Skip to main content

HeaderBarExt

Trait HeaderBarExt 

Source
pub trait HeaderBarExt: IsA<HeaderBar> + 'static {
Show 30 methods // Provided methods fn custom_title(&self) -> Option<Widget> { ... } fn decoration_layout(&self) -> Option<GString> { ... } fn has_subtitle(&self) -> bool { ... } fn shows_close_button(&self) -> bool { ... } fn subtitle(&self) -> Option<GString> { ... } fn title(&self) -> Option<GString> { ... } fn pack_end(&self, child: &impl IsA<Widget>) { ... } fn pack_start(&self, child: &impl IsA<Widget>) { ... } fn set_custom_title(&self, title_widget: Option<&impl IsA<Widget>>) { ... } fn set_decoration_layout(&self, layout: Option<&str>) { ... } fn set_has_subtitle(&self, setting: bool) { ... } fn set_show_close_button(&self, setting: bool) { ... } fn set_subtitle(&self, subtitle: Option<&str>) { ... } fn set_title(&self, title: Option<&str>) { ... } fn is_decoration_layout_set(&self) -> bool { ... } fn set_decoration_layout_set(&self, decoration_layout_set: bool) { ... } fn spacing(&self) -> i32 { ... } fn set_spacing(&self, spacing: i32) { ... } fn child_pack_type<T: IsA<Widget>>(&self, item: &T) -> PackType { ... } fn set_child_pack_type<T: IsA<Widget>>(&self, item: &T, pack_type: PackType) { ... } fn child_position<T: IsA<Widget>>(&self, item: &T) -> i32 { ... } fn set_child_position<T: IsA<Widget>>(&self, item: &T, position: i32) { ... } fn connect_custom_title_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_decoration_layout_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_decoration_layout_set_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_has_subtitle_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_show_close_button_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_spacing_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_subtitle_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_title_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all HeaderBar methods.

§Implementors

HeaderBar

Provided Methods§

Source

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

Retrieves the custom title widget of the header. See set_custom_title().

§Returns

the custom title widget of the header, or None if none has been set explicitly.

Source

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

Gets the decoration layout set with set_decoration_layout().

§Returns

the decoration layout

Source

fn has_subtitle(&self) -> bool

Retrieves whether the header bar reserves space for a subtitle, regardless if one is currently set or not.

§Returns

true if the header bar reserves space for a subtitle

Source

fn shows_close_button(&self) -> bool

Returns whether this header bar shows the standard window decorations.

§Returns

true if the decorations are shown

Source

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

Retrieves the subtitle of the header. See set_subtitle().

§Returns

the subtitle of the header, or None if none has been set explicitly. The returned string is owned by the widget and must not be modified or freed.

Source

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

Retrieves the title of the header. See set_title().

§Returns

the title of the header, or None if none has been set explicitly. The returned string is owned by the widget and must not be modified or freed.

Source

fn pack_end(&self, child: &impl IsA<Widget>)

Adds child to self, packed with reference to the end of the self.

§child

the Widget to be added to self

Source

fn pack_start(&self, child: &impl IsA<Widget>)

Adds child to self, packed with reference to the start of the self.

§child

the Widget to be added to self

Source

fn set_custom_title(&self, title_widget: Option<&impl IsA<Widget>>)

Sets a custom title for the HeaderBar.

The title should help a user identify the current view. This supersedes any title set by set_title() or set_subtitle(). To achieve the same style as the builtin title and subtitle, use the “title” and “subtitle” style classes.

You should set the custom title to None, for the header title label to be visible again.

§title_widget

a custom widget to use for a title

Source

fn set_decoration_layout(&self, layout: Option<&str>)

Sets the decoration layout for this header bar, overriding the gtk-decoration-layout setting.

There can be valid reasons for overriding the setting, such as a header bar design that does not allow for buttons to take room on the right, or only offers room for a single close button. Split header bars are another example for overriding the setting.

The format of the string is button names, separated by commas. A colon separates the buttons that should appear on the left from those on the right. Recognized button names are minimize, maximize, close, icon (the window icon) and menu (a menu button for the fallback app menu).

For example, “menu:minimize,maximize,close” specifies a menu on the left, and minimize, maximize and close buttons on the right.

§layout

a decoration layout, or None to unset the layout

Source

fn set_has_subtitle(&self, setting: bool)

Sets whether the header bar should reserve space for a subtitle, even if none is currently set.

§setting

true to reserve space for a subtitle

Source

fn set_show_close_button(&self, setting: bool)

Sets whether this header bar shows the standard window decorations, including close, maximize, and minimize.

§setting

true to show standard window decorations

Source

fn set_subtitle(&self, subtitle: Option<&str>)

Sets the subtitle of the HeaderBar. The title should give a user an additional detail to help him identify the current view.

Note that GtkHeaderBar by default reserves room for the subtitle, even if none is currently set. If this is not desired, set the has-subtitle property to false.

§subtitle

a subtitle, or None

Source

fn set_title(&self, title: Option<&str>)

Sets the title of the HeaderBar. The title should help a user identify the current view. A good title should not include the application name.

§title

a title, or None

Source

fn is_decoration_layout_set(&self) -> bool

Set to true if decoration-layout is set.

Source

fn set_decoration_layout_set(&self, decoration_layout_set: bool)

Set to true if decoration-layout is set.

Source

fn spacing(&self) -> i32

Source

fn set_spacing(&self, spacing: i32)

Source

fn child_pack_type<T: IsA<Widget>>(&self, item: &T) -> PackType

Source

fn set_child_pack_type<T: IsA<Widget>>(&self, item: &T, pack_type: PackType)

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§