Class: GOffice::Selector

Inherits:
Gtk::Box
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Constructor Details

#initialize(initial_type, default_type) ⇒ Gtk::Widget

Creates a new line type selector.

Parameters:

Instance Method Details

#activate ⇒ nil

Updates slector swatch and emits an "activate" signal.

Returns:

  • (nil)

#active=(index) ⇒ Boolean

Sets current selection index, and emits "activate" signal if
selection is actually changed.

Parameters:

  • index (Integer) —

    new index

Returns:

  • (Boolean) —

    TRUE if selection is actually changed.

#get_active(is_auto) ⇒ Integer

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

Parameters:

  • is_auto (Boolean) —

    boolean

Returns:

  • (Integer) —

    current index.

#setup_dnd(dnd_target, dnd_length, data_get, data_received, fill_icon) ⇒ nil

Setups drag and drop for selector.

Parameters:

  • dnd_target (String) —

    drag and drop target type

  • dnd_length (Integer) —

    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

Returns:

  • (nil)

#update_swatch ⇒ nil

Requests a swatch update.

Returns:

  • (nil)

#user_data ⇒ GObject

A convenience function to access user_data of selector palette.
(See go_palette_get_user_data).

Returns:

  • (GObject) —

    a pointer to palette user_data.