TuttleOFX  1
tuttle::host::ofx::interact::OfxhInteract Class Reference

#include <OfxhInteract.hpp>

Inheritance diagram for tuttle::host::ofx::interact::OfxhInteract:
Collaboration diagram for tuttle::host::ofx::interact::OfxhInteract:

Public Member Functions

 OfxhInteract (const OfxhInteractDescriptor &desc, void *effectInstance)
virtual ~OfxhInteract ()
State getState () const
 what is it's state?
OfxPropertySetHandle getPropHandle ()
 grab a handle on the properties of this parameter for the C api
const property::OfxhSetgetProperties () const
 get prop set
OfxStatus callEntry (const char *action, property::OfxhSet *inArgs)
 call the entry point in the descriptor with action and the given args
virtual void getViewportSize (int &width, int &height) const =0
virtual void getPixelScale (double &xScale, double &yScale) const =0
virtual void getBackgroundColour (double &r, double &g, double &b) const =0
virtual void swapBuffers () OFX_EXCEPTION_SPEC=0
 implement
virtual void redraw () OFX_EXCEPTION_SPEC=0
 implement this
virtual void getSlaveToParam (std::vector< std::string > &params) const
 returns the params the interact uses
virtual void reset (const std::string &name) OFX_EXCEPTION_SPEC
 override this to handle a reset().
virtual void createInstanceAction () OFX_EXCEPTION_SPEC
 call create instance
virtual void drawAction (OfxTime time, const OfxPointD &renderScale) OFX_EXCEPTION_SPEC
virtual void penMotionAction (OfxTime time, const OfxPointD &renderScale, const OfxPointD &penPos, const OfxPointI &penPosViewport, double pressure) OFX_EXCEPTION_SPEC
virtual void penUpAction (OfxTime time, const OfxPointD &renderScale, const OfxPointD &penPos, const OfxPointI &penPosViewport, double pressure) OFX_EXCEPTION_SPEC
virtual void penDownAction (OfxTime time, const OfxPointD &renderScale, const OfxPointD &penPos, const OfxPointI &penPosViewport, double pressure) OFX_EXCEPTION_SPEC
virtual void keyDownAction (OfxTime time, const OfxPointD &renderScale, int key, char *keyString) OFX_EXCEPTION_SPEC
virtual void keyUpAction (OfxTime time, const OfxPointD &renderScale, int key, char *keyString) OFX_EXCEPTION_SPEC
virtual void keyRepeatAction (OfxTime time, const OfxPointD &renderScale, int key, char *keyString) OFX_EXCEPTION_SPEC
virtual void gainFocusAction (OfxTime time, const OfxPointD &renderScale) OFX_EXCEPTION_SPEC
virtual void loseFocusAction (OfxTime time, const OfxPointD &renderScale) OFX_EXCEPTION_SPEC

Protected Member Functions

void initArgProp (OfxTime time, const OfxPointD &renderScale)
 initialise the argument properties
void setPenArgProps (const OfxPointD &penPos, const OfxPointI &penPosViewport, double pressure)
 set pen props in the args
void setKeyArgProps (int key, char *keyString)
 set key args in the props

Protected Attributes

const OfxhInteractDescriptor_descriptor
 who we are
property::OfxhSet _properties
 its props
State _state
 how is it feeling today
void * _effectInstance
 this is ugly, we need a base class to all plugin instances at some point.
property::OfxhSet _argProperties

Detailed Description

a generic interact, it doesn't belong to anything in particular we need to generify this slighty more and remove the renderscale args into a derived class, as they only belong to image effect plugins

Definition at line 121 of file OfxhInteract.hpp.


Constructor & Destructor Documentation

tuttle::host::ofx::interact::OfxhInteract::OfxhInteract ( const OfxhInteractDescriptor desc,
void *  effectInstance 
)
tuttle::host::ofx::interact::OfxhInteract::~OfxhInteract ( ) [virtual]

call it directly incase CI failed and we should always tidy up after create instance

Definition at line 155 of file OfxhInteract.cpp.

References callEntry(), tuttle::ofx::mapStatusToString(), and TUTTLE_LOG_TRACE.

Here is the call graph for this function:


Member Function Documentation

OfxStatus tuttle::host::ofx::interact::OfxhInteract::callEntry ( const char *  action,
property::OfxhSet inArgs 
)

call the entry point in the descriptor with action and the given args

Definition at line 167 of file OfxhInteract.cpp.

References _descriptor, _state, tuttle::host::ofx::interact::OfxhInteractDescriptor::callEntry(), tuttle::host::ofx::interact::eFailed, tuttle::host::ofx::interact::OfxhInteractBase::getHandle(), and tuttle::host::ofx::property::OfxhSet::getHandle().

Referenced by createInstanceAction(), and ~OfxhInteract().

Here is the call graph for this function:

void tuttle::host::ofx::interact::OfxhInteract::createInstanceAction ( ) [virtual]

call create instance

Definition at line 233 of file OfxhInteract.cpp.

References _state, callEntry(), tuttle::host::ofx::interact::eCreated, and tuttle::host::ofx::interact::eFailed.

Referenced by tuttle::host::OverlayInteract::OverlayInteract().

Here is the call graph for this function:

void tuttle::host::ofx::interact::OfxhInteract::drawAction ( OfxTime  time,
const OfxPointD &  renderScale 
) [virtual]

Definition at line 248 of file OfxhInteract.cpp.

Referenced by tuttle::host::OverlayInteract::draw().

void tuttle::host::ofx::interact::OfxhInteract::gainFocusAction ( OfxTime  time,
const OfxPointD &  renderScale 
) [virtual]

Definition at line 332 of file OfxhInteract.cpp.

virtual void tuttle::host::ofx::interact::OfxhInteract::getBackgroundColour ( double &  r,
double &  g,
double &  b 
) const [pure virtual]

Referenced by initArgProp().

virtual void tuttle::host::ofx::interact::OfxhInteract::getPixelScale ( double &  xScale,
double &  yScale 
) const [pure virtual]

Referenced by initArgProp().

const property::OfxhSet& tuttle::host::ofx::interact::OfxhInteract::getProperties ( ) const [inline]

get prop set

Definition at line 156 of file OfxhInteract.hpp.

References _properties.

OfxPropertySetHandle tuttle::host::ofx::interact::OfxhInteract::getPropHandle ( ) [inline, virtual]

grab a handle on the properties of this parameter for the C api

Implements tuttle::host::ofx::interact::OfxhInteractBase.

Definition at line 153 of file OfxhInteract.hpp.

References _properties, and tuttle::host::ofx::property::OfxhSet::getHandle().

Here is the call graph for this function:

void tuttle::host::ofx::interact::OfxhInteract::getSlaveToParam ( std::vector< std::string > &  params) const [virtual]

returns the params the interact uses

Definition at line 182 of file OfxhInteract.cpp.

References _properties, tuttle::host::ofx::property::OfxhSet::getDimension(), and tuttle::host::ofx::property::OfxhSet::getStringProperty().

Here is the call graph for this function:

State tuttle::host::ofx::interact::OfxhInteract::getState ( ) const [inline]

what is it's state?

Definition at line 150 of file OfxhInteract.hpp.

References _state.

virtual void tuttle::host::ofx::interact::OfxhInteract::getViewportSize ( int &  width,
int &  height 
) const [pure virtual]

hooks to kOfxInteractPropViewportSize in the property set this is actually redundant and is to be deprecated

Referenced by initArgProp().

void tuttle::host::ofx::interact::OfxhInteract::initArgProp ( OfxTime  time,
const OfxPointD &  renderScale 
) [protected]
void tuttle::host::ofx::interact::OfxhInteract::keyDownAction ( OfxTime  time,
const OfxPointD &  renderScale,
int  key,
char *  keyString 
) [virtual]

Definition at line 296 of file OfxhInteract.cpp.

void tuttle::host::ofx::interact::OfxhInteract::keyRepeatAction ( OfxTime  time,
const OfxPointD &  renderScale,
int  key,
char *  keyString 
) [virtual]

Definition at line 320 of file OfxhInteract.cpp.

void tuttle::host::ofx::interact::OfxhInteract::keyUpAction ( OfxTime  time,
const OfxPointD &  renderScale,
int  key,
char *  keyString 
) [virtual]

Definition at line 308 of file OfxhInteract.cpp.

void tuttle::host::ofx::interact::OfxhInteract::loseFocusAction ( OfxTime  time,
const OfxPointD &  renderScale 
) [virtual]

Definition at line 341 of file OfxhInteract.cpp.

void tuttle::host::ofx::interact::OfxhInteract::penDownAction ( OfxTime  time,
const OfxPointD &  renderScale,
const OfxPointD &  penPos,
const OfxPointI &  penPosViewport,
double  pressure 
) [virtual]

Definition at line 283 of file OfxhInteract.cpp.

void tuttle::host::ofx::interact::OfxhInteract::penMotionAction ( OfxTime  time,
const OfxPointD &  renderScale,
const OfxPointD &  penPos,
const OfxPointI &  penPosViewport,
double  pressure 
) [virtual]

Definition at line 257 of file OfxhInteract.cpp.

void tuttle::host::ofx::interact::OfxhInteract::penUpAction ( OfxTime  time,
const OfxPointD &  renderScale,
const OfxPointD &  penPos,
const OfxPointI &  penPosViewport,
double  pressure 
) [virtual]

Definition at line 270 of file OfxhInteract.cpp.

virtual void tuttle::host::ofx::interact::OfxhInteract::redraw ( ) [pure virtual]

implement this

void tuttle::host::ofx::interact::OfxhInteract::reset ( const std::string &  name) [virtual]

override this to handle a reset().

Reimplemented from tuttle::host::ofx::property::OfxhGetHook.

Definition at line 177 of file OfxhInteract.cpp.

void tuttle::host::ofx::interact::OfxhInteract::setKeyArgProps ( int  key,
char *  keyString 
) [protected]

set key args in the props

Definition at line 226 of file OfxhInteract.cpp.

References _argProperties, tuttle::host::ofx::property::OfxhSet::setIntProperty(), and tuttle::host::ofx::property::OfxhSet::setStringProperty().

Here is the call graph for this function:

void tuttle::host::ofx::interact::OfxhInteract::setPenArgProps ( const OfxPointD &  penPos,
const OfxPointI &  penPosViewport,
double  pressure 
) [protected]
virtual void tuttle::host::ofx::interact::OfxhInteract::swapBuffers ( ) [pure virtual]

implement


Field Documentation

who we are

Definition at line 125 of file OfxhInteract.hpp.

Referenced by callEntry().

this is ugly, we need a base class to all plugin instances at some point.

Definition at line 128 of file OfxhInteract.hpp.

Referenced by initArgProp().

how is it feeling today

Definition at line 127 of file OfxhInteract.hpp.

Referenced by callEntry(), createInstanceAction(), and getState().


The documentation for this class was generated from the following files: