ZoomableViewΒΆ

class ZoomableView

A zoomable layout

Hierarchy

class ZoomableView < class Window

Members

Methods:

string path getnodepath ( ) Returns the edited node path (is nil if the method is not supported)
number,number,number,number left,right,top,bottom getvirtualrect ( ) Get the view coordinates in the virtual node space. This space is the same than the Node.NodePos plug.
number,number,number zoom,x,y getzoompos ( ) Get the zoom and display origin of the ZoomableView
nil setnodepath ( string path )
nil setzoompos ( number zoom , number x , number y ) Change the zoom and display origin of the ZoomableView
number,number x,y tozoomable ( number x , number y ) Transform a couple of window coordinates to the ZoomableView virtual node coordinates. This space is the same than the Node.NodePos plug.


Inherited from class Window

Methods:

nil addtracker ( table tracker ) Add a tracker to this window. A tracker receives notification when the tracked window is invalidated or destroyed. A tracker may implement onTrackedDestroyed and onTrackedInvalidated to get notifications on such events
nil destroy ( ) Destroy the window and all its children windows
nil disable ( ) Disable the window
nil enable ( ) Enable the window
nil getchild ( string|number name ) Get a child window
Window container getcontainer ( ) Get the main container of a window
nil geth ( ) Get the window height
string path getnodepath ( ) Returns the edited node path (is nil if the method is not supported)
nil getparent ( string|nil parentclass ) Get the first parent window of given class (immediate parent if no class is provided)
nil getroot ( ) Return the root window of this window
nil getw ( ) Get the window width
nil getx ( ) Get the window X coordinate in the parent space
nil gety ( ) Get the window Y coordinate in the parent space
nil hide ( ) Hide the window
nil removetracker ( table tracker ) Remove a tracker of this window.
nil setcolor ( ui.color color ) Change the window color, see also ui.color function
nil setfocus ( ) Set the focus to the window
nil seth ( number h , number parentmul , number childadd , number childmul ) Set the window height
nil setnodepath ( string path )
nil settitle ( string name ) Change the window title
nil settopmost ( ) Set the window as top most in children order
nil setw ( number w , number parentmul , number childadd , number childmul ) Set the window width
nil setx ( number x , number parentpivot , number pivot ) Set the X window placement
nil sety ( number y , number parentpivot , number pivot ) Set the Y window placement
nil show ( ) Show the window

Documentation

string path getnodepath ( )

Returns the edited node path (is nil if the method is not supported)

Return:

  • path The path to the edited node


number,number,number,number left,right,top,bottom getvirtualrect ( )

Get the view coordinates in the virtual node space. This space is the same than the Node.NodePos plug.

Return:

  • left,right,top,bottom The current left, right, top and bottom virtual coordinate of the view


number,number,number zoom,x,y getzoompos ( )

Get the zoom and display origin of the ZoomableView

Return:

  • zoom,x,y The current zoom and origin of the ZoomableView


nil setnodepath ( string path )

Arguments:

  • path The path of the node to edit


nil setzoompos ( number zoom , number x , number y )

Change the zoom and display origin of the ZoomableView

Arguments:

  • zoom the new zoom
  • x the X coordinate of the left border of the ZoomableView
  • y the Y coordinate of the top border of the ZoomableView


number,number x,y tozoomable ( number x , number y )

Transform a couple of window coordinates to the ZoomableView virtual node coordinates. This space is the same than the Node.NodePos plug.

Arguments:

  • x The window X coordinate
  • y The window Y coordinate

Return:

  • x,y The input coordinates in ZoomableView space