40 explicit PGEntry(
const std::string &name);
48 virtual void xform(
const LMatrix4 &mat);
60 virtual void cursormove();
69 void setup(PN_stdfloat width,
int num_lines);
70 void setup_minimal(PN_stdfloat width,
int num_lines);
72 INLINE
bool set_text(
const std::string &text);
73 INLINE std::string get_plain_text()
const;
74 INLINE std::string get_text()
const;
76 INLINE
int get_num_characters()
const;
77 INLINE
wchar_t get_character(
int n)
const;
81 INLINE
void set_cursor_position(
int position);
82 INLINE
int get_cursor_position()
const;
84 INLINE PN_stdfloat get_cursor_X()
const;
85 INLINE PN_stdfloat get_cursor_Y()
const;
87 INLINE
void set_max_chars(
int max_chars);
88 INLINE
int get_max_chars()
const;
89 INLINE
void set_max_width(PN_stdfloat max_width);
90 INLINE PN_stdfloat get_max_width()
const;
91 INLINE
void set_num_lines(
int num_lines);
92 INLINE
int get_num_lines()
const;
94 INLINE
void set_blink_rate(PN_stdfloat blink_rate);
95 INLINE PN_stdfloat get_blink_rate()
const;
98 INLINE
void clear_cursor_def();
100 INLINE
void set_cursor_keys_active(
bool flag);
101 INLINE
bool get_cursor_keys_active()
const;
103 INLINE
void set_obscure_mode(
bool flag);
104 INLINE
bool get_obscure_mode()
const;
106 INLINE
void set_overflow_mode(
bool flag);
107 INLINE
bool get_overflow_mode()
const;
109 INLINE
void set_candidate_active(
const std::string &candidate_active);
110 INLINE
const std::string &get_candidate_active()
const;
112 INLINE
void set_candidate_inactive(
const std::string &candidate_inactive);
113 INLINE
const std::string &get_candidate_inactive()
const;
115 void set_text_def(
int state,
TextNode *node);
116 TextNode *get_text_def(
int state)
const;
121 INLINE
static std::string get_accept_prefix();
122 INLINE
static std::string get_accept_failed_prefix();
123 INLINE
static std::string get_overflow_prefix();
124 INLINE
static std::string get_type_prefix();
125 INLINE
static std::string get_erase_prefix();
126 INLINE
static std::string get_cursormove_prefix();
128 INLINE std::string get_accept_event(
const ButtonHandle &button)
const;
129 INLINE std::string get_accept_failed_event(
const ButtonHandle &button)
const;
130 INLINE std::string get_overflow_event()
const;
131 INLINE std::string get_type_event()
const;
132 INLINE std::string get_erase_event()
const;
133 INLINE std::string get_cursormove_event()
const;
136 INLINE
bool set_wtext(
const std::wstring &wtext);
137 INLINE std::wstring get_plain_wtext()
const;
138 INLINE std::wstring get_wtext()
const;
139 INLINE
void set_accept_enabled(
bool enabled);
140 bool is_wtext()
const;
144 void slot_text_def(
int state);
146 void update_cursor();
147 void show_hide_cursor(
bool visible);
152 int _cursor_position;
154 bool _cursor_visible;
156 std::wstring _candidate_wtext;
157 size_t _candidate_highlight_start;
158 size_t _candidate_highlight_end;
159 size_t _candidate_cursor_pos;
162 PN_stdfloat _max_width;
165 bool _accept_enabled;
167 std::string _candidate_active;
168 std::string _candidate_inactive;
180 bool _text_geom_stale;
181 bool _text_geom_flattened;
192 bool _cursor_keys_active;
196 PN_stdfloat _current_padding;
202 static void init_type() {
205 PGItem::get_class_type());
208 return get_class_type();
210 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
This collects together the pieces of data that are accumulated for each node while walking the scene ...
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling,...
This is sent along as a parameter to most events generated for a region to indicate the mouse and but...
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
This is a particular kind of PGItem that handles simple one-line or short multi-line text entries,...
This is the base class for all the various kinds of gui widget objects.
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...
virtual void keystroke(const MouseWatcherParameter ¶m, bool background)
This is a callback hook function, called whenever the user presses a key.
virtual void set_focus(bool focus)
Sets whether the PGItem currently has keyboard focus.
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 set_active(bool active)
Sets whether the PGItem is active for mouse watching.
A basic node of the scene graph or data graph.
This class is not normally used directly by user code, but is used by the TextNode to lay out a block...
This defines a special model that has been constructed for the purposes of embedding an arbitrary gra...
The primary interface to this module.
This defines the set of visual properties that may be assigned to the individual characters of the te...
TypeHandle is the identifier used to differentiate C++ class types.
This is our own Panda specialization on the default STL vector.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.