Panda3D
 All Classes Functions Variables Enumerations
pgItemNotify.h
1 // Filename: pgItemNotify.h
2 // Created by: drose (18Aug05)
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 PGITEMNOTIFY_H
16 #define PGITEMNOTIFY_H
17 
18 #include "pandabase.h"
19 #include "pset.h"
20 
21 class PGItem;
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : PGItemNotify
26 // Description : Objects that inherit from this class can receive
27 // specialized messages when PGItems change in certain
28 // ways.
29 ////////////////////////////////////////////////////////////////////
30 class EXPCL_PANDA_PGUI PGItemNotify {
31 public:
32  INLINE PGItemNotify();
33  virtual ~PGItemNotify();
34 
35 protected:
36  virtual void item_transform_changed(PGItem *item);
37  virtual void item_frame_changed(PGItem *item);
38  virtual void item_draw_mask_changed(PGItem *item);
39 
40  virtual void item_enter(PGItem *item, const MouseWatcherParameter &param);
41  virtual void item_exit(PGItem *item, const MouseWatcherParameter &param);
42  virtual void item_within(PGItem *item, const MouseWatcherParameter &param);
43  virtual void item_without(PGItem *item, const MouseWatcherParameter &param);
44  virtual void item_focus_in(PGItem *item);
45  virtual void item_focus_out(PGItem *item);
46  virtual void item_press(PGItem *item, const MouseWatcherParameter &param);
47  virtual void item_release(PGItem *item, const MouseWatcherParameter &param);
48  virtual void item_keystroke(PGItem *item, const MouseWatcherParameter &param);
49  virtual void item_candidate(PGItem *item, const MouseWatcherParameter &param);
50  virtual void item_move(PGItem *item, const MouseWatcherParameter &param);
51 
52 protected:
53  void add_item(PGItem *item);
54  void remove_item(PGItem *item);
55 
56 private:
57  typedef pset<PGItem *> Items;
58  Items _items;
59 
60  friend class PGItem;
61 };
62 
63 #include "pgItemNotify.I"
64 
65 #endif
This is the base class for all the various kinds of gui widget objects.
Definition: pgItem.h:58
Objects that inherit from this class can receive specialized messages when PGItems change in certain ...
Definition: pgItemNotify.h:30
This is sent along as a parameter to most events generated for a region to indicate the mouse and but...