EUIManager

EUIManager — construct menus and toolbars from a UI definition

Synopsis

#include <e-util/e-util.h>

struct              EUIManager;
GtkUIManager *      e_ui_manager_new                    (void);
gboolean            e_ui_manager_get_express_mode       (EUIManager *ui_manager);
void                e_ui_manager_set_express_mode       (EUIManager *ui_manager,
                                                         gboolean express_mode);
guint               e_ui_manager_add_ui_from_file       (EUIManager *ui_manager,
                                                         const gchar *basename);
guint               e_ui_manager_add_ui_from_string     (EUIManager *ui_manager,
                                                         const gchar *ui_definition,
                                                         GError **error);

Object Hierarchy

  GObject
   +----GtkUIManager
         +----EUIManager

Implemented Interfaces

EUIManager implements GtkBuildable.

Properties

  "express-mode"             gboolean              : Read / Write / Construct

Description

This is a GtkUIManager with support for Evolution's "express" mode, which influences the parsing of UI definitions.

Details

struct EUIManager

struct EUIManager;

e_ui_manager_new ()

GtkUIManager *      e_ui_manager_new                    (void);

Returns a new EUIManager instance.

Returns :

a new EUIManager instance

e_ui_manager_get_express_mode ()

gboolean            e_ui_manager_get_express_mode       (EUIManager *ui_manager);

Returns the "express mode" flag in ui_manager.

ui_manager :

an EUIManager

Returns :

TRUE if ui_manager is set to express mode

e_ui_manager_set_express_mode ()

void                e_ui_manager_set_express_mode       (EUIManager *ui_manager,
                                                         gboolean express_mode);

Sets the "express mode" flag in ui_manager, which influences how UI definitions are loaded.

ui_manager :

an EUIManager

express_mode :

express mode flag

e_ui_manager_add_ui_from_file ()

guint               e_ui_manager_add_ui_from_file       (EUIManager *ui_manager,
                                                         const gchar *basename);

Loads a UI definition into ui_manager from Evolution's UI directory. If the EUIManager:express-mode property is TRUE, a simplified version of the UI may be presented.

Failure here is fatal, since the application can't function without its core UI definitions.

ui_manager :

an EUIManager

basename :

basename of the UI definition file

Returns :

The merge ID for the merged UI. The merge ID can be used to unmerge the UI with gtk_ui_manager_remove_ui().

e_ui_manager_add_ui_from_string ()

guint               e_ui_manager_add_ui_from_string     (EUIManager *ui_manager,
                                                         const gchar *ui_definition,
                                                         GError **error);

Loads the given UI definition into ui_manager. If the EUIManager:express-mode property is TRUE, a simplified version of the UI may be presented.

Failure here is <i>not</i> fatal, since the function is primarily used to load UI definitions for plugins, which we can get by without.

ui_manager :

an EUIManager

ui_definition :

the UI XML in NULL terminated string form

error :

return location for a GError, or NULL

Returns :

The merge ID for the merged UI. The merge ID can be used to unmerge the UI with gtk_ui_manager_remove_ui().

Property Details

The "express-mode" property

  "express-mode"             gboolean              : Read / Write / Construct

Default value: FALSE