Debian Codegraph @

lib/database/src/so/events/SoEventInit.c++

raw
1 /*
2 *
3 * Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * Further, this software is distributed without any warranty that it is
16 * free of the rightful claim of any third person regarding infringement
17 * or the like. Any license provided herein, whether implied or
18 * otherwise, applies only to this software file. Patent licenses, if
19 * any, provided herein do not apply to combinations of this program with
20 * other software, or any other product whatsoever.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
27 * Mountain View, CA 94043, or:
28 *
29 * http://www.sgi.com
30 *
31 * For further information regarding this notice, see:
32 *
33 * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
34 *
35 */
36
37
38 /*
39 * Copyright (C) 1990,91,92 Silicon Graphics, Inc.
40 *
41 _______________________________________________________________________
42 ______________ S I L I C O N G R A P H I C S I N C . ____________
43 |
44 | $Revision: 1.1.1.1 $
45 |
46 | Class:
47 | call initClasses for all event classes
48 |
49 | Author(s) : Ronen Barzel
50 |
51 ______________ S I L I C O N G R A P H I C S I N C . ____________
52 _______________________________________________________________________
53 */
54
55 #include <Inventor/events/SoEvents.h>
56
57 ////////////////////////////////////////////////////////////////////////
58 //
59 // Description:
60 // This initializes ALL Inventor event classes.
61 //
62 // Use: internal
63
64 void
65 SoEvent::initClasses()
66 //
67 ////////////////////////////////////////////////////////////////////////
68 {
69 SoEvent::initClass();
70
71 SoButtonEvent::initClass();
72 SoKeyboardEvent::initClass();
73 SoMouseButtonEvent::initClass();
74 SoSpaceballButtonEvent::initClass();
75
76 SoLocation2Event::initClass();
77 SoMotion3Event::initClass();
78 }
79 ////////////////////////////////////////////////////////////////////////
80 //
81 // Class initialization
82 //
83 // SoINTERNAL public
84 //
85 void
86 SoButtonEvent::initClass()
87 //
88 ////////////////////////////////////////////////////////////////////////
89 {
90 // Allocate a new node type id
91 classTypeId = SoType::createType(SoEvent::getClassTypeId(), "ButtonEvent");
92 }
93
94 ////////////////////////////////////////////////////////////////////////
95 //
96 // Class initialization
97 //
98 // SoINTERNAL public
99 //
100 void
101 SoEvent::initClass()
102 //
103 ////////////////////////////////////////////////////////////////////////
104 {
105 // Allocate a new node type id
106 // No real parent id, so pass 'badType' as the parent type
107 classTypeId = SoType::createType(SoType::badType(), "Event");
108 }
109
110 ////////////////////////////////////////////////////////////////////////
111 //
112 // Class initialization
113 //
114 // SoINTERNAL public
115 //
116 void
117 SoKeyboardEvent::initClass()
118 //
119 ////////////////////////////////////////////////////////////////////////
120 {
121 // Allocate a new event type id
122 classTypeId = SoType::createType(
123 SoButtonEvent::getClassTypeId(), "KeyboardEvent");
124 }
125
126 ////////////////////////////////////////////////////////////////////////
127 //
128 // Class initialization
129 //
130 // SoINTERNAL public
131 //
132 void
133 SoLocation2Event::initClass()
134 //
135 ////////////////////////////////////////////////////////////////////////
136 {
137 // Allocate a new event type id
138 classTypeId = SoType::createType(SoEvent::getClassTypeId(), "Location2Event");
139 }
140
141 ////////////////////////////////////////////////////////////////////////
142 //
143 // Class initialization
144 //
145 // SoINTERNAL public
146 //
147 void
148 SoMotion3Event::initClass()
149 //
150 ////////////////////////////////////////////////////////////////////////
151 {
152 // Allocate a new event type id
153 classTypeId = SoType::createType(
154 SoEvent::getClassTypeId(), "Motion3Event");
155 }
156
157 ////////////////////////////////////////////////////////////////////////
158 //
159 // Class initialization
160 //
161 // SoINTERNAL public
162 //
163 void
164 SoMouseButtonEvent::initClass()
165 //
166 ////////////////////////////////////////////////////////////////////////
167 {
168 // Allocate a new event type id
169 classTypeId = SoType::createType(
170 SoButtonEvent::getClassTypeId(), "MouseButtonEvent");
171 }
172
173 ////////////////////////////////////////////////////////////////////////
174 //
175 // Class initialization
176 //
177 // SoINTERNAL public
178 //
179 void
180 SoSpaceballButtonEvent::initClass()
181 //
182 ////////////////////////////////////////////////////////////////////////
183 {
184 // Allocate a new event type id
185 classTypeId = SoType::createType(
186 SoButtonEvent::getClassTypeId(), "SpaceballButtonEvent");
187 }
188