SoEvent.h Source File

| http://www.sim.no/ http://www.coin3d.org/

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

SoEvent.h
1 #ifndef COIN_SOEVENT_H
2 #define COIN_SOEVENT_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/SoType.h>
28 #include <Inventor/SbVec2s.h>
29 #include <Inventor/SbTime.h>
30
31 class SbViewportRegion;
32 class SbVec2f;
33
34 class COIN_DLL_API SoEvent {
35
36 public:
37 SoEvent(void);
38 virtual ~SoEvent();
39
40 SbBool isOfType(SoType type) const;
41 static SoType getClassTypeId(void);
42 virtual SoType getTypeId(void) const;
43
44 void setTime(const SbTime t);
45 SbTime getTime(void) const;
46
47 void setPosition(const SbVec2s & p);
48 const SbVec2s & getPosition(void) const;
49 const SbVec2s getPosition(const SbViewportRegion & vpRgn) const;
50 const SbVec2f getNormalizedPosition(const SbViewportRegion & vpRgn) const;
51
52 void setShiftDown(SbBool isDown);
53 SbBool wasShiftDown(void) const;
54 void setCtrlDown(SbBool isDown);
55 SbBool wasCtrlDown(void) const;
56 void setAltDown(SbBool isDown);
57 SbBool wasAltDown(void) const;
58
59 static void initClass(void);
60
61 private:
62 static SoType classTypeId;
63
64 SbTime timeofevent;
65 SbVec2s positionofevent;
66
67 static void initEvents(void);
68 static void cleanupClass(void);
69
70 struct {
71 unsigned int shiftdown : 1;
72 unsigned int ctrldown : 1;
73 unsigned int altdown : 1;
74 } modifiers;
75 };
76
77 #endif // !COIN_SOEVENT_H
SbVec2f
The SbVec2f class is a 2 dimensional vector with floating point coordinates.This vector class is used...
Definition: SbVec2f.h:39
SbTime
The SbTime class instances represents time values.SbTime is a convenient way of doing system independ...
Definition: SbTime.h:41
SoEvent
The SoEvent class is the base class for all Coin events.Coin contains its own set of event classes...
Definition: SoEvent.h:34
SbViewportRegion
The SbViewportRegion class is a viewport within a full window.The SbViewportRegion class contains inf...
Definition: SbViewportRegion.h:31
SbVec2s
The SbVec2s class is a 2 dimensional vector with short integer coordinates.This vector class is used ...
Definition: SbVec2s.h:41
SoType
The SoType class is the basis for the run-time type system in Coin.Many of the classes in the Coin li...
Definition: SoType.h:50

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