Gui::AbstractMouseSelection Class Reference

The mouse selection base class In derived classes you must implement the methods initialize() and terminate() For all drawing stuff you just have to reimplement the draw() method. More...

#include <MouseSelection.h>

Inheritance diagram for Gui::AbstractMouseSelection:
Gui::BaseMouseSelection Gui::PolyPickerSelection Gui::RectangleSelection Gui::PolyClipSelection Gui::BoxZoomSelection

List of all members.

Public Types

enum  { Continue = 0, Restart = 1, Finish = 2, Cancel = 3 }

Public Member Functions

 AbstractMouseSelection ()
const std::vector< SbVec2s > & getPositions () const
void grabMouseModel (Gui::View3DInventorViewer *)
virtual void initialize ()=0
 implement this in derived classes
SbBool isInner () const
void redraw ()
void releaseMouseModel (void)
virtual void terminate ()=0
 implement this in derived classes
virtual ~AbstractMouseSelection (void)
Mouse events



int handleEvent (const SoEvent *const ev, const SbViewportRegion &vp)

Protected Member Functions

virtual void draw ()
 drawing stuff
virtual int keyboardEvent (const SoKeyboardEvent *const e)
virtual int locationEvent (const SoLocation2Event *const e, const QPoint &pos)
virtual int mouseButtonEvent (const SoMouseButtonEvent *const e, const QPoint &pos)

Protected Attributes

Gui::View3DInventorViewer_pcView3D
SbBool m_bInner
QCursor m_cPrevCursor
int m_iXnew
int m_iXold
int m_iYnew
int m_iYold
SbBool mustRedraw

Detailed Description

The mouse selection base class In derived classes you must implement the methods initialize() and terminate() For all drawing stuff you just have to reimplement the draw() method.

In general you need not to do anything else.

Author:
Werner Mayer and Jürgen Riegel

Definition at line 53 of file MouseSelection.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
Continue 
Restart 
Finish 
Cancel 

Definition at line 56 of file MouseSelection.h.


Constructor & Destructor Documentation

AbstractMouseSelection::AbstractMouseSelection (  ) 

Definition at line 47 of file MouseSelection.cpp.

References m_bInner, and mustRedraw.

virtual Gui::AbstractMouseSelection::~AbstractMouseSelection ( void   )  [inline, virtual]

Definition at line 59 of file MouseSelection.h.


Member Function Documentation

virtual void Gui::AbstractMouseSelection::draw (  )  [inline, protected, virtual]

drawing stuff

Reimplemented in Gui::PolyPickerSelection, and Gui::RectangleSelection.

Definition at line 82 of file MouseSelection.h.

const std::vector<SbVec2s>& Gui::AbstractMouseSelection::getPositions (  )  const [inline]
void AbstractMouseSelection::grabMouseModel ( Gui::View3DInventorViewer viewer  ) 

Definition at line 53 of file MouseSelection.cpp.

References _pcView3D, initialize(), and m_cPrevCursor.

Referenced by Gui::NavigationStyle::startSelection().

int AbstractMouseSelection::handleEvent ( const SoEvent *const   ev,
const SbViewportRegion &  vp 
)
virtual void Gui::AbstractMouseSelection::initialize (  )  [pure virtual]

implement this in derived classes

Implemented in Gui::PolyPickerSelection, and Gui::RectangleSelection.

Referenced by grabMouseModel().

SbBool Gui::AbstractMouseSelection::isInner (  )  const [inline]

Definition at line 67 of file MouseSelection.h.

Referenced by Gui::NavigationStyle::processEvent().

virtual int Gui::AbstractMouseSelection::keyboardEvent ( const SoKeyboardEvent *const   e  )  [inline, protected, virtual]

Reimplemented in Gui::PolyPickerSelection, and Gui::RectangleSelection.

Definition at line 79 of file MouseSelection.h.

Referenced by handleEvent().

virtual int Gui::AbstractMouseSelection::locationEvent ( const SoLocation2Event *const   e,
const QPoint &  pos 
) [inline, protected, virtual]

Reimplemented in Gui::PolyPickerSelection, and Gui::RectangleSelection.

Definition at line 78 of file MouseSelection.h.

Referenced by handleEvent().

virtual int Gui::AbstractMouseSelection::mouseButtonEvent ( const SoMouseButtonEvent *const   e,
const QPoint &  pos 
) [inline, protected, virtual]

Reimplemented in Gui::PolyPickerSelection, and Gui::RectangleSelection.

Definition at line 77 of file MouseSelection.h.

Referenced by handleEvent().

void AbstractMouseSelection::redraw (  ) 

Definition at line 71 of file MouseSelection.cpp.

References mustRedraw.

Referenced by Gui::NavigationStyle::redraw().

void AbstractMouseSelection::releaseMouseModel ( void   ) 
virtual void Gui::AbstractMouseSelection::terminate (  )  [pure virtual]

implement this in derived classes

Implemented in Gui::PolyPickerSelection, Gui::RectangleSelection, and Gui::BoxZoomSelection.

Referenced by releaseMouseModel().


Member Data Documentation

Definition at line 89 of file MouseSelection.h.

Referenced by AbstractMouseSelection(), and Gui::PolyClipSelection::popupMenu().

Definition at line 90 of file MouseSelection.h.

Referenced by AbstractMouseSelection(), Gui::PolyPickerSelection::draw(), and redraw().


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

Generated on Wed Nov 23 19:01:58 2011 for FreeCAD by  doxygen 1.6.1