Class: Teek::UI::RealizedNode

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

Overview

What a Node gets in its realized slot once the realizer creates a live widget for it: which app owns it, its live Tk path (what a Handle acts on - #configure, event bindings, on_close, ...), and the path its parent's own layout should actually place (+arrange_path+, defaulting to the same as path).

These two paths only diverge for a node the realizer auto-wraps in a scrollbar (a bare list/text_area/table/tree/canvas, when scrolling applies - see Realizer#create_native_scrollable): path stays the real widget, so a Handle keeps acting on it directly, but the widget's actual Tk parent is now the wrapper frame the scrollbar lives in - arrange_path points there instead, since that's what has to be packed/gridded into the surrounding layout.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app:, path:, arrange_path: path) ⇒ RealizedNode

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 RealizedNode.



20
21
22
# File 'lib/teek/ui/realized_node.rb', line 20

def initialize(app:, path:, arrange_path: path)
  super
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app

Returns:

  • (Object)

    the current value of app



18
19
20
# File 'lib/teek/ui/realized_node.rb', line 18

def app
  @app
end

#arrange_pathObject (readonly)

Returns the value of attribute arrange_path

Returns:

  • (Object)

    the current value of arrange_path



18
19
20
# File 'lib/teek/ui/realized_node.rb', line 18

def arrange_path
  @arrange_path
end

#pathObject (readonly)

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



18
19
20
# File 'lib/teek/ui/realized_node.rb', line 18

def path
  @path
end