Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

SoWWWInline.h

00001 /**************************************************************************\
00002  *
00003  *  This file is part of the Coin 3D visualization library.
00004  *  Copyright (C) 1998-2002 by Systems in Motion. All rights reserved.
00005  *
00006  *  This library is free software; you can redistribute it and/or
00007  *  modify it under the terms of the GNU Lesser General Public License
00008  *  version 2.1 as published by the Free Software Foundation. See the
00009  *  file LICENSE.LGPL at the root directory of the distribution for
00010  *  more details.
00011  *
00012  *  If you want to use Coin for applications not compatible with the
00013  *  LGPL, please contact SIM to acquire a Professional Edition license.
00014  *
00015  *  Systems in Motion, Prof Brochs gate 6, 7030 Trondheim, NORWAY
00016  *  http://www.sim.no support@sim.no Voice: +47 22114160 Fax: +47 22207097
00017  *
00018 \**************************************************************************/
00019 
00020 #ifndef COIN_SOWWWINLINE_H
00021 #define COIN_SOWWWINLINE_H
00022 
00023 #include <Inventor/nodes/SoSubNode.h>
00024 #include <Inventor/fields/SoSFString.h>
00025 #include <Inventor/fields/SoSFVec3f.h>
00026 #include <Inventor/fields/SoSFNode.h>
00027 
00028 
00029 class SbColor;
00030 class SoGroup;
00031 
00032 // *************************************************************************
00033 
00034 class SoWWWInline;
00035 typedef void SoWWWInlineFetchURLCB(const SbString & url, void * userData,
00036                                    SoWWWInline * node);
00037 
00038 // *************************************************************************
00039 
00040 class COIN_DLL_API SoWWWInline : public SoNode {
00041   typedef SoNode inherited;
00042 
00043   SO_NODE_HEADER(SoWWWInline);
00044 
00045 public:
00046   static void initClass(void);
00047   SoWWWInline(void);
00048 
00049   SoSFString name;
00050   SoSFVec3f bboxCenter;
00051   SoSFVec3f bboxSize;
00052   SoSFNode alternateRep;
00053 
00054   enum BboxVisibility {
00055     NEVER, 
00056     UNTIL_LOADED, 
00057     ALWAYS
00058   };
00059 
00060   void setFullURLName(const SbString & url);
00061   const SbString & getFullURLName(void);
00062 
00063   SoGroup * copyChildren(void) const;
00064 
00065   void requestURLData(void);
00066   SbBool isURLDataRequested(void) const;
00067   SbBool isURLDataHere(void) const;
00068   void cancelURLDataRequest(void);
00069 
00070   void setChildData(SoNode * urldata);
00071   SoNode * getChildData(void) const;
00072 
00073   virtual SoChildList * getChildren(void) const;
00074 
00075   static void setFetchURLCallBack(SoWWWInlineFetchURLCB * f, void * userdata);
00076 
00077   static void setBoundingBoxVisibility(BboxVisibility b);
00078   static BboxVisibility getBoundingBoxVisibility(void);
00079 
00080   static void setBoundingBoxColor(SbColor & c);
00081   static const SbColor & getBoundingBoxColor(void);
00082 
00083   static void setReadAsSoFile(SbBool onoff);
00084   static SbBool getReadAsSoFile(void);
00085 
00086   virtual void doAction(SoAction * action);
00087   virtual void doActionOnKidsOrBox(SoAction * action);
00088   virtual void callback(SoCallbackAction * action);
00089   virtual void GLRender(SoGLRenderAction * action);
00090   virtual void getBoundingBox(SoGetBoundingBoxAction * action);
00091   virtual void getMatrix(SoGetMatrixAction * action);
00092   virtual void handleEvent(SoHandleEventAction * action);
00093   virtual void search(SoSearchAction * action);
00094   virtual void pick(SoPickAction * action);
00095   virtual void getPrimitiveCount(SoGetPrimitiveCountAction * action);
00096 
00097 protected:
00098   virtual ~SoWWWInline();
00099 
00100   virtual void addBoundingBoxChild(SbVec3f center, SbVec3f size);
00101   virtual SbBool readInstance(SoInput * in, unsigned short flags);
00102   virtual void copyContents(const SoFieldContainer * fromfC,
00103                             SbBool copyconnections);
00104 
00105 private:
00106   friend class SoWWWInlineP;
00107   static SoWWWInlineFetchURLCB * fetchurlcb;
00108   static void * fetchurlcbdata;
00109   static SbBool readassofile;
00110   static SbColor * bboxcolor;
00111   static BboxVisibility bboxvisibility;
00112   
00113   static void cleanup(void);
00114 };
00115 
00116 #endif // !COIN_SOWWWINLINE_H

Generated at Tue Mar 5 03:31:20 2002 for Coin by doxygen1.2.9 written by Dimitri van Heesch, © 1997-2001