MOUSEMOVE_DELTA

Detailed Description

These constants should be used in InputEvent and only movements bigger than MOUSEMOVE_DELTA_TABLET or MOUSEMOVE_DELTA_MOUSE should be processed.
Here is an example from the material preview:

{
}
Bool MaterialPreviewArea::InputEvent(const BaseContainer& msg)
{
...
Float rMinDelta = GetMouseMoveDelta();
Float rTotalDeltaX = 0, rTotalDeltaY = 0;
Float rDeltaX, rDeltaY;
while (MouseDrag(&rDeltaX, &rDeltaY, nullptr)==MOUSEDRAGRESULT_CONTINUE)
{
rTotalDeltaX += rDeltaX;
rTotalDeltaY += rDeltaY;
if ((rDeltaX == 0 && rDeltaY == 0) ||
(!bRotated && Abs(rTotalDeltaX) < rMinDelta && Abs(rTotalDeltaY) < rMinDelta))
{
GeSleep(10);
continue;
}
...
bRotated = true;
bRestart = true;
}
}

Macros

#define MOUSEMOVE_DELTA_TABLET
 
#define MOUSEMOVE_DELTA_MOUSE
 

Macro Definition Documentation

◆ MOUSEMOVE_DELTA_TABLET

#define MOUSEMOVE_DELTA_TABLET

Tablet movement threshold.

◆ MOUSEMOVE_DELTA_MOUSE

#define MOUSEMOVE_DELTA_MOUSE

Mouse movement threshold.

MOUSEMOVE_DELTA_TABLET
#define MOUSEMOVE_DELTA_TABLET
Tablet movement threshold.
Definition: c4d_gui.h:935
GeIsTabletMode
Bool GeIsTabletMode()
GetMouseMoveDelta
Float GetMouseMoveDelta()
Float
maxon::Float Float
Definition: ge_sys_math.h:66
MOUSEMOVE_DELTA_MOUSE
#define MOUSEMOVE_DELTA_MOUSE
Mouse movement threshold.
Definition: c4d_gui.h:936
GeSleep
void GeSleep(Int32 milliseconds)
Abs
Float32 Abs(Float32 val)
Definition: apibasemath.h:186
GeUserArea::MouseDrag
MOUSEDRAGRESULT MouseDrag(Float *mx, Float *my, BaseContainer *channels)
Bool
maxon::Bool Bool
Definition: ge_sys_math.h:55
BaseContainer
Definition: c4d_basecontainer.h:46