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.



435
436
437
# File 'lib/fzeet/windows/uiribbon.rb', line 435

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

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



439
440
441
# File 'lib/fzeet/windows/uiribbon.rb', line 439

def id
  @id
end

#ribbonObject (readonly)

Returns the value of attribute ribbon.



439
440
441
# File 'lib/fzeet/windows/uiribbon.rb', line 439

def ribbon
  @ribbon
end

Instance Method Details

#[](k) ⇒ Object



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

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

#[]=(k, v) ⇒ Object



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

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

#checked=(checked) ⇒ Object



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

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

#checked?Boolean

Returns:

  • (Boolean)


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

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

#enabled=(enabled) ⇒ Object



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

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

#enabled?Boolean

Returns:

  • (Boolean)


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

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