GOffice.Palette

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned GOffice.Palette GOffice.Palette Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.MenuShell Gtk.MenuShell Gtk.Container->Gtk.MenuShell Gtk.Menu Gtk.Menu Gtk.Menu->GOffice.Palette Gtk.MenuShell->Gtk.Menu Gtk.Widget->Gtk.Container

Subclasses:None

Methods

Inherited:Gtk.Menu (31), Gtk.MenuShell (14), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)
Structs:Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class new (n_swatches, swatch_width, n_columns, swatch_render, get_tooltip, *data)
  get_n_swatches ()
  get_user_data ()
  show_automatic (index, label)
  show_custom (label)
  swatch_new (index)

Child Properties

Inherited:Gtk.Menu (4)

Style Properties

Inherited:Gtk.Menu (7), Gtk.Widget (17)

Fields

Inherited:Gtk.Menu (2), Gtk.MenuShell (8), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name Type Access Description
parent Gtk.Menu r  

Class Details

class GOffice.Palette(**kwargs)
Bases:Gtk.Menu
Abstract:No
Structure:GOffice.PaletteClass
classmethod new(n_swatches, swatch_width, n_columns, swatch_render, get_tooltip, *data)
Parameters:
Returns:

a new GOffice.Palette object.

Return type:

Gtk.Widget

get_n_swatches()
Returns:the number of palette items.
Return type:int

A convenience function.

get_user_data()
Returns:a pointer to user data given to GOffice.Palette.new function.
Return type:object or None
show_automatic(index, label)
Parameters:
  • index (int) – index to use on automatic item activation
  • label (str) – if not None, replace automatic button label

Adds an automatic button to self.

show_custom(label)
Parameters:label (str) – if not None, replaces custom button label

Adds a custom button to bottom of self. An activation of custom button will cause an emition of “custom_activate” signal.

swatch_new(index)
Parameters:index (int) – default index
Returns:a new Gtk.DrawingArea which will be rendered like a self swatch. index can be changed later by changing swatch “index” data.
Return type:Gtk.Widget

Signal Details

GOffice.Palette.signals.activate(palette, object)
Signal Name:

activate

Flags:

RUN_LAST

Parameters:
GOffice.Palette.signals.automatic_activate(palette, object)
Signal Name:

automatic-activate

Flags:

RUN_LAST

Parameters:
GOffice.Palette.signals.custom_activate(palette)
Signal Name:custom-activate
Flags:RUN_LAST
Parameters:palette (GOffice.Palette) – The object which received the signal