Package: gtk

Class gtk-ui-manager

Superclasses

gtk-buildable, g-object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

None

Direct Slots

add-tearoffs
The add-tearoffs property of type :boolean (Read / Write)
Controls whether generated menus have tearoff menu items. Note that this only affects regular menus. Generated popup menus never have tearoff menu items.
Default value: false
ui
The ui property of type :string (Read)
An XML string describing the merged UI.
Default value: "<ui></ui>"

Details

A gtk-ui-manager object constructs a user interface, menus and toolbars, from one or more UI definitions, which reference actions from one or more action groups.

See the GTKUIManager documentation for a description of the UI definitions.

Warning

The gtk-ui-manager class is deprecated since GTK 3.10. To construct user interfaces from XML definitions, you should use the gtk-builder, g-menu-model classes, et al. To work with actions, use the g-action, gtk-actionable classes et al. These newer classes support richer functionality and integration with various desktop shells. It should be possible to migrate most/all functionality from the gtk-ui-manager class.

GtkUIManager as GtkBuildable

The gtk-ui-manager implementation of the gtk-buildable interface accepts gtk-action-group objects as <child> elements in UI definitions. A gtk-ui-manager UI definition can be embedded in an gtk-ui-manager <object> element in a gtk-builder UI definition. The widgets that are constructed by a gtk-ui-manager object can be embedded in other parts of the constructed user interface with the help of the constructor attribute. See the example below.

Example: An embedded gtk-ui-manager UI definition
<object class="GtkUIManager" id="uiman">
    <child>
    <object class="GtkActionGroup" id="actiongroup">
        <child>
        <object class="GtkAction" id="file">
            <property name="label">_File</property>
        </object>
        </child>
    </object>
    </child>
    <ui>
    <menubar name="menubar1">
        <menu action="file">
        </menu>
    </menubar>
    </ui>
</object>
<object class="GtkWindow" id="main-window">
    <child>
    <object class="GtkMenuBar" id="menubar1" constructor="uiman"/>
    </child>
</object>    

Signal Details

The "actions-changed" signal
 lambda (manager)    :no-recurse      
The signal is emitted whenever the set of actions changes.
manager
The gtk-ui-manager object which received the signal.
The "add-widget" signal
 lambda (manager widget)    :no-recurse      
The signal is emitted for each generated menubar and toolbar. It is not emitted for generated popup menus, which can be obtained by the function gtk-ui-manager-widget.
manager
The gtk-ui-manager object which received the signal.
widget
The added gtk-widget object.
The "connect-proxy" signal
 lambda (manager action proxy)    :no-recurse      
The signal is emitted after connecting a proxy to an action. 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.
manager
The gtk-ui-manager object which receibed the signal.
action
The gtk-action object.
proxy
The gtk-widget proxy.
The "disconnect-proxy" signal
 lambda (manager action proxy)    :no-recurse      
The signal is emitted after disconnecting a proxy from an action.
manager
The gtk-ui-manager object which received the signal.
action
The gtk-action object.
proxy
The gtk-widget proxy.
The "post-activate" signal
 lambda (manager action)    :no-recurse      
The signal is emitted just after the action is activated. This is intended for applications to get notification just after any action is activated.
manager
The gtk-ui-manager object which received the signal.
action
The gtk-action object.
The "pre-activate" signal
 lambda (manager action)    :no-recurse      
The signal is emitted just before the action is activated. This is intended for applications to get notification just before any action is activated.
manager
The gtk-ui-manager object which received the signal.
action
The gtk-action object.
 

Slot Access Functions

Inherited Slot Access Functions

See also

*2021-7-24