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

PGItem Class Reference

#include <pgItem.h>

Inheritance diagram for PGItem:

PandaNode TypedWritable Namable BoundedObject ReferenceCount TypedObject PGButton PGEntry PGWaitBar List of all members.

Public Member Functions

void activate_region (const LMatrix4f &transform, int sort)
INLINE PGMouseWatcherRegionget_region () const
virtual void enter (const MouseWatcherParameter &param)
virtual void exit (const MouseWatcherParameter &param)
virtual void within (const MouseWatcherParameter &param)
virtual void without (const MouseWatcherParameter &param)
virtual void focus_in ()
virtual void focus_out ()
virtual void press (const MouseWatcherParameter &param, bool background)
virtual void release (const MouseWatcherParameter &param, bool background)
virtual void keystroke (const MouseWatcherParameter &param, bool background)
INLINE void set_frame (const LVecBase4f &frame)
INLINE const LVecBase4f & get_frame () const
INLINE bool has_frame () const
INLINE void clear_frame ()
INLINE void set_state (int state)
INLINE int get_state () const
virtual void set_active (bool active)
INLINE bool get_active () const
virtual void set_focus (bool focus)
INLINE bool get_focus () const
void set_background_focus (bool focus)
INLINE bool get_background_focus () const
INLINE void set_suppress_flags (int suppress_flags)
INLINE int get_suppress_flags () const
int get_num_state_defs () const
void clear_state_def (int state)
bool has_state_def (int state) const
NodePathget_state_def (int state)
NodePath instance_to_state_def (int state, const NodePath &path)
PGFrameStyle get_frame_style (int state)
void set_frame_style (int state, const PGFrameStyle &style)
INLINE const string & get_id () const
INLINE void set_id (const string &id)
INLINE string get_enter_event () const
INLINE string get_exit_event () const
INLINE string get_within_event () const
INLINE string get_without_event () const
INLINE string get_focus_in_event () const
INLINE string get_focus_out_event () const
INLINE string get_press_event (const ButtonHandle &button) const
INLINE string get_release_event (const ButtonHandle &button) const
INLINE string get_keystroke_event () const
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

void background_press (const MouseWatcherParameter &param)
void background_release (const MouseWatcherParameter &param)
void background_keystroke (const MouseWatcherParameter &param)
INLINE string get_enter_prefix ()
INLINE string get_exit_prefix ()
INLINE string get_within_prefix ()
INLINE string get_without_prefix ()
INLINE string get_focus_in_prefix ()
INLINE string get_focus_out_prefix ()
INLINE string get_press_prefix ()
INLINE string get_release_prefix ()
INLINE string get_keystroke_prefix ()
TextNodeget_text_node ()
INLINE void set_text_node (TextNode *node)
INLINE PGItem * get_focus_item ()
TypeHandle get_class_type ()
void init_type ()

Public Attributes

PUBLISHED __pad1__: INLINE void set_frame(float left
PUBLISHED float right
PUBLISHED float float bottom
PUBLISHED float float float top

Protected Member Functions

 PGItem (const PGItem &copy)
virtual PandaNodemake_copy () const
virtual void xform (const LMatrix4f &mat)
virtual bool has_cull_callback () const
virtual bool cull_callback (CullTraverser *trav, CullTraverserData &data)
virtual BoundingVolumerecompute_internal_bound ()
void play_sound (const string &event)

Private Types

typedef pvector< StateDefStateDefs
typedef pset< PGItem * > BackgroundFocus
enum  Flags { F_active = 0x01, F_focus = 0x02, F_background_focus = 0x04 }

Private Member Functions

virtual ~PGItem ()
void slot_state_def (int state)
void update_frame (int state)
void mark_frames_stale ()
 PT (PGMouseWatcherRegion) _region

Static Private Member Functions

 PT (TextNode) _text_node

Private Attributes

PUBLISHED __pad0__: PGItem(const string &name)
bool _has_frame
LVecBase4f _frame
int _state
int _flags
StateDefs _state_defs

Static Private Attributes

PGItem * _focus_item
BackgroundFocus _background_focus
TypeHandle _type_handle

Member Typedef Documentation

typedef pset<PGItem *> PGItem::BackgroundFocus [private]
 

Definition at line 190 of file pgItem.h.

typedef pvector<StateDef> PGItem::StateDefs [private]
 

Definition at line 179 of file pgItem.h.


Member Enumeration Documentation

enum PGItem::Flags [private]
 

Enumeration values:
F_active 
F_focus 
F_background_focus 

Reimplemented from BoundedObject.

Definition at line 163 of file pgItem.h.


Constructor & Destructor Documentation

PGItem::~PGItem  )  [private, virtual]
 

Definition at line 65 of file pgItem.cxx.

References _focus_item, NULL, and set_background_focus().

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

Definition at line 81 of file pgItem.cxx.

Referenced by make_copy().


Member Function Documentation

void PGItem::activate_region const LMatrix4f &  transform,
int  sort
 

Definition at line 282 of file pgItem.cxx.

References _frame, and transform.

Referenced by cull_callback().

void PGItem::background_keystroke const MouseWatcherParameter param  )  [static]
 

Definition at line 486 of file pgItem.cxx.

References _background_focus, get_focus(), keystroke(), and param.

Referenced by PGMouseWatcherBackground::keystroke().

void PGItem::background_press const MouseWatcherParameter param  )  [static]
 

Definition at line 452 of file pgItem.cxx.

References _background_focus, get_focus(), param, and press().

Referenced by PGMouseWatcherBackground::press().

void PGItem::background_release const MouseWatcherParameter param  )  [static]
 

Definition at line 469 of file pgItem.cxx.

References _background_focus, get_focus(), param, and release().

Referenced by PGMouseWatcherBackground::release().

INLINE void PGItem::clear_frame  ) 
 

void PGItem::clear_state_def int  state  ) 
 

Definition at line 632 of file pgItem.cxx.

References _state_defs, BoundedObject::mark_bound_stale(), and PandaNode::NodePath.

Referenced by PGButton::setup().

bool PGItem::cull_callback CullTraverser trav,
CullTraverserData data
[protected, virtual]
 

Reimplemented from PandaNode.

Reimplemented in PGEntry, and PGWaitBar.

Definition at line 173 of file pgItem.cxx.

References PGCullTraverser::_sort_index, PGCullTraverser::_top, activate_region(), PGTop::add_region(), CullBinManager::BT_fixed, CullBinManager::BT_unsorted, data, DCAST_INTO_R, get_active(), CullBinManager::get_bin_sort(), CullBinManager::get_bin_type(), PGCullTraverser::get_class_type(), CullBinManager::get_global_ptr(), get_region(), get_state(), get_state_def(), has_frame(), has_state_def(), TypedObject::is_exact_type(), root, transform, and CullTraverser::traverse().

Referenced by PGWaitBar::cull_callback(), and PGEntry::cull_callback().

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

Reimplemented in PGButton.

Definition at line 312 of file pgItem.cxx.

References get_enter_event(), param, play_sound(), and throw_event().

Referenced by PGMouseWatcherRegion::enter(), and PGButton::enter().

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

Reimplemented in PGButton.

Definition at line 329 of file pgItem.cxx.

References get_exit_event(), param, play_sound(), and throw_event().

Referenced by PGMouseWatcherRegion::exit(), and PGButton::exit().

void PGItem::focus_in  )  [virtual]
 

Definition at line 376 of file pgItem.cxx.

References get_focus_in_event(), play_sound(), and throw_event().

Referenced by set_focus().

void PGItem::focus_out  )  [virtual]
 

Definition at line 389 of file pgItem.cxx.

References get_focus_out_event(), play_sound(), and throw_event().

Referenced by set_focus().

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

Reimplemented from PandaNode.

Reimplemented in PGButton, PGEntry, and PGWaitBar.

Definition at line 205 of file pgItem.h.

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

INLINE bool PGItem::get_active  )  const
 

Referenced by cull_callback(), PGButton::enter(), PGButton::exit(), PGEntry::keystroke(), PGEntry::press(), PGButton::press(), PGButton::release(), PGButton::set_active(), set_focus(), and PGEntry::update_state().

INLINE bool PGItem::get_background_focus  )  const
 

Referenced by PGEntry::press(), and set_background_focus().

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

Reimplemented from PandaNode.

Reimplemented in PGButton, PGEntry, and PGWaitBar.

Definition at line 194 of file pgItem.h.

Referenced by PGWaitBar::force_init_type(), PGEntry::force_init_type(), PGButton::force_init_type(), PGWaitBar::get_type(), PGEntry::get_type(), PGButton::get_type(), PGWaitBar::init_type(), PGEntry::init_type(), and PGButton::init_type().

INLINE string PGItem::get_enter_event  )  const
 

Referenced by enter().

INLINE string PGItem::get_enter_prefix  )  [static]
 

INLINE string PGItem::get_exit_event  )  const
 

Referenced by exit().

INLINE string PGItem::get_exit_prefix  )  [static]
 

INLINE bool PGItem::get_focus  )  const
 

Referenced by background_keystroke(), background_press(), background_release(), PGEntry::press(), set_active(), set_focus(), PGEntry::update_cursor(), and PGEntry::update_state().

INLINE string PGItem::get_focus_in_event  )  const
 

Referenced by focus_in().

INLINE string PGItem::get_focus_in_prefix  )  [static]
 

INLINE PGItem* PGItem::get_focus_item  )  [static]
 

INLINE string PGItem::get_focus_out_event  )  const
 

Referenced by focus_out().

INLINE string PGItem::get_focus_out_prefix  )  [static]
 

INLINE const LVecBase4f& PGItem::get_frame  )  const
 

Referenced by PGWaitBar::update().

PGFrameStyle PGItem::get_frame_style int  state  ) 
 

Definition at line 695 of file pgItem.cxx.

References _state_defs.

Referenced by PGWaitBar::update().

INLINE const string& PGItem::get_id  )  const
 

INLINE string PGItem::get_keystroke_event  )  const
 

Referenced by keystroke().

INLINE string PGItem::get_keystroke_prefix  )  [static]
 

int PGItem::get_num_state_defs  )  const
 

Definition at line 605 of file pgItem.cxx.

References _state_defs.

INLINE string PGItem::get_press_event const ButtonHandle button  )  const
 

Referenced by press().

INLINE string PGItem::get_press_prefix  )  [static]
 

INLINE PGMouseWatcherRegion* PGItem::get_region  )  const
 

Referenced by cull_callback().

INLINE string PGItem::get_release_event const ButtonHandle button  )  const
 

Referenced by release().

INLINE string PGItem::get_release_prefix  )  [static]
 

INLINE int PGItem::get_state  )  const
 

Reimplemented from PandaNode.

Referenced by cull_callback(), PGWaitBar::update(), PGEntry::update_cursor(), and PGEntry::update_text().

NodePath & PGItem::get_state_def int  state  ) 
 

Definition at line 653 of file pgItem.cxx.

References _state_defs, format_string(), PandaNode::NodePath, slot_state_def(), and update_frame().

Referenced by cull_callback(), instance_to_state_def(), recompute_internal_bound(), set_frame_style(), PGButton::setup(), PGWaitBar::update(), and update_frame().

INLINE int PGItem::get_suppress_flags  )  const
 

TextNode * PGItem::get_text_node  )  [static]
 

Definition at line 779 of file pgItem.cxx.

References TextNode::A_left, and NULL.

Referenced by PGEntry::get_text_def(), and PGButton::setup().

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

Reimplemented from PandaNode.

Reimplemented in PGButton, PGEntry, and PGWaitBar.

Definition at line 202 of file pgItem.h.

References PandaNode::get_class_type().

INLINE string PGItem::get_within_event  )  const
 

Referenced by within().

INLINE string PGItem::get_within_prefix  )  [static]
 

INLINE string PGItem::get_without_event  )  const
 

Referenced by without().

INLINE string PGItem::get_without_prefix  )  [static]
 

bool PGItem::has_cull_callback  )  const [protected, virtual]
 

Reimplemented from PandaNode.

Reimplemented in PGEntry, and PGWaitBar.

Definition at line 149 of file pgItem.cxx.

INLINE bool PGItem::has_frame  )  const
 

Referenced by cull_callback(), and update_frame().

bool PGItem::has_state_def int  state  )  const
 

Definition at line 617 of file pgItem.cxx.

References _state_defs.

Referenced by cull_callback().

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

Reimplemented from PandaNode.

Reimplemented in PGButton, PGEntry, and PGWaitBar.

Definition at line 197 of file pgItem.h.

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

Referenced by PGWaitBar::force_init_type(), PGEntry::force_init_type(), PGButton::force_init_type(), init_libpgui(), PGWaitBar::init_type(), PGEntry::init_type(), and PGButton::init_type().

NodePath PGItem::instance_to_state_def int  state,
const NodePath path
 

Definition at line 677 of file pgItem.cxx.

References get_state_def(), NodePath::instance_to(), NodePath::is_empty(), BoundedObject::mark_bound_stale(), and PandaNode::NodePath.

Referenced by PGButton::setup().

void PGItem::keystroke const MouseWatcherParameter param,
bool  background
[virtual]
 

Reimplemented in PGEntry.

Definition at line 436 of file pgItem.cxx.

References get_keystroke_event(), param, play_sound(), and throw_event().

Referenced by background_keystroke(), PGMouseWatcherRegion::keystroke(), and PGEntry::keystroke().

PandaNode * PGItem::make_copy  )  const [protected, virtual]
 

Reimplemented from PandaNode.

Reimplemented in PGButton, PGEntry, and PGWaitBar.

Definition at line 100 of file pgItem.cxx.

References PGItem().

void PGItem::mark_frames_stale  )  [private]
 

Definition at line 857 of file pgItem.cxx.

References _state_defs, and BoundedObject::mark_bound_stale().

void PGItem::play_sound const string &  event  )  [protected]
 

Definition at line 798 of file pgItem.cxx.

Referenced by PGEntry::accept(), PGButton::click(), enter(), PGEntry::erase(), exit(), focus_in(), focus_out(), keystroke(), PGEntry::overflow(), press(), release(), PGEntry::type(), within(), and without().

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

Reimplemented in PGButton, and PGEntry.

Definition at line 403 of file pgItem.cxx.

References get_press_event(), param, play_sound(), and throw_event().

Referenced by background_press(), PGMouseWatcherRegion::press(), PGEntry::press(), and PGButton::press().

PGItem::PT TextNode   )  [static, private]
 

PGItem::PT PGMouseWatcherRegion   )  [private]
 

Referenced by PGButton::setup().

BoundingVolume * PGItem::recompute_internal_bound  )  [protected, virtual]
 

Reimplemented from PandaNode.

Definition at line 249 of file pgItem.cxx.

References _state_defs, BoundingVolume::around(), get_state_def(), NULL, PandaNode::recompute_internal_bound(), and root.

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

Reimplemented in PGButton.

Definition at line 420 of file pgItem.cxx.

References get_release_event(), param, play_sound(), and throw_event().

Referenced by background_release(), PGMouseWatcherRegion::release(), and PGButton::release().

void PGItem::set_active bool  active  )  [virtual]
 

Reimplemented in PGButton, and PGEntry.

Definition at line 506 of file pgItem.cxx.

References _flags, F_active, get_focus(), and set_focus().

Referenced by PGEntry::set_active(), and PGButton::set_active().

void PGItem::set_background_focus bool  focus  ) 
 

Definition at line 576 of file pgItem.cxx.

References _background_focus, _flags, F_background_focus, and get_background_focus().

Referenced by ~PGItem().

void PGItem::set_focus bool  focus  )  [virtual]
 

Reimplemented in PGEntry.

Definition at line 532 of file pgItem.cxx.

References _flags, _focus_item, F_focus, focus_in(), focus_out(), get_active(), get_focus(), and NULL.

Referenced by set_active(), and PGEntry::set_focus().

INLINE void PGItem::set_frame const LVecBase4f &  frame  ) 
 

Referenced by PGEntry::setup(), and PGButton::setup().

void PGItem::set_frame_style int  state,
const PGFrameStyle style
 

Definition at line 709 of file pgItem.cxx.

References _state_defs, get_state_def(), BoundedObject::mark_bound_stale(), and root.

Referenced by PGEntry::setup(), and PGButton::setup().

INLINE void PGItem::set_id const string &  id  ) 
 

INLINE void PGItem::set_state int  state  ) 
 

Referenced by PGButton::enter(), PGButton::exit(), PGButton::press(), PGButton::release(), PGButton::set_active(), and PGEntry::update_state().

INLINE void PGItem::set_suppress_flags int  suppress_flags  ) 
 

INLINE void PGItem::set_text_node TextNode node  )  [static]
 

void PGItem::slot_state_def int  state  )  [private]
 

Definition at line 815 of file pgItem.cxx.

References PGItem::StateDef::_frame_stale, and _state_defs.

Referenced by get_state_def().

void PGItem::update_frame int  state  )  [private]
 

Definition at line 830 of file pgItem.cxx.

References _frame, _state_defs, get_state_def(), has_frame(), and root.

Referenced by get_state_def().

void PGItem::within const MouseWatcherParameter param  )  [virtual]
 

Definition at line 347 of file pgItem.cxx.

References get_within_event(), param, play_sound(), and throw_event().

Referenced by PGMouseWatcherRegion::within().

void PGItem::without const MouseWatcherParameter param  )  [virtual]
 

Definition at line 362 of file pgItem.cxx.

References get_without_event(), param, play_sound(), and throw_event().

Referenced by PGMouseWatcherRegion::without().

void PGItem::xform const LMatrix4f &  mat  )  [protected, virtual]
 

Reimplemented from PandaNode.

Definition at line 112 of file pgItem.cxx.

References _frame, _state_defs, SceneGraphReducer::apply_attribs(), BoundedObject::mark_bound_stale(), and root.


Member Data Documentation

PUBLISHED PGItem::__pad0__ [private]
 

Reimplemented from PandaNode.

Reimplemented in PGButton, PGEntry, and PGWaitBar.

Definition at line 55 of file pgItem.h.

PUBLISHED PGItem::__pad1__
 

Reimplemented from PandaNode.

Reimplemented in PGButton, PGEntry, and PGWaitBar.

Definition at line 87 of file pgItem.h.

PGItem::BackgroundFocus PGItem::_background_focus [static, private]
 

Definition at line 41 of file pgItem.cxx.

Referenced by background_keystroke(), background_press(), background_release(), and set_background_focus().

int PGItem::_flags [private]
 

Definition at line 168 of file pgItem.h.

Referenced by set_active(), set_background_focus(), and set_focus().

PGItem* PGItem::_focus_item [static, private]
 

Definition at line 188 of file pgItem.h.

Referenced by set_focus(), and ~PGItem().

LVecBase4f PGItem::_frame [private]
 

Definition at line 161 of file pgItem.h.

Referenced by activate_region(), update_frame(), and xform().

bool PGItem::_has_frame [private]
 

Definition at line 160 of file pgItem.h.

int PGItem::_state [private]
 

Definition at line 162 of file pgItem.h.

StateDefs PGItem::_state_defs [private]
 

Definition at line 180 of file pgItem.h.

Referenced by clear_state_def(), get_frame_style(), get_num_state_defs(), get_state_def(), has_state_def(), mark_frames_stale(), recompute_internal_bound(), set_frame_style(), slot_state_def(), update_frame(), and xform().

TypeHandle PGItem::_type_handle [static, private]
 

Reimplemented from PandaNode.

Reimplemented in PGButton, PGEntry, and PGWaitBar.

Definition at line 38 of file pgItem.cxx.

PUBLISHED float float PGItem::bottom
 

Definition at line 87 of file pgItem.h.

PUBLISHED float PGItem::right
 

Definition at line 87 of file pgItem.h.

PUBLISHED float float float PGItem::top
 

Definition at line 87 of file pgItem.h.


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