Module: RTask::UI::CursesInterface::Main
- Defined in:
- lib/rtask/ui/curses.rb
Instance Attribute Summary collapse
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
Class Method Summary collapse
Instance Method Summary collapse
-
#draw ⇒ Object
Draw windows.
-
#input(msg, val = "") ⇒ Object
Input.
-
#input_char(msg) ⇒ Object
Wait to input a character.
-
#message(msg) ⇒ Object
Show the message.
-
#start ⇒ Object
Start to render main window.
Instance Attribute Details
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
33 34 35 |
# File 'lib/rtask/ui/curses.rb', line 33 def spec @spec end |
Class Method Details
.extended(obj) ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/rtask/ui/curses.rb', line 35 def self.extended(obj) obj.instance_eval do @awin = subwin maxy-7, maxx, 4, 0, Attribute @bwin = subwin 4, maxx, 0, 0, Banner @dwin = subwin 1, maxx, maxy-1, 0, Display @uwin = subwin 1, maxx, maxy-2, 0, Usage end end |
Instance Method Details
#draw ⇒ Object
Draw windows.
50 51 52 |
# File 'lib/rtask/ui/curses.rb', line 50 def draw clear; children.each {|win| win.draw } end |
#input(msg, val = "") ⇒ Object
Input.
58 |
# File 'lib/rtask/ui/curses.rb', line 58 def input(msg, val=""); @dwin.input(msg, val); end |
#input_char(msg) ⇒ Object
Wait to input a character.
61 |
# File 'lib/rtask/ui/curses.rb', line 61 def input_char(msg); @dwin.input_char(msg); end |
#message(msg) ⇒ Object
Show the message.
55 |
# File 'lib/rtask/ui/curses.rb', line 55 def (msg); @dwin << msg; end |
#start ⇒ Object
Start to render main window.
45 46 47 |
# File 'lib/rtask/ui/curses.rb', line 45 def start draw; @awin.start end |