Module: GamesAndRpgParadise::GUI::Gtk::DosboxWrapperModule
- Includes:
- Gtk::BaseModule
- Included in:
- DosboxWrapper
- Defined in:
- lib/games_and_rpg_paradise/utility_scripts/dosbox_wrapper/shared_code/dosbox_wrapper_module.rb
Constant Summary collapse
- NAMESPACE =
#
NAMESPACE
#
inspect
- TITLE =
#
TITLE
#
'Dosbox Wrapper'
- WIDTH =
#
WIDTH
#
1200
- HEIGHT =
#
HEIGHT
#
500
Class Method Summary collapse
-
.run(i = ARGV) ⇒ Object
# === GamesAndRpgParadise::GUI::Gtk::DosboxWrapperModule.run ========================================================================= #.
Instance Method Summary collapse
-
#border_size? ⇒ Boolean
# === border_size? ========================================================================= #.
-
#connect_skeleton ⇒ Object
# === connect_skeleton (connect tag) ========================================================================= #.
-
#create_buttons ⇒ Object
# === create ========================================================================= #.
-
#create_skeleton ⇒ Object
# === create_skeleton (create tag) ========================================================================= #.
-
#initialize(optional_file = nil, run_already = true) ⇒ Object
# === initialize ========================================================================= #.
-
#padding? ⇒ Boolean
# === padding? ========================================================================= #.
-
#reset ⇒ Object
# === reset (reset tag) ========================================================================= #.
-
#run ⇒ Object
# === run (run tag) ========================================================================= #.
Class Method Details
.run(i = ARGV) ⇒ Object
#
GamesAndRpgParadise::GUI::Gtk::DosboxWrapperModule.run
#
122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/games_and_rpg_paradise/utility_scripts/dosbox_wrapper/shared_code/dosbox_wrapper_module.rb', line 122 def self.run( i = ARGV ) require 'gtk_paradise/run' _ = ::GamesAndRpgParadise::GUI::Gtk::DosboxWrapper.new(i) r = ::Gtk.run r << _ r.set_size_request(_.width?, _.height?) r.automatic_title r.top_left_then_run end |
Instance Method Details
#border_size? ⇒ Boolean
#
border_size?
#
78 79 80 |
# File 'lib/games_and_rpg_paradise/utility_scripts/dosbox_wrapper/shared_code/dosbox_wrapper_module.rb', line 78 def border_size? 2 end |
#connect_skeleton ⇒ Object
#
connect_skeleton (connect tag)
#
106 107 108 109 110 |
# File 'lib/games_and_rpg_paradise/utility_scripts/dosbox_wrapper/shared_code/dosbox_wrapper_module.rb', line 106 def connect_skeleton abort_on_exception minimal(@hbox1, 2) minimal(@button_generate_the_configuration_file, 2) end |
#create_buttons ⇒ Object
#
create
#
96 97 98 99 100 101 |
# File 'lib/games_and_rpg_paradise/utility_scripts/dosbox_wrapper/shared_code/dosbox_wrapper_module.rb', line 96 def @button_generate_the_configuration_file = ('Generate the configuration file') @button_generate_the_configuration_file.bblack2 @button_generate_the_configuration_file.fancy_tooltips = 'Click this button to generate a customized dosbox-config file.' end |
#create_skeleton ⇒ Object
#
create_skeleton (create tag)
#
85 86 87 88 89 90 91 |
# File 'lib/games_and_rpg_paradise/utility_scripts/dosbox_wrapper/shared_code/dosbox_wrapper_module.rb', line 85 def create_skeleton @hbox1 = create_hbox @hbox1.minimal(text('Number of CPU cycles to use:')) @entry_cpu_cycles = create_entry @hbox1.maximal(@entry_cpu_cycles) end |
#initialize(optional_file = nil, run_already = true) ⇒ Object
#
initialize
#
44 45 46 47 48 49 50 51 |
# File 'lib/games_and_rpg_paradise/utility_scripts/dosbox_wrapper/shared_code/dosbox_wrapper_module.rb', line 44 def initialize( optional_file = nil, run_already = true ) super(:vertical) reset run if run_already end |
#padding? ⇒ Boolean
#
padding?
#
71 72 73 |
# File 'lib/games_and_rpg_paradise/utility_scripts/dosbox_wrapper/shared_code/dosbox_wrapper_module.rb', line 71 def padding? 2 end |
#reset ⇒ Object
#
reset (reset tag)
#
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/games_and_rpg_paradise/utility_scripts/dosbox_wrapper/shared_code/dosbox_wrapper_module.rb', line 56 def reset reset_the_internal_variables # ======================================================================= # # === @configuration # ======================================================================= # @configuration = [true, __dir__, NAMESPACE] title_width_height(TITLE, WIDTH, HEIGHT) set_use_this_font(:dejavu_condensed_22) use_gtk_paradise_project_css_file infer_the_size_automatically end |
#run ⇒ Object
#
run (run tag)
#
115 116 117 |
# File 'lib/games_and_rpg_paradise/utility_scripts/dosbox_wrapper/shared_code/dosbox_wrapper_module.rb', line 115 def run create_skeleton_then_connect_skeleton end |