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(), 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(), tuttle::ofx::mapStatusToString(), and TUTTLE_LOG_TRACE.
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().
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().
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] |
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 182 of file OfxhInteract.cpp.
References _properties, tuttle::host::ofx::property::OfxhSet::getDimension(), and tuttle::host::ofx::property::OfxhSet::getStringProperty().
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 194 of file OfxhInteract.cpp.
References _argProperties, _effectInstance, _properties, getBackgroundColour(), getPixelScale(), tuttle::host::ofx::property::OfxhSet::getPointerProperty(), getViewportSize(), tuttle::host::ofx::property::OfxhSet::setDoubleProperty(), tuttle::host::ofx::property::OfxhSet::setDoublePropertyN(), tuttle::host::ofx::property::OfxhSet::setIntPropertyN(), and tuttle::host::ofx::property::OfxhSet::setPointerProperty().
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().
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 215 of file OfxhInteract.cpp.
References _argProperties, tuttle::host::ofx::property::OfxhSet::setDoubleProperty(), tuttle::host::ofx::property::OfxhSet::setDoublePropertyN(), and tuttle::host::ofx::property::OfxhSet::setIntPropertyN().
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().