GOffice.Palette¶
- 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 |
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Gtk.Menu (12), Gtk.MenuShell (1), Gtk.Container (3), Gtk.Widget (39)
Child Properties¶
- Inherited:
Style Properties¶
- Inherited:
Signals¶
Name |
Short Description |
---|---|
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class GOffice.Palette(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(n_swatches, swatch_width, n_columns, swatch_render, get_tooltip, *data)¶
- Parameters:
n_swatches (
int
) – number of palette itemsswatch_width (
float
) – swatch width as multiple of swatch heightn_columns (
int
) – number of columns for displaying palette itemsswatch_render (
GOffice.PaletteSwatchRenderCallback
) – a user function used for swatch renderingget_tooltip (
GOffice.PaletteSwatchTooltipCallback
) – a user function for tooltips.data (
object
orNone
) – user data for use by swatch render function
- Returns:
a new
GOffice.Palette
object.- Return type:
- get_user_data()¶
- Returns:
a pointer to user data given to
GOffice.Palette.new
function.- Return type:
- show_automatic(index, label)¶
- Parameters:
Adds an automatic button to self.
- show_custom(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:
Signal Details¶
- GOffice.Palette.signals.activate(palette, object)¶
- Signal Name:
activate
- Flags:
- Parameters:
palette (
GOffice.Palette
) – The object which received the signalobject (
int
) –
- GOffice.Palette.signals.automatic_activate(palette, object)¶
- Signal Name:
automatic-activate
- Flags:
- Parameters:
palette (
GOffice.Palette
) – The object which received the signalobject (
int
) –
- GOffice.Palette.signals.custom_activate(palette)¶
- Signal Name:
custom-activate
- Flags:
- Parameters:
palette (
GOffice.Palette
) – The object which received the signal