Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | Related Pages

SoWWWInline.h

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-2003 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 <URL:http://www.coin3d.org> for  more information.
00021  *
00022  *  Systems in Motion, Teknobyen, Abels Gate 5, 7030 Trondheim, NORWAY.
00023  *  <URL:http://www.sim.no>.
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 class SbColor;
00033 class SoGroup;
00034 class SoWWWInlineP;
00035 
00036 // *************************************************************************
00037 
00038 class SoWWWInline;
00039 typedef void SoWWWInlineFetchURLCB(const SbString & url, void * userData,
00040                                    SoWWWInline * node);
00041 
00042 // *************************************************************************
00043 
00044 class COIN_DLL_API SoWWWInline : public SoNode {
00045   typedef SoNode inherited;
00046 
00047   SO_NODE_HEADER(SoWWWInline);
00048 
00049 public:
00050   static void initClass(void);
00051   SoWWWInline(void);
00052 
00053   SoSFString name;
00054   SoSFVec3f bboxCenter;
00055   SoSFVec3f bboxSize;
00056   SoSFNode alternateRep;
00057 
00058   enum BboxVisibility {
00059     NEVER,
00060     UNTIL_LOADED,
00061     ALWAYS
00062   };
00063 
00064   void setFullURLName(const SbString & url);
00065   const SbString & getFullURLName(void);
00066 
00067   SoGroup * copyChildren(void) const;
00068 
00069   void requestURLData(void);
00070   SbBool isURLDataRequested(void) const;
00071   SbBool isURLDataHere(void) const;
00072   void cancelURLDataRequest(void);
00073 
00074   void setChildData(SoNode * urldata);
00075   SoNode * getChildData(void) const;
00076 
00077   virtual SoChildList * getChildren(void) const;
00078 
00079   static void setFetchURLCallBack(SoWWWInlineFetchURLCB * f, void * userdata);
00080 
00081   static void setBoundingBoxVisibility(BboxVisibility b);
00082   static BboxVisibility getBoundingBoxVisibility(void);
00083 
00084   static void setBoundingBoxColor(SbColor & c);
00085   static const SbColor & getBoundingBoxColor(void);
00086 
00087   static void setReadAsSoFile(SbBool onoff);
00088   static SbBool getReadAsSoFile(void);
00089 
00090   virtual void doAction(SoAction * action);
00091   virtual void doActionOnKidsOrBox(SoAction * action);
00092   virtual void callback(SoCallbackAction * action);
00093   virtual void GLRender(SoGLRenderAction * action);
00094   virtual void getBoundingBox(SoGetBoundingBoxAction * action);
00095   virtual void getMatrix(SoGetMatrixAction * action);
00096   virtual void handleEvent(SoHandleEventAction * action);
00097   virtual void search(SoSearchAction * action);
00098   virtual void pick(SoPickAction * action);
00099   virtual void getPrimitiveCount(SoGetPrimitiveCountAction * action);
00100   virtual void audioRender(SoAudioRenderAction * action);
00101 
00102 protected:
00103   virtual ~SoWWWInline();
00104 
00105   virtual void addBoundingBoxChild(SbVec3f center, SbVec3f size);
00106   virtual SbBool readInstance(SoInput * in, unsigned short flags);
00107   virtual void copyContents(const SoFieldContainer * fromfC,
00108                             SbBool copyconnections);
00109 
00110 private:
00111   friend class SoWWWInlineP;
00112   static SoWWWInlineFetchURLCB * fetchurlcb;
00113   static void * fetchurlcbdata;
00114   static SbBool readassofile;
00115   static SbColor * bboxcolor;
00116   static BboxVisibility bboxvisibility;
00117 
00118   static void cleanup(void);
00119 
00120   SoWWWInlineP * pimpl;
00121 };
00122 
00123 #endif // !COIN_SOWWWINLINE_H

Generated on Mon Dec 8 03:52:07 2003 for Coin by doxygen 1.3.3