Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PGButton Class Reference

#include <pgButton.h>

Inheritance diagram for PGButton:

PGItem PandaNode TypedWritable Namable BoundedObject ReferenceCount TypedObject List of all members.

Public Member Functions

virtual PandaNodemake_copy () const
virtual void enter (const MouseWatcherParameter &param)
virtual void exit (const MouseWatcherParameter &param)
virtual void press (const MouseWatcherParameter &param, bool background)
virtual void release (const MouseWatcherParameter &param, bool background)
virtual void click (const MouseWatcherParameter &param)
void setup (const string &label)
INLINE void setup (const NodePath &ready)
INLINE void setup (const NodePath &ready, const NodePath &depressed)
INLINE void setup (const NodePath &ready, const NodePath &depressed, const NodePath &rollover)
void setup (const NodePath &ready, const NodePath &depressed, const NodePath &rollover, const NodePath &inactive)
virtual void set_active (bool active)
bool add_click_button (const ButtonHandle &button)
bool remove_click_button (const ButtonHandle &button)
bool has_click_button (const ButtonHandle &button)
INLINE string get_click_event (const ButtonHandle &button) const
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

INLINE string get_click_prefix ()
TypeHandle get_class_type ()
void init_type ()

Public Attributes

PUBLISHED __pad1__: enum State { S_ready = 0
PUBLISHED S_depressed
PUBLISHED S_rollover
PUBLISHED S_inactive

Protected Member Functions

 PGButton (const PGButton &copy)

Private Types

typedef pset< ButtonHandleButtons

Private Member Functions

virtual ~PGButton ()

Private Attributes

PUBLISHED __pad0__: PGButton(const string &name)
Buttons _click_buttons
bool _button_down

Static Private Attributes

TypeHandle _type_handle

Member Typedef Documentation

typedef pset<ButtonHandle> PGButton::Buttons [private]
 

Definition at line 79 of file pgButton.h.


Constructor & Destructor Documentation

PGButton::~PGButton  )  [private, virtual]
 

Definition at line 50 of file pgButton.cxx.

PGButton::PGButton const PGButton &  copy  )  [protected]
 

Definition at line 59 of file pgButton.cxx.

References _button_down.

Referenced by make_copy().


Member Function Documentation

bool PGButton::add_click_button const ButtonHandle button  ) 
 

Definition at line 263 of file pgButton.cxx.

References _click_buttons.

void PGButton::click const MouseWatcherParameter param  )  [virtual]
 

Definition at line 154 of file pgButton.cxx.

References get_click_event(), param, PGItem::play_sound(), and throw_event().

Referenced by release().

void PGButton::enter const MouseWatcherParameter param  )  [virtual]
 

Reimplemented from PGItem.

Definition at line 85 of file pgButton.cxx.

References _button_down, PGItem::enter(), PGItem::get_active(), param, S_depressed, S_rollover, and PGItem::set_state().

void PGButton::exit const MouseWatcherParameter param  )  [virtual]
 

Reimplemented from PGItem.

Definition at line 99 of file pgButton.cxx.

References PGItem::exit(), PGItem::get_active(), param, and PGItem::set_state().

virtual TypeHandle PGButton::force_init_type void   )  [inline, virtual]
 

Reimplemented from PGItem.

Definition at line 96 of file pgButton.h.

References PGItem::get_class_type(), and PGItem::init_type().

TypeHandle PGButton::get_class_type void   )  [inline, static]
 

Reimplemented from PGItem.

Definition at line 85 of file pgButton.h.

INLINE string PGButton::get_click_event const ButtonHandle button  )  const
 

Referenced by click().

INLINE string PGButton::get_click_prefix  )  [static]
 

virtual TypeHandle PGButton::get_type void   )  const [inline, virtual]
 

Reimplemented from PGItem.

Definition at line 93 of file pgButton.h.

References PGItem::get_class_type().

bool PGButton::has_click_button const ButtonHandle button  ) 
 

Definition at line 289 of file pgButton.cxx.

References _click_buttons.

Referenced by press(), and release().

void PGButton::init_type void   )  [inline, static]
 

Reimplemented from PGItem.

Definition at line 88 of file pgButton.h.

References PGItem::get_class_type(), PGItem::init_type(), and register_type().

Referenced by init_libpgui().

PandaNode * PGButton::make_copy  )  const [virtual]
 

Reimplemented from PGItem.

Definition at line 74 of file pgButton.cxx.

References PGButton().

void PGButton::press const MouseWatcherParameter param,
bool  background
[virtual]
 

Reimplemented from PGItem.

Definition at line 114 of file pgButton.cxx.

References _button_down, PGItem::get_active(), has_click_button(), param, PGItem::press(), S_depressed, and PGItem::set_state().

void PGButton::release const MouseWatcherParameter param,
bool  background
[virtual]
 

Reimplemented from PGItem.

Definition at line 132 of file pgButton.cxx.

References _button_down, click(), PGItem::get_active(), has_click_button(), param, PGItem::release(), S_rollover, and PGItem::set_state().

bool PGButton::remove_click_button const ButtonHandle button  ) 
 

Definition at line 277 of file pgButton.cxx.

References _click_buttons.

void PGButton::set_active bool  active  )  [virtual]
 

Reimplemented from PGItem.

Definition at line 247 of file pgButton.cxx.

References PGItem::get_active(), S_inactive, PGItem::set_active(), and PGItem::set_state().

void PGButton::setup const NodePath ready,
const NodePath depressed,
const NodePath rollover,
const NodePath inactive
 

Definition at line 226 of file pgButton.cxx.

References PGItem::clear_state_def(), PGItem::instance_to_state_def(), S_depressed, S_inactive, and S_rollover.

INLINE void PGButton::setup const NodePath ready,
const NodePath depressed,
const NodePath rollover
 

INLINE void PGButton::setup const NodePath ready,
const NodePath depressed
 

INLINE void PGButton::setup const NodePath ready  ) 
 

void PGButton::setup const string &  label  ) 
 

Definition at line 171 of file pgButton.cxx.

References NodePath::attach_new_node(), PGItem::clear_state_def(), Colorf, TextNode::get_card_actual(), PGItem::get_state_def(), PGItem::get_text_node(), PandaNode::PandaNode(), PGItem::PT(), S_depressed, S_inactive, S_rollover, PGFrameStyle::set_color(), PGItem::set_frame(), PGItem::set_frame_style(), TextNode::set_text(), PGFrameStyle::set_type(), PGFrameStyle::set_width(), PGFrameStyle::T_bevel_in, and PGFrameStyle::T_bevel_out.


Member Data Documentation

PUBLISHED PGButton::__pad0__ [private]
 

Reimplemented from PGItem.

Definition at line 37 of file pgButton.h.

PUBLISHED PGButton::__pad1__
 

Reimplemented from PGItem.

Definition at line 55 of file pgButton.h.

bool PGButton::_button_down [private]
 

Definition at line 82 of file pgButton.h.

Referenced by enter(), PGButton(), press(), and release().

Buttons PGButton::_click_buttons [private]
 

Definition at line 80 of file pgButton.h.

Referenced by add_click_button(), has_click_button(), and remove_click_button().

TypeHandle PGButton::_type_handle [static, private]
 

Reimplemented from PGItem.

Definition at line 28 of file pgButton.cxx.

PUBLISHED PGButton::S_depressed
 

Definition at line 55 of file pgButton.h.

Referenced by enter(), press(), and setup().

PUBLISHED PGButton::S_inactive
 

Definition at line 55 of file pgButton.h.

Referenced by set_active(), and setup().

PUBLISHED PGButton::S_rollover
 

Definition at line 55 of file pgButton.h.

Referenced by enter(), release(), and setup().


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 00:13:05 2003 for Panda by doxygen1.3