Trait components::WidgetExt [−][src]
pub trait WidgetExt: 'static {}Show methods
fn apply_style<P: Is<Style>>(&self, style: &P); fn get_available_area(&self, allocation: &ActorBox, area: &mut ActorBox); fn get_background_color(&self) -> Option<Color>; fn get_background_texture(&self) -> Option<Handle>; fn get_disabled(&self) -> bool; fn get_padding(&self) -> Padding; fn long_press_cancel(&self); fn long_press_query(&self, event: &mut Event); fn set_disabled(&self, disabled: bool); fn connect_property_disabled_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_menu_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_tooltip_delay_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_tooltip_text_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
Required methods
fn apply_style<P: Is<Style>>(&self, style: &P)
[src]
widget_apply_style: @widget: A #Widget @style: A #Style
Used to implement how a new style instance should be applied in the widget. For instance, setting style instance on stylable internal children.
fn get_available_area(&self, allocation: &ActorBox, area: &mut ActorBox)
[src]
get_available_area: @widget: A #Widget @allocation: A #ActorBox @area: A #ActorBox
Copies @allocation into @area and accounts for the padding values. This gives the area that is available in which to allocate children with respect to padding.
fn get_background_color(&self) -> Option<Color>
[src]
get_background_color: @actor: A #Widget
Get the color used as the background. This is set using the “background-color” CSS property. This function should normally only be used by subclasses.
Returns: (transfer none): a #Color
fn get_background_texture(&self) -> Option<Handle>
[src]
fn get_disabled(&self) -> bool
[src]
get_disabled: @widget: an #Widget
Get the value of the “disabled” property.
fn get_padding(&self) -> Padding
[src]
get_padding: @widget: A #Widget @padding: (out): A pointer to an #Padding to fill
Gets the padding of the widget, set using the “padding” CSS property. This function should normally only be used by subclasses.
fn long_press_cancel(&self)
[src]
long_press_cancel: @widget: An Widget
Cancel a long-press timeout if one is running and emit the signal to notify that the long-press has been cancelled.
fn long_press_query(&self, event: &mut Event)
[src]
long_press_query: @widget: An Widget @event: the event used to determine whether to run a long-press
Emit the long-press query signal and start a long-press timeout if required.
fn set_disabled(&self, disabled: bool)
[src]
widget_set_disabled: @widget: an #Widget @disabled: value to set
Set the disabled property. Disabled widgets have a “disabled” pseudo-class until disabled is set to #false.
fn connect_property_disabled_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_menu_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_tooltip_delay_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_tooltip_text_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: Is<Widget>> WidgetExt for O
[src]
fn apply_style<P: Is<Style>>(&self, style: &P)
[src]
widget_apply_style: @widget: A #Widget @style: A #Style
Used to implement how a new style instance should be applied in the widget. For instance, setting style instance on stylable internal children.
fn get_available_area(&self, allocation: &ActorBox, area: &mut ActorBox)
[src]
get_available_area: @widget: A #Widget @allocation: A #ActorBox @area: A #ActorBox
Copies @allocation into @area and accounts for the padding values. This gives the area that is available in which to allocate children with respect to padding.
fn get_background_color(&self) -> Option<Color>
[src]
get_background_color: @actor: A #Widget
Get the color used as the background. This is set using the “background-color” CSS property. This function should normally only be used by subclasses.
Returns: (transfer none): a #Color
fn get_background_texture(&self) -> Option<Handle>
[src]
fn get_disabled(&self) -> bool
[src]
get_disabled: @widget: an #Widget
Get the value of the “disabled” property.
fn get_padding(&self) -> Padding
[src]
get_padding: @widget: A #Widget @padding: (out): A pointer to an #Padding to fill
Gets the padding of the widget, set using the “padding” CSS property. This function should normally only be used by subclasses.
fn long_press_cancel(&self)
[src]
long_press_cancel: @widget: An Widget
Cancel a long-press timeout if one is running and emit the signal to notify that the long-press has been cancelled.
fn long_press_query(&self, event: &mut Event)
[src]
long_press_query: @widget: An Widget @event: the event used to determine whether to run a long-press
Emit the long-press query signal and start a long-press timeout if required.
fn set_disabled(&self, disabled: bool)
[src]
widget_set_disabled: @widget: an #Widget @disabled: value to set
Set the disabled property. Disabled widgets have a “disabled” pseudo-class until disabled is set to #false.
fn connect_property_disabled_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_menu_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_tooltip_delay_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_tooltip_text_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId