Class: Twterm::FilterQueryWindow
- Inherits:
-
Object
- Object
- Twterm::FilterQueryWindow
- Includes:
- Curses, Singleton
- Defined in:
- lib/twterm/filter_query_window.rb
Instance Method Summary collapse
- #clear ⇒ Object
-
#initialize ⇒ FilterQueryWindow
constructor
A new instance of FilterQueryWindow.
- #input ⇒ Object
Constructor Details
#initialize ⇒ FilterQueryWindow
Returns a new instance of FilterQueryWindow.
6 7 8 |
# File 'lib/twterm/filter_query_window.rb', line 6 def initialize @window = stdscr.subwin(1, stdscr.maxx, stdscr.maxy - 1, 0) end |
Instance Method Details
#clear ⇒ Object
23 24 25 26 |
# File 'lib/twterm/filter_query_window.rb', line 23 def clear stdscr.setpos(stdscr.maxy - 1, 0) stdscr.addstr(' ' * window.maxx) end |
#input ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/twterm/filter_query_window.rb', line 10 def input clear echo stdscr.setpos(stdscr.maxy - 1, 0) stdscr.addch '/' query = getstr.chomp noecho query || '' end |