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

ButtonThrower Class Reference

#include <buttonThrower.h>

Inheritance diagram for ButtonThrower:

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

Public Member Functions

virtual void write (ostream &out, int indent_level=0) const
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()

Protected Member Functions

virtual void do_transmit_data (const DataNodeTransmit &input, DataNodeTransmit &output)

Private Types

typedef pvector< EventParameterParameterList
typedef pvector< ModifierButtonsThrowButtonDef
typedef pmap< ButtonHandle,
ThrowButtonDef
ThrowButtons

Private Member Functions

 ~ButtonThrower ()
void set_prefix (const string &prefix)
bool has_prefix () const
string get_prefix () const
void add_parameter (const EventParameter &obj)
int get_num_parameters () const
EventParameter get_parameter (int n) const
const ModifierButtonsget_modifier_buttons () const
void set_modifier_buttons (const ModifierButtons &mods)
void set_throw_buttons_active (bool flag)
bool get_throw_buttons_active () const
bool add_throw_button (const ModifierButtons &mods, const ButtonHandle &button)
bool remove_throw_button (const ModifierButtons &mods, const ButtonHandle &button)
bool has_throw_button (const ModifierButtons &mods, const ButtonHandle &button) const
bool has_throw_button (const ButtonHandle &button) const
void clear_throw_buttons ()
void do_throw_event (const string &event_name)
 PT (ButtonEventList) _button_events

Private Attributes

PUBLISHED __pad0__: ButtonThrower(const string &name)
string _prefix
ModifierButtons _mods
ParameterList _parameters
ThrowButtons _throw_buttons
bool _throw_buttons_active
int _button_events_input
int _button_events_output

Static Private Attributes

TypeHandle _type_handle

Member Typedef Documentation

typedef pvector<EventParameter> ButtonThrower::ParameterList [private]
 

Definition at line 78 of file buttonThrower.h.

typedef pvector<ModifierButtons> ButtonThrower::ThrowButtonDef [private]
 

Definition at line 81 of file buttonThrower.h.

Referenced by add_throw_button(), has_throw_button(), remove_throw_button(), and write().

typedef pmap<ButtonHandle, ThrowButtonDef> ButtonThrower::ThrowButtons [private]
 

Definition at line 82 of file buttonThrower.h.


Constructor & Destructor Documentation

ButtonThrower::~ButtonThrower  )  [private]
 

Definition at line 55 of file buttonThrower.cxx.


Member Function Documentation

void ButtonThrower::add_parameter const EventParameter obj  )  [private]
 

Definition at line 101 of file buttonThrower.cxx.

References _parameters.

bool ButtonThrower::add_throw_button const ModifierButtons mods,
const ButtonHandle button
[private]
 

Definition at line 220 of file buttonThrower.cxx.

References _throw_buttons, ModifierButtons::matches(), and ThrowButtonDef.

void ButtonThrower::clear_throw_buttons  )  [private]
 

Definition at line 336 of file buttonThrower.cxx.

References _throw_buttons.

void ButtonThrower::do_throw_event const string &  event_name  )  [private]
 

Definition at line 373 of file buttonThrower.cxx.

References _parameters, _prefix, Event::add_parameter(), and throw_event().

Referenced by do_transmit_data().

void ButtonThrower::do_transmit_data const DataNodeTransmit input,
DataNodeTransmit output
[protected, virtual]
 

Reimplemented from DataNode.

Definition at line 398 of file buttonThrower.cxx.

References ButtonEvent::_button, _button_events_input, _button_events_output, _mods, _throw_buttons_active, ButtonEvent::_type, ModifierButtons::button_down(), ModifierButtons::button_up(), DCAST_INTO_V, do_throw_event(), ButtonEventList::get_event(), ButtonEventList::get_num_events(), ModifierButtons::get_prefix(), has_throw_button(), input, DataNodeTransmit::set_data(), ButtonEvent::T_down, ButtonEvent::T_resume_down, and ButtonEvent::T_up.

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

Reimplemented from DataNode.

Definition at line 111 of file buttonThrower.h.

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

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

Reimplemented from DataNode.

Definition at line 100 of file buttonThrower.h.

const ModifierButtons & ButtonThrower::get_modifier_buttons  )  const [private]
 

Definition at line 145 of file buttonThrower.cxx.

References _mods.

int ButtonThrower::get_num_parameters  )  const [private]
 

Definition at line 114 of file buttonThrower.cxx.

References _parameters.

EventParameter ButtonThrower::get_parameter int  n  )  const [private]
 

Definition at line 126 of file buttonThrower.cxx.

References _parameters, and n.

string ButtonThrower::get_prefix  )  const [private]
 

Definition at line 89 of file buttonThrower.cxx.

References _prefix.

bool ButtonThrower::get_throw_buttons_active  )  const [private]
 

Definition at line 196 of file buttonThrower.cxx.

References _throw_buttons_active.

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

Reimplemented from DataNode.

Definition at line 108 of file buttonThrower.h.

References DataNode::get_class_type().

bool ButtonThrower::has_prefix  )  const [private]
 

Definition at line 78 of file buttonThrower.cxx.

References _prefix.

bool ButtonThrower::has_throw_button const ButtonHandle button  )  const [private]
 

Definition at line 318 of file buttonThrower.cxx.

References _throw_buttons, and ThrowButtonDef.

bool ButtonThrower::has_throw_button const ModifierButtons mods,
const ButtonHandle button
const [private]
 

Definition at line 283 of file buttonThrower.cxx.

References _throw_buttons, ModifierButtons::matches(), and ThrowButtonDef.

Referenced by do_transmit_data().

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

Reimplemented from DataNode.

Definition at line 103 of file buttonThrower.h.

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

Referenced by ConfigureFn().

ButtonThrower::PT ButtonEventList   )  [private]
 

bool ButtonThrower::remove_throw_button const ModifierButtons mods,
const ButtonHandle button
[private]
 

Definition at line 248 of file buttonThrower.cxx.

References _throw_buttons, ModifierButtons::matches(), and ThrowButtonDef.

void ButtonThrower::set_modifier_buttons const ModifierButtons mods  )  [private]
 

Definition at line 168 of file buttonThrower.cxx.

References _mods.

void ButtonThrower::set_prefix const string &  prefix  )  [private]
 

Definition at line 66 of file buttonThrower.cxx.

References _prefix.

void ButtonThrower::set_throw_buttons_active bool  flag  )  [private]
 

Definition at line 183 of file buttonThrower.cxx.

References _throw_buttons_active.

void ButtonThrower::write ostream &  out,
int  indent_level = 0
const [virtual]
 

Reimplemented from PandaNode.

Definition at line 347 of file buttonThrower.cxx.

References _throw_buttons, indent(), ThrowButtonDef, and PandaNode::write().


Member Data Documentation

PUBLISHED ButtonThrower::__pad0__ [private]
 

Reimplemented from DataNode.

Definition at line 45 of file buttonThrower.h.

int ButtonThrower::_button_events_input [private]
 

Definition at line 93 of file buttonThrower.h.

Referenced by do_transmit_data().

int ButtonThrower::_button_events_output [private]
 

Definition at line 96 of file buttonThrower.h.

Referenced by do_transmit_data().

ModifierButtons ButtonThrower::_mods [private]
 

Definition at line 76 of file buttonThrower.h.

Referenced by do_transmit_data(), get_modifier_buttons(), and set_modifier_buttons().

ParameterList ButtonThrower::_parameters [private]
 

Definition at line 79 of file buttonThrower.h.

Referenced by add_parameter(), do_throw_event(), get_num_parameters(), and get_parameter().

string ButtonThrower::_prefix [private]
 

Definition at line 75 of file buttonThrower.h.

Referenced by do_throw_event(), get_prefix(), has_prefix(), and set_prefix().

ThrowButtons ButtonThrower::_throw_buttons [private]
 

Definition at line 83 of file buttonThrower.h.

Referenced by add_throw_button(), clear_throw_buttons(), has_throw_button(), remove_throw_button(), and write().

bool ButtonThrower::_throw_buttons_active [private]
 

Definition at line 84 of file buttonThrower.h.

Referenced by do_transmit_data(), get_throw_buttons_active(), and set_throw_buttons_active().

TypeHandle ButtonThrower::_type_handle [static, private]
 

Reimplemented from DataNode.

Definition at line 29 of file buttonThrower.cxx.


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