14 #ifndef MOUSEWATCHERREGION_H 15 #define MOUSEWATCHERREGION_H 33 INLINE
explicit MouseWatcherRegion(
const std::string &name, PN_stdfloat left, PN_stdfloat right,
34 PN_stdfloat bottom, PN_stdfloat top);
37 INLINE
void set_frame(PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top);
38 INLINE
void set_frame(
const LVecBase4 &frame);
39 INLINE
const LVecBase4 &get_frame()
const;
40 INLINE PN_stdfloat get_area()
const;
42 INLINE
void set_sort(
int sort);
43 INLINE
int get_sort()
const;
45 INLINE
void set_active(
bool active);
46 INLINE
bool get_active()
const;
48 INLINE
void set_keyboard(
bool keyboard);
49 INLINE
bool get_keyboard()
const;
52 SF_mouse_button = 0x001,
53 SF_other_button = 0x002,
54 SF_any_button = 0x003,
55 SF_mouse_position = 0x004,
58 INLINE
void set_suppress_flags(
int suppress_flags);
59 INLINE
int get_suppress_flags()
const;
61 void output(std::ostream &out)
const;
62 void write(std::ostream &out,
int indent_level = 0)
const;
65 MAKE_PROPERTY(frame, get_frame, set_frame);
66 MAKE_PROPERTY(area, get_area);
68 MAKE_PROPERTY(sort, get_sort, set_sort);
69 MAKE_PROPERTY(active, get_active, set_active);
70 MAKE_PROPERTY(keyboard, get_keyboard, set_keyboard);
71 MAKE_PROPERTY(suppress_flags, get_suppress_flags, set_suppress_flags);
94 F_suppress_flags = 0x0ff,
104 static void init_type() {
105 TypedWritableReferenceCount::init_type();
106 Namable::init_type();
108 TypedWritableReferenceCount::get_class_type(),
109 Namable::get_class_type());
112 return get_class_type();
114 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
120 INLINE std::ostream &operator << (std::ostream &out,
const MouseWatcherRegion ®ion) {
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void output(std::ostream &out) const
Outputs the Namable.
A base class for all things which can have a name.
This is the class that defines a rectangular region on the screen for the MouseWatcher.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
This is sent along as a parameter to most events generated for a region to indicate the mouse and but...