Class: Fox::FXPseudoKeyboard
- Inherits:
-
Object
- Object
- Fox::FXPseudoKeyboard
- Defined in:
- lib/fox16/pseudokeyboard.rb
Overview
An FXPseudoKeyboard object provides a simple means to operate widgets programmatically, to aid test driven design. An FXPseudoKeyboard instance can be pointed at an FXObject and will manage the sending of events to it.
For example:
textfield = FXTextField.new(...)
pk = FXPseudoKeyboard.new(textfield)
pk.doKeyPress # sends a SEL_KEYPRESS message to the textfield
pk.doKeyRelease # sends a SEL_KEYRELEASE message to the textfield
Instance Attribute Summary collapse
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
- #doKeyPress ⇒ Object
- #doKeyRelease ⇒ Object
-
#initialize(tgt = nil) ⇒ FXPseudoKeyboard
constructor
A new instance of FXPseudoKeyboard.
Constructor Details
#initialize(tgt = nil) ⇒ FXPseudoKeyboard
Returns a new instance of FXPseudoKeyboard.
19 20 21 |
# File 'lib/fox16/pseudokeyboard.rb', line 19 def initialize(tgt=nil) @target = tgt end |
Instance Attribute Details
#target ⇒ Object
Returns the value of attribute target.
17 18 19 |
# File 'lib/fox16/pseudokeyboard.rb', line 17 def target @target end |