Method: CDK::SCREEN#initialize

Defined in:
lib/cdk/screen.rb

#initialize(window) ⇒ SCREEN

Returns a new instance of SCREEN.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/cdk/screen.rb', line 10

def initialize (window)
  # initialization for the first time
  if CDK::ALL_SCREENS.size == 0
    # Set up basic curses settings.
    # #ifdef HAVE_SETLOCALE
    # setlocale (LC_ALL, "");
    # #endif
    
    Ncurses.noecho
    Ncurses.cbreak
  end

  CDK::ALL_SCREENS << self
  @object_count = 0
  @object_limit = 2
  @object = Array.new(@object_limit, nil)
  @window = window
  @object_focus = 0
end