Class: Fzeet::UIRibbon::Command
- Inherits:
-
Object
- Object
- Fzeet::UIRibbon::Command
- Includes:
- Toggle
- Defined in:
- lib/fzeet/UIRibbon.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#ribbon ⇒ Object
readonly
Returns the value of attribute ribbon.
Instance Method Summary collapse
- #[](k) ⇒ Object
- #[]=(k, v) ⇒ Object
- #checked=(checked) ⇒ Object
- #checked? ⇒ Boolean
- #enabled=(enabled) ⇒ Object
- #enabled? ⇒ Boolean
-
#initialize(ribbon, id) ⇒ Command
constructor
A new instance of Command.
Methods included from Toggle
Constructor Details
#initialize(ribbon, id) ⇒ Command
Returns a new instance of Command.
16 17 18 |
# File 'lib/fzeet/UIRibbon.rb', line 16 def initialize(ribbon, id) @ribbon, @id = ribbon, id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
20 21 22 |
# File 'lib/fzeet/UIRibbon.rb', line 20 def id @id end |
#ribbon ⇒ Object (readonly)
Returns the value of attribute ribbon.
20 21 22 |
# File 'lib/fzeet/UIRibbon.rb', line 20 def ribbon @ribbon end |
Instance Method Details
#[](k) ⇒ Object
22 |
# File 'lib/fzeet/UIRibbon.rb', line 22 def [](k) Windows::PROPVARIANT.new.tap { |v| ribbon.uif.GetUICommandProperty(id, k, v) } end |
#[]=(k, v) ⇒ Object
23 |
# File 'lib/fzeet/UIRibbon.rb', line 23 def []=(k, v) ribbon.uif.SetUICommandProperty(id, k, v) end |
#checked=(checked) ⇒ Object
29 |
# File 'lib/fzeet/UIRibbon.rb', line 29 def checked=(checked) self[Windows::UI_PKEY_BooleanValue] = Windows::PROPVARIANT[:bool, checked] end |
#checked? ⇒ Boolean
28 |
# File 'lib/fzeet/UIRibbon.rb', line 28 def checked?; self[Windows::UI_PKEY_BooleanValue].bool end |
#enabled=(enabled) ⇒ Object
26 |
# File 'lib/fzeet/UIRibbon.rb', line 26 def enabled=(enabled) self[Windows::UI_PKEY_Enabled] = Windows::PROPVARIANT[:bool, enabled] end |
#enabled? ⇒ Boolean
25 |
# File 'lib/fzeet/UIRibbon.rb', line 25 def enabled?; self[Windows::UI_PKEY_Enabled].bool end |