Class: Fzeet::UIRibbon::Command

Inherits:
Object
  • Object
show all
Includes:
Toggle
Defined in:
lib/fzeet/windows/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.



454
455
456
# File 'lib/fzeet/windows/uiribbon.rb', line 454

def initialize(ribbon, id)
	@ribbon, @id = ribbon, id
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



458
459
460
# File 'lib/fzeet/windows/uiribbon.rb', line 458

def id
  @id
end

#ribbonObject (readonly)

Returns the value of attribute ribbon.



458
459
460
# File 'lib/fzeet/windows/uiribbon.rb', line 458

def ribbon
  @ribbon
end

Instance Method Details

#[](k) ⇒ Object



460
# File 'lib/fzeet/windows/uiribbon.rb', line 460

def [](k) Windows::PROPVARIANT.new.tap { |v| ribbon.uif.GetUICommandProperty(id, k, v) } end

#[]=(k, v) ⇒ Object



461
# File 'lib/fzeet/windows/uiribbon.rb', line 461

def []=(k, v) ribbon.uif.SetUICommandProperty(id, k, v) end

#checked=(checked) ⇒ Object



467
# File 'lib/fzeet/windows/uiribbon.rb', line 467

def checked=(checked) self[Windows::UI_PKEY_BooleanValue] = Windows::PROPVARIANT[:bool, checked] end

#checked?Boolean

Returns:

  • (Boolean)


466
# File 'lib/fzeet/windows/uiribbon.rb', line 466

def checked?; self[Windows::UI_PKEY_BooleanValue].bool end

#enabled=(enabled) ⇒ Object



464
# File 'lib/fzeet/windows/uiribbon.rb', line 464

def enabled=(enabled) self[Windows::UI_PKEY_Enabled] = Windows::PROPVARIANT[:bool, enabled] end

#enabled?Boolean

Returns:

  • (Boolean)


463
# File 'lib/fzeet/windows/uiribbon.rb', line 463

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