39 explicit PGEntry(
const std::string &name);
47 virtual void xform(
const LMatrix4 &mat);
59 virtual void cursormove();
68 void setup(PN_stdfloat width,
int num_lines);
69 void setup_minimal(PN_stdfloat width,
int num_lines);
71 INLINE
bool set_text(
const std::string &text);
72 INLINE std::string get_plain_text()
const;
73 INLINE std::string get_text()
const;
75 INLINE
int get_num_characters()
const;
76 INLINE
wchar_t get_character(
int n)
const;
80 INLINE
void set_cursor_position(
int position);
81 INLINE
int get_cursor_position()
const;
83 INLINE PN_stdfloat get_cursor_X()
const;
84 INLINE PN_stdfloat get_cursor_Y()
const;
86 INLINE
void set_max_chars(
int max_chars);
87 INLINE
int get_max_chars()
const;
88 INLINE
void set_max_width(PN_stdfloat max_width);
89 INLINE PN_stdfloat get_max_width()
const;
90 INLINE
void set_num_lines(
int num_lines);
91 INLINE
int get_num_lines()
const;
93 INLINE
void set_blink_rate(PN_stdfloat blink_rate);
94 INLINE PN_stdfloat get_blink_rate()
const;
97 INLINE
void clear_cursor_def();
99 INLINE
void set_cursor_keys_active(
bool flag);
100 INLINE
bool get_cursor_keys_active()
const;
102 INLINE
void set_obscure_mode(
bool flag);
103 INLINE
bool get_obscure_mode()
const;
105 INLINE
void set_overflow_mode(
bool flag);
106 INLINE
bool get_overflow_mode()
const;
108 INLINE
void set_candidate_active(
const std::string &candidate_active);
109 INLINE
const std::string &get_candidate_active()
const;
111 INLINE
void set_candidate_inactive(
const std::string &candidate_inactive);
112 INLINE
const std::string &get_candidate_inactive()
const;
114 void set_text_def(
int state,
TextNode *node);
115 TextNode *get_text_def(
int state)
const;
120 INLINE
static std::string get_accept_prefix();
121 INLINE
static std::string get_accept_failed_prefix();
122 INLINE
static std::string get_overflow_prefix();
123 INLINE
static std::string get_type_prefix();
124 INLINE
static std::string get_erase_prefix();
125 INLINE
static std::string get_cursormove_prefix();
127 INLINE std::string get_accept_event(
const ButtonHandle &button)
const;
128 INLINE std::string get_accept_failed_event(
const ButtonHandle &button)
const;
129 INLINE std::string get_overflow_event()
const;
130 INLINE std::string get_type_event()
const;
131 INLINE std::string get_erase_event()
const;
132 INLINE std::string get_cursormove_event()
const;
135 INLINE
bool set_wtext(
const std::wstring &wtext);
136 INLINE std::wstring get_plain_wtext()
const;
137 INLINE std::wstring get_wtext()
const;
138 INLINE
void set_accept_enabled(
bool enabled);
139 bool is_wtext()
const;
143 void slot_text_def(
int state);
145 void update_cursor();
146 void show_hide_cursor(
bool visible);
151 int _cursor_position;
153 bool _cursor_visible;
155 std::wstring _candidate_wtext;
156 size_t _candidate_highlight_start;
157 size_t _candidate_highlight_end;
158 size_t _candidate_cursor_pos;
161 PN_stdfloat _max_width;
164 bool _accept_enabled;
166 std::string _candidate_active;
167 std::string _candidate_inactive;
179 bool _text_geom_stale;
180 bool _text_geom_flattened;
191 bool _cursor_keys_active;
195 PN_stdfloat _current_padding;
201 static void init_type() {
204 PGItem::get_class_type());
207 return get_class_type();
209 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
A basic node of the scene graph or data graph.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the base class for all the various kinds of gui widget objects.
This is a particular kind of PGItem that handles simple one-line or short multi-line text entries,...
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This collects together the pieces of data that are accumulated for each node while walking the scene ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is our own Panda specialization on the default STL vector.
virtual void set_focus(bool focus)
Sets whether the PGItem currently has keyboard focus.
This class is not normally used directly by user code, but is used by the TextNode to lay out a block...
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.
The primary interface to this module.
This defines the set of visual properties that may be assigned to the individual characters of the te...
virtual void candidate(const MouseWatcherParameter ¶m, bool background)
This is a callback hook function, called whenever the user highlights an option in the IME window.
virtual void keystroke(const MouseWatcherParameter ¶m, bool background)
This is a callback hook function, called whenever the user presses a key.
TypeHandle is the identifier used to differentiate C++ class types.
This is sent along as a parameter to most events generated for a region to indicate the mouse and but...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling,...
This defines a special model that has been constructed for the purposes of embedding an arbitrary gra...
virtual void set_active(bool active)
Sets whether the PGItem is active for mouse watching.
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...