29class EXPCL_PANDA_PGUI PGButton :
public PGItem {
31 explicit PGButton(
const std::string &name);
35 PGButton(
const PGButton ©);
58 void setup(
const std::string &label, PN_stdfloat bevel = 0.1f);
59 INLINE
void setup(
const NodePath &ready);
60 INLINE
void setup(
const NodePath &ready,
const NodePath &depressed);
61 INLINE
void setup(
const NodePath &ready,
const NodePath &depressed,
62 const NodePath &rollover);
63 void setup(
const NodePath &ready,
const NodePath &depressed,
64 const NodePath &rollover,
const NodePath &inactive);
79 typedef pset<ButtonHandle> Buttons;
80 Buttons _click_buttons;
88 static void init_type() {
91 PGItem::get_class_type());
93 virtual TypeHandle get_type()
const {
94 return get_class_type();
96 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
99 static TypeHandle _type_handle;
This is sent along as a parameter to most events generated for a region to indicate the mouse and but...
void set_notify(PGItemNotify *notify)
Sets the object which will be notified when the PGItem changes.
virtual void press(const MouseWatcherParameter ¶m, bool background)
This is a callback hook function, called whenever a mouse or keyboard button is depressed while the m...
PGItemNotify * get_notify() const
Returns the object which will be notified when the PGItem changes, if any.
virtual void release(const MouseWatcherParameter ¶m, bool background)
This is a callback hook function, called whenever a mouse or keyboard button previously depressed wit...
virtual void exit_region(const MouseWatcherParameter ¶m)
This is a callback hook function, called whenever the mouse exits the region.
virtual void enter_region(const MouseWatcherParameter ¶m)
This is a callback hook function, called whenever the mouse enters the region.
virtual void set_active(bool active)
Sets whether the PGItem is active for mouse watching.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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(),...