pub trait PanelFrameExt: 'static {
Show 24 methods // Required methods fn add(&self, panel: &impl IsA<Widget>); fn add_before(&self, panel: &impl IsA<Widget>, sibling: &impl IsA<Widget>); fn is_closeable(&self) -> bool; fn is_empty(&self) -> bool; fn header(&self) -> Option<FrameHeader>; fn n_pages(&self) -> u32; fn page(&self, n: u32) -> Option<Widget>; fn pages(&self) -> SelectionModel; fn placeholder(&self) -> Option<Widget>; fn position(&self) -> Position; fn requested_size(&self) -> i32; fn visible_child(&self) -> Option<Widget>; fn remove(&self, panel: &impl IsA<Widget>); fn set_child_pinned(&self, child: &impl IsA<Widget>, pinned: bool); fn set_header(&self, header: Option<&impl IsA<FrameHeader>>); fn set_placeholder(&self, placeholder: Option<&impl IsA<Widget>>); fn set_requested_size(&self, requested_size: i32); fn set_visible_child(&self, widget: &impl IsA<Widget>); fn connect_adopt_widget<F: Fn(&Self, &Widget) -> bool + 'static>( &self, f: F ) -> SignalHandlerId; fn connect_page_closed<F: Fn(&Self, &Widget) + 'static>( &self, f: F ) -> SignalHandlerId; fn connect_closeable_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId; fn connect_empty_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId; fn connect_placeholder_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId; fn connect_visible_child_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId;
}
Expand description

Trait containing all Frame methods.

Implementors

Frame

Required Methods§

source

fn add(&self, panel: &impl IsA<Widget>)

Adds a widget to the frame.

panel

a Widget to add

source

fn add_before(&self, panel: &impl IsA<Widget>, sibling: &impl IsA<Widget>)

Add panel before sibling in the Frame.

panel

the Widget to add.

sibling

the sibling Widget to add the panel before.

source

fn is_closeable(&self) -> bool

Tells if the panel frame is closeable.

Returns

true if the panel frame is closeable.

source

fn is_empty(&self) -> bool

Tells if the panel frame is empty.

Returns

true if the panel is empty.

source

fn header(&self) -> Option<FrameHeader>

Gets the header for the frame.

Returns

a FrameHeader or None

source

fn n_pages(&self) -> u32

Gets the number of pages in the panel frame.

Returns

The number of pages.

source

fn page(&self, n: u32) -> Option<Widget>

Gets the page with the given index, if any.

n

the index of the page

Returns

a Widget or None

source

fn pages(&self) -> SelectionModel

Get the pages for the frame.

Returns

a gtk::SelectionModel

source

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

Gets the placeholder widget, if any.

Returns

a gtk::Widget or None

source

fn position(&self) -> Position

Gets the Position for the frame.

Returns

a Position

source

fn requested_size(&self) -> i32

Gets the requested size for the panel frame.

Returns

the requested size.

source

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

Gets the widget of the currently visible child.

Returns

a Widget or None

source

fn remove(&self, panel: &impl IsA<Widget>)

Removes a widget from the frame.

panel

a Widget to remove.

source

fn set_child_pinned(&self, child: &impl IsA<Widget>, pinned: bool)

Available on crate feature v1_2 only.

Set pinned state of child.

child

a Widget

pinned

if widget should be pinned

source

fn set_header(&self, header: Option<&impl IsA<FrameHeader>>)

Sets the header for the frame, such as a FrameSwitcher.

a FrameHeader

source

fn set_placeholder(&self, placeholder: Option<&impl IsA<Widget>>)

Sets the placeholder widget for the frame.

The placeholder widget is displayed when there are no pages to display in the frame.

placeholder

a gtk::Widget or None

source

fn set_requested_size(&self, requested_size: i32)

Sets the requested size for the panel frame.

requested_size

the requested size.

source

fn set_visible_child(&self, widget: &impl IsA<Widget>)

Sets the current page to the child specified in widget.

widget

a Widget

source

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

Available on crate feature v1_2 only.

This signal is emitted when the frame should decide if it can adopt a Widget dropped on the frame.

If GDK_EVENT_STOP is returned, then the widget will not be adopted.

widget

a Widget

Returns

GDK_EVENT_STOP or GDK_EVENT_PROPAGATE

source

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

Available on crate feature v1_2 only.

This signal is emitted when the page widget will be closed.

widget

a Widget

source

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

source

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

source

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

source

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

Implementors§

source§

impl<O: IsA<Frame>> FrameExt for O