Class: FX::Button
- Inherits:
-
Fox::FXButton
- Object
- Fox::FXButton
- FX::Button
- Defined in:
- lib/libGUIb16.rb,
lib/libGUIb14.rb
Instance Method Summary collapse
-
#initialize(p, opts = 0) ⇒ Button
constructor
A new instance of Button.
- #state ⇒ Object
- #state=(x) ⇒ Object
Methods included from MiddleBtn
#handleMMB_Events, #onMiddleBtnPress, #onMiddleBtnRelease
Methods included from RightBtn
#handleRMB_Events, #onRightBtnPress, #onRightBtnRelease
Constructor Details
#initialize(p, opts = 0) ⇒ Button
Returns a new instance of Button.
412 413 414 415 416 |
# File 'lib/libGUIb16.rb', line 412 def initialize(p, opts = 0) super(p, "Button", nil, nil, 0, Fox::BUTTON_NORMAL | opts) handleMMB_Events handleRMB_Events end |
Instance Method Details
#state ⇒ Object
428 429 430 431 432 433 |
# File 'lib/libGUIb16.rb', line 428 def state if getState == Fox::STATE_DOWN then return true elsif getState == Fox::STATE_CHECKED then return true end false end |
#state=(x) ⇒ Object
418 419 420 421 422 423 424 425 426 |
# File 'lib/libGUIb16.rb', line 418 def state=(x) if x == true setState(Fox::STATE_DOWN) elsif x == false setState(Fox::STATE_UP) elsif x.instance_of?(Integer) setState(x) end end |