Top | ![]() |
![]() |
![]() |
![]() |
GtkWidget * | adw_header_bar_new () |
GtkWidget * | adw_header_bar_get_title_widget () |
void | adw_header_bar_set_title_widget () |
void | adw_header_bar_pack_start () |
void | adw_header_bar_pack_end () |
void | adw_header_bar_remove () |
gboolean | adw_header_bar_get_show_start_title_buttons () |
void | adw_header_bar_set_show_start_title_buttons () |
gboolean | adw_header_bar_get_show_end_title_buttons () |
void | adw_header_bar_set_show_end_title_buttons () |
const char * | adw_header_bar_get_decoration_layout () |
void | adw_header_bar_set_decoration_layout () |
AdwCenteringPolicy | adw_header_bar_get_centering_policy () |
void | adw_header_bar_set_centering_policy () |
AdwCenteringPolicy | centering-policy | Read / Write |
char * | decoration-layout | Read / Write |
gboolean | show-end-title-buttons | Read / Write |
gboolean | show-start-title-buttons | Read / Write |
GtkWidget * | title-widget | Read / Write |
GtkWidget *
adw_header_bar_new (void
);
Creates a new AdwHeaderBar widget.
Since: 1.0
GtkWidget *
adw_header_bar_get_title_widget (AdwHeaderBar *self
);
Retrieves the title widget widget of the header. See
adw_header_bar_set_title_widget()
.
the title widget
of the header, or NULL
if none has been set explicitly.
[nullable][transfer none]
Since: 1.0
void adw_header_bar_set_title_widget (AdwHeaderBar *self
,GtkWidget *title_widget
);
Sets the title for the AdwHeaderBar.
When set to NULL
, the headerbar will display the title of the window it is
contained in.
The title should help a user identify the current view. To achieve the same style as the builtin title, use the “title” style class.
You should set the title widget to NULL
, for the window title label to be
visible again.
Since: 1.0
void adw_header_bar_pack_start (AdwHeaderBar *self
,GtkWidget *child
);
Adds child
to self
, packed with reference to the
start of the self
.
Since: 1.0
void adw_header_bar_pack_end (AdwHeaderBar *self
,GtkWidget *child
);
Adds child
to self
, packed with reference to the
end of the self
.
Since: 1.0
void adw_header_bar_remove (AdwHeaderBar *self
,GtkWidget *child
);
Removes a child from self
, after it has been added
with adw_header_bar_pack_start()
, adw_header_bar_pack_end()
or adw_header_bar_set_title_widget()
.
Since: 1.0
gboolean
adw_header_bar_get_show_start_title_buttons
(AdwHeaderBar *self
);
Returns whether this header bar shows the standard window title buttons.
Since: 1.0
void adw_header_bar_set_show_start_title_buttons (AdwHeaderBar *self
,gboolean setting
);
Sets whether this header bar shows the standard window title buttons including close, maximize, and minimize.
Since: 1.0
gboolean
adw_header_bar_get_show_end_title_buttons
(AdwHeaderBar *self
);
Returns whether this header bar shows the standard window title buttons.
Since: 1.0
void adw_header_bar_set_show_end_title_buttons (AdwHeaderBar *self
,gboolean setting
);
Sets whether this header bar shows the standard window title buttons including close, maximize, and minimize.
Since: 1.0
const char *
adw_header_bar_get_decoration_layout (AdwHeaderBar *self
);
Gets the decoration layout set with
adw_header_bar_set_decoration_layout()
.
Since: 1.0
void adw_header_bar_set_decoration_layout (AdwHeaderBar *self
,const char *layout
);
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 and icon (the window icon).
For example, “icon:minimize,maximize,close” specifies an icon on the left, and minimize, maximize and close buttons on the right.
Since: 1.0
AdwCenteringPolicy
adw_header_bar_get_centering_policy (AdwHeaderBar *self
);
Gets the policy self
follows to horizontally align its center widget.
Since: 1.0
void adw_header_bar_set_centering_policy (AdwHeaderBar *self
,AdwCenteringPolicy centering_policy
);
Sets the policy self
must follow to horizontally align its center widget.
Since: 1.0
“centering-policy”
property“centering-policy” AdwCenteringPolicy
The policy to horizontally align the center widget.
Owner: AdwHeaderBar
Flags: Read / Write
Default value: ADW_CENTERING_POLICY_LOOSE
“decoration-layout”
property “decoration-layout” char *
The decoration layout for buttons. If this property is not set, the “gtk-decoration-layout” setting is used.
See adw_header_bar_set_decoration_layout()
for information
about the format of this string.
Owner: AdwHeaderBar
Flags: Read / Write
Default value: NULL
Since: 1.0
“show-end-title-buttons”
property “show-end-title-buttons” gboolean
Whether to show title buttons like close, minimize, maximize.
Which buttons are actually shown and where is determined by the “decoration-layout” property, and by the state of the window (e.g. a close button will not be shown if the window can't be closed).
Owner: AdwHeaderBar
Flags: Read / Write
Default value: TRUE
Since: 1.0
“show-start-title-buttons”
property “show-start-title-buttons” gboolean
Whether to show title buttons like close, minimize, maximize.
Which buttons are actually shown and where is determined by the “decoration-layout” property, and by the state of the window (e.g. a close button will not be shown if the window can't be closed).
Owner: AdwHeaderBar
Flags: Read / Write
Default value: TRUE
Since: 1.0