Class: VER::Help::HelpForHelp

Inherits:
Object
  • Object
show all
Defined in:
lib/ver/help/help_for_help.rb

Instance Method Summary collapse

Constructor Details

#initialize(parent) ⇒ HelpForHelp

Returns a new instance of HelpForHelp.



4
5
6
7
8
# File 'lib/ver/help/help_for_help.rb', line 4

def initialize(parent)
  @parent = parent
  setup_widgets
  setup_tags
end

Instance Method Details

#setup_tagsObject



35
36
# File 'lib/ver/help/help_for_help.rb', line 35

def setup_tags
end

#setup_widgetsObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/ver/help/help_for_help.rb', line 10

def setup_widgets
  font, tabs = VER.options.values_at(:font, :tabs)

  @text = Tk::Text.new(@parent,
    autoseparators:   true, # insert separators into the undo flow
    borderwidth:      0,
    exportselection:  true, # copy into X11 buffer automatically
    font:             font,
    insertofftime:    0, # blinking cursor be gone!
    setgrid:          true, # tell the wm that this is a griddy window
    takefocus:        true,
    tabs:             tabs,
    tabstyle:         :wordprocessor,
    undo:             true, # enable undo capabilities
    wrap:             :word
  )
  @text.pack
  @text.insert(:end, <<-'HELP')
Welcome to the internal Help system of VER.
You most likely got here by pressing [<Help.help_for_help>].

You can close the help using [<Views.view_close>].
  HELP
end