Class: RubyCurses::TabbedWindow
- Defined in:
- lib/rbcurse/core/widgets/rtabbedwindow.rb
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.
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/rbcurse/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 = 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.
24 25 26 |
# File 'lib/rbcurse/core/widgets/rtabbedwindow.rb', line 24 def tabbed_pane @tabbed_pane end |
Instance Method Details
#run ⇒ Object
returns button index Call this after instantiating the window
41 42 43 44 45 |
# File 'lib/rbcurse/core/widgets/rtabbedwindow.rb', line 41 def run @form.repaint @window.wrefresh return handle_keys end |