Class: Fzeet::UIRibbon::Command

Inherits:
Object
  • Object
show all
Includes:
Toggle
Defined in:
lib/fzeet/UIRibbon.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Toggle

#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

#idObject (readonly)

Returns the value of attribute id.



20
21
22
# File 'lib/fzeet/UIRibbon.rb', line 20

def id
  @id
end

#ribbonObject (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

Returns:

  • (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

Returns:

  • (Boolean)


25
# File 'lib/fzeet/UIRibbon.rb', line 25

def enabled?; self[Windows::UI_PKEY_Enabled].bool end