| 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 | * Copyright (C) 1990,91 Silicon Graphics, Inc. |
| 39 | * |
| 40 | _______________________________________________________________________ |
| 41 | ______________ S I L I C O N G R A P H I C S I N C . ____________ |
| 42 | | |
| 43 | | $Revision: 1.1.1.1 $ |
| 44 | | |
| 45 | | Classes: |
| 46 | | SoCallback |
| 47 | | |
| 48 | | Author(s) : Paul S. Strauss |
| 49 | | |
| 50 | ______________ S I L I C O N G R A P H I C S I N C . ____________ |
| 51 | _______________________________________________________________________ |
| 52 | */ |
| 53 | |
| 54 | #include <Inventor/actions/SoCallbackAction.h>cxx . . $ `<file>/lib/database/include/Inventor/actions/SoCallbackAction.h`/ |
| 55 | #include <Inventor/actions/SoGLRenderAction.h>cxx . . $ `<file>/lib/database/include/Inventor/actions/SoGLRenderAction.h`/ |
| 56 | #include <Inventor/actions/SoGetBoundingBoxAction.h>cxx . . $ `<file>/lib/database/include/Inventor/actions/SoGetBoundingBoxAction.h`/ |
| 57 | #include <Inventor/actions/SoGetMatrixAction.h>cxx . . $ `<file>/lib/database/include/Inventor/actions/SoGetMatrixAction.h`/ |
| 58 | #include <Inventor/actions/SoHandleEventAction.h>cxx . . $ `<file>/lib/database/include/Inventor/actions/SoHandleEventAction.h`/ |
| 59 | #include <Inventor/actions/SoRayPickAction.h>cxx . . $ `<file>/lib/database/include/Inventor/actions/SoRayPickAction.h`/ |
| 60 | #include <Inventor/actions/SoSearchAction.h>cxx . . $ `<file>/lib/database/include/Inventor/actions/SoSearchAction.h`/ |
| 61 | #include <Inventor/actions/SoWriteAction.h>cxx . . $ `<file>/lib/database/include/Inventor/actions/SoWriteAction.h`/ |
| 62 | #include <Inventor/elements/SoGLCacheContextElement.h>cxx . . $ `<file>/lib/database/include/Inventor/elements/SoGLCacheContextElement.h`/ |
| 63 | #include <Inventor/nodes/SoCallback.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoCallback.h`/ |
| 64 | |
| 65 | SO_NODE_SOURCEcxx . . $ `lib/database/include/Inventor/nodes/SoSubNode.h:241:9`!(SoCallback); |
| 66 | |
| 67 | //////////////////////////////////////////////////////////////////////// |
| 68 | // |
| 69 | // Description: |
| 70 | // Constructor |
| 71 | // |
| 72 | // Use: public |
| 73 | |
| 74 | SoCallbackcxx . . $ SoCallback#::SoCallbackcxx . . $ SoCallback#SoCallback(49f6e7a06ebc5aa8).() |
| 75 | // |
| 76 | //////////////////////////////////////////////////////////////////////// |
| 77 | { |
| 78 | SO_NODE_CONSTRUCTORcxx . . $ `lib/database/include/Inventor/nodes/SoSubNode.h:309:9`!(SoCallback); |
| 79 | |
| 80 | isBuiltIncxx . . $ SoFieldContainer#isBuiltIn. = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!; |
| 81 | callbackFunccxx . . $ SoCallback#callbackFunc. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!; |
| 82 | callbackDatacxx . . $ SoCallback#callbackData. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!; |
| 83 | } |
| 84 | |
| 85 | //////////////////////////////////////////////////////////////////////// |
| 86 | // |
| 87 | // Description: |
| 88 | // Copies the contents of the given node into this instance. |
| 89 | // |
| 90 | // Use: protected, virtual |
| 91 | |
| 92 | void |
| 93 | SoCallbackcxx . . $ SoCallback#::copyContentscxx . . $ SoCallback#copyContents(502fcadd2953076).(const SoFieldContainercxx . . $ SoFieldContainer# *fromFC, |
| 94 | SbBoolcxx . . $ SbBool# copyConnections) |
| 95 | // |
| 96 | //////////////////////////////////////////////////////////////////////// |
| 97 | { |
| 98 | // Copy the usual stuff |
| 99 | SoNodecxx . . $ SoNode#::copyContentscxx . . $ SoNode#copyContents(502fcadd2953076).(fromFC, copyConnections); |
| 100 | |
| 101 | // Copy the callback function and data |
| 102 | const SoCallbackcxx . . $ SoCallback# *fromCB = (const SoCallbackcxx . . $ SoCallback# *) fromFC; |
| 103 | setCallbackcxx . . $ SoCallback#setCallback(8cbb79f918785003).(fromCB->callbackFunccxx . . $ SoCallback#callbackFunc., fromCB->callbackDatacxx . . $ SoCallback#callbackData.); |
| 104 | } |
| 105 | |
| 106 | //////////////////////////////////////////////////////////////////////// |
| 107 | // |
| 108 | // Description: |
| 109 | // Destructor |
| 110 | // |
| 111 | // Use: private |
| 112 | |
| 113 | SoCallbackcxx . . $ SoCallback#::~cxx . . $ SoCallback#`~SoCallback`(49f6e7a06ebc5aa8).SoCallbackcxx . . $ SoCallback#() |
| 114 | // |
| 115 | //////////////////////////////////////////////////////////////////////// |
| 116 | { |
| 117 | } |
| 118 | |
| 119 | //////////////////////////////////////////////////////////////////////// |
| 120 | // |
| 121 | // Description: |
| 122 | // Typical action method. |
| 123 | // |
| 124 | // Use: extender |
| 125 | |
| 126 | void |
| 127 | SoCallbackcxx . . $ SoCallback#::doActioncxx . . $ SoCallback#doAction(967167263c8a77b7).(SoActioncxx . . $ SoAction# *action) |
| 128 | // |
| 129 | //////////////////////////////////////////////////////////////////////// |
| 130 | { |
| 131 | SoTypecxx . . $ SoType# actionType = action->getTypeIdcxx . . $ SoAction#getTypeId(70775439ff16cb15).(); |
| 132 | SoStatecxx . . $ SoState# *state = action->getStatecxx . . $ SoAction#getState(5c8eb8fe6550a03).(); |
| 133 | |
| 134 | if (this->callbackFunccxx . . $ SoCallback#callbackFunc. != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!) |
| 135 | (*this->callbackFunccxx . . $ SoCallback#callbackFunc.)(this->callbackDatacxx . . $ SoCallback#callbackData., action); |
| 136 | } |
| 137 | |
| 138 | //////////////////////////////////////////////////////////////////////// |
| 139 | // |
| 140 | // Description: |
| 141 | // Does the callback action |
| 142 | // |
| 143 | // Use: extender |
| 144 | |
| 145 | void |
| 146 | SoCallbackcxx . . $ SoCallback#::callbackcxx . . $ SoCallback#callback(425635c2081b81c8).(SoCallbackActioncxx . . $ SoCallbackAction# *action) |
| 147 | // |
| 148 | //////////////////////////////////////////////////////////////////////// |
| 149 | { |
| 150 | SoCallbackcxx . . $ SoCallback#::doActioncxx . . $ SoCallback#doAction(967167263c8a77b7).(action); |
| 151 | } |
| 152 | |
| 153 | //////////////////////////////////////////////////////////////////////// |
| 154 | // |
| 155 | // Description: |
| 156 | // Does the GL render action |
| 157 | // |
| 158 | // Use: extender |
| 159 | |
| 160 | void |
| 161 | SoCallbackcxx . . $ SoCallback#::GLRendercxx . . $ SoCallback#GLRender(5c806c737f468e18).(SoGLRenderActioncxx . . $ SoGLRenderAction# *action) |
| 162 | // |
| 163 | //////////////////////////////////////////////////////////////////////// |
| 164 | { |
| 165 | // Ask to be cached, to match Inventor 2.0 default: |
| 166 | SoGLCacheContextElementcxx . . $ SoGLCacheContextElement#::shouldAutoCachecxx . . $ SoGLCacheContextElement#shouldAutoCache(47a371b7b9daa722).(action->getStatecxx . . $ SoAction#getState(5c8eb8fe6550a03).(), TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!); |
| 167 | |
| 168 | SoCallbackcxx . . $ SoCallback#::doActioncxx . . $ SoCallback#doAction(967167263c8a77b7).(action); |
| 169 | } |
| 170 | |
| 171 | //////////////////////////////////////////////////////////////////////// |
| 172 | // |
| 173 | // Description: |
| 174 | // Does the get bounding box action |
| 175 | // |
| 176 | // Use: extender |
| 177 | |
| 178 | void |
| 179 | SoCallbackcxx . . $ SoCallback#::getBoundingBoxcxx . . $ SoCallback#getBoundingBox(dd7d7d7c2dd56aae).(SoGetBoundingBoxActioncxx . . $ SoGetBoundingBoxAction# *action) |
| 180 | // |
| 181 | //////////////////////////////////////////////////////////////////////// |
| 182 | { |
| 183 | SoCallbackcxx . . $ SoCallback#::doActioncxx . . $ SoCallback#doAction(967167263c8a77b7).(action); |
| 184 | } |
| 185 | |
| 186 | //////////////////////////////////////////////////////////////////////// |
| 187 | // |
| 188 | // Description: |
| 189 | // Does the get matrix action |
| 190 | // |
| 191 | // Use: extender |
| 192 | |
| 193 | void |
| 194 | SoCallbackcxx . . $ SoCallback#::getMatrixcxx . . $ SoCallback#getMatrix(b69d845234b7e6ee).(SoGetMatrixActioncxx . . $ SoGetMatrixAction# *action) |
| 195 | // |
| 196 | //////////////////////////////////////////////////////////////////////// |
| 197 | { |
| 198 | SoCallbackcxx . . $ SoCallback#::doActioncxx . . $ SoCallback#doAction(967167263c8a77b7).(action); |
| 199 | } |
| 200 | |
| 201 | //////////////////////////////////////////////////////////////////////// |
| 202 | // |
| 203 | // Description: |
| 204 | // Does the handle event thing |
| 205 | // |
| 206 | // Use: extender |
| 207 | |
| 208 | void |
| 209 | SoCallbackcxx . . $ SoCallback#::handleEventcxx . . $ SoCallback#handleEvent(89f4d17049d836a3).(SoHandleEventActioncxx . . $ SoHandleEventAction# *action) |
| 210 | // |
| 211 | //////////////////////////////////////////////////////////////////////// |
| 212 | { |
| 213 | SoCallbackcxx . . $ SoCallback#::doActioncxx . . $ SoCallback#doAction(967167263c8a77b7).(action); |
| 214 | } |
| 215 | |
| 216 | //////////////////////////////////////////////////////////////////////// |
| 217 | // |
| 218 | // Description: |
| 219 | // Pick. |
| 220 | // |
| 221 | // Use: extender |
| 222 | |
| 223 | void |
| 224 | SoCallbackcxx . . $ SoCallback#::pickcxx . . $ SoCallback#pick(7b4c6871cb3411ea).(SoPickActioncxx . . $ SoPickAction# *action) |
| 225 | // |
| 226 | //////////////////////////////////////////////////////////////////////// |
| 227 | { |
| 228 | SoCallbackcxx . . $ SoCallback#::doActioncxx . . $ SoCallback#doAction(967167263c8a77b7).(action); |
| 229 | } |
| 230 | |
| 231 | //////////////////////////////////////////////////////////////////////// |
| 232 | // |
| 233 | // Description: |
| 234 | // Does search... |
| 235 | // |
| 236 | // Use: extender |
| 237 | |
| 238 | void |
| 239 | SoCallbackcxx . . $ SoCallback#::searchcxx . . $ SoCallback#search(ecd330ee9b1f803b).(SoSearchActioncxx . . $ SoSearchAction# *action) |
| 240 | // |
| 241 | //////////////////////////////////////////////////////////////////////// |
| 242 | { |
| 243 | SoCallbackcxx . . $ SoCallback#::doActioncxx . . $ SoCallback#doAction(967167263c8a77b7).(action); |
| 244 | SoNodecxx . . $ SoNode#::searchcxx . . $ SoNode#search(ecd330ee9b1f803b).(action); |
| 245 | } |
| 246 | |
| 247 | //////////////////////////////////////////////////////////////////////// |
| 248 | // |
| 249 | // Description: |
| 250 | // Does the write action |
| 251 | // |
| 252 | // Use: extender |
| 253 | |
| 254 | void |
| 255 | SoCallbackcxx . . $ SoCallback#::writecxx . . $ SoCallback#write(a375a81bffae2638).(SoWriteActioncxx . . $ SoWriteAction# *action) |
| 256 | // |
| 257 | //////////////////////////////////////////////////////////////////////// |
| 258 | { |
| 259 | SoCallbackcxx . . $ SoCallback#::doActioncxx . . $ SoCallback#doAction(967167263c8a77b7).(action); |
| 260 | SoNodecxx . . $ SoNode#::writecxx . . $ SoNode#write(a375a81bffae2638).(action); |
| 261 | } |