GObject.Object
Gtk.UIManager
Import line: | Gtk = imports.gi.Gtk; |
GIR File: | Gtk-3.0.gir |
C documentation: | GtkUIManager |
Class : | UIManager |
Implements: | Gtk.Buildable |
Extends: | GObject.Object |
Properties | Defined By | |
---|---|---|
add_tearoffs : gboolean
The "add-tearoffs" property controls whether generated menus
have tearoff menu items. The "add-tearoffs" property controls whether generated menus
have tearoff menu items. Note that this only affects regular menus. Generated popup menus never have tearoff menu items. |
Gtk.UIManager | |
parent : GObject.Object
read only
|
Gtk.UIManager | |
private_data : Gtk.UIManagerPrivate
read only
|
Gtk.UIManager | |
ui : String
read only
|
Gtk.UIManager |
Method / Constructor | Defined By | |
---|---|---|
new Gtk.UIManager
(Object properties)
Create a new Gtk.UIManager
Create a new Gtk.UIManager
|
||
Adds a child to buildable.
Adds a child to buildable. type is an optional string
describing how the child should be added.
|
Gtk.Buildable | |
add_ui
(guint32 merge_id, String path, String name, String action, UIManagerItemType type, gboolean top)
:
none
Adds a UI element to the current contents of manager.
Adds a UI element to the current contents of manager.
If type is GTK_UI_MANAGER_AUTO, GTK+ inserts a menuitem, toolitem or separator if such an element can be inserted at the place determined by the place determined by path. If path points to a menuitem or toolitem, the new element will be inserted before or after this item, depending on top.
|
Gtk.UIManager | |
Parses a file containing a UI definition and
merges it with the current contents of manager.
Parses a file containing a UI definition and
merges it with the current contents of manager. to unmerge the UI with gtk_ui_manager_remove_ui(). If an error occurred, the return value is 0.
|
Gtk.UIManager | |
Parses a string containing a UI definition and
merges it with the current contents of manager.
Parses a string containing a UI definition and
merges it with the current contents of manager. An enclosing <ui> element is added if it is missing. to unmerge the UI with gtk_ui_manager_remove_ui(). If an error occurred, the return value is 0.
|
Gtk.UIManager | |
Constructs a child of buildable with the name name.
Constructs a child of buildable with the name name.
GtkBuilder calls this function if a "constructor" has been specified in the UI definition.
|
Gtk.Buildable | |
This is similar to gtk_buildable_parser_finished() but is
called once for each custom tag handled by the buildable.
This is similar to gtk_buildable_parser_finished() but is
called once for each custom tag handled by the buildable.
|
Gtk.Buildable | |
This is called at the end of each custom element handled by
the buildable.
This is called at the end of each custom element handled by
the buildable.
|
Gtk.Buildable | |
This is called for each unknown element under <child>.
This is called for each unknown element under <child>.
if it doesn't.
|
Gtk.Buildable | |
ensure_update
()
:
none
Makes sure that all pending updates to the UI have been completed.
Makes sure that all pending updates to the UI have been completed.
This may occasionally be necessary, since GtkUIManager updates the UI in an idle function. A typical example where this function is useful is to enforce that the menubar and toolbar have been added to the main window before showing it: |[ gtk_container_add (GTK_CONTAINER (window), vbox); g_signal_connect (merge, "add-widget", G_CALLBACK (add_widget), vbox); gtk_ui_manager_add_ui_from_file (merge, "my-menus"); gtk_ui_manager_add_ui_from_file (merge, "my-toolbars"); gtk_ui_manager_ensure_update (merge); gtk_widget_show (window); ]|
|
Gtk.UIManager | |
get_accel_group
()
:
Gtk.AccelGroup
Returns the GtkAccelGroup associated with manager.
Returns the GtkAccelGroup associated with manager.
|
Gtk.UIManager | |
get_action
(String path)
:
Gtk.Action
Looks up an action by following a path.
Looks up an action by following a path. See gtk_ui_manager_get_widget()
for more information about paths. or NULL if no widget was found.
|
Gtk.UIManager | |
get_action_groups
()
:
Array
Returns the list of action groups associated with manager.
Returns the list of action groups associated with manager.
action groups. The list is owned by GTK+ and should not be modified.
|
Gtk.UIManager | |
get_add_tearoffs
()
:
gboolean
Returns whether menus generated by this GtkUIManager
will have tearoff menu items.
Returns whether menus generated by this GtkUIManager
will have tearoff menu items.
|
Gtk.UIManager | |
Get the internal child called childname of the buildable object.
Get the internal child called childname of the buildable object.
|
Gtk.Buildable | |
get_name
()
:
String
Gets the name of the buildable object.
Gets the name of the buildable object.
GtkBuilder sets the name based on the the GtkBuilder UI definition used to construct the buildable.
|
Gtk.Buildable | |
get_toplevels
(UIManagerItemType types)
:
Array
Obtains a list of all toplevel widgets of the requested types.
Obtains a list of all toplevel widgets of the requested types.
all toplevel widgets of the requested types. Free the returned list with g_slist_free().
|
Gtk.UIManager | |
get_ui
()
:
String
Creates a UI definition of the merged UI.
Creates a UI definition of the merged UI.
the merged UI.
|
Gtk.UIManager | |
get_widget
(String path)
:
Gtk.Widget
Looks up a widget by following a path.
Looks up a widget by following a path.
The path consists of the names specified in the XML description of the UI. separated by '/'. Elements which don't have a name or action attribute in the XML (e.g. <popup>) can be addressed by their XML element name (e.g. "popup"). The root element ("/ui") can be omitted in the path. Note that the widget found by following a path that ends in a <menu> element is the menuitem to which the menu is attached, not the menu itmanager. Also note that the widgets constructed by a ui manager are not tied to the lifecycle of the ui manager. If you add the widgets returned by this function to some container or explicitly ref them, they will survive the destruction of the ui manager. was found.
|
Gtk.UIManager | |
insert_action_group
(ActionGroup action_group, gint32 pos)
:
none
Inserts an action group into the list of action groups associated
with manager.
Inserts an action group into the list of action groups associated
with manager. Actions in earlier groups hide actions with the same name in later groups.
|
Gtk.UIManager | |
new_merge_id
()
:
guint32
Returns an unused merge id, suitable for use with
gtk_ui_manager_add_ui().
Returns an unused merge id, suitable for use with
gtk_ui_manager_add_ui().
|
Gtk.UIManager | |
parser_finished
(Builder builder)
:
none
Called when the builder finishes the parsing of a
GtkBuilder UI definition.
Called when the builder finishes the parsing of a
GtkBuilder UI definition. Note that this will be called once for each time gtk_builder_add_from_file() or gtk_builder_add_from_string() is called on a builder.
|
Gtk.Buildable | |
remove_action_group
(ActionGroup action_group)
:
none
Removes an action group from the list of action groups associated
with manager.
Removes an action group from the list of action groups associated
with manager.
|
Gtk.UIManager | |
remove_ui
(guint32 merge_id)
:
none
Unmerges the part of managers content identified by merge_id.
Unmerges the part of managers content identified by merge_id.
|
Gtk.UIManager | |
set_add_tearoffs
(gboolean add_tearoffs)
:
none
Sets the "add_tearoffs" property, which controls whether menus
generated by this GtkUIManager will have tearoff menu items.
Sets the "add_tearoffs" property, which controls whether menus
generated by this GtkUIManager will have tearoff menu items. Note that this only affects regular menus. Generated popup menus never have tearoff menu items.
|
Gtk.UIManager | |
Sets the property name name to value on the buildable object.
Sets the property name name to value on the buildable object.
|
Gtk.Buildable | |
set_name
(String name)
:
none
Sets the name of the buildable object.
Sets the name of the buildable object.
|
Gtk.Buildable |
Event | Defined By | |
---|---|---|
actions_changed (UIManager self)
:
none
The ::actions-changed signal is emitted whenever the set of actions
changes.
The ::actions-changed signal is emitted whenever the set of actions
changes.
|
Gtk.UIManager | |
The ::add-widget signal is emitted for each generated menubar and toolbar.
The ::add-widget signal is emitted for each generated menubar and toolbar.
It is not emitted for generated popup menus, which can be obtained by gtk_ui_manager_get_widget().
|
Gtk.UIManager | |
The ::connect-proxy signal is emitted after connecting a proxy to
an action in the group.
The ::connect-proxy signal is emitted after connecting a proxy to
an action in the group. This is intended for simple customizations for which a custom action class would be too clumsy, e.g. showing tooltips for menuitems in the statusbar.
|
Gtk.UIManager | |
The ::disconnect-proxy signal is emitted after disconnecting a proxy
from an action in the group.
The ::disconnect-proxy signal is emitted after disconnecting a proxy
from an action in the group.
|
Gtk.UIManager | |
The ::post-activate signal is emitted just after the action
is activated.
The ::post-activate signal is emitted just after the action
is activated. This is intended for applications to get notification just after any action is activated.
|
Gtk.UIManager | |
The ::pre-activate signal is emitted just before the action
is activated.
The ::pre-activate signal is emitted just before the action
is activated. This is intended for applications to get notification just before any action is activated.
|
Gtk.UIManager |