Panda3D
 All Classes Functions Variables Enumerations
mouseWatcherRegion.cxx
1 // Filename: mouseWatcherRegion.cxx
2 // Created by: drose (13Jul00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "mouseWatcherRegion.h"
16 
17 #include "indent.h"
18 
19 
20 TypeHandle MouseWatcherRegion::_type_handle;
21 
22 ////////////////////////////////////////////////////////////////////
23 // Function: MouseWatcherRegion::output
24 // Access: Published
25 // Description:
26 ////////////////////////////////////////////////////////////////////
27 void MouseWatcherRegion::
28 output(ostream &out) const {
29  out << get_name() << " lrbt = " << _frame;
30 }
31 
32 ////////////////////////////////////////////////////////////////////
33 // Function: MouseWatcherRegion::write
34 // Access: Published
35 // Description:
36 ////////////////////////////////////////////////////////////////////
37 void MouseWatcherRegion::
38 write(ostream &out, int indent_level) const {
39  indent(out, indent_level)
40  << get_name() << " lrbt = " << _frame
41  << ", sort = " << _sort << "\n";
42 }
43 
44 ////////////////////////////////////////////////////////////////////
45 // Function: MouseWatcherRegion::enter_region
46 // Access: Public, Virtual
47 // Description: This is a callback hook function, called whenever the
48 // mouse enters the region. The mouse is only
49 // considered to be "entered" in one region at a time;
50 // in the case of nested regions, it exits the outer
51 // region before entering the inner one.
52 ////////////////////////////////////////////////////////////////////
55 }
56 
57 ////////////////////////////////////////////////////////////////////
58 // Function: MouseWatcherRegion::exit_region
59 // Access: Public, Virtual
60 // Description: This is a callback hook function, called whenever the
61 // mouse exits the region. The mouse is only considered
62 // to be "entered" in one region at a time; in the case
63 // of nested regions, it exits the outer region before
64 // entering the inner one.
65 ////////////////////////////////////////////////////////////////////
68 }
69 
70 ////////////////////////////////////////////////////////////////////
71 // Function: MouseWatcherRegion::within_region
72 // Access: Public, Virtual
73 // Description: This is a callback hook function, called whenever the
74 // mouse moves within the boundaries of the region, even
75 // if it is also within the boundaries of a nested
76 // region. This is different from "enter", which is
77 // only called whenever the mouse is within only that
78 // region.
79 ////////////////////////////////////////////////////////////////////
82 }
83 
84 ////////////////////////////////////////////////////////////////////
85 // Function: MouseWatcherRegion::without_region
86 // Access: Public, Virtual
87 // Description: This is a callback hook function, called whenever the
88 // mouse moves completely outside the boundaries of the
89 // region. See within_region().
90 ////////////////////////////////////////////////////////////////////
93 }
94 
95 ////////////////////////////////////////////////////////////////////
96 // Function: MouseWatcherRegion::press
97 // Access: Public, Virtual
98 // Description: This is a callback hook function, called whenever a
99 // mouse or keyboard button is depressed while the mouse
100 // is within the region.
101 ////////////////////////////////////////////////////////////////////
104 }
105 
106 ////////////////////////////////////////////////////////////////////
107 // Function: MouseWatcherRegion::release
108 // Access: Public, Virtual
109 // Description: This is a callback hook function, called whenever a
110 // mouse or keyboard button previously depressed with
111 // press() is released.
112 ////////////////////////////////////////////////////////////////////
115 }
116 
117 ////////////////////////////////////////////////////////////////////
118 // Function: MouseWatcherRegion::keystroke
119 // Access: Public, Virtual
120 // Description: This is a callback hook function, called whenever a
121 // keystroke is generated by the user.
122 ////////////////////////////////////////////////////////////////////
125 }
126 
127 ////////////////////////////////////////////////////////////////////
128 // Function: MouseWatcherRegion::candidate
129 // Access: Public, Virtual
130 // Description: This is a callback hook function, called whenever an
131 // IME candidate is highlighted by the user.
132 ////////////////////////////////////////////////////////////////////
135 }
136 
137 ////////////////////////////////////////////////////////////////////
138 // Function: MouseWatcherRegion::move
139 // Access: Public, Virtual
140 // Description: This is a callback hook function, called whenever a
141 // mouse is moved within the region.
142 ////////////////////////////////////////////////////////////////////
145 }
virtual void without_region(const MouseWatcherParameter &param)
This is a callback hook function, called whenever the mouse moves completely outside the boundaries o...
virtual void exit_region(const MouseWatcherParameter &param)
This is a callback hook function, called whenever the mouse exits the region.
virtual void release(const MouseWatcherParameter &param)
This is a callback hook function, called whenever a mouse or keyboard button previously depressed wit...
virtual void enter_region(const MouseWatcherParameter &param)
This is a callback hook function, called whenever the mouse enters the region.
virtual void within_region(const MouseWatcherParameter &param)
This is a callback hook function, called whenever the mouse moves within the boundaries of the region...
virtual void press(const MouseWatcherParameter &param)
This is a callback hook function, called whenever a mouse or keyboard button is depressed while the m...
virtual void candidate(const MouseWatcherParameter &param)
This is a callback hook function, called whenever an IME candidate is highlighted by the user...
virtual void keystroke(const MouseWatcherParameter &param)
This is a callback hook function, called whenever a keystroke is generated by the user...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
This is sent along as a parameter to most events generated for a region to indicate the mouse and but...
virtual void move(const MouseWatcherParameter &param)
This is a callback hook function, called whenever a mouse is moved within the region.