Struct flo_ui::control::Control
[−]
[src]
pub struct Control { /* fields omitted */ }
Represents a control
Methods
impl Control
[src]
pub fn new(control_type: ControlType) -> Control
[src]
Creates a new control of a particular type
pub fn container() -> Control
[src]
Creates a new container control
pub fn cropping_container() -> Control
[src]
Creates a new cropping container control
pub fn scrolling_container() -> Control
[src]
Creates a new scrolling container control
pub fn popup() -> Control
[src]
Creates a new popup control
[src]
Creates a new button control
pub fn label() -> Control
[src]
Creates a new label control
pub fn empty() -> Control
[src]
Create a new empty control
pub fn canvas() -> Control
[src]
Creates a new canvas control
pub fn slider() -> Control
[src]
Creates a new slider control
pub fn rotor() -> Control
[src]
Creates a new rotor control
pub fn add_attribute(&mut self, attribute: ControlAttribute)
[src]
Adds an attribute to this control
pub fn with<T: ControlModifier>(self, modifier: T) -> Control
[src]
Creates a control with some attributes added to it
pub fn with_controller(self, controller: &str) -> Control
[src]
Creates a control with an added controller
ⓘImportant traits for Box<W>pub fn attributes<'a>(
&'a self
) -> Box<Iterator<Item = &'a ControlAttribute> + 'a>
[src]
&'a self
) -> Box<Iterator<Item = &'a ControlAttribute> + 'a>
Returns an iterator over the attributes for this control
pub fn control_type(&self) -> ControlType
[src]
The type of this control
pub fn has_attribute_flat(&self, attr: &ControlAttribute) -> bool
[src]
True if any of the attributes of this control exactly match the specified attribute (using the rules of is_different_flat, so no recursion when there are subcomponents)
pub fn controller<'a>(&'a self) -> Option<&'a str>
[src]
If this control has a controller attribute, finds it
pub fn subcomponents<'a>(&'a self) -> Option<&'a Vec<Control>>
[src]
If this control has a controller attribute, finds it
pub fn bounding_box<'a>(&'a self) -> Option<&'a Bounds>
[src]
Finds the bounding box for this control if it exists
pub fn canvas_resource<'a>(&'a self) -> Option<&Resource<BindingCanvas>>
[src]
If this control has a canvas attribute, finds it
pub fn all_controllers(&self) -> Vec<String>
[src]
Finds the names of all of the controllers referenced by this control and its subcontrols
pub fn map<TFn: Fn(&Control) -> Control>(&self, map_fn: &TFn) -> Control
[src]
Visits the control tree and performs a mapping function on each item
Trait Implementations
impl ToJsonValue for Control
[src]
impl Clone for Control
[src]
fn clone(&self) -> Control
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Control
[src]
fn eq(&self, __arg_0: &Control) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Control) -> bool
[src]
This method tests for !=
.
impl Debug for Control
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl DiffableTree for Control
[src]
fn child_nodes<'a>(&'a self) -> Vec<&'a Self>
[src]
Retrieves the child nodes of this item Read more
fn is_different(&self, compare_to: &Self) -> bool
[src]
Returns true if this node is different from the specified node (excluding child nodes) Read more