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

PGEntry Class Reference

#include <pgEntry.h>

Inheritance diagram for PGEntry:

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

Public Member Functions

virtual PandaNodemake_copy () const
virtual bool has_cull_callback () const
virtual bool cull_callback (CullTraverser *trav, CullTraverserData &data)
virtual void press (const MouseWatcherParameter &param, bool background)
virtual void keystroke (const MouseWatcherParameter &param, bool background)
virtual void accept (const MouseWatcherParameter &param)
virtual void overflow (const MouseWatcherParameter &param)
virtual void type (const MouseWatcherParameter &param)
virtual void erase (const MouseWatcherParameter &param)
void setup (float width, int num_lines)
INLINE void set_text (const string &text)
INLINE string get_text () const
INLINE void set_cursor_position (int position)
INLINE int get_cursor_position () const
INLINE void set_max_chars (int max_chars)
INLINE int get_max_chars () const
INLINE void set_max_width (float max_width)
INLINE float get_max_width () const
INLINE void set_num_lines (int num_lines)
INLINE int get_num_lines () const
INLINE void set_blink_rate (float blink_rate)
INLINE float get_blink_rate () const
INLINE const NodePathget_cursor_def ()
INLINE void clear_cursor_def ()
INLINE void set_cursor_keys_active (bool flag)
INLINE bool get_cursor_keys_active () const
INLINE void set_obscure_mode (bool flag)
INLINE bool get_obscure_mode () const
void set_text_def (int state, TextNode *node)
TextNodeget_text_def (int state) const
virtual void set_active (bool active)
virtual void set_focus (bool focus)
INLINE string get_accept_event (const ButtonHandle &button) const
INLINE string get_overflow_event () const
INLINE string get_type_event () const
INLINE string get_erase_event () const
INLINE void set_wtext (const wstring &wtext)
INLINE const wstring & get_wtext () const
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

INLINE string get_accept_prefix ()
INLINE string get_overflow_prefix ()
INLINE string get_type_prefix ()
INLINE string get_erase_prefix ()
TypeHandle get_class_type ()
void init_type ()

Public Attributes

PUBLISHED __pad1__: enum State { S_focus = 0
PUBLISHED S_no_focus
PUBLISHED S_inactive

Protected Member Functions

 PGEntry (const PGEntry &copy)

Private Types

typedef pvector< PT(TextNodeTextDefs )
typedef pvector< WWLineWWLines

Private Member Functions

virtual ~PGEntry ()
const wstring & get_display_wtext ()
void slot_text_def (int state)
void update_text ()
void update_cursor ()
void show_hide_cursor (bool visible)
void update_state ()

Private Attributes

PUBLISHED __pad0__: PGEntry(const string &name)
wstring _wtext
wstring _obscured_wtext
int _cursor_position
bool _cursor_stale
bool _cursor_visible
int _max_chars
float _max_width
int _num_lines
TextDefs _text_defs
NodePath _text_render_root
NodePath _current_text
TextNode_last_text_def
bool _text_geom_stale
WWLines _ww_lines
NodePath _cursor_def
double _blink_start
double _blink_rate
bool _cursor_keys_active
bool _obscure_mode

Static Private Attributes

TypeHandle _type_handle

Member Typedef Documentation

typedef pvector< PT(TextNode) PGEntry::TextDefs) [private]
 

Definition at line 139 of file pgEntry.h.

typedef pvector<WWLine> PGEntry::WWLines [private]
 

Definition at line 159 of file pgEntry.h.


Constructor & Destructor Documentation

PGEntry::~PGEntry  )  [private, virtual]
 

Definition at line 71 of file pgEntry.cxx.

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

Definition at line 80 of file pgEntry.cxx.

References _cursor_stale, _last_text_def, _text_geom_stale, and NULL.

Referenced by make_copy().


Member Function Documentation

void PGEntry::accept const MouseWatcherParameter param  )  [virtual]
 

Definition at line 466 of file pgEntry.cxx.

References get_accept_event(), param, PGItem::play_sound(), set_focus(), and throw_event().

Referenced by press().

INLINE void PGEntry::clear_cursor_def  ) 
 

Referenced by setup().

bool PGEntry::cull_callback CullTraverser trav,
CullTraverserData data
[virtual]
 

Reimplemented from PGItem.

Definition at line 145 of file pgEntry.cxx.

References _text_render_root, PGItem::cull_callback(), data, NodePath::node(), CullTraverser::traverse(), update_cursor(), and update_text().

void PGEntry::erase const MouseWatcherParameter param  )  [virtual]
 

Definition at line 511 of file pgEntry.cxx.

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

Referenced by press().

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

Reimplemented from PGItem.

Definition at line 185 of file pgEntry.h.

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

INLINE string PGEntry::get_accept_event const ButtonHandle button  )  const
 

Referenced by accept().

INLINE string PGEntry::get_accept_prefix  )  [static]
 

INLINE float PGEntry::get_blink_rate  )  const
 

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

Reimplemented from PGItem.

Definition at line 174 of file pgEntry.h.

INLINE const NodePath& PGEntry::get_cursor_def  ) 
 

Referenced by setup().

INLINE bool PGEntry::get_cursor_keys_active  )  const
 

INLINE int PGEntry::get_cursor_position  )  const
 

const wstring & PGEntry::get_display_wtext  )  [private]
 

Definition at line 686 of file pgEntry.cxx.

References _obscured_wtext, and _wtext.

Referenced by keystroke(), press(), and update_text().

INLINE string PGEntry::get_erase_event  )  const
 

Referenced by erase().

INLINE string PGEntry::get_erase_prefix  )  [static]
 

INLINE int PGEntry::get_max_chars  )  const
 

Referenced by keystroke(), and press().

INLINE float PGEntry::get_max_width  )  const
 

INLINE int PGEntry::get_num_lines  )  const
 

INLINE bool PGEntry::get_obscure_mode  )  const
 

INLINE string PGEntry::get_overflow_event  )  const
 

Referenced by overflow().

INLINE string PGEntry::get_overflow_prefix  )  [static]
 

INLINE string PGEntry::get_text  )  const
 

TextNode * PGEntry::get_text_def int  state  )  const
 

Definition at line 641 of file pgEntry.cxx.

References _text_defs, PGItem::get_text_node(), and NULL.

Referenced by keystroke(), press(), setup(), update_cursor(), and update_text().

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

Reimplemented from PGItem.

Definition at line 182 of file pgEntry.h.

References PGItem::get_class_type().

INLINE string PGEntry::get_type_event  )  const
 

Referenced by type().

INLINE string PGEntry::get_type_prefix  )  [static]
 

INLINE const wstring& PGEntry::get_wtext  )  const
 

bool PGEntry::has_cull_callback  )  const [virtual]
 

Reimplemented from PGItem.

Definition at line 121 of file pgEntry.cxx.

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

Reimplemented from PGItem.

Definition at line 177 of file pgEntry.h.

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

Referenced by init_libpgui().

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

Reimplemented from PGItem.

Definition at line 351 of file pgEntry.cxx.

References _cursor_position, _cursor_stale, _max_width, _num_lines, _obscured_wtext, _text_geom_stale, _wtext, TextNode::calc_width(), PGItem::get_active(), get_display_wtext(), get_max_chars(), get_text_def(), PGItem::keystroke(), overflow(), p, param, type(), and TextNode::wordwrap_to().

PandaNode * PGEntry::make_copy  )  const [virtual]
 

Reimplemented from PGItem.

Definition at line 107 of file pgEntry.cxx.

References PGEntry().

void PGEntry::overflow const MouseWatcherParameter param  )  [virtual]
 

Definition at line 483 of file pgEntry.cxx.

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

Referenced by keystroke(), and press().

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

Reimplemented from PGItem.

Definition at line 166 of file pgEntry.cxx.

References _blink_start, _cursor_position, _cursor_stale, _max_width, _num_lines, _obscure_mode, _obscured_wtext, _text_geom_stale, _wtext, accept(), KeyboardButton::backspace(), TextNode::calc_width(), KeyboardButton::del(), KeyboardButton::end(), KeyboardButton::enter(), erase(), PGItem::get_active(), ButtonHandle::get_ascii_equivalent(), PGItem::get_background_focus(), get_display_wtext(), PGItem::get_focus(), ClockObject::get_frame_time(), ClockObject::get_global_clock(), get_max_chars(), get_text_def(), ButtonHandle::has_ascii_equivalent(), KeyboardButton::home(), KeyboardButton::left(), MouseButton::one(), overflow(), p, param, PGItem::press(), KeyboardButton::right(), set_focus(), MouseButton::three(), MouseButton::two(), type(), use_keystrokes, and TextNode::wordwrap_to().

void PGEntry::set_active bool  active  )  [virtual]
 

Reimplemented from PGItem.

Definition at line 660 of file pgEntry.cxx.

References PGItem::set_active(), and update_state().

INLINE void PGEntry::set_blink_rate float  blink_rate  ) 
 

INLINE void PGEntry::set_cursor_keys_active bool  flag  ) 
 

INLINE void PGEntry::set_cursor_position int  position  ) 
 

void PGEntry::set_focus bool  focus  )  [virtual]
 

Reimplemented from PGItem.

Definition at line 672 of file pgEntry.cxx.

References _blink_start, ClockObject::get_frame_time(), ClockObject::get_global_clock(), PGItem::set_focus(), and update_state().

Referenced by accept(), and press().

INLINE void PGEntry::set_max_chars int  max_chars  ) 
 

Referenced by setup().

INLINE void PGEntry::set_max_width float  max_width  ) 
 

Referenced by setup().

INLINE void PGEntry::set_num_lines int  num_lines  ) 
 

Referenced by setup().

INLINE void PGEntry::set_obscure_mode bool  flag  ) 
 

INLINE void PGEntry::set_text const string &  text  ) 
 

Referenced by setup().

void PGEntry::set_text_def int  state,
TextNode node
 

Definition at line 622 of file pgEntry.cxx.

References _text_defs, NULL, and slot_text_def().

INLINE void PGEntry::set_wtext const wstring &  wtext  ) 
 

void PGEntry::setup float  width,
int  num_lines
 

Definition at line 528 of file pgEntry.cxx.

References _cursor_position, TextNode::A_center, TextNode::A_left, TextNode::A_right, NodePath::attach_new_node(), clear_cursor_def(), LineSegs::create(), LineSegs::draw_to(), TextNode::get_align(), get_cursor_def(), TextNode::get_line_height(), get_text_def(), TextNode::get_transform(), PandaNode::ls(), LineSegs::move_to(), S_inactive, S_no_focus, LineSegs::set_color(), PGFrameStyle::set_color(), PGItem::set_frame(), PGItem::set_frame_style(), set_max_chars(), set_max_width(), set_num_lines(), set_text(), PGFrameStyle::set_type(), PGFrameStyle::set_width(), PGFrameStyle::T_bevel_in, and width.

void PGEntry::show_hide_cursor bool  visible  )  [private]
 

Definition at line 850 of file pgEntry.cxx.

References _cursor_def, _cursor_visible, NodePath::hide(), and NodePath::show().

Referenced by update_cursor().

void PGEntry::slot_text_def int  state  )  [private]
 

Definition at line 713 of file pgEntry.cxx.

References _text_defs, and NULL.

Referenced by set_text_def().

void PGEntry::type const MouseWatcherParameter param  )  [virtual]
 

Definition at line 497 of file pgEntry.cxx.

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

Referenced by keystroke(), and press().

void PGEntry::update_cursor  )  [private]
 

Definition at line 800 of file pgEntry.cxx.

References _blink_rate, _blink_start, _cursor_def, _cursor_position, _cursor_stale, _last_text_def, _wtext, _ww_lines, TextNode::calc_width(), column, PGItem::get_focus(), ClockObject::get_frame_time(), ClockObject::get_global_clock(), TextNode::get_line_height(), PGItem::get_state(), get_text_def(), NULL, row, NodePath::set_pos(), show_hide_cursor(), update_text(), and width.

Referenced by cull_callback().

void PGEntry::update_state  )  [private]
 

Definition at line 868 of file pgEntry.cxx.

References PGItem::get_active(), PGItem::get_focus(), S_inactive, S_no_focus, and PGItem::set_state().

Referenced by set_active(), and set_focus().

void PGEntry::update_text  )  [private]
 

Definition at line 726 of file pgEntry.cxx.

References _current_text, _cursor_stale, _last_text_def, PGEntry::WWLine::_left, _max_width, _num_lines, PGEntry::WWLine::_str, _text_geom_stale, _text_render_root, _ww_lines, TextNode::A_left, NodePath::attach_new_node(), TextNode::get_align(), get_display_wtext(), TextNode::get_left(), PGItem::get_state(), get_text_def(), NodePath::is_empty(), NULL, p, q, NodePath::remove_node(), TextNode::set_wtext(), and TextNode::wordwrap_to().

Referenced by cull_callback(), and update_cursor().


Member Data Documentation

PUBLISHED PGEntry::__pad0__ [private]
 

Reimplemented from PGItem.

Definition at line 47 of file pgEntry.h.

PUBLISHED PGEntry::__pad1__
 

Reimplemented from PGItem.

Definition at line 68 of file pgEntry.h.

double PGEntry::_blink_rate [private]
 

Definition at line 168 of file pgEntry.h.

Referenced by update_cursor().

double PGEntry::_blink_start [private]
 

Definition at line 167 of file pgEntry.h.

Referenced by press(), set_focus(), and update_cursor().

NodePath PGEntry::_current_text [private]
 

Definition at line 147 of file pgEntry.h.

Referenced by update_text().

NodePath PGEntry::_cursor_def [private]
 

Definition at line 165 of file pgEntry.h.

Referenced by show_hide_cursor(), and update_cursor().

bool PGEntry::_cursor_keys_active [private]
 

Definition at line 170 of file pgEntry.h.

int PGEntry::_cursor_position [private]
 

Definition at line 131 of file pgEntry.h.

Referenced by keystroke(), press(), setup(), and update_cursor().

bool PGEntry::_cursor_stale [private]
 

Definition at line 132 of file pgEntry.h.

Referenced by keystroke(), PGEntry(), press(), update_cursor(), and update_text().

bool PGEntry::_cursor_visible [private]
 

Definition at line 133 of file pgEntry.h.

Referenced by show_hide_cursor().

TextNode* PGEntry::_last_text_def [private]
 

Definition at line 148 of file pgEntry.h.

Referenced by PGEntry(), update_cursor(), and update_text().

int PGEntry::_max_chars [private]
 

Definition at line 135 of file pgEntry.h.

float PGEntry::_max_width [private]
 

Definition at line 136 of file pgEntry.h.

Referenced by keystroke(), press(), and update_text().

int PGEntry::_num_lines [private]
 

Definition at line 137 of file pgEntry.h.

Referenced by keystroke(), press(), and update_text().

bool PGEntry::_obscure_mode [private]
 

Definition at line 171 of file pgEntry.h.

Referenced by press().

wstring PGEntry::_obscured_wtext [private]
 

Definition at line 130 of file pgEntry.h.

Referenced by get_display_wtext(), keystroke(), and press().

TextDefs PGEntry::_text_defs [private]
 

Definition at line 140 of file pgEntry.h.

Referenced by get_text_def(), set_text_def(), and slot_text_def().

bool PGEntry::_text_geom_stale [private]
 

Definition at line 149 of file pgEntry.h.

Referenced by keystroke(), PGEntry(), press(), and update_text().

NodePath PGEntry::_text_render_root [private]
 

Definition at line 143 of file pgEntry.h.

Referenced by cull_callback(), and update_text().

TypeHandle PGEntry::_type_handle [static, private]
 

Reimplemented from PGItem.

Definition at line 33 of file pgEntry.cxx.

wstring PGEntry::_wtext [private]
 

Definition at line 129 of file pgEntry.h.

Referenced by get_display_wtext(), keystroke(), press(), and update_cursor().

WWLines PGEntry::_ww_lines [private]
 

Definition at line 160 of file pgEntry.h.

Referenced by update_cursor(), and update_text().

PUBLISHED PGEntry::S_inactive
 

Definition at line 68 of file pgEntry.h.

Referenced by setup(), and update_state().

PUBLISHED PGEntry::S_no_focus
 

Definition at line 68 of file pgEntry.h.

Referenced by setup(), and update_state().


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