Package: gtk

Class gtk:ui-manager

Superclasses

gtk:buildable, gobject: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)
The XML string describing the merged UI.
Default value: "<ui></ui>"

Details

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

Slot Access Functions

Inherited Slot Access Functions

See also

#2025-06-27