GOffice.Selector

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 Gtk.Orientable Gtk.Orientable GObject.GInterface->Gtk.Orientable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned GOffice.Selector GOffice.Selector Gtk.Box Gtk.Box Gtk.Box->GOffice.Selector Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Box Gtk.Orientable->Gtk.Box Gtk.Widget->Gtk.Container

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) – a GOffice.ColorGroup name

Returns:

a Gtk.Widget.

Return type:

Gtk.Widget

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:
Returns:

a new Gtk.Widget.

Return type:

Gtk.Widget

Creates a new gradient selector.

New in version 0.9.6.

classmethod new_line_dash(initial_type, default_type)
Parameters:
Returns:

a new Gtk.Widget.

Return type:

Gtk.Widget

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)
Parameters:

is_auto (bool) – boolean

Returns:

current index.

Return type:

int

Retrieves current selection index, and set is_auto to True if current selection was set by clicking on automatic palette item.

get_user_data()
Returns:

a pointer to palette user_data.

Return type:

object or 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:

True if 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:

Setups drag and drop for self.

update_swatch()

Requests a swatch update.

Signal Details

GOffice.Selector.signals.activate(selector)
Signal Name:

activate

Flags:

RUN_LAST

Parameters:

selector (GOffice.Selector) – The object which received the signal