SoWWWAnchor(3)

NAME
SoWWWAnchor - The SoWWWAnchor class adds URL callbacks to the highlighted geometry.

SYNOPSIS

#include <Inventor/nodes/SoWWWAnchor.h>

Inherits SoLocateHighlight.

  Public Types
enum Mapping { NONE, POINT }

  Public Member Functions
virtual SoType getTypeId (void) const
SoWWWAnchor (void)
void setFullURLName (const SbString &url)
const SbString & getFullURLName (void)
virtual void handleEvent (SoHandleEventAction *action)

  Static Public Member Functions
static SoType getClassTypeId (void)
static void initClass (void)
Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.
static void setFetchURLCallBack (SoWWWAnchorCB *f, void *userData)
static void setHighlightURLCallBack (SoWWWAnchorCB *f, void *userData)

  Public Attributes
SoSFString name
SoSFString description
SoSFEnum map

  Protected Member Functions
virtual const SoFieldData * getFieldData (void) const
virtual ~SoWWWAnchor ()
virtual void redrawHighlighted (SoAction *act, SbBool isNowHighlighting)

  Static Protected Member Functions
static const SoFieldData ** getFieldDataPtr (void)

  Additional Inherited Members

Detailed Description

The SoWWWAnchor class adds URL callbacks to the highlighted geometry. In addition to highlighting geometry under the cursor, the application programmer can set callbacks. It is possible to set one callback for picking, the fetch callback, and one callback for highlighting.

#Inventor V2.1 ascii
WWWAnchor {
   name 'https://github.com/coin3d/coin/egg.iv'
   description 'Easter Egg'
   Separator {
      Transform { scaleFactor 0.8 1.2 0.8 }
      Sphere { }
   }
}

FILE FORMAT/DEFAULTS:

WWWAnchor {
    renderCaching AUTO
    boundingBoxCaching AUTO
    renderCulling AUTO
    pickCulling AUTO
    color 0.3 0.3 0.3
    style EMISSIVE
    mode AUTO
    name "<Undefined URL>"
    description ""
    map NONE
}

Since
    SGI Inventor 2.1

Member Enumeration Documentation

  enum SoWWWAnchor::Mapping
Enum that says how a picked node's position should be mapped to the URL.

Enumerator

NONE
    The position of the picked node is not mapped to the URL.

POINT
    The position of the picked node is mapped to the URL as object space coordinates, adding a parameter string to the end of the URL. To assure that the URL works with all browsers, the coordinates are divided by commas sent as the hex representation.

If a model by the name of sim.wrl resided at https://github.com/coin3d/ and the picked point had the coordinates [1.5, 10, 6.77], the resulting URL would be 'https://github.com/coin3d/sim.wrl?1.5%2c10%2c6.77'.

Constructor & Destructor Documentation

  SoWWWAnchor::SoWWWAnchor (void)
Constructor.

  SoWWWAnchor::~SoWWWAnchor () [protected], [virtual]
Destructor.

Member Function Documentation

  SoType SoWWWAnchor::getClassTypeId (void) [static]
This static method returns the SoType object associated with objects of this class.

  SoType SoWWWAnchor::getTypeId (void) const [virtual]
Returns the type identification of an object derived from a class inheriting SoBase. This is used for runtime type checking and 'downward' casting.

Reimplemented from SoLocateHighlight.

  const SoFieldData ** SoWWWAnchor::getFieldDataPtr (void) [static], [protected]
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
 Returns the SoFieldData class which holds information about fields in this node.

  const SoFieldData * SoWWWAnchor::getFieldData (void) const [protected], [virtual]
Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL.

Reimplemented from SoLocateHighlight.

  void SoWWWAnchor::setFullURLName (const SbString & url)
Sets the full URL to url. If this is set, this URL will be used in callbacks instead of the URL set in SoWWWAnchor::name.

See also
    SoWWWAnchor::getFullURLName()

  const SbString & SoWWWAnchor::getFullURLName (void)
Returns the full URL if it is set by SoWWWAnchor::setFullURLName(). Otherwise the contents of SoWWWAnchor::name is returned.

See also
    SoWWWAnchor::setFullURLName()

  void SoWWWAnchor::handleEvent (SoHandleEventAction * action) [virtual]
Action method for SoHandleEventAction.

Inspects the event data from action, and processes it if it is something which this node should react to.

Nodes influencing relevant state variables for how event handling is done also override this method.

Reimplemented from SoLocateHighlight.

  void SoWWWAnchor::setFetchURLCallBack (SoWWWAnchorCB * f, void * userData) [static]
Sets the callback function f that is called when a SoWWWAnchor node is clicked on. This callback can among other things be used to provide a browser with the URL of this node.

The callback will be called with the URL, userData and a pointer to this node as arguments.

  void SoWWWAnchor::setHighlightURLCallBack (SoWWWAnchorCB * f, void * userData) [static]
Sets the callback function f that is called when a SoWWWAnchor node is highlighted. This callback can among other things be used to provide the user with a visual clue on which URL the node points to, for example by showing the URL as a string.

The callback will be called with the URL, userData and a pointer to this node as arguments.

  void SoWWWAnchor::redrawHighlighted (SoAction * act, SbBool isNowHighlighting) [protected], [virtual]
Calls the highlight callback set up with SoWWWAnchor::setHighlightURLCallBack().

Reimplemented from SoLocateHighlight.

Member Data Documentation

  SoSFString SoWWWAnchor::name
The name of the URL which the anchor points to.

  SoSFString SoWWWAnchor::description
The description of the URL.

  SoSFEnum SoWWWAnchor::map
Enum describing how a node's position should be mapped to the URL.

Author

Generated automatically by Doxygen for Coin from the source code.