Class: Roebe::GUI::Gtk::InteractiveCaesarCipher
- Inherits:
-
Gtk::Box
- Object
- Gtk::Box
- Roebe::GUI::Gtk::InteractiveCaesarCipher
show all
- Includes:
- Gtk::BaseModule, InteractiveCaesarCipherModule
- Defined in:
- lib/roebe/gui/gtk4/interactive_caesar_cipher/interactive_caesar_cipher.rb
Constant Summary
InteractiveCaesarCipherModule::ALPHABET, InteractiveCaesarCipherModule::CSS_SMALL_BORDER, InteractiveCaesarCipherModule::HEIGHT, InteractiveCaesarCipherModule::HELPER_TEXT_FOR_THE_MAIN_HEADER_LABEL, InteractiveCaesarCipherModule::LARGER_FONT, InteractiveCaesarCipherModule::TITLE, InteractiveCaesarCipherModule::USE_THIS_FONT, InteractiveCaesarCipherModule::WIDTH
Class Method Summary
collapse
-
.run(i = ARGV) ⇒ Object
# === Roebe::GUI::Gtk::InteractiveCaesarCipher.run ========================================================================= #.
Instance Method Summary
collapse
#add_to_array_entries, #array_entries?, #border_size?, #entry2?, #last_entry?, #padding?, #reset_the_shared_module, #return_text1, #return_text2, #return_text3, #set_top_right_entry, #title?, #top_left_entry?
Constructor Details
27
28
29
30
31
32
33
|
# File 'lib/roebe/gui/gtk4/interactive_caesar_cipher/interactive_caesar_cipher.rb', line 27
def initialize(
run_already = true
)
super(:vertical)
reset
run if run_already
end
|
Class Method Details
.run(i = ARGV) ⇒ Object
#
Roebe::GUI::Gtk::InteractiveCaesarCipher.run
#
109
110
111
112
113
|
# File 'lib/roebe/gui/gtk4/interactive_caesar_cipher/interactive_caesar_cipher.rb', line 109
def self.run(i = ARGV)
::Gtk.default_application('interactive.caesar.cipher') {{
widget_to_use: Roebe::GUI::Gtk::InteractiveCaesarCipher.new
}}
end
|
Instance Method Details
#create_skeleton ⇒ Object
#
create_skeleton (create tag, skeleton tag)
#
72
73
74
75
|
# File 'lib/roebe/gui/gtk4/interactive_caesar_cipher/interactive_caesar_cipher.rb', line 72
def create_skeleton
create_the_grid
create_the_spin_buttons
end
|
#handle_the_CSS_rules ⇒ Object
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# File 'lib/roebe/gui/gtk4/interactive_caesar_cipher/interactive_caesar_cipher.rb', line 49
def handle_the_CSS_rules
use_these_css_rules = ::Gtk.return_gtk_paradise_css_rules.dup
use_these_css_rules << '
.bold_font {
font-weight: 500;
}
.larger_font {
font-size: 5em;
}
'+return_the_CSS_rules_for_this_module+'
'+::Gtk.turn_this_font_symbol_into_its_corresponding_CSS_rule(USE_THIS_FONT)
::Gtk.load_css_engine_for_gtk4(
use_these_css_rules
)
css_class('use_this_font') end
|
#height? ⇒ Boolean
102
103
104
|
# File 'lib/roebe/gui/gtk4/interactive_caesar_cipher/interactive_caesar_cipher.rb', line 102
def height?
return ::Gtk.calculate_the_true_value_represented_via_a_percentage_value(HEIGHT)
end
|
38
39
40
41
42
43
44
|
# File 'lib/roebe/gui/gtk4/interactive_caesar_cipher/interactive_caesar_cipher.rb', line 38
def reset
reset_the_internal_hash
populate_the_internal_hash_with_the_default_values
reset_the_shared_module
title_width_height(TITLE, WIDTH, HEIGHT)
handle_the_CSS_rules
end
|
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
# File 'lib/roebe/gui/gtk4/interactive_caesar_cipher/interactive_caesar_cipher.rb', line 80
def run
create_skeleton
title = text(TITLE)
title.css_class('hack_30')
title.hint = HELPER_TEXT_FOR_THE_MAIN_HEADER_LABEL
hbox1 = hbox
hbox1.hcenter
hbox1.append(title)
hbox1.css_class('small_border')
append(hbox1)
do_populate_the_main_grid
append(@grid)
let_the_main_spin_button_respond_to_change_events
determine_the_top_right_entry
end
|
#width? ⇒ Boolean
98
99
100
|
# File 'lib/roebe/gui/gtk4/interactive_caesar_cipher/interactive_caesar_cipher.rb', line 98
def width?
return ::Gtk.calculate_the_true_value_represented_via_a_percentage_value(WIDTH)
end
|