PegTextBox
Class Name Derived From Styles Signals
PegTextBox PegWindow/
PegTextThing
FF_NONE
FF_THIN
FF_THICK
EF_WRAP
TT_COPY
TJ_RIGHT
TJ_LEFT
TJ_CENTER
PSF_SIZED
PSF_FOCUS_RECEIVED
PSF_FOCUS_LOST
PSF_KEY_RECEIVED
PegTextBox is a multi-line text display control that does not support editing. By default,
PegTextBox left-justifies the displayed text. Center-justification is also supported. Lines
of text that are too long to fit in the client width of the textbox are also wrapped by
default to use two or more lines. This is controlled by the EF_WRAP style flag. The
wrapping algorithm searches for whitespace, comma, or hyphen characters as logical
points to break long lines. If a suitable breaking point is not found, PegTextBox simply
breaks a line at the last character which fits within the client width area.
Here is an example of a centered text box with some default text inside:
PegRect r = mReal;
r.wBottom = r.wBottom/2;
PegTextBox *p = new PegTextBox(r, 0, FF_RECESSED|EF_WRAP|TJ_CENTER,
"This is a long string.\nWell, it isn't that long.\nBut if we add
them all up.\n.\n.\nIt gets long");
Add(p);
74