Open Inventor Reference
SoWWWInline Class Reference

Node that refers to children through a URL. More...

#include <Inventor/nodes/SoWWWInline.h>

Inheritance diagram for SoWWWInline:
SoNode SoFieldContainer SoBase

List of all members.

Public Types

enum  BboxVisibility { NEVER, UNTIL_LOADED, ALWAYS }

Public Member Functions

 SoWWWInline ()
 Creates an inline node with default settings.
void setFullURLName (const SbString &url)
const SbStringgetFullURLName ()
 If the name field contains a relative URL (e.g.
SoGroupcopyChildren () const
 Return (hidden) children as Group.
void requestURLData ()
 Request that URL data be fetched.
SbBool isURLDataRequested () const
 Return whether URL data has been requested and whether that data is here (i.e.
SbBool isURLDataHere () const
 Return whether URL data has been requested and whether that data is here (i.e.
void cancelURLDataRequest ()
 Cancel the active URL data fetch request.
void setChildData (SoNode *urlData)
 Set/get the child data the inline should display.
SoNodegetChildData () const
 Set/get the child data the inline should display.
virtual void doAction (SoAction *action)
 Traversal methods for all the actions:
virtual void doActionOnKidsOrBox (SoAction *action)
virtual void callback (SoCallbackAction *action)
virtual void GLRender (SoGLRenderAction *action)
 These virtual functions implement all of the actions for nodes, Most of the default implementations do nothing.
virtual void getBoundingBox (SoGetBoundingBoxAction *action)
virtual void getMatrix (SoGetMatrixAction *action)
virtual void handleEvent (SoHandleEventAction *action)
virtual void search (SoSearchAction *action)
virtual void pick (SoPickAction *action)
virtual SoChildListgetChildren () const
 Returns pointer to children, or NULL if none.

Static Public Member Functions

static void setFetchURLCallBack (SoWWWInlineFetchURLCB *f, void *userData)
 Application callbacks invoked when the inline needs its URL data fetched.
static void setBoundingBoxVisibility (BboxVisibility b)
 This allows the application to specify when bounding boxes are displayed.
static BboxVisibility getBoundingBoxVisibility ()
 Get the bounding boxes visibility.
static void setBoundingBoxColor (SbColor &c)
 This allows the application to specify the color of bounding boxes displayed.
static const SbColorgetBoundingBoxColor ()
 This allows the application to specify the color of bounding boxes displayed.
static void initClass ()
 Initializes base node class.

Public Attributes

SoSFVec3f bboxCenter
 Bounding box center.
SoSFVec3f bboxSize
 Bounding box size.
SoSFString name
 URL specifying children (might be relative)
SoSFNode alternateRep
 Child data if app cannot fetch URL.

Protected Member Functions

virtual ~SoWWWInline ()
virtual void addBoundingBoxChild (SbVec3f center, SbVec3f size)
virtual SbBool readInstance (SoInput *in, unsigned short flags)
 Reads into instance of SoWWWInline. Returns FALSE on error.
virtual void copyContents (const SoFieldContainer *fromFC, SbBool copyConnections)
 Copies the child data as well as the rest of the node (if the child data has been set)

Detailed Description

This node refers to children through a URL (Universal Resource Locator). The application is responsible for actually fetching data from the URL for an SoWWWInline node to display.

Action Behavior
SoGLRenderAction
This renders the child data if it has been set by the application. It will render a wireframe bounding box as specified by the bboxCenter and bboxSize fields, and the setting passed to setBoundingBoxVisibility(). If no fetch URL callback is set and the alternateRep is not NULL, the alternateRep will be rendered until child data has been set.
See Also
SoWWWAnchor, SoFile

Definition at line 96 of file SoWWWInline.h.


Member Enumeration Documentation

Enumerator:
NEVER 

Do not show bounding box.

UNTIL_LOADED 

Show bounding box (if specified) until data is loaded.

ALWAYS 

Show bounding box along with data.

Definition at line 105 of file SoWWWInline.h.


Constructor & Destructor Documentation

SoWWWInline::SoWWWInline ( )
virtual SoWWWInline::~SoWWWInline ( ) [protected, virtual]

Member Function Documentation

virtual void SoWWWInline::addBoundingBoxChild ( SbVec3f  center,
SbVec3f  size 
) [protected, virtual]
virtual void SoWWWInline::callback ( SoCallbackAction action) [virtual]

Reimplemented from SoNode.

void SoWWWInline::cancelURLDataRequest ( ) [inline]

Definition at line 141 of file SoWWWInline.h.

References FALSE.

SoGroup* SoWWWInline::copyChildren ( ) const
virtual void SoWWWInline::copyContents ( const SoFieldContainer fromFC,
SbBool  copyConnections 
) [protected, virtual]

Reimplemented from SoNode.

virtual void SoWWWInline::doAction ( SoAction action) [virtual]

Reimplemented from SoNode.

virtual void SoWWWInline::doActionOnKidsOrBox ( SoAction action) [virtual]
virtual void SoWWWInline::getBoundingBox ( SoGetBoundingBoxAction action) [virtual]

Reimplemented from SoNode.

static const SbColor& SoWWWInline::getBoundingBoxColor ( ) [inline, static]

Definition at line 167 of file SoWWWInline.h.

static BboxVisibility SoWWWInline::getBoundingBoxVisibility ( ) [inline, static]

Definition at line 162 of file SoWWWInline.h.

SoNode* SoWWWInline::getChildData ( ) const

The application should set child data after it has fetched data for an inline node.

virtual SoChildList* SoWWWInline::getChildren ( ) const [virtual]

Reimplemented from SoNode.

const SbString& SoWWWInline::getFullURLName ( )

"foo.wrl" instead of "http://bogus.com/foo.wrl"), the inline cannot resolve the URL reference. This method allows the application to tell the anchor what it's full URL should be. getFullURLName() returns the fullURL set here, or if not set, returns the contents of the name field.

virtual void SoWWWInline::getMatrix ( SoGetMatrixAction action) [virtual]

Reimplemented from SoNode.

virtual void SoWWWInline::GLRender ( SoGLRenderAction action) [virtual]

Reimplemented from SoNode.

virtual void SoWWWInline::handleEvent ( SoHandleEventAction action) [virtual]

Reimplemented from SoNode.

static void SoWWWInline::initClass ( ) [static]

Reimplemented from SoNode.

SbBool SoWWWInline::isURLDataHere ( ) const [inline]

whether setChildData() has been called.)

Definition at line 139 of file SoWWWInline.h.

SbBool SoWWWInline::isURLDataRequested ( ) const [inline]

whether setChildData() has been called.)

Definition at line 136 of file SoWWWInline.h.

virtual void SoWWWInline::pick ( SoPickAction action) [virtual]

Reimplemented from SoNode.

virtual SbBool SoWWWInline::readInstance ( SoInput in,
unsigned short  flags 
) [protected, virtual]

Reimplemented from SoFieldContainer.

void SoWWWInline::requestURLData ( ) [inline]

This will invoke the application callback to actually fetch the data and can be called before the inline does this for itself (see setFetchURLCallBack()).

Definition at line 132 of file SoWWWInline.h.

virtual void SoWWWInline::search ( SoSearchAction action) [virtual]

Reimplemented from SoNode.

static void SoWWWInline::setBoundingBoxColor ( SbColor c) [inline, static]

Definition at line 165 of file SoWWWInline.h.

static void SoWWWInline::setBoundingBoxVisibility ( BboxVisibility  b) [inline, static]

The bounding box can be rendered along with the children (ALWAYS), only until the child data is loaded (UNTIL_LOADED), or not at all (NEVER). Default is UNTIL_LOADED

Definition at line 160 of file SoWWWInline.h.

void SoWWWInline::setChildData ( SoNode urlData)

The application should set child data after it has fetched data for an inline node.

static void SoWWWInline::setFetchURLCallBack ( SoWWWInlineFetchURLCB f,
void *  userData 
) [static]

This happens the first time the inline is rendered, or if it needs to compute a bounding box and the bboxSize field is not set, or when requestURLData() is called.

void SoWWWInline::setFullURLName ( const SbString url) [inline]
See also:
getFullURLName()

Definition at line 117 of file SoWWWInline.h.


Member Data Documentation

Definition at line 114 of file SoWWWInline.h.

Definition at line 111 of file SoWWWInline.h.

Definition at line 112 of file SoWWWInline.h.

Definition at line 113 of file SoWWWInline.h.


The documentation for this class was generated from the following file: