[][src]Trait gtk::StackExt

pub trait StackExt: 'static {
    fn add_named<P: IsA<Widget>>(&self, child: &P, name: &str);
fn add_titled<P: IsA<Widget>>(&self, child: &P, name: &str, title: &str);
fn get_child_by_name(&self, name: &str) -> Option<Widget>;
fn get_hhomogeneous(&self) -> bool;
fn get_homogeneous(&self) -> bool;
fn get_interpolate_size(&self) -> bool;
fn get_transition_duration(&self) -> u32;
fn get_transition_running(&self) -> bool;
fn get_transition_type(&self) -> StackTransitionType;
fn get_vhomogeneous(&self) -> bool;
fn get_visible_child(&self) -> Option<Widget>;
fn get_visible_child_name(&self) -> Option<GString>;
fn set_hhomogeneous(&self, hhomogeneous: bool);
fn set_homogeneous(&self, homogeneous: bool);
fn set_interpolate_size(&self, interpolate_size: bool);
fn set_transition_duration(&self, duration: u32);
fn set_transition_type(&self, transition: StackTransitionType);
fn set_vhomogeneous(&self, vhomogeneous: bool);
fn set_visible_child<P: IsA<Widget>>(&self, child: &P);
fn set_visible_child_full(
        &self,
        name: &str,
        transition: StackTransitionType
    );
fn set_visible_child_name(&self, name: &str);
fn get_property_interpolate_size(&self) -> bool;
fn set_property_interpolate_size(&self, interpolate_size: bool);
fn get_child_icon_name<T: IsA<Widget>>(&self, item: &T) -> Option<GString>;
fn set_child_icon_name<T: IsA<Widget>>(
        &self,
        item: &T,
        icon_name: Option<&str>
    );
fn get_child_name<T: IsA<Widget>>(&self, item: &T) -> Option<GString>;
fn set_child_name<T: IsA<Widget>>(&self, item: &T, name: Option<&str>);
fn get_child_needs_attention<T: IsA<Widget>>(&self, item: &T) -> bool;
fn set_child_needs_attention<T: IsA<Widget>>(
        &self,
        item: &T,
        needs_attention: bool
    );
fn get_child_position<T: IsA<Widget>>(&self, item: &T) -> i32;
fn set_child_position<T: IsA<Widget>>(&self, item: &T, position: i32);
fn get_child_title<T: IsA<Widget>>(&self, item: &T) -> Option<GString>;
fn set_child_title<T: IsA<Widget>>(&self, item: &T, title: Option<&str>);
fn connect_property_hhomogeneous_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_homogeneous_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_interpolate_size_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_transition_duration_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_transition_running_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_transition_type_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_vhomogeneous_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_visible_child_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_visible_child_name_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all Stack methods.

Implementors

Stack

Required methods

fn add_named<P: IsA<Widget>>(&self, child: &P, name: &str)

Adds a child to self. The child is identified by the name.

child

the widget to add

name

the name for child

fn add_titled<P: IsA<Widget>>(&self, child: &P, name: &str, title: &str)

Adds a child to self. The child is identified by the name. The title will be used by StackSwitcher to represent child in a tab bar, so it should be short.

child

the widget to add

name

the name for child

title

a human-readable title for child

fn get_child_by_name(&self, name: &str) -> Option<Widget>

Finds the child of the Stack with the name given as the argument. Returns None if there is no child with this name.

name

the name of the child to find

Returns

the requested child of the Stack

fn get_hhomogeneous(&self) -> bool

Gets whether self is horizontally homogeneous. See StackExt::set_hhomogeneous.

Feature: v3_16

Returns

whether self is horizontally homogeneous.

fn get_homogeneous(&self) -> bool

Gets whether self is homogeneous. See StackExt::set_homogeneous.

Returns

whether self is homogeneous.

fn get_interpolate_size(&self) -> bool

Returns wether the Stack is set up to interpolate between the sizes of children on page switch.

Feature: v3_18

Returns

true if child sizes are interpolated

fn get_transition_duration(&self) -> u32

Returns the amount of time (in milliseconds) that transitions between pages in self will take.

Returns

the transition duration

fn get_transition_running(&self) -> bool

Returns whether the self is currently in a transition from one page to another.

Returns

true if the transition is currently running, false otherwise.

fn get_transition_type(&self) -> StackTransitionType

Gets the type of animation that will be used for transitions between pages in self.

Returns

the current transition type of self

fn get_vhomogeneous(&self) -> bool

Gets whether self is vertically homogeneous. See StackExt::set_vhomogeneous.

Feature: v3_16

Returns

whether self is vertically homogeneous.

fn get_visible_child(&self) -> Option<Widget>

Gets the currently visible child of self, or None if there are no visible children.

Returns

the visible child of the Stack

fn get_visible_child_name(&self) -> Option<GString>

Returns the name of the currently visible child of self, or None if there is no visible child.

Returns

the name of the visible child of the Stack

fn set_hhomogeneous(&self, hhomogeneous: bool)

Sets the Stack to be horizontally homogeneous or not. If it is homogeneous, the Stack will request the same width for all its children. If it isn't, the stack may change width when a different child becomes visible.

Feature: v3_16

hhomogeneous

true to make self horizontally homogeneous

fn set_homogeneous(&self, homogeneous: bool)

Sets the Stack to be homogeneous or not. If it is homogeneous, the Stack will request the same size for all its children. If it isn't, the stack may change size when a different child becomes visible.

Since 3.16, homogeneity can be controlled separately for horizontal and vertical size, with the Stack:hhomogeneous and Stack:vhomogeneous.

homogeneous

true to make self homogeneous

fn set_interpolate_size(&self, interpolate_size: bool)

Sets whether or not self will interpolate its size when changing the visible child. If the Stack:interpolate-size property is set to true, self will interpolate its size between the current one and the one it'll take after changing the visible child, according to the set transition duration.

Feature: v3_18

interpolate_size

the new value

fn set_transition_duration(&self, duration: u32)

Sets the duration that transitions between pages in self will take.

duration

the new duration, in milliseconds

fn set_transition_type(&self, transition: StackTransitionType)

Sets the type of animation that will be used for transitions between pages in self. Available types include various kinds of fades and slides.

The transition type can be changed without problems at runtime, so it is possible to change the animation based on the page that is about to become current.

transition

the new transition type

fn set_vhomogeneous(&self, vhomogeneous: bool)

Sets the Stack to be vertically homogeneous or not. If it is homogeneous, the Stack will request the same height for all its children. If it isn't, the stack may change height when a different child becomes visible.

Feature: v3_16

vhomogeneous

true to make self vertically homogeneous

fn set_visible_child<P: IsA<Widget>>(&self, child: &P)

Makes child the visible child of self.

If child is different from the currently visible child, the transition between the two will be animated with the current transition type of self.

Note that the child widget has to be visible itself (see WidgetExt::show) in order to become the visible child of self.

child

a child of self

fn set_visible_child_full(&self, name: &str, transition: StackTransitionType)

Makes the child with the given name visible.

Note that the child widget has to be visible itself (see WidgetExt::show) in order to become the visible child of self.

name

the name of the child to make visible

transition

the transition type to use

fn set_visible_child_name(&self, name: &str)

Makes the child with the given name visible.

If child is different from the currently visible child, the transition between the two will be animated with the current transition type of self.

Note that the child widget has to be visible itself (see WidgetExt::show) in order to become the visible child of self.

name

the name of the child to make visible

fn get_property_interpolate_size(&self) -> bool

fn set_property_interpolate_size(&self, interpolate_size: bool)

fn get_child_icon_name<T: IsA<Widget>>(&self, item: &T) -> Option<GString>

fn set_child_icon_name<T: IsA<Widget>>(&self, item: &T, icon_name: Option<&str>)

fn get_child_name<T: IsA<Widget>>(&self, item: &T) -> Option<GString>

fn set_child_name<T: IsA<Widget>>(&self, item: &T, name: Option<&str>)

fn get_child_needs_attention<T: IsA<Widget>>(&self, item: &T) -> bool

fn set_child_needs_attention<T: IsA<Widget>>(
    &self,
    item: &T,
    needs_attention: bool
)

fn get_child_position<T: IsA<Widget>>(&self, item: &T) -> i32

fn set_child_position<T: IsA<Widget>>(&self, item: &T, position: i32)

fn get_child_title<T: IsA<Widget>>(&self, item: &T) -> Option<GString>

fn set_child_title<T: IsA<Widget>>(&self, item: &T, title: Option<&str>)

fn connect_property_hhomogeneous_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_homogeneous_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_interpolate_size_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_transition_duration_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_transition_running_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_transition_type_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_vhomogeneous_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_visible_child_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_visible_child_name_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

Loading content...

Implementors

impl<O: IsA<Stack>> StackExt for O[src]

Loading content...