#include <patchobj.h>
Public Member Functions |
|
EP_VertWeldCMode (PatchObject *mod, IObjParam *i) | |
int | Class () |
Returns the Class of the command mode.
|
|
int | ID () |
Returns the ID of the command mode. |
|
MouseCallBack * | MouseProc (int *numPoints) |
This method establishes the number of points
required by the command mode and returns a pointer to the mouse
callback object that is used to process the user input. |
|
ChangeForegroundCallback * | ChangeFGProc () |
Returns a pointer to a callback procedure
that flags nodes that belong in the foreground plane. |
|
BOOL | ChangeFG (CommandMode *oldMode) |
This method returns TRUE if the command mode
needs to change the foreground proc (using
ChangeFGProc()) and FALSE if it does not. |
|
void | EnterMode () |
This method is called when a command mode
becomes active. |
|
void | ExitMode () |
This method is called when the active
command mode is replaced by a different mode. |
|
Public Attributes |
|
ChangeFGObject | fgProc |
PatchObject * | po |
EP_VertWeldMouseProc | proc |
EP_VertWeldCMode | ( | PatchObject * | mod, |
IObjParam * | i | ||
) | [inline] |
: fgProc((ReferenceTarget *)mod), proc(mod,i) {po=mod;}
int Class | ( | ) | [inline, virtual] |
Returns the Class of the command mode.
The class describes the type of command mode this is. If the developer is defining a command mode to be used as part of the sub-object manipulation (Move, Rotate, and Scale) then one of the following pre-defined values in Command Classes should be used.
Implements CommandMode.
{ return MODIFY_COMMAND; }
int ID | ( | ) | [inline, virtual] |
Returns the ID of the command mode.
This value should be the constant CID_USER plus some random value chosen by the developer. As an example, this method could be implemented as: { CID_USER+0x1423; } In the special case of the developer implementing a custom command mode to be used as part of sub-object manipulation (Move, Rotate or Scale) the value for ID() should be one of the following values:
Implements CommandMode.
{ return CID_VERT_WELD; }
MouseCallBack* MouseProc | ( | int * | numPoints | ) | [inline, virtual] |
This method establishes the number of points required by the command mode and returns a pointer to the mouse callback object that is used to process the user input.
numPoints | This is where to store the number of points used by the CommandMode. If the plug-in needs to use an undetermined number of points it can specify a large number for this value. When the mouse proc has finished processing points it returns FALSE to stop the point processing before the number of points specified here have been entered. |
Implements CommandMode.
{*numPoints=2; return &proc;}
ChangeForegroundCallback* ChangeFGProc | ( | ) | [inline, virtual] |
Returns a pointer to a callback procedure that flags nodes that belong in the foreground plane.
Plug-ins typically use a standard callback object provided by the system that flags all nodes dependent on the plug-in object. This ensures that when the plug-in object changes, any nodes that change as a result will be in the foreground plane, making redraw time faster. These constants may be specified to use one of the standard callback objects instead of an actual FG proc. For example {return CHANGE_FG_SELECTED;} CHANGE_FG_SELECTED Selected nodes are flagged. CHANGE_FG_ANIMATED Nodes that are animated are flagged.
Implements CommandMode.
{return &fgProc;}
BOOL ChangeFG | ( | CommandMode * | oldMode | ) | [inline, virtual] |
This method returns TRUE if the command mode needs to change the foreground proc (using ChangeFGProc()) and FALSE if it does not.
A command mode that does not involve any redrawing of the viewports can just return FALSE.
oldMode | This is the command mode that is currently in place. This may be used for comparison with a potential new mode. See the sample code below. |
BOL ChangeFG( CommandMode *oldMode ) { return (oldMode->ChangeFGProc() != CHANGE_FG_SELECTED); } ChangeForegroundCallback *ChangeFGProc() { return CHANGE_FG_SELECTED; }
Implements CommandMode.
{return oldMode->ChangeFGProc()!= &fgProc;}
void EnterMode | ( | ) | [virtual] |
This method is called when a command mode becomes active.
Usually a developer responds by changing the state of a control to indicate to the user that they have entered the mode. Typically this means pushing in a tool button. When the mode is finished the button should be returned to normal (see ExitMode() below). Note: A developer should use the standard color GREEN_WASH for check buttons that instigate a command mode. While the command mode is active the button should be displayed in GREEN_WASH. See Class ICustButton (specifically the method SetHighlightColor()) for more details.
Implements CommandMode.
void ExitMode | ( | ) | [virtual] |
This method is called when the active command mode is replaced by a different mode.
Typically a developer implements this method to set the state of the control that invoked the command mode to the 'out' state. See Class ICustButton (specifically the method SetCheck().
Implements CommandMode.