Coin Logo http://www.sim.no/
http://www.coin3d.org/

SoHandleEventAction.h
1 #ifndef COIN_SOHANDLEEVENTACTION_H
2 #define COIN_SOHANDLEEVENTACTION_H
3 
4 /**************************************************************************\
5  *
6  * This file is part of the Coin 3D visualization library.
7  * Copyright (C) by Kongsberg Oil & Gas Technologies.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * ("GPL") version 2 as published by the Free Software Foundation.
12  * See the file LICENSE.GPL at the root directory of this source
13  * distribution for additional information about the GNU GPL.
14  *
15  * For using Coin with software that can not be combined with the GNU
16  * GPL, and for taking advantage of the additional benefits of our
17  * support services, please contact Kongsberg Oil & Gas Technologies
18  * about acquiring a Coin Professional Edition License.
19  *
20  * See http://www.coin3d.org/ for more information.
21  *
22  * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
23  * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24  *
25 \**************************************************************************/
26 
27 #include <Inventor/actions/SoAction.h>
28 #include <Inventor/actions/SoSubAction.h>
29 
30 class SbViewportRegion;
31 class SoEvent;
32 class SoPickedPoint;
33 class SoPickedPointList;
34 
35 class SoHandleEventActionP;
36 
37 class COIN_DLL_API SoHandleEventAction : public SoAction {
38  typedef SoAction inherited;
39 
40  SO_ACTION_HEADER(SoHandleEventAction);
41 
42 public:
43  static void initClass(void);
44 
45  SoHandleEventAction(const SbViewportRegion & viewportregion);
46  virtual ~SoHandleEventAction(void);
47 
48  void setViewportRegion(const SbViewportRegion & newregion);
49  const SbViewportRegion & getViewportRegion(void) const;
50  void setEvent(const SoEvent * ev);
51  const SoEvent * getEvent(void) const;
52  void setHandled(void);
53  SbBool isHandled(void) const;
54  void setGrabber(SoNode * node);
55  void releaseGrabber(void);
56  SoNode * getGrabber(void) const;
57  void setPickRoot(SoNode * node);
58  SoNode * getPickRoot(void) const;
59  void setPickRadius(const float radiusinpixels);
60  const SoPickedPoint * getPickedPoint(void);
61  const SoPickedPointList & getPickedPointList(void);
62 
63 protected:
64  virtual void beginTraversal(SoNode * node);
65 
66 private:
67  SbPimplPtr<SoHandleEventActionP> pimpl;
68 
69  // NOT IMPLEMENTED:
71  SoHandleEventAction & operator = (const SoHandleEventAction & rhs);
72 }; // SoHandleEventAction
73 
74 #ifndef COIN_INTERNAL
75 // For SGI / TGS Open Inventor compile-time compatibility.
76 #include <Inventor/actions/SoRayPickAction.h>
77 #endif // COIN_INTERNAL
78 
79 #endif // !COIN_SOHANDLEEVENTACTION_H
static void initClass(void)
Definition: SoAction.cpp:366
The SoNode class is the base class for nodes used in scene graphs.Coin is a retained mode 3D visualiz...
Definition: SoNode.h:47
The SoPickedPointList class is a container for pointers to SoPickedPoint objects.This list class will...
Definition: SoPickedPointList.h:31
The SoAction class is the base class for all traversal actions.Applying actions is the basic mechanis...
Definition: SoAction.h:68
The SoHandleEventAction class distributes user events to the scene.This is the action used by the GUI...
Definition: SoHandleEventAction.h:37
The SoPickedPoint class is used for specifying picked points.It holds miscellaneous information about...
Definition: SoPickedPoint.h:39
The SoEvent class is the base class for all Coin events.Coin contains its own set of event classes...
Definition: SoEvent.h:34
virtual void beginTraversal(SoNode *node)
Definition: SoAction.cpp:1263
The SbViewportRegion class is a viewport within a full window.The SbViewportRegion class contains inf...
Definition: SbViewportRegion.h:31

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.

Generated on Fri Sep 9 2016 for Coin by Doxygen 1.8.5.