Class: Smartdict::Gui::InterchangeButton

Inherits:
Gtk::Button
  • Object
show all
Includes:
Smartdict::Gui
Defined in:
lib/smartdict/gui/interchange_button.rb

Constant Summary

Constants included from Smartdict::Gui

LEFT_BOX_BUTTON_HEIGHT, VERSION

Instance Method Summary collapse

Methods included from Smartdict::Gui

#root_dir, #run

Constructor Details

#initialize(controller) ⇒ InterchangeButton

Returns a new instance of InterchangeButton.



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/smartdict/gui/interchange_button.rb', line 4

def initialize(controller)
  super('')

  @controller = controller
  signal_connect('clicked') { @controller.interchange_langs }

  image = Gtk::Image.new(Smartdict::Icons.interchange)
  set_image image
  image.show

  set_size_request(60, LEFT_BOX_BUTTON_HEIGHT)
end