Top | ![]() |
![]() |
![]() |
![]() |
EUIMenu * | e_ui_menu_new () |
EUIManager * | e_ui_menu_get_manager () |
const gchar * | e_ui_menu_get_id () |
void | e_ui_menu_append_item () |
void | e_ui_menu_append_section () |
void | e_ui_menu_track_action () |
void | e_ui_menu_freeze () |
void | e_ui_menu_thaw () |
gboolean | e_ui_menu_is_frozen () |
void | e_ui_menu_rebuild () |
void | e_ui_menu_remove_all () |
char * | id | Read / Write / Construct Only |
EUIManager * | manager | Read / Write / Construct Only |
EUIMenu is a GMenuModel descendant, which takes care of an EUIAction visibility and regenerates its content when any of the actions hides/shows itself or when the associated EUIManager changes.
The object is not thread-safe, it's meant to be used only from the main/GUI thread.
EUIMenu * e_ui_menu_new (EUIManager *manager
,const gchar *id
);
Creates a new EUIMenu, which will use the manager
to get
its content from under identifier id
.
Since: 3.56
EUIManager *
e_ui_menu_get_manager (EUIMenu *self
);
Gets an associated EUIManager.
Since: 3.56
const gchar *
e_ui_menu_get_id (EUIMenu *self
);
Gets an identifier of the menu to populate the self
with.
Since: 3.56
void e_ui_menu_append_item (EUIMenu *self
,EUIAction *action
,GMenuItem *item
);
Appends a GMenuItem descendant item
into the menu, which can
be related to the action
. When the action
is not NULL
, its
state is tracked and the menu is regenerated whenever the state
changed (and when needed).
Since: 3.56
void e_ui_menu_append_section (EUIMenu *self
,GMenuModel *section
);
Appends a GMenuModel as a new section in the self
.
Since: 3.56
void e_ui_menu_track_action (EUIMenu *self
,EUIAction *action
);
Tracks a state change of the action
and regenerates the menu
content when needed.
Since: 3.56
void
e_ui_menu_freeze (EUIMenu *self
);
Freezes rebuild of the menu content. Useful when filling the content.
The function can be called multiple times, only each call needs
a pair call of the e_ui_menu_thaw()
to revert the effect of this function.
Since: 3.56
void
e_ui_menu_thaw (EUIMenu *self
);
Pair function for the e_ui_menu_freeze()
. It's a programming
error to thaw a menu, which is not frozen.
Since: 3.56
gboolean
e_ui_menu_is_frozen (EUIMenu *self
);
Gets whether the self
is frozen for rebuild. It can be frozen with
the e_ui_menu_freeze()
and unfrozen with the e_ui_menu_thaw()
.
Since: 3.56
void
e_ui_menu_rebuild (EUIMenu *self
);
Rebuilds the self
content. If the rebuild is frozen (see e_ui_menu_freeze()
),
the rebuild is postponed until the rebuild is allowed again.
Since: 3.56
“id”
property “id” char *
Identifier of the menu to be read from the EUIManager.
Owner: EUIMenu
Flags: Read / Write / Construct Only
Default value: NULL
Since: 3.56
“manager”
property“manager” EUIManager *
An EUIManager associated with the menu.
Owner: EUIMenu
Flags: Read / Write / Construct Only
Since: 3.56