TuttleOFX
1
|
#include <OfxhInteract.hpp>
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::OfxhSet & | getProperties () 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 > ¶ms) 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 |
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.
tuttle::host::ofx::interact::OfxhInteract::OfxhInteract | ( | const OfxhInteractDescriptor & | desc, |
void * | effectInstance | ||
) |
chain it into the descriptor props
Definition at line 144 of file OfxhInteract.cpp.
References _properties, tuttle::host::ofx::interact::OfxhInteractDescriptor::getProperties(), kOfxPropEffectInstance, tuttle::host::ofx::property::OfxhSet::setChainedSet(), and tuttle::host::ofx::property::OfxhSet::setPointerProperty().
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(), and kOfxActionDestroyInstance.
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 162 of file OfxhInteract.cpp.
References _descriptor, _state, tuttle::host::ofx::interact::OfxhInteractDescriptor::callEntry(), tuttle::host::ofx::interact::eFailed, tuttle::host::ofx::interact::OfxhInteractBase::getHandle(), tuttle::host::ofx::property::OfxhSet::getHandle(), and kOfxStatErrValue.
Referenced by createInstanceAction(), and ~OfxhInteract().
void tuttle::host::ofx::interact::OfxhInteract::createInstanceAction | ( | ) | [virtual] |
call create instance
Definition at line 228 of file OfxhInteract.cpp.
References _state, callEntry(), tuttle::host::ofx::interact::eCreated, tuttle::host::ofx::interact::eFailed, kOfxActionCreateInstance, kOfxStatOK, and kOfxStatReplyDefault.
Referenced by tuttle::host::OverlayInteract::OverlayInteract().
void tuttle::host::ofx::interact::OfxhInteract::drawAction | ( | OfxTime | time, |
const OfxPointD & | renderScale | ||
) | [virtual] |
Definition at line 243 of file OfxhInteract.cpp.
References kOfxInteractActionDraw, kOfxStatOK, and kOfxStatReplyDefault.
Referenced by tuttle::host::OverlayInteract::draw().
void tuttle::host::ofx::interact::OfxhInteract::gainFocusAction | ( | OfxTime | time, |
const OfxPointD & | renderScale | ||
) | [virtual] |
Definition at line 327 of file OfxhInteract.cpp.
References kOfxInteractActionGainFocus, kOfxStatOK, and kOfxStatReplyDefault.
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] |
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().
void tuttle::host::ofx::interact::OfxhInteract::getSlaveToParam | ( | std::vector< std::string > & | params | ) | const [virtual] |
returns the params the interact uses
Definition at line 177 of file OfxhInteract.cpp.
References _properties, tuttle::host::ofx::property::OfxhSet::getDimension(), tuttle::host::ofx::property::OfxhSet::getStringProperty(), and kOfxInteractPropSlaveToParam.
State tuttle::host::ofx::interact::OfxhInteract::getState | ( | ) | const [inline] |
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] |
initialise the argument properties
Definition at line 189 of file OfxhInteract.cpp.
References _argProperties, _effectInstance, _properties, getBackgroundColour(), getPixelScale(), tuttle::host::ofx::property::OfxhSet::getPointerProperty(), getViewportSize(), kOfxImageEffectPropRenderScale, kOfxInteractPropBackgroundColour, kOfxInteractPropPixelScale, kOfxInteractPropViewportSize, kOfxPropEffectInstance, kOfxPropInstanceData, kOfxPropTime, tuttle::host::ofx::property::OfxhSet::setDoubleProperty(), tuttle::host::ofx::property::OfxhSet::setDoublePropertyN(), tuttle::host::ofx::property::OfxhSet::setIntPropertyN(), tuttle::host::ofx::property::OfxhSet::setPointerProperty(), and OfxPointD::x.
void tuttle::host::ofx::interact::OfxhInteract::keyDownAction | ( | OfxTime | time, |
const OfxPointD & | renderScale, | ||
int | key, | ||
char * | keyString | ||
) | [virtual] |
Definition at line 291 of file OfxhInteract.cpp.
References kOfxInteractActionKeyDown, kOfxStatOK, and kOfxStatReplyDefault.
void tuttle::host::ofx::interact::OfxhInteract::keyRepeatAction | ( | OfxTime | time, |
const OfxPointD & | renderScale, | ||
int | key, | ||
char * | keyString | ||
) | [virtual] |
Definition at line 315 of file OfxhInteract.cpp.
References kOfxInteractActionKeyRepeat, kOfxStatOK, and kOfxStatReplyDefault.
void tuttle::host::ofx::interact::OfxhInteract::keyUpAction | ( | OfxTime | time, |
const OfxPointD & | renderScale, | ||
int | key, | ||
char * | keyString | ||
) | [virtual] |
Definition at line 303 of file OfxhInteract.cpp.
References kOfxInteractActionKeyUp, kOfxStatOK, and kOfxStatReplyDefault.
void tuttle::host::ofx::interact::OfxhInteract::loseFocusAction | ( | OfxTime | time, |
const OfxPointD & | renderScale | ||
) | [virtual] |
Definition at line 336 of file OfxhInteract.cpp.
References kOfxInteractActionLoseFocus, kOfxStatOK, and kOfxStatReplyDefault.
void tuttle::host::ofx::interact::OfxhInteract::penDownAction | ( | OfxTime | time, |
const OfxPointD & | renderScale, | ||
const OfxPointD & | penPos, | ||
const OfxPointI & | penPosViewport, | ||
double | pressure | ||
) | [virtual] |
Definition at line 278 of file OfxhInteract.cpp.
References kOfxInteractActionPenDown, kOfxStatOK, and kOfxStatReplyDefault.
void tuttle::host::ofx::interact::OfxhInteract::penMotionAction | ( | OfxTime | time, |
const OfxPointD & | renderScale, | ||
const OfxPointD & | penPos, | ||
const OfxPointI & | penPosViewport, | ||
double | pressure | ||
) | [virtual] |
Definition at line 252 of file OfxhInteract.cpp.
References kOfxInteractActionPenMotion, kOfxStatOK, and kOfxStatReplyDefault.
void tuttle::host::ofx::interact::OfxhInteract::penUpAction | ( | OfxTime | time, |
const OfxPointD & | renderScale, | ||
const OfxPointD & | penPos, | ||
const OfxPointI & | penPosViewport, | ||
double | pressure | ||
) | [virtual] |
Definition at line 265 of file OfxhInteract.cpp.
References kOfxInteractActionPenUp, kOfxStatOK, and kOfxStatReplyDefault.
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 172 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 221 of file OfxhInteract.cpp.
References _argProperties, kOfxPropKeyString, kOfxPropKeySym, tuttle::host::ofx::property::OfxhSet::setIntProperty(), and tuttle::host::ofx::property::OfxhSet::setStringProperty().
void tuttle::host::ofx::interact::OfxhInteract::setPenArgProps | ( | const OfxPointD & | penPos, |
const OfxPointI & | penPosViewport, | ||
double | pressure | ||
) | [protected] |
set pen props in the args
Definition at line 210 of file OfxhInteract.cpp.
References _argProperties, kOfxInteractPropPenPosition, kOfxInteractPropPenPressure, kOfxInteractPropPenViewportPosition, tuttle::host::ofx::property::OfxhSet::setDoubleProperty(), tuttle::host::ofx::property::OfxhSet::setDoublePropertyN(), tuttle::host::ofx::property::OfxhSet::setIntPropertyN(), OfxPointI::x, and OfxPointD::x.
virtual void tuttle::host::ofx::interact::OfxhInteract::swapBuffers | ( | ) | [pure virtual] |
implement
Definition at line 129 of file OfxhInteract.hpp.
Referenced by initArgProp(), setKeyArgProps(), and setPenArgProps().
const OfxhInteractDescriptor& tuttle::host::ofx::interact::OfxhInteract::_descriptor [protected] |
void* tuttle::host::ofx::interact::OfxhInteract::_effectInstance [protected] |
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().
its props
Definition at line 126 of file OfxhInteract.hpp.
Referenced by getProperties(), getPropHandle(), getSlaveToParam(), initArgProp(), and OfxhInteract().
how is it feeling today
Definition at line 127 of file OfxhInteract.hpp.
Referenced by callEntry(), createInstanceAction(), and getState().