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 | new(palette) | 
| class | new_color(initial_color, default_color, color_group) | 
| class | new_gradient(initial_direction, default_direction) | 
| class | new_line_dash(initial_type, default_type) | 
| activate() | |
| get_active(is_auto) | |
| get_user_data() | |
| set_active(index) | |
| setup_dnd(dnd_target, dnd_length, data_get, data_received, fill_icon) | |
| update_swatch() | 
Virtual Methods¶
| Inherited: | Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10) | 
|---|
Properties¶
| Inherited: | Gtk.Box (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1) | 
|---|
Child Properties¶
| Inherited: | Gtk.Box (5) | 
|---|
Style Properties¶
| Inherited: | Gtk.Widget (17) | 
|---|
Signals¶
| Inherited: | Gtk.Container (4), Gtk.Widget (69), GObject.Object (1) | 
|---|
| Name | Short Description | 
|---|---|
| activate | 
Fields¶
| Inherited: | Gtk.Container (4), Gtk.Widget (69), GObject.Object (1) | 
|---|
| Name | Type | Access | Description | 
|---|---|---|---|
| parent | Gtk.Box | r | 
Class Details¶
- 
class GOffice.Selector(*args, **kwargs)¶
- Bases: - Gtk.Box- Abstract: - No - Structure: - GOffice.SelectorClass- 
classmethod new(palette)¶
- Parameters: - palette ( - GOffice.Palette) – a- GOffice.Palette- Returns: - a new - Gtk.Widget.- Return type: - Gtk.Widget- 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 color
- default_color (int) – automatic color
- color_group (str) – aGOffice.ColorGroupname
 - 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. 
- initial_color (
 - 
classmethod new_gradient(initial_direction, default_direction)¶
- Parameters: - initial_direction (GOffice.GradientDirection) – initially selected direction
- default_direction (GOffice.GradientDirection) – automatic gradient direction
 - Returns: - a new - Gtk.Widget.- Return type: - Creates a new gradient selector. - New in version 0.9.6. 
- initial_direction (
 - 
classmethod new_line_dash(initial_type, default_type)¶
- Parameters: - initial_type (GOffice.LineDashType) – line type initially selected
- default_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. 
- initial_type (
 - 
activate()¶
- Updates slector swatch and emits an “activate” signal. 
 - 
get_active(is_auto)¶
- Parameters: - is_auto ( - bool) – boolean- Returns: - current index. - Return type: - int- Retrieves current selection index, and set is_auto to - Trueif current selection was set by clicking on automatic palette item.
 - 
get_user_data()¶
- Returns: - a pointer to palette user_data. - Return type: - objector- None- A convenience function to access user_data of selector palette. (See go_palette_get_user_data). 
 - 
set_active(index)¶
- Parameters: - index ( - int) – new index- Returns: - Trueif selection is actually changed.- Return type: - bool- 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 type
- dnd_length (int) – length of data transfered on drop
- data_get (GOffice.SelectorDndDataGet) – a user provided data_get method
- data_received (GOffice.SelectorDndDataReceived) – a user provided data_received method
- fill_icon (GOffice.SelectorDndFillIcon) – a user function for dnd icon creation
 - Setups drag and drop for self. 
- dnd_target (
 - 
update_swatch()¶
- Requests a swatch update. 
 
- 
classmethod 
Signal Details¶
- 
GOffice.Selector.signals.activate(selector)¶
- Signal Name: - activate- Flags: - RUN_LAST- Parameters: - selector ( - GOffice.Selector) – The object which received the signal