EHeaderBarButton

EHeaderBarButton

Functions

Properties

GtkAction * action Read / Write / Construct Only
char * label Read / Write / Construct Only
char * prefer-item Read / Write

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBox
                    ╰── EHeaderBarButton

Description

Functions

e_header_bar_button_new ()

GtkWidget *
e_header_bar_button_new (const gchar *label,
                         GtkAction *action);

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().

Parameters

action

An action overriding menu default action

 

Returns

a new EHeaderBarButton.

[transfer full]

Since: 3.46


e_header_bar_button_add_action ()

void
e_header_bar_button_add_action (EHeaderBarButton *header_bar_button,
                                const gchar *label,
                                GtkAction *action);

Adds a new button with a related action.

Parameters

header_bar_button

EHeaderBarButton

 

label

The text you want the GtkButton to hold.

 

action

GtkButton related action

 

Since: 3.46


e_header_bar_button_take_menu ()

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.

Parameters

header_bar_button

EHeaderBarButton

 

menu

A GtkMenu, or NULL to unset and disable the dropdown button.

[transfer full][nullable]

Since: 3.46


e_header_bar_button_css_add_class ()

void
e_header_bar_button_css_add_class (EHeaderBarButton *header_bar_button,
                                   const gchar *class);

Adds a CSS class to EHeaderBarButton main button

Parameters

header_bar_button

EHeaderBarButton

 

class_name

a CSS class name

 

Since: 3.46


e_header_bar_button_add_accelerator ()

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

Parameters

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

Property Details

The “action” property

  “action”                   GtkAction *

Button action.

Owner: EHeaderBarButton

Flags: Read / Write / Construct Only


The “label” property

  “label”                    char *

Button label.

Owner: EHeaderBarButton

Flags: Read / Write / Construct Only

Default value: NULL


The “prefer-item” property

  “prefer-item”              char *

Name of an item to show instead of the first.

Owner: EHeaderBarButton

Flags: Read / Write

Default value: NULL