Class: Teek::UI::WidgetAddressing Private

Inherits:
Object
  • Object
show all
Defined in:
lib/teek/ui/widget_addressing.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

The default Teek::UI::WidgetType#addressing strategy - an ordinary Tk widget with an independent path of its own, driving +#path+/ #configure through it directly. See Teek::UI::WidgetType#addressing for how a type opts into a different strategy (e.g. MenuEntryAddressing).

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ WidgetAddressing

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of WidgetAddressing.



16
17
18
# File 'lib/teek/ui/widget_addressing.rb', line 16

def initialize(node)
  @node = node
end

Instance Method Details

#configure(**opts) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • opts (Hash)

Raises:



29
30
31
# File 'lib/teek/ui/widget_addressing.rb', line 29

def configure(**opts)
  realized.app.command(realized.path, :configure, **opts)
end

#option_dumpHash{Symbol => String}

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns every current option/value Tk reports for this widget right now.

Returns:

  • (Hash{Symbol => String})

    every current option/value Tk reports for this widget right now

Raises:



36
37
38
# File 'lib/teek/ui/widget_addressing.rb', line 36

def option_dump
  OptionDumpParsing.parse(realized.app, realized.app.command(realized.path, :configure))
end

#virtual_pathString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the real Tk widget path.

Returns:

  • (String)

    the real Tk widget path

Raises:



22
23
24
# File 'lib/teek/ui/widget_addressing.rb', line 22

def virtual_path
  realized.path
end