Class: Roebe::GUI::Gtk::Shell

Inherits:
Gtk::Frame
  • Object
show all
Includes:
Gtk::BaseModule, ShellModule
Defined in:
lib/roebe/gui/gtk4/shell/shell.rb

Overview

Roebe::GUI::Gtk::Shell

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

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

#

initialize

#


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/roebe/gui/gtk4/shell/shell.rb', line 23

def initialize(
    commandline_arguments = ARGV,
    run_already           = true
  )
  super('')
  reset
  set_commandline_arguments(
    commandline_arguments.reject {|entry| entry.start_with?('--') }
  )
  label.set_markup(
    %Q(<span weight="ultrabold" size="large" foreground="darkblue"> #{TITLE} </span>),
    use_underline: true
  )
  on_delete_event_quit_the_application
  run if run_already
end

Class Method Details

.run(i = ARGV) ⇒ Object

#

Roebe::GUI::Gtk::Shell.run

#


83
84
85
86
87
# File 'lib/roebe/gui/gtk4/shell/shell.rb', line 83

def self.run(i = ARGV)
  ::Gtk.default_application('roebe.gui.gtk.shell') {{
    widget_to_use: Roebe::GUI::Gtk::Shell.new
  }}
end

Instance Method Details

#connect_skeletonObject

#

connect_skeleton

#


76
77
78
# File 'lib/roebe/gui/gtk4/shell/shell.rb', line 76

def connect_skeleton
  append(@label_current_working_directory)
end

#create_skeletonObject

#

create_skeleton (create tag, skeleton tag)

#


62
63
64
# File 'lib/roebe/gui/gtk4/shell/shell.rb', line 62

def create_skeleton
  create_the_labels                   # (1) defined in shell_module.rb
end

#resetObject

#

reset (reset tag)

#


43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/roebe/gui/gtk4/shell/shell.rb', line 43

def reset
  reset_the_internal_variables
  reset_the_shared_module
  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)

#


69
70
71
# File 'lib/roebe/gui/gtk4/shell/shell.rb', line 69

def run
  super()
end