Class: TopinambourColorSelector

Inherits:
Gtk::Grid
  • Object
show all
Defined in:
lib/color_selector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(window) ⇒ TopinambourColorSelector

Returns a new instance of TopinambourColorSelector.



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/color_selector.rb', line 22

def initialize(window)
  @window = window
  super()

  reset_button = generate_reset_button
  attach(reset_button, 0, 0, 1, 1)

  initialize_default_colors
  add_color_selectors

  save_button = generate_save_button
  attach(save_button, 0, 1, 1, 1)

  import_button = generate_import_button
  attach(import_button, 10, 0, 1, 1)

  export_button = generate_export_button
  attach(export_button, 10, 1, 1, 1)

  show_all
  set_halign(:center)
  set_valign(:end)
  set_name("topinambour-color-selector")
end

Instance Attribute Details

#colorsObject (readonly)

Returns the value of attribute colors.



21
22
23
# File 'lib/color_selector.rb', line 21

def colors
  @colors
end