| Top |
| GtkWidget * | e_header_bar_button_new () |
| void | e_header_bar_button_add_action () |
| void | e_header_bar_button_take_menu () |
| void | e_header_bar_button_css_add_class () |
| void | e_header_bar_button_add_accelerator () |
| void | e_header_bar_button_get_widths () |
| gboolean | e_header_bar_button_get_show_icon_only () |
| void | e_header_bar_button_set_show_icon_only () |
| EUIAction * | action | Read / Write |
| char * | label | Read / Write / Construct Only |
| char * | prefer-item | Read / Write |
| EUIManager * | ui-manager | Read / Write / Construct Only |
GObject
╰── GInitiallyUnowned
╰── GtkWidget
╰── GtkContainer
╰── GtkBox
╰── EHeaderBarButton
GtkWidget * e_header_bar_button_new (const gchar *label,EUIAction *action,EUIManager *ui_manager);
Creates a new EHeaderBarButton labeled with label
.
If action is NULL, button will use default preferred menu action if available,
see e_header_bar_button_take_menu().
label |
a button label |
|
action |
an EUIAction overriding menu default action |
|
ui_manager |
an EUIManager to get an icon for the |
Since: 3.56
void e_header_bar_button_add_action (EHeaderBarButton *header_bar_button,const gchar *label,EUIAction *action);
Adds a new button with a related action.
header_bar_button |
||
label |
The text you want the GtkButton to hold. |
|
action |
GtkButton related action |
Since: 3.56
void e_header_bar_button_take_menu (EHeaderBarButton *header_bar_button,GtkWidget *menu);
Sets the GtkMenu that will be popped up when the menu_button
is clicked, or
NULL to dissociate any existing menu and disable the dropdown button.
If current EHeaderBarButton action is NULL, clicking the button will fire
the preferred item, if set, or the first menu item otherwise.
header_bar_button |
||
menu |
A GtkMenu, or |
[transfer full][nullable] |
Since: 3.46
void e_header_bar_button_css_add_class (EHeaderBarButton *header_bar_button,const gchar *class);
Adds a CSS class to EHeaderBarButton main button
Since: 3.46
void e_header_bar_button_add_accelerator (EHeaderBarButton *header_bar_button,GtkAccelGroup *accel_group,guint accel_key,GdkModifierType accel_mods,GtkAccelFlags accel_flags);
Installs an accelerator for main action
header_bar_button |
EHeaderBarButton to activate |
|
accel_group |
Accel group for this widget, added to its toplevel. |
|
accel_key |
GDK keyval of the accelerator |
|
accel_mods |
Modifier key combination of the accelerator. |
|
accel_flags |
Flag accelerators, e.g. GTK_ACCEL_VISIBLE |
Since: 3.46
void e_header_bar_button_get_widths (EHeaderBarButton *self,gint *out_labeled_width,gint *out_icon_only_width);
Returns expected width of the button when it has set a label and when only icon is shown. When either of the two is -1, the width could not be calculated, like when the button cannot have (un)set the label, then the out_icon_only_width is set to -1.
self |
||
out_labeled_width |
return location for width of the button with the label. |
[out] |
out_icon_only_width |
return location for width of the button with the icon only. |
[out] |
Since: 3.48
gboolean
e_header_bar_button_get_show_icon_only
(EHeaderBarButton *self);
Returns whether the button shows only icon, without label.
Returns FALSE, when the label cannot be (un)set.
Since: 3.48
void e_header_bar_button_set_show_icon_only (EHeaderBarButton *self,gboolean show_icon_only);
Changes button's appearance between showing only icon and showing label with an icon. The function does nothing, when the label cannot be (un)set.
Since: 3.48
“action” property“action” EUIAction *
Button action.
Owner: EHeaderBarButton
Flags: Read / Write
“label” property “label” char *
Button label.
Owner: EHeaderBarButton
Flags: Read / Write / Construct Only
Default value: NULL
“prefer-item” property “prefer-item” char *
Name of an item to show instead of the first.
Owner: EHeaderBarButton
Flags: Read / Write
Default value: NULL
“ui-manager” property“ui-manager” EUIManager *
Owner: EHeaderBarButton
Flags: Read / Write / Construct Only