Panda3D
pgItemNotify.h
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 pgItemNotify.h
10  * @author drose
11  * @date 2005-08-18
12  */
13 
14 #ifndef PGITEMNOTIFY_H
15 #define PGITEMNOTIFY_H
16 
17 #include "pandabase.h"
18 #include "pset.h"
19 
20 class PGItem;
22 
23 /**
24  * Objects that inherit from this class can receive specialized messages when
25  * PGItems change in certain ways.
26  */
27 class EXPCL_PANDA_PGUI PGItemNotify {
28 public:
29  INLINE PGItemNotify();
30  virtual ~PGItemNotify();
31 
32 protected:
33  virtual void item_transform_changed(PGItem *item);
34  virtual void item_frame_changed(PGItem *item);
35  virtual void item_draw_mask_changed(PGItem *item);
36 
37  virtual void item_enter(PGItem *item, const MouseWatcherParameter &param);
38  virtual void item_exit(PGItem *item, const MouseWatcherParameter &param);
39  virtual void item_within(PGItem *item, const MouseWatcherParameter &param);
40  virtual void item_without(PGItem *item, const MouseWatcherParameter &param);
41  virtual void item_focus_in(PGItem *item);
42  virtual void item_focus_out(PGItem *item);
43  virtual void item_press(PGItem *item, const MouseWatcherParameter &param);
44  virtual void item_release(PGItem *item, const MouseWatcherParameter &param);
45  virtual void item_keystroke(PGItem *item, const MouseWatcherParameter &param);
46  virtual void item_candidate(PGItem *item, const MouseWatcherParameter &param);
47  virtual void item_move(PGItem *item, const MouseWatcherParameter &param);
48 
49 protected:
50  void add_item(PGItem *item);
51  void remove_item(PGItem *item);
52 
53 private:
54  typedef pset<PGItem *> Items;
55  Items _items;
56 
57  friend class PGItem;
58 };
59 
60 #include "pgItemNotify.I"
61 
62 #endif
This is the base class for all the various kinds of gui widget objects.
Definition: pgItem.h:53
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Objects that inherit from this class can receive specialized messages when PGItems change in certain ...
Definition: pgItemNotify.h:27
This is sent along as a parameter to most events generated for a region to indicate the mouse and but...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.