Subscribe in a reader

class View

since 1.0.5

Description

This class provides functions to manipulate VSTForx's view and its objects. This class is meant to be singleton, so you are not able to create an instance of this. You can find the only instance in the Frx table (if the current lua context provides view access):
  --example: get all view objects  
objs=frx.view:getObjects()

Functions

Object add ( mixed whatToAdd )
void remove ( Object obj )
Sequence getObjects ( )
Object connect ( Object from , Object to )
Parameter addKnob ( )
Parameter addHostKnob ( int index )
Tuple getLocation ( )
void setLocation ( float x , float y )
Tuple getSize ( )
void setSize ( float width , float height )
Object getEntry ( )
Object getExit ( )
Object getByName ( string name )
Sequence getByType ( string type )
Sequence getSelectedObjects ( )
void addViewListener ( string callbackFuncName )
void removeViewListener ( string callbackFuncName )
void setMenu ( Table menu )
Object getContextObject ( )
ListWindow createListWindow ( )

Fields

no fields

Detailed Description

Functions

Object add ( mixed whatToAdd )
since 1.0.5
Description
Creates a new view object and adds it to the view.
Parameters
whatToAdd - can be either an object type id or a view object what isn't on the view already.
  frx.view:add("unknown-plugin.Plugin('/plugins/MyPlugin.vst')") --adding a plugin via location 
adsr=frx.view:add("internal.ADSRTrigger") -- adding internal plugin via object type id
frx.view:add(adsr:getParameters()[1]) -- adding view object parameter
Return
a Object
void remove ( Object obj )
since 1.0.5
Description
Removes an object from view.
Parameters
obj - the object to remove
Sequence getObjects ( )
since 1.0.5
Description
Return
all objects on view
Object connect ( Object from , Object to )
since 1.0.5
Description
Connects two view objects.
Parameters
from - the "connect from" Object
to - the "connect to" Object
Return
a Connection object or nil if objects are unconnectable.
Parameter addKnob ( )
since 1.0.5
Description
Adds a "free parameter" knob to view.
Return
a Parameter object.
Parameter addHostKnob ( int index )
since 1.0.5
Description
Adds a "host parameter" knob to view.
Parameters
index - the host parameter index
Return
a Parameter object
Tuple getLocation ( )
since 1.0.5
Description
Return
(x,y) the current view position
void setLocation ( float x , float y )
since 1.0.5
Description
Set the view position
Parameters
x -
y -
Tuple getSize ( )
since 1.0.5
Description
Return
(width, height) the current view size
void setSize ( float width , float height )
since 1.0.5
Description
Set the view size
Parameters
width -
height -
Object getEntry ( )
since 1.0.5
Description
Return
the "Entry" Object
Object getExit ( )
since 1.0.5
Description
Return
the "Exit" Object
Object getByName ( string name )
since 1.0.5
Description
Parameters
name -
Return
a Object by view name or nil.
Sequence getByType ( string type )
since 1.0.5
Description
Parameters
type - a object type id. Wildcards are supported.
  objs=frx.view:getByType("internal.Volume") --get all volumes 
objs=frx.view:getByType("internal.*") --get all internal plugins
objs=frx.view:getByType("*.Plugin*") --get all (external) plugins
Return
a sequence of Object
Sequence getSelectedObjects ( )
since 1.0.5
Description
Return
all selected objects
void addViewListener ( string callbackFuncName )
since 1.0.5
Description
Adds a view event listener.
  function onViewEvent(evName, evObj)		  
if evName=="requesting context menu" then
-- handle event
return
end
frx.view:addViewListener("onViewEvent")
implemented events:
  "requesting context menu", called when an objects context menu is opening
  "on saving view state", called when the view state is going to be saved (there is no "on load" event because the script dosen't run while loading)
  "object added", called when an object was added to view (an "object removing" event is unfortunately missing because it is to late at this point to create a lua representation before destroying the actual object)
Parameters
callbackFuncName - a function name which will be called when event appears.
void removeViewListener ( string callbackFuncName )
since 1.0.5
Description
Removes an view listener from view. ( see: addViewListener() )
Parameters
callbackFuncName - the listener related to the callback function
void setMenu ( Table menu )
since 1.0.5
Description
Set the view context menu.
Parameters
menu - a menu structure table. A previous installed menu will be overwritten.
  menuStructureExample = {	
{name="A Menu Label"},
{name="A Singe Entry", action="aValidLuaExpression()"},
{name="A SubMenu", {
{name="A Single Submenu Entry", action="aValidLuaExpression()"},
{name="Another Single Submenu Entry", action="aValidLuaExpression()"},
}
}
}
Object getContextObject ( )
since 1.0.5
Description
Return
the Object of that object whose context menu is currently shown or nil
ListWindow createListWindow ( )
since 1.0.52
Description
Creates a ListWindow object.
Return
the created ListWindow object or nil when creation failed.

Fields

no fields

Add comment


Security code
Refresh