Cafu Engine
ViewWindow2DT::MouseGrabT Class Reference

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...
 

Detailed Description

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.

Member Function Documentation

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.

const wxPoint& ViewWindow2DT::MouseGrabT::GetRefPt ( ) const
inline

Returns the position of the reference point in window coordinates.

bool ViewWindow2DT::MouseGrabT::IsActive ( ) const
inline

Returns whether the mouse control is active.


The documentation for this class was generated from the following files: