class Amun::Windows::Base
based on amun object, means it has event manager inside and respond to all event manager methods (bind, undind, trigger…etc) and has a size (Rect
instance), it also expose the methods of the size to the public, it also creates a subwindow from the curses standard screen and resizes it whenever you set a new (size) value
Attributes
curses_window[RW]
size[R]
Public Class Methods
new(size)
click to toggle source
Calls superclass method
Amun::Object::new
# File lib/amun/windows/base.rb, line 18 def initialize(size) super() @size = size @curses_window = Curses.stdscr.subwin(height, width, top, left) end
Public Instance Methods
size=(size)
click to toggle source
change the object size the internal curses window will be resized and moved along with it
# File lib/amun/windows/base.rb, line 27 def size=(size) @size = size resize end
Private Instance Methods
resize()
click to toggle source
# File lib/amun/windows/base.rb, line 36 def resize curses_window.resize(height, width) curses_window.move(top, left) end