SoWWWAnchor.h
#ifndef COIN_SOWWWANCHOR_H
#define COIN_SOWWWANCHOR_H
/**************************************************************************\
* Copyright (c) Kongsberg Oil & Gas Technologies AS
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\**************************************************************************/
#include <Inventor/nodes/SoSubNode.h>
#include <Inventor/nodes/SoLocateHighlight.h>
#include <Inventor/fields/SoSFString.h>
#include <Inventor/fields/SoSFEnum.h>
class SoWWWAnchor;
class SoWWWAnchorP;
typedef void SoWWWAnchorCB(const SbString & url, void * data,
SoWWWAnchor * node);
// *************************************************************************
class COIN_DLL_API SoWWWAnchor : public SoLocateHighlight {
typedef SoLocateHighlight inherited;
SO_NODE_HEADER(SoWWWAnchor);
public:
static void initClass(void);
SoWWWAnchor(void);
enum Mapping {
NONE, POINT
};
SoSFString name;
SoSFString description;
SoSFEnum map;
void setFullURLName(const SbString & url);
const SbString & getFullURLName(void);
virtual void handleEvent(SoHandleEventAction * action);
static void setFetchURLCallBack(SoWWWAnchorCB * f, void * userData);
static void setHighlightURLCallBack(SoWWWAnchorCB * f, void * userData);
protected:
virtual ~SoWWWAnchor();
virtual void redrawHighlighted(SoAction * act, SbBool isNowHighlighting);
private:
SoWWWAnchorP * pimpl;
};
#endif // !COIN_SOWWWANCHOR_H
SbString
The SbString class is a string class with convenience functions for string operations.
Definition SbString.h:52
SoAction
The SoAction class is the base class for all traversal actions.
Definition SoAction.h:77
SoHandleEventAction
The SoHandleEventAction class distributes user events to the scene.
Definition SoHandleEventAction.h:46
SoLocateHighlight::initClass
static void initClass(void)
Sets up initialization for data common to all instances of this class, like submitting necessary info...
Definition SoLocateHighlight.cpp:227
SoLocateHighlight::SoLocateHighlight
SoLocateHighlight(void)
Definition SoLocateHighlight.cpp:193
SoLocateHighlight::redrawHighlighted
virtual void redrawHighlighted(SoAction *act, SbBool flag)
Definition SoLocateHighlight.cpp:303
SoLocateHighlight::handleEvent
virtual void handleEvent(SoHandleEventAction *action)
Definition SoLocateHighlight.cpp:244
SoSFEnum
The SoSFEnum class is a container for an enum value.
Definition SoSFEnum.h:40
SoSFString
The SoSFString class is a container for an SbString.
Definition SoSFString.h:40
SoWWWAnchor
The SoWWWAnchor class adds URL callbacks to the highlighted geometry.
Definition SoWWWAnchor.h:49
SoWWWAnchor::map
SoSFEnum map
Definition SoWWWAnchor.h:64
SoWWWAnchor::setHighlightURLCallBack
static void setHighlightURLCallBack(SoWWWAnchorCB *f, void *userData)
Definition SoWWWAnchor.cpp:277
SoWWWAnchor::Mapping
Mapping
Definition SoWWWAnchor.h:58
SoWWWAnchor::POINT
@ POINT
Definition SoWWWAnchor.h:59
SoWWWAnchor::NONE
@ NONE
Definition SoWWWAnchor.h:59
SoWWWAnchor::SoWWWAnchor
SoWWWAnchor(void)
Definition SoWWWAnchor.cpp:163
SoWWWAnchor::description
SoSFString description
Definition SoWWWAnchor.h:63
SoWWWAnchor::name
SoSFString name
Definition SoWWWAnchor.h:62
SoWWWAnchor::getFullURLName
const SbString & getFullURLName(void)
Definition SoWWWAnchor.cpp:218
SoWWWAnchor::setFullURLName
void setFullURLName(const SbString &url)
Definition SoWWWAnchor.cpp:205
SoWWWAnchor::setFetchURLCallBack
static void setFetchURLCallBack(SoWWWAnchorCB *f, void *userData)
Definition SoWWWAnchor.cpp:261
SO_NODE_HEADER
#define SO_NODE_HEADER(classname)
Definition Coin_macros.dox:50