Dazzle.MenuButton¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.MenuButton (13), Gtk.ToggleButton (10), Gtk.Button (29), Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Actionable (5), Gtk.Activatable (6)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Gtk.MenuButton (6), Gtk.ToggleButton (3), Gtk.Button (9), Gtk.Container (3), Gtk.Widget (39), Gtk.Actionable (2), Gtk.Activatable (2)
Name |
Type |
Flags |
Short Description |
---|---|---|---|
w |
The icon-name for the button |
||
w |
The identifier for the menu model to use |
||
r/w |
The |
||
r/w |
If accelerator keys should be shown |
||
r/w |
If the down arrow should be shown |
||
r/w |
If icons should be shown next to menu items |
||
r/w |
If transitions should be allowed |
Style Properties¶
- Inherited:
Signals¶
Fields¶
- Inherited:
Gtk.ToggleButton (1), Gtk.Button (6), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Dazzle.MenuButton(*args, **kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new_with_model(icon_name, model)¶
- Parameters:
icon_name (
str
) – An icon-name for the buttonmodel (
Gio.MenuModel
orNone
) – AGio.MenuModel
orNone
- Returns:
- Return type:
Creates a new
Dazzle.MenuButton
with the icon icon_name and the menu contents of model.
- get_model()¶
- Returns:
A
Dazzle.MenuButton
orNone
.- Return type:
New in version 3.26.
- set_model(model)¶
- Parameters:
model (
Gio.MenuModel
) –
- set_show_accels(show_accels)¶
- Parameters:
show_accels (
bool
) – if accelerators should be visible
Sets the
Dazzle.MenuButton
:show-accels
property.If
True
, accelerators will be displayed next to menu items that contain a shortcut.New in version 3.26.
- set_show_arrow(show_arrow)¶
- Parameters:
show_arrow (
bool
) –
Sets the
Dazzle.MenuButton
:show-arrow
property.If
True
, an pan-down-symbolic image will be displayed next to the image in the button.New in version 3.26.
- set_show_icons(show_icons)¶
- Parameters:
show_icons (
bool
) – if icons should be visible
Sets the
Dazzle.MenuButton
:show-icons
property.If
True
, icons will be displayed next to menu items that contain a shortcut.New in version 3.26.
Property Details¶
- Dazzle.MenuButton.props.icon_name¶
-
The icon-name for the button
- Dazzle.MenuButton.props.menu_id¶
-
The “menu-id” property can be used to automatically load a
Gio.MenuModel
from the applications merged menus. This is performed viaDazzle.Application.get_menu_by_id
().New in version 3.26.
- Dazzle.MenuButton.props.model¶
- Name:
model
- Type:
- Default Value:
- Flags:
The
Gio.MenuModel
to display in the popover
- Dazzle.MenuButton.props.show_accels¶
-
If accelerator keys should be shown
- Dazzle.MenuButton.props.show_arrow¶
-
If the down arrow should be shown
- Dazzle.MenuButton.props.show_icons¶
-
If icons should be shown next to menu items