#include <customgui_kerning.h>
A helper class that does all the drawing and handle management.
Alloc/Free | |
static KerningVpGuiHelper * | Alloc () |
static void | Free (KerningVpGuiHelper *&pData) |
Constructor/Destructor | |
KerningVpGuiHelper () | |
~KerningVpGuiHelper () | |
Init | |
Bool | Init (const maxon::String &s, BaseContainer *generationresults, KerningData *kd, Int32 plane) |
Draw | |
DRAWRESULT | Draw (BaseObject *op, BaseDraw *bd, BaseDrawHelp *bh) |
Handle | |
Int32 | DetectHandle (BaseObject *op, BaseDraw *bd, Int32 x, Int32 y, QUALIFIER qualifier) |
Bool | MoveHandle (BaseObject *op, BaseObject *undo, const Vector &mouse_pos, Int32 hit_id, QUALIFIER qualifier, BaseDraw *bd) |
void | GetHandle (BaseObject *op, Int32 i, HandleInfo &info) |
Miscellaneous | |
Bool | CopyTo (KerningVpGuiHelper *dest) |
Bool | ClickHandle (Bool release, BaseObject *op) |
void | SetZeroSize () |
Constructor.
~KerningVpGuiHelper | ( | ) |
Destructor.
|
static |
Allocates a KerningVpGuiHelper object. Destroy the allocated KerningVpGuiHelper object with Free(). Use AutoAlloc to automate the allocation and destruction based on scope.
|
static |
Destructs KerningVpGuiHelper objects allocated with Alloc(). Use AutoAlloc to automate the allocation and destruction based on scope.
[in,out] | pData | The KerningVpGuiHelper objects to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards. |
Bool Init | ( | const maxon::String & | s, |
BaseContainer * | generationresults, | ||
KerningData * | kd, | ||
Int32 | plane | ||
) |
Initializes the KerningVpGuiHelper.
[in] | s | The string that the text spline was generated from. |
[in] | generationresults | A pointer to the BaseContainer with generation results (get the container with GetContainer(TEXTSPLINE_RESULTS) from the text spline's container). |
[in] | kd | A pointer to the KerningData that was used for text spline generation. |
[in] | plane | Indicates the spline generation plane. Value from PRIM_PLANE can be used. |
DRAWRESULT Draw | ( | BaseObject * | op, |
BaseDraw * | bd, | ||
BaseDrawHelp * | bh | ||
) |
Draws the complete Kerning Viewport GUI into the current drawpass.
[in] | op | Pass op from an ObjectData::Draw. |
[in] | bd | Pass bd from an ObjectData::Draw. |
[in] | bh | Pass bh from an ObjectData::Draw. |
Manages the Kerning handles.
[in] | op | Pass op from an ObjectData::DetectHandle. |
[in] | bd | Pass bd from an ObjectData::DetectHandle. |
[in] | x | Pass x from an ObjectData::DetectHandle. |
[in] | y | Pass y from an ObjectData::DetectHandle. |
[in] | qualifier | Pass qualifier from an ObjectData::DetectHandle. |
Bool MoveHandle | ( | BaseObject * | op, |
BaseObject * | undo, | ||
const Vector & | mouse_pos, | ||
Int32 | hit_id, | ||
QUALIFIER | qualifier, | ||
BaseDraw * | bd | ||
) |
Manages the Kerning handles.
[in] | op | Pass op from an ObjectData::MoveHandle. |
[in] | undo | Pass undo from an ObjectData::MoveHandle. |
[in] | mouse_pos | Pass mouse_pos from an ObjectData::MoveHandle. |
[in] | hit_id | Pass hit_id from an ObjectData::MoveHandle. |
[in] | qualifier | Pass qualifier from anObjectData::MoveHandle. |
[in] | bd | Pass bd from an ObjectData::MoveHandle. |
void GetHandle | ( | BaseObject * | op, |
Int32 | i, | ||
HandleInfo & | info | ||
) |
Manages the Kerning handles.
[in] | op | Pass op from an ObjectData::GetHandle. |
[in] | i | Pass i from an ObjectData::GetHandle. |
[in] | info | Pass info from an ObjectData::GetHandle. |
Bool CopyTo | ( | KerningVpGuiHelper * | dest | ) |
Copies all data of the class to another KerningVpGuiHelper object.
[in] | dest | A pointer to the destination KerningVpGuiHelper object. Must not be nullptr. The caller owns the pointed KerningVpGuiHelper. |
Bool ClickHandle | ( | Bool | release, |
BaseObject * | op | ||
) |
Used internally by HandleKerningMessages() to handle drag-less clicks on handles.
[in] | release | false on MouseDown, true on MouseUp. |
[in] | op | The BaseObject from which the HandleKerningMessages() call originated. The caller owns the pointed object. |
void SetZeroSize | ( | ) |
Sets all sizes but TEXTSPLINE_RESULT_HEIGHT_BASE to zero. Specially useful when scaling down kerning by handlers to zero until text spline is so small that text spline generator returns a null spline.