TuttleOFX
1
|
Wraps up an OFX interact object for an Image Effect. It won't work for any other plug-in type at present (it would need to be broken into a hierarchy of classes). More...
#include <ofxsInteract.h>
Public Member Functions | |
Interact (OfxInteractHandle handle) | |
ctor | |
virtual | ~Interact ()=0 |
virtual destructor | |
bool | verifyMagic () const |
PropertySet & | getProperties () |
int | getBitDepth (void) const |
The bitdepth of each component in the openGL frame buffer. | |
bool | hasAlpha (void) const |
Does the openGL frame buffer have an alpha. | |
OfxPointD | getPixelScale (void) const |
Returns the size of a real screen pixel under the interact's cannonical projection. | |
OfxRGBColourD | getBackgroundColour (void) const |
the background colour | |
void | addParamToSlaveTo (Param *p) |
Set a param that the interact should be redrawn on if its value changes. | |
void | removeParamToSlaveTo (Param *p) |
Remova a param that the interact should be redrawn on if its value changes. | |
void | requestRedraw (void) const |
Request a redraw. | |
void | swapBuffers (void) const |
Swap a buffer in the case of a double bufferred interact, this is possibly a silly one. | |
Protected Attributes | |
OfxInteractHandle | _interactHandle |
The handle for this interact. | |
PropertySet | _interactProperties |
The property set on this interact. | |
std::list< Param * > | _slaveParams |
List of params we are currently slaved to. | |
ImageEffect * | _effect |
The instance we are associated with. | |
Private Attributes | |
const int | _magic |
to check for handles being nice | |
Static Private Attributes | |
static const int | kMagic = 0x06012013 |
magic number for Interact, and current day :-) |
Wraps up an OFX interact object for an Image Effect. It won't work for any other plug-in type at present (it would need to be broken into a hierarchy of classes).
Definition at line 176 of file ofxsInteract.h.
OFX::Interact::Interact | ( | OfxInteractHandle | handle | ) |
ctor
Definition at line 181 of file ofxsInteract.cpp.
References _effect, _interactProperties, OFX::Private::gInteractSuite, OfxInteractSuiteV1::interactGetPropertySet, kOfxPropInstanceData, OFX::PropertySet::propSetHandle(), OFX::PropertySet::propSetPointer(), OFX::retrieveEffectFromInteractHandle(), and OFX::throwSuiteStatusException().
OFX::Interact::~Interact | ( | ) | [pure virtual] |
virtual destructor
Definition at line 200 of file ofxsInteract.cpp.
void OFX::Interact::addParamToSlaveTo | ( | Param * | p | ) |
Set a param that the interact should be redrawn on if its value changes.
Definition at line 242 of file ofxsInteract.cpp.
References _interactProperties, _slaveParams, OFX::Attribute::getName(), kOfxInteractPropSlaveToParam, OFX::PropertySet::propGetDimension(), and OFX::PropertySet::propSetString().
OfxRGBColourD OFX::Interact::getBackgroundColour | ( | void | ) | const |
the background colour
Definition at line 283 of file ofxsInteract.cpp.
References _interactProperties.
int OFX::Interact::getBitDepth | ( | void | ) | const |
The bitdepth of each component in the openGL frame buffer.
Definition at line 204 of file ofxsInteract.cpp.
References _interactProperties, kOfxInteractPropBitDepth, and OFX::PropertySet::propGetInt().
OfxPointD OFX::Interact::getPixelScale | ( | void | ) | const |
Returns the size of a real screen pixel under the interact's cannonical projection.
Definition at line 216 of file ofxsInteract.cpp.
References _interactProperties, kOfxInteractPropPixelScale, OFX::PropertySet::propGetDouble(), OfxPointD::x, and OfxPointD::y.
PropertySet& OFX::Interact::getProperties | ( | ) | [inline] |
Definition at line 197 of file ofxsInteract.h.
References _interactProperties.
bool OFX::Interact::hasAlpha | ( | void | ) | const |
Does the openGL frame buffer have an alpha.
Definition at line 210 of file ofxsInteract.cpp.
References _interactProperties, kOfxInteractPropHasAlpha, and OFX::PropertySet::propGetInt().
void OFX::Interact::removeParamToSlaveTo | ( | Param * | p | ) |
Remova a param that the interact should be redrawn on if its value changes.
Definition at line 260 of file ofxsInteract.cpp.
References _interactProperties, _slaveParams, kOfxInteractPropSlaveToParam, OFX::PropertySet::propReset(), and OFX::PropertySet::propSetString().
void OFX::Interact::requestRedraw | ( | void | ) | const |
Request a redraw.
Definition at line 226 of file ofxsInteract.cpp.
References _interactHandle, OFX::Private::gInteractSuite, OfxInteractSuiteV1::interactRedraw, and OFX::throwSuiteStatusException().
void OFX::Interact::swapBuffers | ( | void | ) | const |
Swap a buffer in the case of a double bufferred interact, this is possibly a silly one.
Definition at line 234 of file ofxsInteract.cpp.
References _interactHandle, OFX::Private::gInteractSuite, OfxInteractSuiteV1::interactSwapBuffers, and OFX::throwSuiteStatusException().
bool OFX::Interact::verifyMagic | ( | ) | const [inline] |
Definition at line 195 of file ofxsInteract.h.
References _magic, and kMagic.
Referenced by OFX::Private::interactMainEntry().
ImageEffect* OFX::Interact::_effect [protected] |
The instance we are associated with.
Reimplemented in OFX::ParamInteract.
Definition at line 182 of file ofxsInteract.h.
Referenced by tuttle::plugin::colorCubeViewer::ColorCubeViewerOverlay::ColorCubeViewerOverlay(), tuttle::plugin::colorSpaceKeyer::ColorSpaceKeyerOverlay::ColorSpaceKeyerOverlay(), tuttle::plugin::crop::CropOverlay::CropOverlay(), tuttle::plugin::anisotropicFilter::tensors::TensorsMargin::draw(), tuttle::plugin::crop::CropOverlay::draw(), tuttle::plugin::imageStatistics::ImageStatisticsOverlayInteract::ImageStatisticsOverlayInteract(), Interact(), tuttle::plugin::lens::LensDistortOverlayInteract::LensDistortOverlayInteract(), OFX::OverlayInteract::OverlayInteract(), tuttle::plugin::pinning::PinningOverlayInteract::PinningOverlayInteract(), tuttle::plugin::anisotropicFilter::tensors::TensorsMargin::TensorsMargin(), tuttle::plugin::warp::WarpOverlayInteract::WarpOverlayInteract(), and OFX::OverlayInteract::~OverlayInteract().
OfxInteractHandle OFX::Interact::_interactHandle [protected] |
The handle for this interact.
Definition at line 179 of file ofxsInteract.h.
Referenced by requestRedraw(), and swapBuffers().
PropertySet OFX::Interact::_interactProperties [protected] |
The property set on this interact.
Definition at line 180 of file ofxsInteract.h.
Referenced by addParamToSlaveTo(), getBackgroundColour(), getBitDepth(), OFX::ParamInteract::getInteractSize(), getPixelScale(), getProperties(), hasAlpha(), Interact(), and removeParamToSlaveTo().
const int OFX::Interact::_magic [private] |
to check for handles being nice
Definition at line 186 of file ofxsInteract.h.
Referenced by verifyMagic().
std::list<Param*> OFX::Interact::_slaveParams [protected] |
List of params we are currently slaved to.
Definition at line 181 of file ofxsInteract.h.
Referenced by addParamToSlaveTo(), and removeParamToSlaveTo().
const int OFX::Interact::kMagic = 0x06012013 [static, private] |
magic number for Interact, and current day :-)
Definition at line 185 of file ofxsInteract.h.
Referenced by verifyMagic().