Class: TabbedWindow
Instance Attribute Summary collapse
-
#tabbed_pane ⇒ Object
readonly
Returns the value of attribute tabbed_pane.
Instance Method Summary collapse
-
#initialize(config = {}, &block) ⇒ TabbedWindow
constructor
The given block is passed to the TabbedPane The given dimensions are used to create the window.
-
#run ⇒ Object
returns button index Call this after instantiating the window.
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_pane ⇒ Object (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
#run ⇒ Object
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 |