Panda3D

Loading...
Searching...
No Matches
mouseWatcherRegion.cxx
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file mouseWatcherRegion.cxx
10 * @author drose
11 * @date 2000-07-13
12 */
13
14#include "mouseWatcherRegion.h"
15
16#include "indent.h"
17
18
19 TypeHandle MouseWatcherRegion::_type_handle;
20
21/**
22 *
23 */
24 void MouseWatcherRegion::
25output(std::ostream &out) const {
26 out << get_name() << " lrbt = " << _frame;
27}
28
29/**
30 *
31 */
32 void MouseWatcherRegion::
33write(std::ostream &out, int indent_level) const {
34 indent(out, indent_level)
35 << get_name() << " lrbt = " << _frame
36 << ", sort = " << _sort << "\n";
37}
38
39/**
40 * This is a callback hook function, called whenever the mouse enters the
41 * region. The mouse is only considered to be "entered" in one region at a
42 * time; in the case of nested regions, it exits the outer region before
43 * entering the inner one.
44 */
45 void MouseWatcherRegion::
46 enter_region(const MouseWatcherParameter &) {
47}
48
49/**
50 * This is a callback hook function, called whenever the mouse exits the
51 * region. The mouse is only considered to be "entered" in one region at a
52 * time; in the case of nested regions, it exits the outer region before
53 * entering the inner one.
54 */
55 void MouseWatcherRegion::
56 exit_region(const MouseWatcherParameter &) {
57}
58
59/**
60 * This is a callback hook function, called whenever the mouse moves within
61 * the boundaries of the region, even if it is also within the boundaries of a
62 * nested region. This is different from "enter", which is only called
63 * whenever the mouse is within only that region.
64 */
65 void MouseWatcherRegion::
66 within_region(const MouseWatcherParameter &) {
67}
68
69/**
70 * This is a callback hook function, called whenever the mouse moves
71 * completely outside the boundaries of the region. See within_region().
72 */
73 void MouseWatcherRegion::
74 without_region(const MouseWatcherParameter &) {
75}
76
77/**
78 * This is a callback hook function, called whenever a mouse or keyboard
79 * button is depressed while the mouse is within the region.
80 */
81 void MouseWatcherRegion::
82 press(const MouseWatcherParameter &) {
83}
84
85/**
86 * This is a callback hook function, called whenever a mouse or keyboard
87 * button previously depressed with press() is released.
88 */
89 void MouseWatcherRegion::
90 release(const MouseWatcherParameter &) {
91}
92
93/**
94 * This is a callback hook function, called whenever a keystroke is generated
95 * by the user.
96 */
97 void MouseWatcherRegion::
98 keystroke(const MouseWatcherParameter &) {
99}
100
101/**
102 * This is a callback hook function, called whenever an IME candidate is
103 * highlighted by the user.
104 */
105 void MouseWatcherRegion::
106 candidate(const MouseWatcherParameter &) {
107}
108
109/**
110 * This is a callback hook function, called whenever a mouse is moved within
111 * the region.
112 */
113 void MouseWatcherRegion::
114 move(const MouseWatcherParameter &) {
115}
MouseWatcherParameter
This is sent along as a parameter to most events generated for a region to indicate the mouse and but...
Definition mouseWatcherParameter.h:28
MouseWatcherRegion::move
virtual void move(const MouseWatcherParameter &param)
This is a callback hook function, called whenever a mouse is moved within the region.
Definition mouseWatcherRegion.cxx:114
MouseWatcherRegion::release
virtual void release(const MouseWatcherParameter &param)
This is a callback hook function, called whenever a mouse or keyboard button previously depressed wit...
Definition mouseWatcherRegion.cxx:90
MouseWatcherRegion::keystroke
virtual void keystroke(const MouseWatcherParameter &param)
This is a callback hook function, called whenever a keystroke is generated by the user.
Definition mouseWatcherRegion.cxx:98
MouseWatcherRegion::exit_region
virtual void exit_region(const MouseWatcherParameter &param)
This is a callback hook function, called whenever the mouse exits the region.
Definition mouseWatcherRegion.cxx:56
MouseWatcherRegion::press
virtual void press(const MouseWatcherParameter &param)
This is a callback hook function, called whenever a mouse or keyboard button is depressed while the m...
Definition mouseWatcherRegion.cxx:82
MouseWatcherRegion::enter_region
virtual void enter_region(const MouseWatcherParameter &param)
This is a callback hook function, called whenever the mouse enters the region.
Definition mouseWatcherRegion.cxx:46
MouseWatcherRegion::candidate
virtual void candidate(const MouseWatcherParameter &param)
This is a callback hook function, called whenever an IME candidate is highlighted by the user.
Definition mouseWatcherRegion.cxx:106
MouseWatcherRegion::within_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...
Definition mouseWatcherRegion.cxx:66
MouseWatcherRegion::without_region
virtual void without_region(const MouseWatcherParameter &param)
This is a callback hook function, called whenever the mouse moves completely outside the boundaries o...
Definition mouseWatcherRegion.cxx:74
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
indent
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
Definition indent.cxx:20
indent.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
mouseWatcherRegion.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.