Class: Bioroebe::GUI::Gtk::CustomizedDialog

Inherits:
Gtk::Dialog
  • Object
show all
Includes:
Gtk::BaseModule
Defined in:
lib/bioroebe/gui/universal_widgets/aminoacid_composition/customized_dialog.rb

Overview

Bioroebe::GUI::Gtk::CustomizedDialog

Instance Method Summary collapse

Constructor Details

#initialize(*optional_widgets_to_add) ⇒ CustomizedDialog

#

initialize

#


25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/bioroebe/gui/universal_widgets/aminoacid_composition/customized_dialog.rb', line 25

def initialize(*optional_widgets_to_add)
  super()
  set_title('Amino Acid Composition')
  set_default_size(800, 550)
  add_close_button
  set_border_width(15)
  set_default_response(::Gtk::ResponseType::CLOSE)
  signal_connect(:response) { |widget, response|
    case response
    when :close, -7
      destroy
    end
  }
  optional_widgets_to_add.flatten.each {|this_widget_is_to_be_added|
    add_this_widget(this_widget_is_to_be_added)
  }
  show_all
end

Instance Method Details

#add_this_widget(i = nil) ⇒ Object

#

add_this_widget

#


47
48
49
# File 'lib/bioroebe/gui/universal_widgets/aminoacid_composition/customized_dialog.rb', line 47

def add_this_widget(i = nil)
  child.add(i) if i
end