Dazzle.MenuButton

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget Dazzle.MenuButton Dazzle.MenuButton GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Actionable Gtk.Actionable GObject.GInterface->Gtk.Actionable Gtk.Activatable Gtk.Activatable GObject.GInterface->Gtk.Activatable Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Button Gtk.Button Gtk.Actionable->Gtk.Button Gtk.Activatable->Gtk.Button Gtk.Bin Gtk.Bin Gtk.Bin->Gtk.Button Gtk.Buildable->Gtk.Widget Gtk.ToggleButton Gtk.ToggleButton Gtk.Button->Gtk.ToggleButton Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin Gtk.MenuButton Gtk.MenuButton Gtk.MenuButton->Dazzle.MenuButton Gtk.ToggleButton->Gtk.MenuButton Gtk.Widget->Gtk.Container

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

new_with_model (icon_name, model)

get_model ()

get_show_accels ()

get_show_arrow ()

get_show_icons ()

set_model (model)

set_show_accels (show_accels)

set_show_arrow (show_arrow)

set_show_icons (show_icons)

Virtual Methods

Inherited:

Gtk.ToggleButton (1), Gtk.Button (6), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10), Gtk.Actionable (4), Gtk.Activatable (2)

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

icon-name

str

w

The icon-name for the button

menu-id

str

w

The identifier for the menu model to use

model

Gio.MenuModel

r/w

The Gio.MenuModel to display in the popover

show-accels

bool

r/w

If accelerator keys should be shown

show-arrow

bool

r/w

If the down arrow should be shown

show-icons

bool

r/w

If icons should be shown next to menu items

transitions-enabled

bool

r/w

If transitions should be allowed

Style Properties

Inherited:

Gtk.Button (7), Gtk.Widget (17)

Signals

Inherited:

Gtk.ToggleButton (1), Gtk.Button (6), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Fields

Inherited:

Gtk.ToggleButton (1), Gtk.Button (6), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Type

Access

Description

parent_instance

Gtk.MenuButton

r

Class Details

class Dazzle.MenuButton(*args, **kwargs)
Bases:

Gtk.MenuButton

Abstract:

No

Structure:

Dazzle.MenuButtonClass

classmethod new_with_model(icon_name, model)
Parameters:
Returns:

A Dazzle.MenuButton

Return type:

Gtk.Widget

Creates a new Dazzle.MenuButton with the icon icon_name and the menu contents of model.

get_model()
Returns:

A Dazzle.MenuButton or None.

Return type:

Gio.MenuModel or None

New in version 3.26.

get_show_accels()
Return type:

bool

get_show_arrow()
Return type:

bool

get_show_icons()
Return type:

bool

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
Name:

icon-name

Type:

str

Default Value:

None

Flags:

WRITABLE

The icon-name for the button

Dazzle.MenuButton.props.menu_id
Name:

menu-id

Type:

str

Default Value:

None

Flags:

WRITABLE

The “menu-id” property can be used to automatically load a Gio.MenuModel from the applications merged menus. This is performed via Dazzle.Application.get_menu_by_id().

New in version 3.26.

Dazzle.MenuButton.props.model
Name:

model

Type:

Gio.MenuModel

Default Value:

None

Flags:

READABLE, WRITABLE

The Gio.MenuModel to display in the popover

Dazzle.MenuButton.props.show_accels
Name:

show-accels

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

If accelerator keys should be shown

Dazzle.MenuButton.props.show_arrow
Name:

show-arrow

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

If the down arrow should be shown

Dazzle.MenuButton.props.show_icons
Name:

show-icons

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

If icons should be shown next to menu items

Dazzle.MenuButton.props.transitions_enabled
Name:

transitions-enabled

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

If transitions should be allowed