This class defines if the associated view is currently being grabbed (for scrolling) with the mouse. More...
#include "ChildFrameViewWin2D.hpp"
Public Member Functions | |
MouseGrabT (ViewWindow2DT &ViewWin) | |
void | Activate (const wxPoint &RefPt) |
Activates mouse grabbing at the given reference point, or updates the reference point when mouse grabbing is already active. More... | |
void | Deactivate () |
Deactivates the mouse control. More... | |
bool | IsActive () const |
Returns whether the mouse control is active. More... | |
const wxPoint & | GetRefPt () const |
Returns the position of the reference point in window coordinates. More... | |
This class defines if the associated view is currently being grabbed (for scrolling) with the mouse.
It is similar to class ViewWindow3DT::MouseControlT, but much simpler as grabbing is the only type of control.
void ViewWindow2DT::MouseGrabT::Activate | ( | const wxPoint & | RefPt | ) |
Activates mouse grabbing at the given reference point, or updates the reference point when mouse grabbing is already active.
Note that activating can fail, especially if some other code has already captured the mouse pointer.
void ViewWindow2DT::MouseGrabT::Deactivate | ( | ) |
Deactivates the mouse control.
|
inline |
Returns the position of the reference point in window coordinates.
|
inline |
Returns whether the mouse control is active.