Coin Logo Coin3D is Free Software,
published under the BSD 3-clause license.
https://bitbucket.org/Coin3D/
http://www.kongsberg.com/kogt/
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SmSwitchboardOperator.h
Go to the documentation of this file.
1 #ifndef SMALLCHANGE_SWITCHBOARDOPERATOR_H
2 #define SMALLCHANGE_SWITCHBOARDOPERATOR_H
3 
4 /**************************************************************************\
5  * Copyright (c) Kongsberg Oil & Gas Technologies AS
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are
10  * met:
11  *
12  * Redistributions of source code must retain the above copyright notice,
13  * this list of conditions and the following disclaimer.
14  *
15  * Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in the
17  * documentation and/or other materials provided with the distribution.
18  *
19  * Neither the name of the copyright holder nor the names of its
20  * contributors may be used to endorse or promote products derived from
21  * this software without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27  * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 \**************************************************************************/
35 
37 #include <Inventor/fields/SoMFEnum.h>
38 #include <Inventor/fields/SoMFInt32.h>
39 #include <Inventor/events/SoKeyboardEvent.h>
40 
41 #include <SmallChange/basic.h>
42 
43 
44 class SMALLCHANGE_DLL_API SmSwitchboardOperator : public SmSwitchboard {
45  typedef SmSwitchboard inherited;
47 
48 public:
49  static void initClass(void);
51  SmSwitchboardOperator(int numchildren);
52 
53  enum Behavior {
54  NONE, TOGGLE, HOLD, INVERSE_HOLD, TIME_HOLD
55  };
56 
57  enum Key {
58  ANY = SoKeyboardEvent::ANY,
59  UNDEFINED = SoKeyboardEvent::UNDEFINED,
60  LEFT_SHIFT = SoKeyboardEvent::LEFT_SHIFT,
61  RIGHT_SHIFT = SoKeyboardEvent::RIGHT_SHIFT,
62  LEFT_CONTROL = SoKeyboardEvent::LEFT_CONTROL,
63  RIGHT_CONTROL = SoKeyboardEvent::RIGHT_CONTROL,
64  LEFT_ALT = SoKeyboardEvent::LEFT_ALT,
65  RIGHT_ALT = SoKeyboardEvent::RIGHT_ALT,
66  CAPS_LOCK = SoKeyboardEvent::CAPS_LOCK,
67  A = SoKeyboardEvent::A,
68  B = SoKeyboardEvent::B,
69  C = SoKeyboardEvent::C,
70  D = SoKeyboardEvent::D,
71  E = SoKeyboardEvent::E,
72  F = SoKeyboardEvent::F,
73  G = SoKeyboardEvent::G,
74  H = SoKeyboardEvent::H,
75  I = SoKeyboardEvent::I,
76  J = SoKeyboardEvent::J,
77  K = SoKeyboardEvent::K,
78  L = SoKeyboardEvent::L,
79  M = SoKeyboardEvent::M,
80  N = SoKeyboardEvent::N,
81  O = SoKeyboardEvent::O,
82  P = SoKeyboardEvent::P,
83  Q = SoKeyboardEvent::Q,
84  R = SoKeyboardEvent::R,
85  S = SoKeyboardEvent::S,
86  T = SoKeyboardEvent::T,
87  U = SoKeyboardEvent::U,
88  V = SoKeyboardEvent::V,
89  W = SoKeyboardEvent::W,
90  X = SoKeyboardEvent::X,
91  Y = SoKeyboardEvent::Y,
92  Z = SoKeyboardEvent::Z,
93  NUMBER_0 = SoKeyboardEvent::NUMBER_0,
94  NUMBER_1 = SoKeyboardEvent::NUMBER_1,
95  NUMBER_2 = SoKeyboardEvent::NUMBER_2,
96  NUMBER_3 = SoKeyboardEvent::NUMBER_3,
97  NUMBER_4 = SoKeyboardEvent::NUMBER_4,
98  NUMBER_5 = SoKeyboardEvent::NUMBER_5,
99  NUMBER_6 = SoKeyboardEvent::NUMBER_6,
100  NUMBER_7 = SoKeyboardEvent::NUMBER_7,
101  NUMBER_8 = SoKeyboardEvent::NUMBER_8,
102  NUMBER_9 = SoKeyboardEvent::NUMBER_9,
103  MINUS = SoKeyboardEvent::MINUS,
104  EQUAL = SoKeyboardEvent::EQUAL,
105  SPACE = SoKeyboardEvent::SPACE,
106  BACKSPACE = SoKeyboardEvent::BACKSPACE,
107  TAB = SoKeyboardEvent::TAB,
108  RETURN = SoKeyboardEvent::RETURN,
109  BRACKETLEFT = SoKeyboardEvent::BRACKETLEFT,
110  BRACKETRIGHT = SoKeyboardEvent::BRACKETRIGHT,
111  SEMICOLON = SoKeyboardEvent::SEMICOLON,
112  APOSTROPHE = SoKeyboardEvent::APOSTROPHE,
113  COMMA = SoKeyboardEvent::COMMA,
114  PERIOD = SoKeyboardEvent::PERIOD,
115  SLASH = SoKeyboardEvent::SLASH,
116  BACKSLASH = SoKeyboardEvent::BACKSLASH,
117  GRAVE = SoKeyboardEvent::GRAVE
118  };
119 
123 
124  virtual void handleEvent(SoHandleEventAction * action);
125 
126 protected:
127  virtual ~SmSwitchboardOperator(void);
128 
129 private:
130  void constructor(void);
131 
132 };
133 
134 #endif // !SMALLCHANGE_SWITCHBOARDOPERATOR_H
#define SO_NODE_HEADER(classname)
virtual void handleEvent(SoHandleEventAction *action)
Definition: Switchboard.cpp:198
static void initClass(void)
Definition: Switchboard.cpp:81
SoMFInt32 msecs
Definition: SmSwitchboardOperator.h:122
Definition: SmSwitchboardOperator.h:54
SoMFEnum behavior
Definition: SmSwitchboardOperator.h:121
The SmSwitchboard class is a group node that can toggle children on and off arbitrarily.
Definition: SmSwitchboard.h:43
Behavior
Definition: SmSwitchboardOperator.h:53
SoMFEnum key
Definition: SmSwitchboardOperator.h:120
Key
Definition: SmSwitchboardOperator.h:57
The SwitchboardOperator class is a group node that can toggle children on and off arbitrarily based o...
Definition: SmSwitchboardOperator.h:44