Class: TtySlides::MainWindow

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/main_window.rb

Instance Method Summary collapse

Constructor Details

#initialize(window, title = '') ⇒ MainWindow

Returns a new instance of MainWindow.



4
5
6
7
8
# File 'lib/main_window.rb', line 4

def initialize window, title=''
  @title = title
  super window
  refresh
end

Instance Method Details

#refreshObject



14
15
16
17
18
19
# File 'lib/main_window.rb', line 14

def refresh
  box("|", "-")
  setpos(0, 0)
  addstr(@title)
  super
end

#to_title_positionObject



10
11
12
# File 'lib/main_window.rb', line 10

def to_title_position
  setpos(1, 1)
end