SplineCustomGui Class Reference

#include <customgui_splinecontrol.h>

Inheritance diagram for SplineCustomGui:

Detailed Description

Spline GUI (CUSTOMGUI_SPLINE) for SplineData.
Here are the settings: SplineCustomGuiSettings

Public Member Functions

void SetMessageFunctions (SplineControlMessages *pFuncs)
 
SplineDataGetSplineData (void)
 
Bool SetSpline (SplineData *pData)
 
void SetLabelText (maxon::String *strXMin=nullptr, maxon::String *strXMax=nullptr, maxon::String *strYMin=nullptr, maxon::String *strYMax=nullptr, maxon::String *strX=nullptr, maxon::String *strY=nullptr)
 
void SetCustomColor (Bool bSet=false, Vector col=Vector(0.0, 0.0, 0.0))
 
void GetScreenPosition (const Vector &v, Int32 &x, Int32 &y) const
 
void GetValue (const Int32 x, const Int32 y, Vector &v) const
 
Bool Command (Int32 id, const BaseContainer &msg)
 
- Public Member Functions inherited from BaseCustomGui< 1009059 >
Int32 GetWidth ()
 
Int32 GetHeight ()
 
void Redraw ()
 
Bool LayoutChanged ()
 
Bool Activate ()
 
Bool SetDefaultForResEdit ()
 
Bool SetData (const TriState< GeData > &tristate)
 
TriState< GeDataGetData ()
 
void SetLayoutMode (Int32 mode)
 
Int32 GetLayoutMode ()
 
Bool SupportLayoutSwitch ()
 
- Public Member Functions inherited from _BaseCustomGui
Int32 GetWidth (Int32 plugid)
 
Int32 GetHeight (Int32 plugid)
 
void Redraw (Int32 plugid)
 
Bool LayoutChanged (Int32 plugid)
 
Bool Activate (Int32 plugid)
 
Bool SetDefaultForResEdit (Int32 plugid)
 
Bool SetData (Int32 plugid, const TriState< GeData > &tristate)
 
TriState< GeDataGetData (Int32 plugid)
 
void SetLayoutMode (Int32 plugid, Int32 mode)
 
Int32 GetLayoutMode (Int32 plugid)
 
Bool SupportLayoutSwitch (Int32 plugid)
 

Private Member Functions

 SplineCustomGui ()
 
 ~SplineCustomGui ()
 

Additional Inherited Members

- Static Public Attributes inherited from BaseCustomGui< 1009059 >
static constexpr Int32 VALUE
 

Constructor & Destructor Documentation

◆ SplineCustomGui()

SplineCustomGui ( )
private

◆ ~SplineCustomGui()

~SplineCustomGui ( )
private

Member Function Documentation

◆ SetMessageFunctions()

void SetMessageFunctions ( SplineControlMessages pFuncs)

Registers a set of message functions.

Parameters
[in]pFuncsThe message functions.

◆ GetSplineData()

SplineData* GetSplineData ( void  )

Gets the spline data.

Returns
The spline data. The spline GUI owns the pointed data.

◆ SetSpline()

Bool SetSpline ( SplineData pData)

Sets the spline data.

Parameters
[in]pDataThe spline data to set.
Returns
true if successful, otherwise false.

◆ SetLabelText()

void SetLabelText ( maxon::String strXMin = nullptr,
maxon::String strXMax = nullptr,
maxon::String strYMin = nullptr,
maxon::String strYMax = nullptr,
maxon::String strX = nullptr,
maxon::String strY = nullptr 
)

Sets the label text.

Parameters
[in]strXMinThe minimum X value text to set, or nullptr (default).
[in]strXMaxThe maximum X value text to set, or nullptr (default).
[in]strYMinThe minimum Y value text to set, or nullptr (default).
[in]strYMaxThe maximum Y value text to set, or nullptr (default).
[in]strXThe new X text, or nullptr (default).
[in]strYThe new Y text, or nullptr (default).

◆ SetCustomColor()

void SetCustomColor ( Bool  bSet = false,
Vector  col = Vector(0.0, 0.0, 0.0) 
)

Sets the custom color for the curve.

Parameters
[in]bSetPass true if a custom color should be used.
[in]colThe custom color.

◆ GetScreenPosition()

void GetScreenPosition ( const Vector v,
Int32 x,
Int32 y 
) const

Gets the screen position for a spline value.

Parameters
[in]vThe spline value.
[out]xAssigned the screen X position.
[out]yAssigned the screen Y position.

◆ GetValue()

void GetValue ( const Int32  x,
const Int32  y,
Vector v 
) const

Gets the spline value for a screen position.

Parameters
[in]xThe screen X position.
[in]yThe screen Y position.
[out]vAssigned the spline value.

◆ Command()

Bool Command ( Int32  id,
const BaseContainer msg 
)

Triggers internal spline GUI commands. Example:

// Prepare the command message container
// We will make the SplineCustomGui frame the selected points
BaseContainer splineMsg;
// Get pointer to the SplineCustomGui
SplineCustomGui* pGui = (SplineCustomGui*)FindCustomGui(MYSPLINE, CUSTOMDATATYPE_SPLINE);
// Talk the SplineCustomGui into performing a command from its popup menu
if (pGui)
Parameters
[in]idThe command ID: IDC_SPLINE_PRESET_POPUPMENU.
[in]msgThe command message container: IDC_SPLINE
Returns
true if the command was successfully sent, otherwise false.
SplineCustomGui
Definition: customgui_splinecontrol.h:628
BaseContainer::SetInt32
void SetInt32(Int32 id, Int32 l)
Definition: c4d_basecontainer.h:505
IDC_SPLINE_FRAME_SEL
#define IDC_SPLINE_FRAME_SEL
Command container value for the Spline GUI Frame Sel menu.
Definition: customgui_splinecontrol.h:56
SplineCustomGui::Command
Bool Command(Int32 id, const BaseContainer &msg)
IDC_SPLINE_PRESET_POPUPMENU
#define IDC_SPLINE_PRESET_POPUPMENU
Definition: customgui_splinecontrol.h:49
CUSTOMDATATYPE_SPLINE
#define CUSTOMDATATYPE_SPLINE
Spline data type ID.
Definition: customgui_splinecontrol.h:23
BaseContainer
Definition: c4d_basecontainer.h:46