GOffice.Selector¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Box (14), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Gtk.Box (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)
Child Properties¶
- Inherited:
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class GOffice.Selector(*args, **kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(palette)¶
- Parameters:
palette (
GOffice.Palette
) – aGOffice.Palette
- Returns:
a new
Gtk.Widget
.- Return type:
Creates a new selector, using palette. Selector button swatch will use swatch render function of palette.
- classmethod new_color(initial_color, default_color, color_group)¶
- Parameters:
initial_color (
int
) – initially selected colordefault_color (
int
) – automatic colorcolor_group (
str
) – aGOffice.ColorGroup
name
- Returns:
a
Gtk.Widget
.- Return type:
Creates a new color selector, with initial_color selected. Palette will contain an automatic button, which can be used to select default_color. This widget supports color drag and drop.
New in version 0.9.6.
- classmethod new_gradient(initial_direction, default_direction)¶
- Parameters:
initial_direction (
GOffice.GradientDirection
) – initially selected directiondefault_direction (
GOffice.GradientDirection
) – automatic gradient direction
- Returns:
a new
Gtk.Widget
.- Return type:
Creates a new gradient selector.
New in version 0.9.6.
- classmethod new_line_dash(initial_type, default_type)¶
- Parameters:
initial_type (
GOffice.LineDashType
) – line type initially selecteddefault_type (
GOffice.LineDashType
) – automatic line type
- Returns:
a new
Gtk.Widget
.- Return type:
Creates a new line type selector.
New in version 0.9.6.
- activate()¶
Updates slector swatch and emits an “activate” signal.
- get_active(is_auto)¶
-
Retrieves current selection index, and set is_auto to
True
if current selection was set by clicking on automatic palette item.
- get_user_data()¶
-
A convenience function to access user_data of selector palette. (See go_palette_get_user_data).
- set_active(index)¶
-
Sets current selection index, and emits “activate” signal if selection is actually changed.
- setup_dnd(dnd_target, dnd_length, data_get, data_received, fill_icon)¶
- Parameters:
dnd_target (
str
) – drag and drop target typednd_length (
int
) – length of data transfered on dropdata_get (
GOffice.SelectorDndDataGet
) – a user provided data_get methoddata_received (
GOffice.SelectorDndDataReceived
) – a user provided data_received methodfill_icon (
GOffice.SelectorDndFillIcon
) – a user function for dnd icon creation
Setups drag and drop for self.
- update_swatch()¶
Requests a swatch update.
Signal Details¶
- GOffice.Selector.signals.activate(selector)¶
- Signal Name:
activate
- Flags:
- Parameters:
selector (
GOffice.Selector
) – The object which received the signal