Class: Canis::TabbedWindow

Inherits:
Object show all
Defined in:
lib/canis/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.



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

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 = Canis::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.



24
25
26
# File 'lib/canis/core/widgets/rtabbedwindow.rb', line 24

def tabbed_pane
  @tabbed_pane
end

Instance Method Details

#runObject

returns button index Call this after instantiating the window



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

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