Class: PPCurses::View
- Inherits:
-
ResponderManager
- Object
- Responder
- ResponderManager
- PPCurses::View
- Defined in:
- lib/ppcurses/view.rb
Overview
Direct Known Subclasses
Button, ButtonPair, ComboBox, DatePicker, Form, InputElement, RadioButtonGroup, TableView
Instance Attribute Summary collapse
-
#frame ⇒ Object
Returns the value of attribute frame.
Attributes inherited from ResponderManager
Attributes inherited from Responder
Instance Method Summary collapse
-
#display(screen) ⇒ Object
Expects screen to be a PPCurses::Screen object Need to convert to work with a window or a view.
-
#initialize ⇒ View
constructor
Extending classes should set the appropriate frame size; the default implementation sets the frame to a zero rect which, although avoids pointer errors, isn’t very useful.
- #setFrameOrigin(origin) ⇒ Object
- #setFrameSize(size) ⇒ Object
Methods inherited from ResponderManager
#accepts_first_responder, #make_first_responder
Methods inherited from Responder
#accepts_first_responder, #become_first_responder, isa, #key_down, #resign_first_responder
Constructor Details
#initialize ⇒ View
Extending classes should set the appropriate frame size; the default implementation sets the frame to a zero rect which, although avoids pointer errors, isn’t very useful.
18 19 20 |
# File 'lib/ppcurses/view.rb', line 18 def initialize @frame = Rect.zeroRect end |
Instance Attribute Details
#frame ⇒ Object
Returns the value of attribute frame.
13 14 15 |
# File 'lib/ppcurses/view.rb', line 13 def frame @frame end |
Instance Method Details
#display(screen) ⇒ Object
Expects screen to be a PPCurses::Screen object Need to convert to work with a window or a view.
The default implementation does nothing
40 41 42 |
# File 'lib/ppcurses/view.rb', line 40 def display(screen) end |
#setFrameOrigin(origin) ⇒ Object
56 57 58 |
# File 'lib/ppcurses/view.rb', line 56 def setFrameOrigin( origin ) @frame.origin = origin end |
#setFrameSize(size) ⇒ Object
61 62 63 |
# File 'lib/ppcurses/view.rb', line 61 def setFrameSize( size ) @frame.size = size end |