Class: Fullscreen
- Inherits:
-
Fox::FXMainWindow
- Object
- Fox::FXMainWindow
- Fullscreen
- Includes:
- Fox, Responder
- Defined in:
- lib/piggy-gui/fullscreen.rb
Overview
Provide a validation hook for ID_ACCEPT action
Instance Method Summary collapse
-
#initialize(*args) ⇒ Fullscreen
constructor
A new instance of Fullscreen.
- #on_key_press(sender, sel, event) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Fullscreen
Returns a new instance of Fullscreen.
11 12 13 14 |
# File 'lib/piggy-gui/fullscreen.rb', line 11 def initialize(*args) super(*args) FXMAPFUNC(SEL_KEYPRESS, 0, :on_key_press) end |
Instance Method Details
#on_key_press(sender, sel, event) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/piggy-gui/fullscreen.rb', line 16 def on_key_press(sender, sel, event) if event.code == KEY_Escape if FOXVERSION_GE_1_2 close(true) else hide() end return 1 end return 0 end |