FxOnScreenControl

Declared In:

Introduction

Defines the methods a plug-in must implement to create parameter controls.



Methods

-drawingCoordinates
Defines the coordinate space for an event.
-drawOSC:height:activePart:time:
Draws a control on an image. This is the main method the host application calls to draw a plug-in parameter control.
-keyDown:positionY:keyPressed:modifiers:forceUpdate:didHandle:time:
Provides information when a key is pressed.
-keyUp:positionY:keyPressed:modifiers:forceUpdate:didHandle:time:
Provides information when a key is released.
-mouseDown:positionY:activePart:modifiers:forceUpdate:time:
Provides information when the left mouse button is pressed and the pointer is on an image with an active plug-in control.
-mouseDragged:positionY:activePart:modifiers:forceUpdate:time:
Provides information when the left mouse button is pressed and the the pointer is moved with the mouse button still down.
-mouseUp:positionY:activePart:modifiers:forceUpdate:time:
Provides information when the left mouse button is released.

drawingCoordinates


Defines the coordinate space for an event.

- (FxDrawingCoordinates)drawingCoordinates;
Return Value

Returns the appropriate coordinate space.


drawOSC:height:activePart:time:


Draws a control on an image. This is the main method the host application calls to draw a plug-in parameter control.

- (void)drawOSC:(int)width height:(int)height activePart:(int)activePart time:(double)time; 
Parameters
width
Width of the current image where the control will be drawn.
height
Height of the current image where the control will be drawn.
activePart
The active part of the control to draw.
time
The time, expressed in canonical frames, to draw the control.
Discussion

This method serves two purposes, depending on the render mode, which is determined like this:

GLint renderMode;
glGetIntegerv( GL_RENDER_MODE, &renderMode );


If renderMode == GL_RENDER, then drawOSC:height:activePart:time: should render its image output into the current GL context.


If renderMode == GL_SELECT, then the method should perform GL drawing commands to define the shapes of the various "parts" of the control. The host application then uses this information for hit testing. When the host application determines that the mouse position lies in a particular part, it passes the part identifier as an activePart parameter to other FxOnScreenControl methods.


Depending on the host application, the time value may be relative to the start of the timeline or to the start of the clip. See the header file FxPlug/FxHostCapabilities.h.


keyDown:positionY:keyPressed:modifiers:forceUpdate:didHandle:time:


Provides information when a key is pressed.

- (void)keyDown:(double)mousePositionX positionY:(double)mousePositionY keyPressed:(unsigned short)asciiKey modifiers:(FxModifierKeys)modifiers forceUpdate:(BOOL *)forceUpdate didHandle:(BOOL *)didHandle time:(double)time; 
Parameters
mousePositionX
X position of the pointer (in 'drawingCoordinates' space).
mousePositionY
Y position of the pointer (in 'drawingCoordinates' space).
asciiKey
The ASCII representation of the key pressed.
modifiers
The keyboard modifiers currently pressed.
forceUpdate
Set to YES if the filter/generator associated with this control needs to be re-calculated; NO otherwise.
didHandle
Set to YES if the control performed an action because of this key press; otherwise, the event is passed back up the object tree.
time
The current time, expressed in canonical frames, when the key press happened.
Discussion

Depending on the host application, the time value may be relative to the start of the timeline or to the start of the clip. See the header file FxPlug/FxHostCapabilities.h.


keyUp:positionY:keyPressed:modifiers:forceUpdate:didHandle:time:


Provides information when a key is released.

- (void)keyUp:(double)mousePositionX positionY:(double)mousePositionY keyPressed:(unsigned short)asciiKey modifiers:(FxModifierKeys)modifiers forceUpdate:(BOOL *)forceUpdate didHandle:(BOOL *)didHandle time:(double)time; 
Parameters
mousePositionX
X position of the pointer (in 'drawingCoordinates' space).
mousePositionY
Y position of the pointer (in 'drawingCoordinates' space).
asciiKey
The ASCII representation of the key released.
modifiers
The keyboard modifiers currently pressed.
forceUpdate
Set to YES if the filter/generator associated with this control needs to be re-calculated; NO otherwise.
didHandle
Set to YES if the plug-in control performed an action because of the key release; otherwise, the event is passed back up the object tree.
time
The current time, expressed in canonical frames, when the key release happened.
Discussion

Depending on the host application, the time value may be relative to the start of the timeline or to the start of the clip. See the header file FxPlug/FxHostCapabilities.h.


mouseDown:positionY:activePart:modifiers:forceUpdate:time:


Provides information when the left mouse button is pressed and the pointer is on an image with an active plug-in control.

- (void)mouseDown:(double)mousePositionX positionY:(double)mousePositionY activePart:(int)activePart modifiers:(FxModifierKeys)modifiers forceUpdate:(BOOL *)forceUpdate time:(double)time; 
Parameters
mousePositionX
X position of the pointer (in 'drawingCoordinates' space).
mousePositionY
Y position of the pointer (in 'drawingCoordinates' space)
activePart
The active part of the control that currently contains the pointer.
modifiers
The keyboard modifiers currently pressed.
forceUpdate
Set to YES if the filter/generator associated with this control needs to be re-calculated; NO otherwise.
time
The current time, expressed in canonical frames, when the mouse button was pressed.
Discussion

Depending on the host application, the time value may be relative to the start of the timeline or to the start of the clip. See the header file FxPlug/FxHostCapabilities.h.


mouseDragged:positionY:activePart:modifiers:forceUpdate:time:


Provides information when the left mouse button is pressed and the the pointer is moved with the mouse button still down.

- (void)mouseDragged:(double)mousePositionX positionY:(double)mousePositionY activePart:(int)activePart modifiers:(FxModifierKeys)modifiers forceUpdate:(BOOL *)forceUpdate time:(double)time; 
Parameters
mousePositionX
X position of the pointer (in 'drawingCoordinates' space).
mousePositionY
Y position of the pointer (in 'drawingCoordinates' space).
activePart
The active part of the control that currently contains the pointer.
modifiers
The keyboard modifiers currently pressed.
forceUpdate
Set to YES if the filter/generator associated with this control needs to be re-calculated; NO otherwise.
time
The current time, expressed in canonical frames, when the pointer was moved.
Discussion

Depending on the host application, the time value may be relative to the start of the timeline or to the start of the clip. See the header flle FxPlug/FxHostCapabilities.h.


mouseUp:positionY:activePart:modifiers:forceUpdate:time:


Provides information when the left mouse button is released.

- (void)mouseUp:(double)mousePositionX positionY:(double)mousePositionY activePart:(int)activePart modifiers:(FxModifierKeys)modifiers forceUpdate:(BOOL *)forceUpdate time:(double)time; 
Parameters
mousePositionX
X position of the pointer (in 'drawingCoordinates' space).
mousePositionY
Y position of the pointer (in 'drawingCoordinates' space).
activePart
The active part of the control that currently contains the pointer.
modifiers
The keyboard modifiers currently pressed.
forceUpdate
Set to YES if the filter/generator associated with this control needs to be re-calculated; NO otherwise.
time
The current time, expressed in canonical frames, when the mouse button was released.
Discussion

Depending on the host application, the time value may be relative to the start of the timeline or to the start of the clip. See the header file FxPlug/FxHostCapabilities.h.

Did this document help you? Yes It's good, but... Not helpful...
Last Updated: 2009-04-14