Class: Curses::Window
- Inherits:
-
Object
- Object
- Curses::Window
- Defined in:
- lib/cursesx.rb
Instance Attribute Summary collapse
-
#__children__ ⇒ Object
(also: #children)
readonly
Returns the value of attribute __children__.
-
#__parent__ ⇒ Object
(also: #parent)
Returns the value of attribute __parent__.
Instance Method Summary collapse
- #color(name) ⇒ Object
-
#draw ⇒ Object
Draw the window.
-
#echo ⇒ Object
Echo within the block.
-
#noecho ⇒ Object
Noecho within the block.
-
#standend ⇒ Object
Standend within the block.
- #standend_orig ⇒ Object
-
#standout ⇒ Object
Standout within the block.
- #standout_orig ⇒ Object
- #subwin(height, width, y, x, mod = nil) ⇒ Object
- #subwin_orig ⇒ Object
Instance Attribute Details
#__children__ ⇒ Object (readonly) Also known as: children
Returns the value of attribute __children__.
95 96 97 |
# File 'lib/cursesx.rb', line 95 def __children__ @__children__ end |
#__parent__ ⇒ Object Also known as: parent
Returns the value of attribute __parent__.
96 97 98 |
# File 'lib/cursesx.rb', line 96 def __parent__ @__parent__ end |
Instance Method Details
#color(name) ⇒ Object
163 |
# File 'lib/cursesx.rb', line 163 def color(name); Curses.color(name); end |
#draw ⇒ Object
Draw the window.
161 |
# File 'lib/cursesx.rb', line 161 def draw; warning "Not implemented"; end |
#echo ⇒ Object
Echo within the block.
137 138 139 140 141 142 143 144 145 146 |
# File 'lib/cursesx.rb', line 137 def echo if block_given? Curses.echo res = yield Curses.noecho return res else Curses.echo end end |
#noecho ⇒ Object
Noecho within the block.
149 150 151 152 153 154 155 156 157 158 |
# File 'lib/cursesx.rb', line 149 def noecho if block_given? Curses.noecho res = yield Curses.echo return res else Curses.noecho end end |
#standend ⇒ Object
Standend within the block.
126 127 128 129 130 131 132 133 134 |
# File 'lib/cursesx.rb', line 126 def standend if block_given? standend_orig yield standout_orig else standend_orig end end |
#standend_orig ⇒ Object
112 |
# File 'lib/cursesx.rb', line 112 alias :standend_orig :standend |
#standout ⇒ Object
Standout within the block.
115 116 117 118 119 120 121 122 123 |
# File 'lib/cursesx.rb', line 115 def standout if block_given? standout_orig yield standend_orig else standout_orig end end |
#standout_orig ⇒ Object
111 |
# File 'lib/cursesx.rb', line 111 alias :standout_orig :standout |
#subwin(height, width, y, x, mod = nil) ⇒ Object
102 103 104 105 106 107 108 109 |
# File 'lib/cursesx.rb', line 102 def subwin(height, width, y, x, mod = nil) @__children__ ||= [] win = subwin_orig(height, width, y, x) win.parent = self win.extend mod if mod @__children__ << win return win end |
#subwin_orig ⇒ Object
101 |
# File 'lib/cursesx.rb', line 101 alias :subwin_orig :subwin |