Class: Roebe::GUI::LibUI::FotoSearcher

Inherits:
Object
  • Object
show all
Includes:
LibuiParadise::Extensions
Defined in:
lib/roebe/gui/libui/foto_searcher/foto_searcher.rb

Overview

Roebe::GUI::LibUI::FotoSearcher

Constant Summary collapse

TITLE =
#

TITLE

#
'Foto Searcher'
WIDTH =
800
HEIGHT =
600

Instance Method Summary collapse

Constructor Details

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

#

initialize

#


35
36
37
38
39
40
41
42
43
44
# File 'lib/roebe/gui/libui/foto_searcher/foto_searcher.rb', line 35

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

Instance Method Details

#create_skeletonObject

#

create_skeleton (create tag, skeleton tag)

#


56
57
58
59
60
61
# File 'lib/roebe/gui/libui/foto_searcher/foto_searcher.rb', line 56

def create_skeleton
  # ======================================================================= #
  # === @window
  # ======================================================================= #
  @window = ui_padded_main_window(title?, width?, height?, 0)
end

#resetObject

#

reset (reset tag)

#


49
50
51
# File 'lib/roebe/gui/libui/foto_searcher/foto_searcher.rb', line 49

def reset
  title_width_height(TITLE, WIDTH, HEIGHT)
end

#return_the_main_gridObject

#

return_the_main_grid

#


73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/roebe/gui/libui/foto_searcher/foto_searcher.rb', line 73

def return_the_main_grid
  text1 = text('Input the search term here:')
  entry1 = ui_entry
  button_generate = button('Generate')
  button_generate.on_clicked {
   _ = entry1.text?
   unless _.empty?
     Roebe.foto_searcher(_)
   end
  }
  grid = ui_vbox
  grid.minimal(hbox(text1, entry1))
  grid.minimal(vbox(button_generate, quit_button))
  return grid
end

#return_titleObject

#

return_title

#


66
67
68
# File 'lib/roebe/gui/libui/foto_searcher/foto_searcher.rb', line 66

def return_title
  TITLE
end

#runObject

#

run

#


92
93
94
95
96
97
98
99
100
101
102
# File 'lib/roebe/gui/libui/foto_searcher/foto_searcher.rb', line 92

def run
  create_skeleton_then_connect_skeleton
  outer_vbox = padded_vbox
  outer_vbox.add_hsep
  outer_vbox.minimal(text(return_title))
  outer_vbox.add_hsep
  outer_vbox.maximal(return_the_main_grid, 1)
  outer_vbox.add_hsep
  @window.add(outer_vbox)
  @window.intelligent_exit
end