1SoWWWAnchor(3IV)()                                          SoWWWAnchor(3IV)()
2
3
4

NAME

6       SoWWWAnchor — separator group node with a URL hyperlink
7

INHERITS FROM

9       SoBase  > SoFieldContainer > SoNode > SoGroup > SoSeparator > SoLocate‐
10       Highlight > SoWWWAnchor
11

SYNOPSIS

13       #include <Inventor/nodes/SoWWWAnchor.h>
14
15     typedef void        SoWWWAnchorCB(const SbString  &url,  void  *userData,
16                              SoWWWAnchor *node)
17
18     enum Mapping {
19          SoWWWAnchor::NONE   Do not add information to the URL
20          SoWWWAnchor::POINT  Add object-space coordinates to URL
21     }
22
23          Fields from class SoWWWAnchor:
24
25     SoSFString          name
26     SoSFString          description
27     SoSFEnum            map
28
29          Fields from class SoLocateHighlight:
30
31     SoSFColor           color
32     SoSFEnum            style
33     SoSFEnum            mode
34
35          Fields from class SoSeparator:
36
37     SoSFEnum            renderCaching
38     SoSFEnum            boundingBoxCaching
39     SoSFEnum            renderCulling
40     SoSFEnum            pickCulling
41
42          Methods from class SoWWWAnchor:
43
44                         SoWWWAnchor()
45     static SoType       getClassTypeId()
46     void                setFullURLName(const SbString &url)
47     const SbString &    getFullURLName()
48     static void         setFetchURLCallBack(SoWWWAnchorCB *f, void *userData)
49     static void         setHighlightURLCallBack(SoWWWAnchorCB *f, void *user‐
50                              Data)
51
52          Methods from class SoSeparator:
53
54     static void         setNumRenderCaches(int howMany)
55     static int          getNumRenderCaches()
56
57          Methods from class SoGroup:
58
59     void                addChild(SoNode *child)
60     void                insertChild(SoNode *child, int newChildIndex)
61     SoNode *            getChild(int index) const
62     int                 findChild(const SoNode *child) const
63     int                 getNumChildren() const
64     void                removeChild(int index)
65     void                removeChild(SoNode *child)
66     void                removeAllChildren()
67     void                replaceChild(int index, SoNode *newChild)
68     void                replaceChild(SoNode *oldChild, SoNode *newChild)
69
70          Methods from class SoNode:
71
72     void                setOverride(SbBool state)
73     SbBool              isOverride() const
74     SoNode *            copy(SbBool copyConnections = FALSE) const
75     virtual SbBool      affectsState() const
76     static SoNode *     getByName(const SbName &name)
77     static int          getByName(const SbName &name, SoNodeList &list)
78
79          Methods from class SoFieldContainer:
80
81     void                setToDefaults()
82     SbBool              hasDefaultValues() const
83     SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
84     void                copyFieldValues(const  SoFieldContainer  *fc,  SbBool
85                              copyConnections = FALSE)
86     SbBool              set(const char *fieldDataString)
87     void                get(SbString &fieldDataString)
88     virtual int         getFields(SoFieldList &resultList) const
89     virtual SoField *   getField(const SbName &fieldName) const
90     SbBool              getFieldName(const SoField *field, SbName &fieldName)
91                              const
92     SbBool              isNotifyEnabled() const
93     SbBool              enableNotify(SbBool flag)
94
95          Methods from class SoBase:
96
97     void                ref()
98     void                unref() const
99     void                unrefNoDelete() const
100     void                touch()
101     virtual SoType      getTypeId() const
102     SbBool              isOfType(SoType type) const
103     virtual void        setName(const SbName &name)
104     virtual SbName      getName() const
105
106

DESCRIPTION

108       This node defines a separator group which has a URL (Universal Resource
109       Locator)  hyperlink.  When clicked on, this node invokes an application
110       callback to fetch the URL. The application may fetch the  data  itself,
111       or call a World Wide Web browser like the HTML based Netscape Navigator
112       or the VRML based WebSpace Navigator to load the URL.
113

FIELDS

115     SoSFString          name
116          URL which the application will be called back  to  fetch  when  this
117          node    is    activated    by    a    left    mouse    click   (e.g.
118          "http://www.sgi.com/Technology/Inventor").
119
120     SoSFString          description
121          A description of the URL which may make more sense to users than the
122          URL itself (e.g. "The Open Inventor Home Page").
123
124     SoSFEnum            map
125          Specifies  what additional information should be added to the end of
126          the URL when passed back to the application for fetching. If set  to
127          POINT,  then  the  x,y,z  location  of the object space intersection
128          point when the mouse was clicked will be suffixed to the URL.  Since
129          the  comma character does not transmit through some web browsers, it
130          is written in hex form (e.g. if the intersection point  is  17,4.5,1
131          the    URL   passed   to   the   application   callback   would   be
132          "http://www.sgi.com/Technology/Inventor?17%2c4.5%2c1").
133
134

METHODS

136                         SoWWWAnchor()
137          Creates an anchor node with default settings.
138
139     static SoType       getClassTypeId()
140          Returns type identifier for this class.
141
142     void                setFullURLName(const SbString &url)
143     const SbString &    getFullURLName()
144          If the name field contains a relative URL (e.g. "foo.wrl" instead of
145          "http://bogus.com/foo.wrl"),  the anchor cannot resolve the URL ref‐
146          erence. This method allows the application to tell the  anchor  what
147          it's  full  URL  should be. getFullURLName() returns the fullURL set
148          here, or if not set, returns the contents of the name field.
149
150     static void         setFetchURLCallBack(SoWWWAnchorCB *f, void *userData)
151          Application callbacks invoked when the mouse is clicked on an anchor
152          so  that  the application can fetch the URL or call Netscape or Web‐
153          Space to fetch the URL.
154
155     static void         setHighlightURLCallBack(SoWWWAnchorCB *f, void *user‐
156                              Data)
157          Application callbacks invoked when the mouse is moved over an anchor
158          so that the app can provide feedback such as changing the cursor, or
159          displaying the anchor description and name.
160
161

ACTION BEHAVIOR

163       SoHandleEventAction
164          When the left mouse is clicked over a child of this anchor node, the
165          application is called back to fetch the  URL  (see  setFetchURLCall‐
166          Back()).
167
168

FILE FORMAT/DEFAULTS

170       WWWAnchor {
171          renderCaching       AUTO
172          boundingBoxCaching  AUTO
173          renderCulling       AUTO
174          pickCulling         AUTO
175          mode                AUTO
176          style               EMISSIVE
177          color               0.3 0.3 0.3
178          name                "<Undefined URL>"
179          description         ""
180          map                 NONE
181     }
182

SEE ALSO

184       SoWWWInline
185
186
187
188
189                                                            SoWWWAnchor(3IV)()
Impressum