Debian Codegraph @

doc/man/man3/ivm/actions/SoHandleEventAction.ivm

raw
1 NAME SoHandleEventAction SoEvAct "" {
2 allows nodes in a graph to receive input events
3 }
4
5 INCLUDE actions/SoHandleEventAction.h
6
7 DESC {
8
9 This class is used to allow nodes in a scene graph to handle input events.
10 It is usually invoked from a
11 component derived from \cSoXtRenderArea\. when the component receives a window
12 system event.
13 \p
14 Manipulator, dragger and selection nodes respond to and process
15 events. Most other group nodes just pass the event to their children,
16 while most other nodes simply ignore the action entirely. Once a node
17 has indicated to the action that it has handled the event, traversal
18 stops.
19 \p
20 A node that handles an event can also grab future events. Once it has
21 done so, all events will be sent directly to that node, with no
22 traversal taking place, until the node releases the grab.
23 }
24
25 METHOD "" SoHandleEventAction(const SbViewportRegion &viewportRegion) {
26 Constructor takes viewport region to use; this is needed to perform
27 a pick operation when requested.
28 }
29
30 METHOD setVPReg void setViewportRegion(const SbViewportRegion &newRegion) {}
31 METHOD getVPReg const SbViewportRegion &getViewportRegion() const {
32 Sets/returns current viewport region to use for action.
33 }
34
35 METHOD setEv void setEvent(const SoEvent *ev) {}
36 METHOD getEv const SoEvent * getEvent() const {
37 Sets/returns the event being handled.
38 }
39
40 METHOD "" void setHandled() {}
41 METHOD "" SbBool isHandled() const {
42 Sets/returns whether any node has yet handled the event.
43 }
44
45 METHOD "" void setGrabber(SoNode *node) {
46 Initiates grabbing of future events. All events will be sent to the
47 given node until the grab is released.
48 }
49
50 METHOD "" void releaseGrabber() {
51 Releases the grab.
52 }
53
54 METHOD "" SoNode * getGrabber() const {
55 Returns the node that is currently grabbing events, or NULL if there is none.
56 }
57
58 METHOD "" void setPickRoot(SoNode *node) {}
59 METHOD "" SoNode * getPickRoot() const {
60 Sets/returns the root node used for initiating a pick action for those
61 nodes that want to know what is under the cursor.
62 }
63
64 METHOD "" void setPickRadius(float radiusInPixels) {
65 Set the radius (in pixels) around the viewport-space point
66 through which the ray passes when doing ray picking. Ray picking
67 is performed when
68 \+\mgetPickedPoint()\.\.
69 \-\mSoEvActGetPickPt()\.\.
70 is called. The pick radius set here is used when
71 testing the ray against lines and points.
72 }
73
74 METHOD getPickPt const SoPickedPoint *getPickedPoint() {
75 Returns the frontmost object hit (as an \cSoPickedPoint\.) by
76 performing a pick based on the mouse location specified in the event
77 for which the action is being applied. The first time this is called
78 for a particular event, a \cSoRayPickAction\. is applied to find this
79 object; subsequent calls for the same event return the same
80 information. The storage for the picked point remains valid as long as
81 the action is not re-applied or deleted.
82 }
83
84 METHOD getPickPtList const SoPickedPointList &getPickedPointList() {
85 Returns a list of objects intersected by a picking operation, sorted
86 from nearest to farthest.
87 }
88
89 ALSO { SoEvent, SoPickedPoint, SoRayPickAction }
90
91