Module: Bioroebe::GUI::LibUI::ShowCodonTable
- Includes:
- ShowCodonTableModule, LibuiParadise::Extensions
- Defined in:
- lib/bioroebe/gui/libui/show_codon_table/show_codon_table.rb
Overview
Bioroebe::GUI::LibUI::ShowCodonTable
Constant Summary
collapse
- TITLE =
'Show Codon Table'
ShowCodonTableModule::HEIGHT, ShowCodonTableModule::WIDTH
Class Method Summary
collapse
-
.run ⇒ Object
# === Bioroebe::GUI::LibUI::ShowCodonTable.run ========================================================================= #.
Instance Method Summary
collapse
-
#create_skeleton ⇒ Object
# === create_skeleton (create tag) ========================================================================= #.
-
#create_the_combo_box ⇒ Object
# === create_the_combo_box ========================================================================= #.
-
#initialize ⇒ Object
# === initialize ========================================================================= #.
-
#reset ⇒ Object
# === reset ========================================================================= #.
-
#reset_then_run ⇒ Object
# === reset_then_run ========================================================================= #.
-
#run ⇒ Object
# === run ========================================================================= #.
#active_text?, #border_size?, #padding?, #reset_the_shared_module
Class Method Details
.run ⇒ Object
#
Bioroebe::GUI::LibUI::ShowCodonTable.run
#
122
123
124
125
126
|
# File 'lib/bioroebe/gui/libui/show_codon_table/show_codon_table.rb', line 122
def self.run
object = Object.new
object.extend(ShowCodonTable)
object.reset_then_run
end
|
Instance Method Details
#create_skeleton ⇒ Object
#
create_skeleton (create tag)
#
55
56
57
|
# File 'lib/bioroebe/gui/libui/show_codon_table/show_codon_table.rb', line 55
def create_skeleton
create_the_combo_box
end
|
#create_the_combo_box ⇒ Object
62
63
64
|
# File 'lib/bioroebe/gui/libui/show_codon_table/show_codon_table.rb', line 62
def create_the_combo_box
@combo_box_containing_the_registered_codon_tables = ui_combobox
end
|
#initialize ⇒ Object
33
34
35
|
# File 'lib/bioroebe/gui/libui/show_codon_table/show_codon_table.rb', line 33
def initialize
reset
end
|
#reset ⇒ Object
48
49
50
|
# File 'lib/bioroebe/gui/libui/show_codon_table/show_codon_table.rb', line 48
def reset
reset_the_shared_module
end
|
#reset_then_run ⇒ Object
40
41
42
43
|
# File 'lib/bioroebe/gui/libui/show_codon_table/show_codon_table.rb', line 40
def reset_then_run
reset
run
end
|
#run ⇒ Object
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
# File 'lib/bioroebe/gui/libui/show_codon_table/show_codon_table.rb', line 69
def run
create_skeleton
hash = ::Bioroebe.hash_codon_tables?
values = hash.values
main_window = margined_window(TITLE, 1200, 200, 0)
@toplabel = text(values.first.to_s)
outer_vbox = padded_vbox
toplevel_hbox = padded_hbox
toplevel_hbox.maximal(@toplabel)
outer_vbox << toplevel_hbox
@text_buffer = text_view
outer_vbox << @text_buffer
hbox = padded_hbox
_ = text('Select the codon table (default: eukaryotes) → ')
hbox.minimal(_)
create_the_combo_box
combobox_selected_callback = proc {|pointer|
e 'The active text was: '+active_text?
}
UI.combobox_on_selected(
@combo_box_containing_the_registered_codon_tables,
combobox_selected_callback,
nil
)
@combo_box_containing_the_registered_codon_tables.append_this_array(hash.values)
hbox.maximal(
@combo_box_containing_the_registered_codon_tables
)
outer_vbox << hbox
@button_do_analyse = button('Do Analyse')
@button_do_analyse.on_clicked {
e 'clicked'
}
outer_vbox << @button_do_analyse
main_window.child = outer_vbox
main_window.complex_finalizer
end
|