Module: GamesParadise::GUI::Gtk::DosboxWrapperModule
- Includes:
- Gtk::BaseModule
- Included in:
- DosboxWrapper
- Defined in:
- lib/games_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
# === GamesParadise::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
#
GamesParadise::GUI::Gtk::DosboxWrapperModule.run
#
133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/games_paradise/utility_scripts/dosbox_wrapper/shared_code/dosbox_wrapper_module.rb', line 133 def self.run( i = ARGV ) require 'gtk_paradise/run' _ = ::GamesParadise::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?
#
89 90 91 |
# File 'lib/games_paradise/utility_scripts/dosbox_wrapper/shared_code/dosbox_wrapper_module.rb', line 89 def border_size? 2 end |
#connect_skeleton ⇒ Object
#
connect_skeleton (connect tag)
#
117 118 119 120 121 |
# File 'lib/games_paradise/utility_scripts/dosbox_wrapper/shared_code/dosbox_wrapper_module.rb', line 117 def connect_skeleton abort_on_exception minimal(@hbox1, 2) minimal(@button_generate_the_configuration_file, 2) end |
#create_buttons ⇒ Object
#
create
#
107 108 109 110 111 112 |
# File 'lib/games_paradise/utility_scripts/dosbox_wrapper/shared_code/dosbox_wrapper_module.rb', line 107 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)
#
96 97 98 99 100 101 102 |
# File 'lib/games_paradise/utility_scripts/dosbox_wrapper/shared_code/dosbox_wrapper_module.rb', line 96 def create_skeleton @hbox1 = gtk_hbox @hbox1.minimal(text('Number of CPU cycles to use:')) @entry_cpu_cycles = gtk_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_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?
#
82 83 84 |
# File 'lib/games_paradise/utility_scripts/dosbox_wrapper/shared_code/dosbox_wrapper_module.rb', line 82 def padding? 2 end |
#reset ⇒ Object
#
reset (reset tag)
#
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/games_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 # ======================================================================= # @title = TITLE # ======================================================================= # # === @width # ======================================================================= # set_width(WIDTH) # ======================================================================= # # === @height # ======================================================================= # set_height(HEIGHT) set_use_this_font(:dejavu_condensed_22) use_gtk_paradise_project_css_file infer_the_size_automatically end |
#run ⇒ Object
#
run (run tag)
#
126 127 128 |
# File 'lib/games_paradise/utility_scripts/dosbox_wrapper/shared_code/dosbox_wrapper_module.rb', line 126 def run create_skeleton_then_connect_skeleton end |