Class: ChemistryParadise::GUI::Gtk::Wetter

Inherits:
Gtk::Box
  • Object
show all
Includes:
WetterModule, Gtk::BaseModule
Defined in:
lib/chemistry_paradise/gui/gtk3/wetter/wetter.rb

Overview

ChemistryParadise::GUI::Gtk::Wetter

Constant Summary

Constants included from WetterModule

WetterModule::HEIGHT, WetterModule::SMALLER_FONT, WetterModule::SMALLEST_FONT, WetterModule::TITLE, WetterModule::USE_THIS_FONT, WetterModule::WIDTH

Class Method Summary collapse

Instance Method Summary collapse

Methods included from WetterModule

#attach_temperature_value_to_the_main_label, #connect_skeleton, #create_skeleton, #create_the_buttons, #create_the_labels, #create_the_main_window, #determine_which_smiley_should_be_used, #do_the_actions_associated_with_the_update_button, #main_window?, #reset_the_shared_module, #return_the_temperature_string, #smaller_font?, #smallest_font?, #update_the_temperature_listing

Constructor Details

#initialize(commandline_arguments = ARGV, run_already = true) ⇒ Wetter

#

initialize

#


32
33
34
35
36
37
38
39
40
41
42
# File 'lib/chemistry_paradise/gui/gtk3/wetter/wetter.rb', line 32

def initialize(
    commandline_arguments = ARGV,
    run_already           = true
  )
  super(:vertical)
  reset
  set_commandline_arguments(
    commandline_arguments
  )
  run if run_already
end

Class Method Details

.gtk3_widgetObject

#

ChemistryParadise::GUI::Gtk::Wetter.gtk3_widget

This variant is guaranteed to return the gtk3 variant.

#


88
89
90
# File 'lib/chemistry_paradise/gui/gtk3/wetter/wetter.rb', line 88

def self.gtk3_widget
  new('gtk3')
end

.run(i = ARGV) ⇒ Object

#

ChemistryParadise::GUI::Gtk::Wetter.run

#


104
105
106
107
108
109
110
111
112
113
# File 'lib/chemistry_paradise/gui/gtk3/wetter/wetter.rb', line 104

def self.run(
    i = ARGV # or 'gtk3' as argument here.
  )
  require 'gtk_paradise/app/app.rb'
  _ = ::ChemistryParadise::GUI::Gtk::Wetter.new(i)
  r = ::Gtk.run
  r << _
  r.enable_quick_exit
  r.automatic_top_left_then_run
end

.run_gtk3_widgetObject

#

ChemistryParadise::GUI::Gtk::Wetter.run_gtk3_widget

#


95
96
97
98
99
# File 'lib/chemistry_paradise/gui/gtk3/wetter/wetter.rb', line 95

def self.run_gtk3_widget
  gtk3_widget
  ::Gtk.enable_default_css
  ::Gtk.main
end

Instance Method Details

#border_size?Boolean

#

border_size?

#

Returns:

  • (Boolean)


72
73
74
# File 'lib/chemistry_paradise/gui/gtk3/wetter/wetter.rb', line 72

def border_size?
  2
end

#padding?Boolean

#

padding?

#

Returns:

  • (Boolean)


65
66
67
# File 'lib/chemistry_paradise/gui/gtk3/wetter/wetter.rb', line 65

def padding?
  4
end

#resetObject

#

reset (reset tag)

#


47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/chemistry_paradise/gui/gtk3/wetter/wetter.rb', line 47

def reset
  reset_the_internal_variables
  infer_the_namespace
  # ======================================================================= #
  # === @configuration
  # ======================================================================= #
  @configuration = [true, __dir__, namespace?]
  # ======================================================================= #
  # === Set the title, width, height and the font in use.
  # ======================================================================= #
  title_width_height_font(TITLE, WIDTH, HEIGHT, USE_THIS_FONT)
  use_gtk_paradise_project_css_file 
  infer_the_size_automatically
end

#runObject

#

run (run tag)

#


79
80
81
# File 'lib/chemistry_paradise/gui/gtk3/wetter/wetter.rb', line 79

def run
  super()
end