sugar3.graphics.palette module

STABLE.

class sugar3.graphics.palette.Palette(label=None, accel_path=None, text_maxlen=60, **kwargs)

Bases: sugar3.graphics.palettewindow.PaletteWindow

Floating palette implementation.

This class dynamically switches between one of two encapsulated child widget types: a _PaletteWindowWidget or a _PaletteMenuWidget.

The window widget, created by default, acts as the container for any type of widget the user may wish to add. It can optionally display primary text, secondary text, and an icon at the top of the palette.

If the user attempts to access the ‘menu’ property, the window widget is destroyed and the palette is dynamically switched to use a menu widget. This is a GtkMenu that retains the same look and feel as a normal palette, allowing submenus and so on. If primary text, secondary text and/or icons were provided, an initial menu entry is created containing widgets to display such information.

do_get_property(pspec)
do_set_property(pspec, value)
get_full_size_request()
get_icon()
get_icon_visible()
get_label_width()
get_menu()
get_primary_text()
get_secondary_text()
icon
icon_visible
menu
on_enter()
popdown(immediate=False, state=None)

Popdown (or show the full contents of) the palette.

Keyword Arguments

immediate (bool) – if True, the palette will be shown instantly (as if the user right clicked the item). If False, the palette will be shown after the usual activation wait time.

Deprecated since version 0.109: The state keyword argument is deprecated. The old secondary state has become the only state.

popup(immediate=False)
primary_text
secondary_text
set_content(widget)
set_icon(icon)
set_icon_visible(visible)
set_primary_text(label, accel_path=None)
set_secondary_text(label)
class sugar3.graphics.palette.PaletteActionBar(*args, **kwargs)

Bases: gi.repository.Gtk.HButtonBox

add_action(label, icon_name=None)