sugar4.graphics.tray

Tray widgets for displaying collections of items with scrolling support.

Attributes

GRID_CELL_SIZE

ALIGN_TO_START

ALIGN_TO_END

Classes

HTray

Horizontal tray widget with custom layout management.

VTray

Vertical tray widget with custom layout management.

TrayButton

A button for use in trays.

TrayIcon

An icon for use in trays with palette support.

Module Contents

sugar4.graphics.tray.GRID_CELL_SIZE[source]
sugar4.graphics.tray.ALIGN_TO_START = 0[source]
sugar4.graphics.tray.ALIGN_TO_END = 1[source]
class sugar4.graphics.tray.HTray(**kwargs)[source]

Bases: gi.repository.Gtk.Widget

Horizontal tray widget with custom layout management.

__gtype_name__ = 'SugarHTray'[source]
__gproperties__[source]
align[source]
do_dispose()[source]

Clean up widget on disposal.

do_measure(orientation, for_size)[source]
do_size_allocate(width, height, baseline)[source]
do_set_property(pspec, value)[source]
do_get_property(pspec)[source]
get_drag_active()[source]
set_drag_active(active)[source]
get_children()[source]
add_item(item, index=-1)[source]
remove_item(item)[source]
get_item_index(item)[source]

Get index of item in tray.

scroll_to_item(item)[source]
class sugar4.graphics.tray.VTray(**kwargs)[source]

Bases: gi.repository.Gtk.Widget

Vertical tray widget with custom layout management.

__gtype_name__ = 'SugarVTray'[source]
__gproperties__[source]
align[source]
do_dispose()[source]

Clean up widget on disposal.

do_measure(orientation, for_size)[source]

Calculate size requirements.

do_size_allocate(width, height, baseline)[source]

Allocate size to child widgets.

do_set_property(pspec, value)[source]

Set property values.

do_get_property(pspec)[source]

Get property values.

get_drag_active()[source]

Get drag active state.

set_drag_active(active)[source]

Set drag active state.

get_children()[source]

Get tray children.

add_item(item, index=-1)[source]

Add item to tray.

remove_item(item)[source]

Remove item from tray.

get_item_index(item)[source]

Get index of item in tray.

scroll_to_item(item)[source]

Scroll to make item visible.

class sugar4.graphics.tray.TrayButton(**kwargs)[source]

Bases: sugar4.graphics.toolbutton.ToolButton

A button for use in trays.

class sugar4.graphics.tray.TrayIcon(icon_name=None, xo_color=None)[source]

Bases: gi.repository.Gtk.Button

An icon for use in trays with palette support.

__gtype_name__ = 'SugarTrayIcon'[source]
create_palette()[source]

Create palette - override in subclasses.

get_palette()[source]
set_palette(palette)[source]
palette[source]
get_palette_invoker()[source]

Get the palette invoker.

set_palette_invoker(palette_invoker)[source]

Set the palette invoker.

palette_invoker[source]
get_icon()[source]
get_icon_name()[source]
set_icon_name(icon_name)[source]
get_xo_color()[source]
set_xo_color(xo_color)[source]
icon[source]