#include <splshape.h>
Public Member Functions |
|
SSCreateLineMouseProc (SplineShape *spl, IObjParam *i) | |
int | proc (HWND hwnd, int msg, int point, int flags, IPoint2 m) |
Called to handle the mouse event processing
whenever a mouse event happens. |
|
int | override (int mode) |
Override the default drag mode. |
|
Protected Member Functions |
|
BOOL | HitTest (ViewExp *vpt, IPoint2 *p, int type, int flags, int hitType) |
BOOL | AnyHits (ViewExp *vpt) |
BOOL | InsertWhere (ViewExp *vpt, IPoint2 *p, BezierShape **shapeOut, int *polyOut, int *vertOut, INode **nodeOut) |
SSCreateLineMouseProc | ( | SplineShape * | spl, |
IObjParam * | i | ||
) | [inline] |
{ ss=spl; ip=i; }
BOOL AnyHits | ( | ViewExp * | vpt | ) | [inline, protected] |
{ return vpt->NumSubObjHits(); }
BOOL InsertWhere | ( | ViewExp * | vpt, |
IPoint2 * | p, | ||
BezierShape ** | shapeOut, | ||
int * | polyOut, | ||
int * | vertOut, | ||
INode ** | nodeOut | ||
) | [protected] |
int proc | ( | HWND | hwnd, |
int | msg, | ||
int | point, | ||
int | flags, | ||
IPoint2 | m | ||
) | [virtual] |
Called to handle the mouse event processing whenever a mouse event happens.
hwnd | The window handle of the window in which the user has clicked. It is one of the viewports to which an interface can be obtained from the system. To get such interface, the window handle should be passes to the functions Interface::GetViewport() as the input. Developers should call Interface::ReleaseViewport() once they are done with the viewport interface. |
msg | This message describes the type of event that occurred. See Mouse Call Back Flags. |
point | The point number. this is 0 for the first click, 1 for the second, etc. |
flags | These flags describe the state of the mouse buttons. See Mouse Call Back Flags. |
m | The 2D screen point on which that the user has clicked. Methods in the viewport interface allow this point to be converted into a world space ray or a 3D view space point. A world space ray can be intersected with the active construction plane which results in a point on the active construction plane. See Class ViewExp. |
Reimplemented from MouseCallBack.
int override | ( | int | mode | ) | [inline, virtual] |
Override the default drag mode.
Most plug-ins will not need to replace the default implementation of this method. This function changes the way the messages are sent based on the sequence of mouse inputs by the user. The normal flow of the messages is described as follows: First the user clicks the mouse button and a MOUSE_POINT message is generated. The user then drags the mouse with the button down, resulting in a series of MOUSE_MOVE messages to be sent. When the user releases the mouse button, a MOUSE_POINT messages is generated. Then the mouse is moved again, resulting in a new series of MOUSE_MOVE messages to be sent again. Unlike the first time, when the user clicks the mouse button here, a point message is NOT generated at this point until the button is released. All future points are then only sent after the mouse button has been pressed and released. The default implementation is { return mode; }, and a sample program using the override method (using CLICK_DOWN_POINT) can be found in /MAXSDK/SAMPLES/OBJECTS/SPLINE.CPP.
mode | The current drag mode from the list Mouse Drag Modes. |
Reimplemented from MouseCallBack.
{ UNUSED_PARAM(mode); return CLICK_DOWN_POINT; }