Panda3D
Loading...
Searching...
No Matches
pgEntry.I
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file pgEntry.I
10 * @author drose
11 * @date 2002-03-13
12 */
13
14/**
15 * Changes the text currently displayed within the entry. This uses the
16 * Unicode encoding currently specified for the "focus" TextNode; therefore,
17 * the TextNode must exist before calling set_text().
18 *
19 * The return value is true if all the text is accepted, or false if some was
20 * truncated (see set_max_width(), etc.).
21 */
22INLINE bool PGEntry::
23set_text(const std::string &text) {
24 LightReMutexHolder holder(_lock);
25 TextNode *text_node = get_text_def(S_focus);
26 nassertr(text_node != nullptr, false);
27 return set_wtext(text_node->decode_text(text));
28}
29
30/**
31 * Returns the text currently displayed within the entry, without any embedded
32 * properties characters.
33 *
34 * This uses the Unicode encoding currently specified for the "focus"
35 * TextNode; therefore, the TextNode must exist before calling get_text().
36 */
37INLINE std::string PGEntry::
38get_plain_text() const {
39 LightReMutexHolder holder(_lock);
40 TextNode *text_node = get_text_def(S_focus);
41 nassertr(text_node != nullptr, std::string());
42 return text_node->encode_wtext(get_plain_wtext());
43}
44
45/**
46 * Returns the text currently displayed within the entry. This uses the
47 * Unicode encoding currently specified for the "focus" TextNode; therefore,
48 * the TextNode must exist before calling get_text().
49 */
50INLINE std::string PGEntry::
51get_text() const {
52 LightReMutexHolder holder(_lock);
53 TextNode *text_node = get_text_def(S_focus);
54 nassertr(text_node != nullptr, std::string());
55 return text_node->encode_wtext(get_wtext());
56}
57
58/**
59 * Returns the number of characters of text in the entry. This is the actual
60 * number of visible characters, not counting implicit newlines due to
61 * wordwrapping, or formatted characters for text properties changes. If
62 * there is an embedded TextGraphic object, it counts as one character.
63 *
64 * This is also the length of the string returned by get_plain_text().
65 */
66INLINE int PGEntry::
67get_num_characters() const {
68 LightReMutexHolder holder(_lock);
69 return _text.get_num_characters();
70}
71
72/**
73 * Returns the character at the indicated position in the entry. If the
74 * object at this position is a graphic object instead of a character, returns
75 * 0.
76 */
77INLINE wchar_t PGEntry::
78get_character(int n) const {
79 LightReMutexHolder holder(_lock);
80 return _text.get_character(n);
81}
82
83/**
84 * Returns the graphic object at the indicated position in the pre-wordwrapped
85 * string. If the object at this position is a character instead of a graphic
86 * object, returns NULL.
87 */
89get_graphic(int n) const {
90 LightReMutexHolder holder(_lock);
91 return _text.get_graphic(n);
92}
93
94/**
95 * Returns the TextProperties in effect for the object at the indicated
96 * position in the pre-wordwrapped string.
97 */
99get_properties(int n) const {
100 LightReMutexHolder holder(_lock);
101 return _text.get_properties(n);
102}
103
104/**
105 * Sets the current position of the cursor. This is the position within the
106 * text at which the next letter typed by the user will be inserted; normally
107 * it is the same as the length of the text.
108 */
109INLINE void PGEntry::
110set_cursor_position(int position) {
111 LightReMutexHolder holder(_lock);
112 if (_cursor_position != position) {
113 _cursor_position = position;
114 _cursor_stale = true;
116
117#ifdef THREADED_PIPELINE
118 if (Pipeline::get_render_pipeline()->get_num_stages() > 1) {
119 update_cursor();
120 }
121#endif
122 }
123}
124
125/**
126 * Returns the current position of the cursor.
127 */
128INLINE int PGEntry::
129get_cursor_position() const {
130 LightReMutexHolder holder(_lock);
131 return _cursor_position;
132}
133
134/**
135 * Returns the node position x of the cursor
136 */
137INLINE PN_stdfloat PGEntry::
138get_cursor_X() const {
139 LightReMutexHolder holder(_lock);
140 return _cursor_def.get_x();
141}
142
143/**
144 * Returns the node position y of the cursor
145 */
146INLINE PN_stdfloat PGEntry::
147get_cursor_Y() const {
148 LightReMutexHolder holder(_lock);
149 return _cursor_def.get_z();
150}
151
152/**
153 * Sets the maximum number of characters that may be typed into the entry.
154 * This is a limit on the number of characters, as opposed to the width of the
155 * entry; see also set_max_width().
156 *
157 * If this is 0, there is no limit.
158 */
159INLINE void PGEntry::
160set_max_chars(int max_chars) {
161 LightReMutexHolder holder(_lock);
162 _max_chars = max_chars;
163}
164
165/**
166 * Returns the current maximum number of characters that may be typed into the
167 * entry, or 0 if there is no limit. See set_max_chars().
168 */
169INLINE int PGEntry::
170get_max_chars() const {
171 LightReMutexHolder holder(_lock);
172 return _max_chars;
173}
174
175/**
176 * Sets the maximum width of all characters that may be typed into the entry.
177 * This is a limit on the width of the formatted text, not a fixed limit on
178 * the number of characters; also set_max_chars().
179 *
180 * If this is 0, there is no limit.
181 *
182 * If _num_lines is more than 1, rather than being a fixed width on the whole
183 * entry, this becomes instead the wordwrap width (and the width limit on the
184 * entry is essentially _max_width * _num_lines).
185 */
186INLINE void PGEntry::
187set_max_width(PN_stdfloat max_width) {
188 LightReMutexHolder holder(_lock);
189 _max_width = max_width;
190 _text_geom_stale = true;
191
192#ifdef THREADED_PIPELINE
193 if (Pipeline::get_render_pipeline()->get_num_stages() > 1) {
194 update_text();
195 update_cursor();
196 }
197#endif
198}
199
200/**
201 * Returns the current maximum width of the characters that may be typed into
202 * the entry, or 0 if there is no limit. See set_max_width().
203 */
204INLINE PN_stdfloat PGEntry::
205get_max_width() const {
206 LightReMutexHolder holder(_lock);
207 return _max_width;
208}
209
210/**
211 * Sets the number of lines of text the PGEntry will use. This only has
212 * meaning if _max_width is not 0; _max_width indicates the wordwrap width of
213 * each line.
214 */
215INLINE void PGEntry::
216set_num_lines(int num_lines) {
217 LightReMutexHolder holder(_lock);
218 nassertv(num_lines >= 1);
219 if (_num_lines != num_lines) {
220 _num_lines = num_lines;
221 _text_geom_stale = true;
222 update_text();
223
224#ifdef THREADED_PIPELINE
225 if (Pipeline::get_render_pipeline()->get_num_stages() > 1) {
226 update_cursor();
227 }
228#endif
229 }
230}
231
232/**
233 * Returns the number of lines of text the PGEntry will use, if _max_width is
234 * not 0. See set_num_lines().
235 */
236INLINE int PGEntry::
237get_num_lines() const {
238 LightReMutexHolder holder(_lock);
239 return _num_lines;
240}
241
242/**
243 * Sets the number of times per second the cursor will blink while the entry
244 * has keyboard focus.
245 *
246 * If this is 0, the cursor does not blink, but is held steady.
247 */
248INLINE void PGEntry::
249set_blink_rate(PN_stdfloat blink_rate) {
250 LightReMutexHolder holder(_lock);
251 _blink_rate = blink_rate;
252}
253
254/**
255 * Returns the number of times per second the cursor will blink, or 0 if the
256 * cursor is not to blink.
257 */
258INLINE PN_stdfloat PGEntry::
259get_blink_rate() const {
260 LightReMutexHolder holder(_lock);
261 return _blink_rate;
262}
263
264/**
265 * Returns the Node that will be rendered to represent the cursor. You can
266 * attach suitable cursor geometry to this node.
267 */
270 LightReMutexHolder holder(_lock);
271 return _cursor_def;
272}
273
274/**
275 * Removes all the children from the cursor_def node, in preparation for
276 * adding a new definition.
277 */
278INLINE void PGEntry::
280 LightReMutexHolder holder(_lock);
281 _cursor_def.remove_node();
282 _cursor_def = _cursor_scale.attach_new_node("cursor");
283}
284
285/**
286 * Sets whether the arrow keys (and home/end) control movement of the cursor.
287 * If true, they are active; if false, they are ignored.
288 */
289INLINE void PGEntry::
290set_cursor_keys_active(bool flag) {
291 LightReMutexHolder holder(_lock);
292 _cursor_keys_active = flag;
293}
294
295/**
296 * Returns whether the arrow keys are currently set to control movement of the
297 * cursor; see set_cursor_keys_active().
298 */
299INLINE bool PGEntry::
301 LightReMutexHolder holder(_lock);
302 return _cursor_keys_active;
303}
304
305/**
306 * Specifies whether obscure mode should be enabled. In obscure mode, a
307 * string of asterisks is displayed instead of the literal text, e.g. for
308 * entering passwords.
309 *
310 * In obscure mode, the width of the text is computed based on the width of
311 * the string of asterisks, not on the width of the actual text. This has
312 * implications on the maximum length of text that may be entered if max_width
313 * is in effect.
314 */
315INLINE void PGEntry::
316set_obscure_mode(bool flag) {
317 LightReMutexHolder holder(_lock);
318 if (_obscure_mode != flag) {
319 _obscure_mode = flag;
320 _text_geom_stale = true;
321
322#ifdef THREADED_PIPELINE
323 if (Pipeline::get_render_pipeline()->get_num_stages() > 1) {
324 update_text();
325 update_cursor();
326 }
327#endif
328 }
329}
330
331/**
332 * Specifies whether obscure mode is enabled. See set_obscure_mode().
333 */
334INLINE bool PGEntry::
335get_obscure_mode() const {
336 LightReMutexHolder holder(_lock);
337 return _obscure_mode;
338}
339
340/**
341 * Specifies whether overflow mode should be enabled. In overflow mode, text
342 * can overflow the boundaries of the Entry element horizontally.
343 *
344 * Overflow mode only works when the number of lines is 1.
345 */
346INLINE void PGEntry::
347set_overflow_mode(bool flag) {
348 LightReMutexHolder holder(_lock);
349 if (_overflow_mode != flag) {
350 _overflow_mode = flag;
351 _text_geom_stale = true;
352 _cursor_stale = true;
353
354#ifdef THREADED_PIPELINE
355 if (Pipeline::get_render_pipeline()->get_num_stages() > 1) {
356 update_text();
357 update_cursor();
358 }
359#endif
360 }
361}
362
363/**
364 * Specifies whether overflow mode is enabled. See set_overflow_mode().
365 */
366INLINE bool PGEntry::
367get_overflow_mode() const {
368 LightReMutexHolder holder(_lock);
369 return _overflow_mode;
370}
371
372/**
373 * Specifies the name of the TextProperties structure added to the
374 * TextPropertiesManager that will be used to render candidate strings from
375 * the IME, used for typing characters in east Asian languages. Each
376 * candidate string represents one possible way to interpret the sequence of
377 * keys the user has just entered; it should not be considered typed yet, but
378 * it is important for the user to be able to see what he is considering
379 * entering.
380 *
381 * This particular method sets the properties for the subset of the current
382 * candidate string that the user can actively scroll through.
383 */
384INLINE void PGEntry::
385set_candidate_active(const std::string &candidate_active) {
386 LightReMutexHolder holder(_lock);
387 _candidate_active = candidate_active;
388}
389
390/**
391 * See set_candidate_active().
392 */
393INLINE const std::string &PGEntry::
394get_candidate_active() const {
395 LightReMutexHolder holder(_lock);
396 return _candidate_active;
397}
398
399/**
400 * Specifies the name of the TextProperties structure added to the
401 * TextPropertiesManager that will be used to render candidate strings from
402 * the IME, used for typing characters in east Asian languages. Each
403 * candidate string represents one possible way to interpret the sequence of
404 * keys the user has just entered; it should not be considered typed yet, but
405 * it is important for the user to be able to see what he is considering
406 * entering.
407 *
408 * This particular method sets the properties for the subset of the current
409 * candidate string that the user is not actively scrolling through.
410 */
411INLINE void PGEntry::
412set_candidate_inactive(const std::string &candidate_inactive) {
413 LightReMutexHolder holder(_lock);
414 _candidate_inactive = candidate_inactive;
415}
416
417/**
418 * See set_candidate_inactive().
419 */
420INLINE const std::string &PGEntry::
422 LightReMutexHolder holder(_lock);
423 return _candidate_inactive;
424}
425
426/**
427 * Returns the prefix that is used to define the accept event for all
428 * PGEntries. The accept event is the concatenation of this string followed
429 * by get_id().
430 */
431INLINE std::string PGEntry::
433 return "accept-";
434}
435
436/**
437 * Returns the prefix that is used to define the accept failed event for all
438 * PGEntries. This event is the concatenation of this string followed by
439 * get_id().
440 */
441INLINE std::string PGEntry::
443 return "acceptfailed-";
444}
445
446/**
447 * Returns the prefix that is used to define the overflow event for all
448 * PGEntries. The overflow event is the concatenation of this string followed
449 * by get_id().
450 */
451INLINE std::string PGEntry::
453 return "overflow-";
454}
455
456/**
457 * Returns the prefix that is used to define the type event for all PGEntries.
458 * The type event is the concatenation of this string followed by get_id().
459 */
460INLINE std::string PGEntry::
462 return "type-";
463}
464
465/**
466 * Returns the prefix that is used to define the erase event for all
467 * PGEntries. The erase event is the concatenation of this string followed by
468 * get_id().
469 */
470INLINE std::string PGEntry::
472 return "erase-";
473}
474
475/**
476 * Returns the prefix that is used to define the cursor event for all
477 * PGEntries. The cursor event is the concatenation of this string followed
478 * by get_id().
479 */
480INLINE std::string PGEntry::
482 return "cursormove-";
483}
484
485/**
486 * Returns the event name that will be thrown when the entry is accepted
487 * normally.
488 */
489INLINE std::string PGEntry::
490get_accept_event(const ButtonHandle &button) const {
491 return get_accept_prefix() + button.get_name() + "-" + get_id();
492}
493
494/**
495 * Returns the event name that will be thrown when the entry cannot accept an
496 * input
497 */
498INLINE std::string PGEntry::
499get_accept_failed_event(const ButtonHandle &button) const {
500 return get_accept_failed_prefix() + button.get_name() + "-" + get_id();
501}
502
503/**
504 * Returns the event name that will be thrown when too much text is attempted
505 * to be entered into the PGEntry, exceeding either the limit set via
506 * set_max_chars() or via set_max_width().
507 */
508INLINE std::string PGEntry::
509get_overflow_event() const {
510 return get_overflow_prefix() + get_id();
511}
512
513/**
514 * Returns the event name that will be thrown whenever the user extends the
515 * text by typing.
516 */
517INLINE std::string PGEntry::
518get_type_event() const {
519 return get_type_prefix() + get_id();
520}
521
522/**
523 * Returns the event name that will be thrown whenever the user erases
524 * characters in the text.
525 */
526INLINE std::string PGEntry::
527get_erase_event() const {
528 return get_erase_prefix() + get_id();
529}
530
531/**
532 * Returns the event name that will be thrown whenever the cursor moves
533 */
534INLINE std::string PGEntry::
535get_cursormove_event() const {
536 return get_cursormove_prefix() + get_id();
537}
538
539/**
540 * Changes the text currently displayed within the entry.
541 *
542 * The return value is true if all the text is accepted, or false if some was
543 * truncated (see set_max_width(), etc.).
544 */
545INLINE bool PGEntry::
546set_wtext(const std::wstring &wtext) {
547 LightReMutexHolder holder(_lock);
548 bool ret = _text.set_wtext(wtext);
549 if (_obscure_mode) {
550 ret = _obscure_text.set_wtext(std::wstring(_text.get_num_characters(), '*'));
551 }
552 _text_geom_stale = true;
553#ifdef THREADED_PIPELINE
554 if (Pipeline::get_render_pipeline()->get_num_stages() > 1) {
555 update_text();
556 }
557#endif
558 set_cursor_position((std::min)(_cursor_position, _text.get_num_characters()));
559 return ret;
560}
561
562/**
563 * Returns the text currently displayed within the entry, without any embedded
564 * properties characters.
565 */
566INLINE std::wstring PGEntry::
567get_plain_wtext() const {
568 LightReMutexHolder holder(_lock);
569 return _text.get_plain_wtext();
570}
571
572/**
573 * Returns the text currently displayed within the entry.
574 */
575INLINE std::wstring PGEntry::
576get_wtext() const {
577 LightReMutexHolder holder(_lock);
578 return _text.get_wtext();
579}
580
581/**
582 * Sets whether the input may be accepted--use to disable submission by the
583 * user
584 */
585INLINE void PGEntry::
586set_accept_enabled(bool enabled) {
587 LightReMutexHolder holder(_lock);
588 _accept_enabled = enabled;
589}
A ButtonHandle represents a single button from any device, including keyboard buttons and mouse butto...
get_name
Returns the name of the button.
get_frame_time
Returns the time in seconds as of the last time tick() was called (typically, this will be as of the ...
Definition clockObject.h:91
static ClockObject * get_global_clock()
Returns a pointer to the global ClockObject.
Similar to MutexHolder, but for a light reentrant mutex.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
Definition nodePath.h:159
void remove_node(Thread *current_thread=Thread::get_current_thread())
Disconnects the referenced node from the scene graph.
Definition nodePath.cxx:627
NodePath attach_new_node(PandaNode *node, int sort=0, Thread *current_thread=Thread::get_current_thread()) const
Attaches a new node, with or without existing parents, to the scene graph below the referenced node o...
Definition nodePath.cxx:599
const std::string & get_candidate_active() const
See set_candidate_active().
Definition pgEntry.I:394
PN_stdfloat get_cursor_X() const
Returns the node position x of the cursor.
Definition pgEntry.I:138
std::string get_plain_text() const
Returns the text currently displayed within the entry, without any embedded properties characters.
Definition pgEntry.I:38
std::string get_overflow_event() const
Returns the event name that will be thrown when too much text is attempted to be entered into the PGE...
Definition pgEntry.I:509
void set_candidate_active(const std::string &candidate_active)
Specifies the name of the TextProperties structure added to the TextPropertiesManager that will be us...
Definition pgEntry.I:385
void set_cursor_position(int position)
Sets the current position of the cursor.
Definition pgEntry.I:110
std::wstring get_wtext() const
Returns the text currently displayed within the entry.
Definition pgEntry.I:576
const std::string & get_candidate_inactive() const
See set_candidate_inactive().
Definition pgEntry.I:421
const TextProperties & get_properties(int n) const
Returns the TextProperties in effect for the object at the indicated position in the pre-wordwrapped ...
Definition pgEntry.I:99
TextNode * get_text_def(int state) const
Returns the TextNode that will be used to render the text within the entry when the entry is in the i...
Definition pgEntry.cxx:699
std::string get_type_event() const
Returns the event name that will be thrown whenever the user extends the text by typing.
Definition pgEntry.I:518
NodePath get_cursor_def()
Returns the Node that will be rendered to represent the cursor.
Definition pgEntry.I:269
void set_cursor_keys_active(bool flag)
Sets whether the arrow keys (and home/end) control movement of the cursor.
Definition pgEntry.I:290
void set_max_chars(int max_chars)
Sets the maximum number of characters that may be typed into the entry.
Definition pgEntry.I:160
void set_overflow_mode(bool flag)
Specifies whether overflow mode should be enabled.
Definition pgEntry.I:347
std::string get_accept_failed_event(const ButtonHandle &button) const
Returns the event name that will be thrown when the entry cannot accept an input.
Definition pgEntry.I:499
void set_num_lines(int num_lines)
Sets the number of lines of text the PGEntry will use.
Definition pgEntry.I:216
PN_stdfloat get_cursor_Y() const
Returns the node position y of the cursor.
Definition pgEntry.I:147
bool get_cursor_keys_active() const
Returns whether the arrow keys are currently set to control movement of the cursor; see set_cursor_ke...
Definition pgEntry.I:300
int get_num_characters() const
Returns the number of characters of text in the entry.
Definition pgEntry.I:67
std::string get_cursormove_event() const
Returns the event name that will be thrown whenever the cursor moves.
Definition pgEntry.I:535
std::string get_text() const
Returns the text currently displayed within the entry.
Definition pgEntry.I:51
static std::string get_cursormove_prefix()
Returns the prefix that is used to define the cursor event for all PGEntries.
Definition pgEntry.I:481
wchar_t get_character(int n) const
Returns the character at the indicated position in the entry.
Definition pgEntry.I:78
void set_max_width(PN_stdfloat max_width)
Sets the maximum width of all characters that may be typed into the entry.
Definition pgEntry.I:187
static std::string get_accept_failed_prefix()
Returns the prefix that is used to define the accept failed event for all PGEntries.
Definition pgEntry.I:442
void set_candidate_inactive(const std::string &candidate_inactive)
Specifies the name of the TextProperties structure added to the TextPropertiesManager that will be us...
Definition pgEntry.I:412
bool set_wtext(const std::wstring &wtext)
Changes the text currently displayed within the entry.
Definition pgEntry.I:546
std::string get_erase_event() const
Returns the event name that will be thrown whenever the user erases characters in the text.
Definition pgEntry.I:527
PN_stdfloat get_max_width() const
Returns the current maximum width of the characters that may be typed into the entry,...
Definition pgEntry.I:205
bool get_overflow_mode() const
Specifies whether overflow mode is enabled.
Definition pgEntry.I:367
static std::string get_accept_prefix()
Returns the prefix that is used to define the accept event for all PGEntries.
Definition pgEntry.I:432
void set_obscure_mode(bool flag)
Specifies whether obscure mode should be enabled.
Definition pgEntry.I:316
static std::string get_overflow_prefix()
Returns the prefix that is used to define the overflow event for all PGEntries.
Definition pgEntry.I:452
int get_num_lines() const
Returns the number of lines of text the PGEntry will use, if _max_width is not 0.
Definition pgEntry.I:237
void set_blink_rate(PN_stdfloat blink_rate)
Sets the number of times per second the cursor will blink while the entry has keyboard focus.
Definition pgEntry.I:249
bool set_text(const std::string &text)
Changes the text currently displayed within the entry.
Definition pgEntry.I:23
int get_cursor_position() const
Returns the current position of the cursor.
Definition pgEntry.I:129
PN_stdfloat get_blink_rate() const
Returns the number of times per second the cursor will blink, or 0 if the cursor is not to blink.
Definition pgEntry.I:259
static std::string get_type_prefix()
Returns the prefix that is used to define the type event for all PGEntries.
Definition pgEntry.I:461
std::string get_accept_event(const ButtonHandle &button) const
Returns the event name that will be thrown when the entry is accepted normally.
Definition pgEntry.I:490
const TextGraphic * get_graphic(int n) const
Returns the graphic object at the indicated position in the pre-wordwrapped string.
Definition pgEntry.I:89
bool get_obscure_mode() const
Specifies whether obscure mode is enabled.
Definition pgEntry.I:335
static std::string get_erase_prefix()
Returns the prefix that is used to define the erase event for all PGEntries.
Definition pgEntry.I:471
int get_max_chars() const
Returns the current maximum number of characters that may be typed into the entry,...
Definition pgEntry.I:170
void clear_cursor_def()
Removes all the children from the cursor_def node, in preparation for adding a new definition.
Definition pgEntry.I:279
std::wstring get_plain_wtext() const
Returns the text currently displayed within the entry, without any embedded properties characters.
Definition pgEntry.I:567
void set_accept_enabled(bool enabled)
Sets whether the input may be accepted–use to disable submission by the user.
Definition pgEntry.I:586
const std::string & get_id() const
Returns the unique ID assigned to this PGItem.
Definition pgItem.I:224
static Pipeline * get_render_pipeline()
Returns a pointer to the global render pipeline.
Definition pipeline.I:18
bool set_wtext(const std::wstring &wtext)
Accepts a new text string and associated properties structure, and precomputes the wordwrapping layou...
std::wstring get_wtext() const
Returns a wstring that represents the contents of the text.
get_properties
Returns the default TextProperties that are applied to the text in the absence of any nested property...
int get_num_characters() const
Returns the number of characters of text, before wordwrapping.
const TextGraphic * get_graphic(int n) const
Returns the graphic object at the indicated position in the pre-wordwrapped string.
char32_t get_character(int n) const
Returns the character at the indicated position in the pre-wordwrapped string.
std::wstring get_plain_wtext() const
Returns a wstring that represents the contents of the text, without any embedded properties character...
std::wstring decode_text(const std::string &text) const
Returns the given wstring decoded to a single-byte string, via the current encoding system.
std::string encode_wtext(const std::wstring &wtext) const
Encodes a wide-text string into a single-char string, according to the current encoding.
This defines a special model that has been constructed for the purposes of embedding an arbitrary gra...
Definition textGraphic.h:37
The primary interface to this module.
Definition textNode.h:48
This defines the set of visual properties that may be assigned to the individual characters of the te...