Class: Spreadshit::Window
- Inherits:
-
Object
- Object
- Spreadshit::Window
- Includes:
- Curses
- Defined in:
- lib/spreadshit/window.rb
Defined Under Namespace
Classes: Address, SpreadsheetDelegate
Instance Method Summary collapse
-
#initialize {|@spreadsheet_delegate| ... } ⇒ Window
constructor
A new instance of Window.
- #start ⇒ Object
Constructor Details
#initialize {|@spreadsheet_delegate| ... } ⇒ Window
Returns a new instance of Window.
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/spreadshit/window.rb', line 31 def initialize @mode = :navigation @x, @y = 0, 0 @sx, @sy = 0, 0 @col_width = 13 @letters = ("A".."ZZZ").to_a @show_dependencies = false @spreadsheet_delegate = SpreadsheetDelegate.new yield @spreadsheet_delegate end |
Instance Method Details
#start ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/spreadshit/window.rb', line 44 def start init_screen start_color init_pair(COLOR_WHITE, COLOR_BLACK, COLOR_WHITE) init_pair(COLOR_BLUE, COLOR_BLACK, COLOR_BLUE) init_pair(COLOR_GREEN, COLOR_BLACK, COLOR_GREEN) init_pair(COLOR_RED, COLOR_BLACK, COLOR_MAGENTA) init_pair(COLOR_YELLOW, COLOR_BLACK, COLOR_YELLOW) init_pair(COLOR_CYAN, COLOR_BLACK, COLOR_CYAN) use_default_colors redraw loop { capture_input } end |