GOffice.Palette¶
| Subclasses: | None | 
|---|
Methods¶
| 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) | 
Virtual Methods¶
| Inherited: | Gtk.MenuShell (9), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10) | 
|---|
Properties¶
| Inherited: | Gtk.Menu (12), Gtk.MenuShell (1), Gtk.Container (3), Gtk.Widget (39) | 
|---|
Child Properties¶
| Inherited: | Gtk.Menu (4) | 
|---|
Style Properties¶
| Inherited: | Gtk.Menu (7), Gtk.Widget (17) | 
|---|
Signals¶
| Inherited: | Gtk.Menu (2), Gtk.MenuShell (8), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1) | 
|---|
| Name | Short Description | 
|---|---|
| activate | |
| automatic-activate | |
| custom-activate | 
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: - n_swatches (int) – number of palette items
- swatch_width (float) – swatch width as multiple of swatch height
- n_columns (int) – number of columns for displaying palette items
- swatch_render (GOffice.PaletteSwatchRenderCallback) – a user function used for swatch rendering
- get_tooltip (GOffice.PaletteSwatchTooltipCallback) – a user function for tooltips.
- data (objectorNone) – user data for use by swatch render function
 - Returns: - a new - GOffice.Paletteobject.- Return type: 
- n_swatches (
 - 
get_user_data()¶
- Returns: - a pointer to user data given to - GOffice.Palette.newfunction.- Return type: - objector- None
 - 
show_automatic(index, label)¶
- Parameters: - 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.DrawingAreawhich will be rendered like a self swatch. index can be changed later by changing swatch “index” data.- Return type: - Gtk.Widget
 
- 
classmethod 
Signal Details¶
- 
GOffice.Palette.signals.activate(palette, object)¶
- Signal Name: - activate- Flags: - Parameters: - palette (GOffice.Palette) – The object which received the signal
- object (int) –
 
- palette (
- 
GOffice.Palette.signals.automatic_activate(palette, object)¶
- Signal Name: - automatic-activate- Flags: - Parameters: - palette (GOffice.Palette) – The object which received the signal
- object (int) –
 
- palette (
- 
GOffice.Palette.signals.custom_activate(palette)¶
- Signal Name: - custom-activate- Flags: - RUN_LAST- Parameters: - palette ( - GOffice.Palette) – The object which received the signal