Class: TabbedWindow

Inherits:
Object show all
Defined in:
lib/rbcurse/core/widgets/rtabbedwindow.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config = {}, &block) ⇒ TabbedWindow

The given block is passed to the TabbedPane The given dimensions are used to create the window. The TabbedPane is placed at 0,0 and fills the window.



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/rbcurse/core/widgets/rtabbedwindow.rb', line 27

def initialize config={}, &block
  
  h = config.fetch(:height, 0)
  w = config.fetch(:width, 0)
  t = config.fetch(:row, 0)
  l = config.fetch(:col, 0)
  @window = VER::Window.new :height => h, :width => w, :top => t, :left => l
  @form = Form.new @window
  config[:row] = config[:col] = 0
  @tabbed_pane = TabbedPane.new @form, config , &block
end

Instance Attribute Details

#tabbed_paneObject (readonly)

Returns the value of attribute tabbed_pane.



23
24
25
# File 'lib/rbcurse/core/widgets/rtabbedwindow.rb', line 23

def tabbed_pane
  @tabbed_pane
end

Instance Method Details

#runObject

returns button index Call this after instantiating the window



40
41
42
43
44
# File 'lib/rbcurse/core/widgets/rtabbedwindow.rb', line 40

def run
  @form.repaint
  @window.wrefresh
  return handle_keys
end