Panda3D
 All Classes Functions Variables Enumerations
pgMouseWatcherBackground.h
1 // Filename: pgMouseWatcherBackground.h
2 // Created by: drose (23Aug01)
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 #ifndef PGMOUSEWATCHERBACKGROUND_H
16 #define PGMOUSEWATCHERBACKGROUND_H
17 
18 #include "pandabase.h"
19 
20 #include "mouseWatcherRegion.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : PGMouseWatcherBackground
24 // Description : This is a special kind of MouseWatcherRegion that
25 // doesn't have a rectangle and is never active, but
26 // just quietly listens for keypresses and sends them to
27 // all the PGItems with background focus.
28 ////////////////////////////////////////////////////////////////////
29 class EXPCL_PANDA_PGUI PGMouseWatcherBackground : public MouseWatcherRegion {
30 PUBLISHED:
32  virtual ~PGMouseWatcherBackground();
33 
34 public:
35  virtual void press(const MouseWatcherParameter &param);
36  virtual void release(const MouseWatcherParameter &param);
37  virtual void keystroke(const MouseWatcherParameter &param);
38  virtual void candidate(const MouseWatcherParameter &param);
39 
40 public:
41  static TypeHandle get_class_type() {
42  return _type_handle;
43  }
44  static void init_type() {
45  MouseWatcherRegion::init_type();
46  register_type(_type_handle, "PGMouseWatcherBackground",
47  MouseWatcherRegion::get_class_type());
48  }
49  virtual TypeHandle get_type() const {
50  return get_class_type();
51  }
52  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
53 
54 private:
55  static TypeHandle _type_handle;
56 };
57 
58 #endif
virtual void release(const MouseWatcherParameter &param)
This is a callback hook function, called whenever a mouse or keyboard button previously depressed wit...
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...
This is the class that defines a rectangular region on the screen for the MouseWatcher.
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...
This is a special kind of MouseWatcherRegion that doesn't have a rectangle and is never active...