File: SoWWWAnchor.ivm

package info (click to toggle)
inventor 2.1.5-10-14
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 32,892 kB
  • ctags: 21,729
  • sloc: ansic: 33,867; lisp: 7,361; cpp: 3,874; yacc: 369; sh: 359; perl: 234; awk: 141; makefile: 76; csh: 35; sed: 11
file content (82 lines) | stat: -rw-r--r-- 2,820 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
NAME SoWWWAnchor "" "" { separator group node with a URL hyperlink }

INCLUDE nodes/SoWWWAnchor.h

DESC {
This node defines a separator group which has a URL (Universal Resource Locator)
hyperlink. When clicked on, this node invokes an application callback to fetch
the URL. The application may fetch the data itself, or call a World Wide Web
browser like the HTML based \kNetscape Navigator\. or the VRML based \kWebSpace Navigator\.
to load the URL. 
}

TYPEDEF void SoWWWAnchorCB "(const SbString &url, void *userData, SoWWWAnchor *node)"

ENUM Mapping {
    NONE    "Do not add information to the URL",
    POINT   "Add object-space coordinates to URL"
}

FIELD name {
URL which the application will be called back to fetch 
when this node is activated by a left mouse click 
(e.g. "http://www.sgi.com/Technology/Inventor").
}

FIELD description {
A description of the URL which may make more sense to users
than the URL itself (e.g. "The Open Inventor Home Page").
}

FIELD map {
Specifies what additional information should be added to the end
of the URL when passed back to the application for fetching. If
set to \kPOINT\., then the x,y,z location of the object space intersection
point when the mouse was clicked will be suffixed to the URL. Since
the comma character does not transmit through some web browsers, it is
written in hex form (e.g. if the intersection point is 17,4.5,1
the URL passed to the application callback would be
"http://www.sgi.com/Technology/Inventor?17%2c4.5%2c1").
}

METHOD "" SoWWWAnchor() {
Creates an anchor node with default settings.
}

METHOD "" static SoType getClassTypeId() {
Returns type identifier for this class.
}

METHOD "" void setFullURLName(const SbString &url) {}
METHOD "" const SbString & getFullURLName()
{
If the name field contains a relative URL (e.g. "foo.wrl" 
instead of "http://bogus.com/foo.wrl"), the anchor cannot 
resolve the URL reference. This method allows the application 
to tell the anchor what it's full URL should be. 
\kgetFullURLName()\. returns the fullURL set here, or if not set, returns 
the contents of the name field.
}

METHOD setFetchCB static void setFetchURLCallBack(SoWWWAnchorCB *f, void *userData)
{
Application callbacks invoked when the mouse is clicked on an 
anchor so that the application can fetch the URL or call
Netscape or WebSpace to fetch the URL.
}

METHOD setHLCB static void setHighlightURLCallBack(SoWWWAnchorCB *f, void *userData)
{
Application callbacks invoked when the mouse is moved over an
anchor so that the app can provide feedback such as changing the
cursor, or displaying the anchor description and name.
}

ACTION SoHandleEventAction {
When the left mouse is clicked over a child of this anchor node,
the application is called back to fetch the URL (see setFetchURLCallBack()).
}

ALSO {
SoWWWInline
}