![]() |
http://www.sim.no http://www.coin3d.org |
00001 #ifndef COIN_SOWWWINLINE_H 00002 #define COIN_SOWWWINLINE_H 00003 00004 /**************************************************************************\ 00005 * 00006 * This file is part of the Coin 3D visualization library. 00007 * Copyright (C) 1998-2007 by Systems in Motion. All rights reserved. 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU General Public License 00011 * ("GPL") version 2 as published by the Free Software Foundation. 00012 * See the file LICENSE.GPL at the root directory of this source 00013 * distribution for additional information about the GNU GPL. 00014 * 00015 * For using Coin with software that can not be combined with the GNU 00016 * GPL, and for taking advantage of the additional benefits of our 00017 * support services, please contact Systems in Motion about acquiring 00018 * a Coin Professional Edition License. 00019 * 00020 * See http://www.coin3d.org/ for more information. 00021 * 00022 * Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY. 00023 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org 00024 * 00025 \**************************************************************************/ 00026 00027 #include <Inventor/nodes/SoSubNode.h> 00028 #include <Inventor/fields/SoSFString.h> 00029 #include <Inventor/fields/SoSFVec3f.h> 00030 #include <Inventor/fields/SoSFNode.h> 00031 00032 #ifndef COIN_INTERNAL 00033 #include <Inventor/actions/SoCallbackAction.h> 00034 #endif // !COIN_INTERNAL 00035 00036 class SbColor; 00037 class SoGroup; 00038 class SoWWWInlineP; 00039 00040 // ************************************************************************* 00041 00042 class SoWWWInline; 00043 typedef void SoWWWInlineFetchURLCB(const SbString & url, void * userData, 00044 SoWWWInline * node); 00045 00046 // ************************************************************************* 00047 00048 class COIN_DLL_API SoWWWInline : public SoNode { 00049 typedef SoNode inherited; 00050 00051 SO_NODE_HEADER(SoWWWInline); 00052 00053 public: 00054 static void initClass(void); 00055 SoWWWInline(void); 00056 00057 SoSFString name; 00058 SoSFVec3f bboxCenter; 00059 SoSFVec3f bboxSize; 00060 SoSFNode alternateRep; 00061 00062 enum BboxVisibility { 00063 NEVER, 00064 UNTIL_LOADED, 00065 ALWAYS 00066 }; 00067 00068 void setFullURLName(const SbString & url); 00069 const SbString & getFullURLName(void); 00070 00071 SoGroup * copyChildren(void) const; 00072 00073 void requestURLData(void); 00074 SbBool isURLDataRequested(void) const; 00075 SbBool isURLDataHere(void) const; 00076 void cancelURLDataRequest(void); 00077 00078 void setChildData(SoNode * urldata); 00079 SoNode * getChildData(void) const; 00080 00081 virtual SoChildList * getChildren(void) const; 00082 00083 static void setFetchURLCallBack(SoWWWInlineFetchURLCB * f, void * userdata); 00084 00085 static void setBoundingBoxVisibility(BboxVisibility b); 00086 static BboxVisibility getBoundingBoxVisibility(void); 00087 00088 static void setBoundingBoxColor(SbColor & c); 00089 static const SbColor & getBoundingBoxColor(void); 00090 00091 static void setReadAsSoFile(SbBool onoff); 00092 static SbBool getReadAsSoFile(void); 00093 00094 virtual void doAction(SoAction * action); 00095 virtual void doActionOnKidsOrBox(SoAction * action); 00096 virtual void callback(SoCallbackAction * action); 00097 virtual void GLRender(SoGLRenderAction * action); 00098 virtual void getBoundingBox(SoGetBoundingBoxAction * action); 00099 virtual void getMatrix(SoGetMatrixAction * action); 00100 virtual void handleEvent(SoHandleEventAction * action); 00101 virtual void search(SoSearchAction * action); 00102 virtual void pick(SoPickAction * action); 00103 virtual void getPrimitiveCount(SoGetPrimitiveCountAction * action); 00104 virtual void audioRender(SoAudioRenderAction * action); 00105 00106 protected: 00107 virtual ~SoWWWInline(); 00108 00109 virtual void addBoundingBoxChild(SbVec3f center, SbVec3f size); 00110 virtual SbBool readInstance(SoInput * in, unsigned short flags); 00111 virtual void copyContents(const SoFieldContainer * fromfC, 00112 SbBool copyconnections); 00113 00114 private: 00115 friend class SoWWWInlineP; 00116 static SoWWWInlineFetchURLCB * fetchurlcb; 00117 static void * fetchurlcbdata; 00118 static SbBool readassofile; 00119 static SbColor * bboxcolor; 00120 static BboxVisibility bboxvisibility; 00121 00122 static void cleanup(void); 00123 00124 SoWWWInlineP * pimpl; 00125 }; 00126 00127 #endif // !COIN_SOWWWINLINE_H
Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.
Generated on Mon Feb 28 2011 10:11:59 for Coin by Doxygen. 1.7.3