![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
#include <FXText.h>
Public Types | |
enum | { STYLE_UNDERLINE = 0x0001, STYLE_STRIKEOUT = 0x0002, STYLE_BOLD = 0x0004 } |
![]() | |
enum | { ID_NONE, ID_HIDE, ID_SHOW, ID_TOGGLESHOWN, ID_LOWER, ID_RAISE, ID_DELETE, ID_DISABLE, ID_ENABLE, ID_TOGGLEENABLED, ID_UNCHECK, ID_CHECK, ID_UNKNOWN, ID_UPDATE, ID_AUTOSCROLL, ID_TIPTIMER, ID_HSCROLLED, ID_VSCROLLED, ID_SETVALUE, ID_SETINTVALUE, ID_SETREALVALUE, ID_SETSTRINGVALUE, ID_SETICONVALUE, ID_SETINTRANGE, ID_SETREALRANGE, ID_GETINTVALUE, ID_GETREALVALUE, ID_GETSTRINGVALUE, ID_GETICONVALUE, ID_GETINTRANGE, ID_GETREALRANGE, ID_SETHELPSTRING, ID_GETHELPSTRING, ID_SETTIPSTRING, ID_GETTIPSTRING, ID_QUERY_MENU, ID_HOTKEY, ID_ACCEL, ID_UNPOST, ID_POST, ID_MDI_TILEHORIZONTAL, ID_MDI_TILEVERTICAL, ID_MDI_CASCADE, ID_MDI_MAXIMIZE, ID_MDI_MINIMIZE, ID_MDI_RESTORE, ID_MDI_CLOSE, ID_MDI_WINDOW, ID_MDI_MENUWINDOW, ID_MDI_MENUMINIMIZE, ID_MDI_MENURESTORE, ID_MDI_MENUCLOSE, ID_MDI_NEXT, ID_MDI_PREV, ID_LAST } |
Static Public Attributes | |
static const FXchar | textDelimiters [] |
![]() | |
static FXDragType | octetType |
static FXDragType | deleteType |
static FXDragType | textType |
static FXDragType | utf8Type |
static FXDragType | utf16Type |
static FXDragType | colorType |
static FXDragType | urilistType |
static const FXDragType | stringType |
static const FXDragType | imageType |
static const FXchar | octetTypeName [] |
static const FXchar | deleteTypeName [] |
static const FXchar | textTypeName [] |
static const FXchar | colorTypeName [] |
static const FXchar | urilistTypeName [] |
static const FXchar | utf8TypeName [] |
static const FXchar | utf16TypeName [] |
Additional Inherited Members | |
![]() | |
static FXWindow * | commonAncestor (FXWindow *a, FXWindow *b) |
static bool | before (const FXWindow *a, const FXWindow *b) |
static bool | after (const FXWindow *a, const FXWindow *b) |
The text widget supports editing of multiple lines of text.
An optional style table can provide text coloring based on the contents of an optional parallel style buffer, which is maintained as text is edited. In a typical scenario, the contents of the style buffer is either directly written when the text is added to the widget, or is continually modified by editing the text via syntax-based highlighting engine which colors the text based on syntactical patterns.
See also:
anonymous enum |
FX::FXText::FXText | ( | FXComposite * | p, |
FXObject * | tgt = NULL , |
||
FXSelector | sel = 0 , |
||
FXuint | opts = 0 , |
||
FXint | x = 0 , |
||
FXint | y = 0 , |
||
FXint | w = 0 , |
||
FXint | h = 0 , |
||
FXint | pl = 3 , |
||
FXint | pr = 3 , |
||
FXint | pt = 2 , |
||
FXint | pb = 2 |
||
) |
Construct multi-line text widget.
|
virtual |
Destructor.
|
virtual |
Create server-side resources.
Reimplemented from FX::FXComposite.
|
virtual |
Detach server-side resources.
Reimplemented from FX::FXComposite.
|
virtual |
Perform layout.
Reimplemented from FX::FXScrollArea.
|
virtual |
Return default width.
Reimplemented from FX::FXScrollArea.
|
virtual |
Return default height.
Reimplemented from FX::FXScrollArea.
|
virtual |
Enable the text widget.
Reimplemented from FX::FXWindow.
|
virtual |
Disable the text widget.
Reimplemented from FX::FXWindow.
|
virtual |
Need to recalculate size.
Reimplemented from FX::FXWindow.
|
virtual |
Get default width.
Reimplemented from FX::FXScrollArea.
|
virtual |
Get default height.
Reimplemented from FX::FXScrollArea.
|
virtual |
Returns true because a text widget can receive focus.
Reimplemented from FX::FXWindow.
|
virtual |
Move the focus to this window.
Reimplemented from FX::FXWindow.
|
virtual |
Remove the focus from this window.
Reimplemented from FX::FXWindow.
void FX::FXText::setMarginTop | ( | FXint | pt | ) |
Change top margin.
|
inline |
Return top margin.
void FX::FXText::setMarginBottom | ( | FXint | pb | ) |
Change bottom margin.
|
inline |
Return bottom margin.
void FX::FXText::setMarginLeft | ( | FXint | pl | ) |
Change left margin.
|
inline |
Return left margin.
void FX::FXText::setMarginRight | ( | FXint | pr | ) |
Change right margin.
|
inline |
Return right margin.
|
inline |
Return wrap columns.
void FX::FXText::setWrapColumns | ( | FXint | cols | ) |
Set wrap columns.
|
inline |
Return tab columns.
void FX::FXText::setTabColumns | ( | FXint | cols | ) |
Change tab columns.
|
inline |
Return number of columns used for line numbers.
void FX::FXText::setBarColumns | ( | FXint | cols | ) |
Change number of columns used for line numbers.
|
inline |
Return TRUE if text was modified.
FXbool FX::FXText::isEditable | ( | ) | const |
Return TRUE if text is editable.
FXbool FX::FXText::isOverstrike | ( | ) | const |
Return TRUE if overstrike mode in effect.
|
inline |
Change delimiters of words.
|
inline |
Return word delimiters.
void FX::FXText::setFont | ( | FXFont * | fnt | ) |
Change text font.
|
inline |
Return text font.
void FX::FXText::setTextColor | ( | FXColor | clr | ) |
Change text color.
|
inline |
Return text color.
void FX::FXText::setSelBackColor | ( | FXColor | clr | ) |
Change selected background color.
|
inline |
Return selected background color.
void FX::FXText::setSelTextColor | ( | FXColor | clr | ) |
Change selected text color.
|
inline |
Return selected text color.
void FX::FXText::setHiliteTextColor | ( | FXColor | clr | ) |
Change highlighted text color.
|
inline |
Return highlighted text color.
void FX::FXText::setHiliteBackColor | ( | FXColor | clr | ) |
Change highlighted background color.
|
inline |
Return highlighted background color.
void FX::FXText::setActiveBackColor | ( | FXColor | clr | ) |
Change active background color.
|
inline |
Return active background color.
void FX::FXText::setCursorColor | ( | FXColor | clr | ) |
Change cursor color.
|
inline |
Return cursor color.
void FX::FXText::setNumberColor | ( | FXColor | clr | ) |
Change line number color.
|
inline |
Return line number color.
void FX::FXText::setBarColor | ( | FXColor | clr | ) |
Change bar color.
|
inline |
Return bar color.
|
inline |
Set help text.
|
inline |
Return help text.
|
inline |
Set the tool tip message for this text widget.
|
inline |
Get the tool tip message for this text widget.
Extract n bytes of text from position pos.
Extract n bytes of style info from position pos.
|
virtual |
Replace m bytes at pos by n characters.
|
virtual |
|
virtual |
Replace m bytes at pos by n characters.
|
virtual |
Append n bytes of text at the end of the buffer.
|
virtual |
Append n bytes of text at the end of the buffer.
|
virtual |
|
virtual |
Insert n bytes of text at position pos into the buffer.
|
virtual |
|
virtual |
Insert n bytes of text at position pos into the buffer.
|
virtual |
Remove n bytes of text at position pos from the buffer.
Change style of text range.
Change style of text range from style-array.
Change the text in the buffer to new text.
|
virtual |
Change the text in the buffer to new text.
|
virtual |
void FX::FXText::getText | ( | FXString & | text | ) | const |
FXString FX::FXText::getText | ( | ) | const |
Return text in the widget.
|
inline |
Return length of buffer.
|
inline |
Return number of rows in buffer.
Shift block of lines from position start up to end by given amount.
FXbool FX::FXText::findText | ( | const FXString & | string, |
FXint * | beg = NULL , |
||
FXint * | end = NULL , |
||
FXint | start = 0 , |
||
FXuint | flags = SEARCH_FORWARD|SEARCH_WRAP|SEARCH_EXACT , |
||
FXint | npar = 1 |
||
) |
Search for string in text buffer, returning the extent of the string in beg and end.
The search starts from the given starting position, scans forward (SEARCH_FORWARD) or backward (SEARCH_BACKWARD), and wraps around if SEARCH_WRAP has been specified. The search type is either a plain search (SEARCH_EXACT), case insensitive search (SEARCH_IGNORECASE), or regular expression search (SEARCH_REGEX). For regular expression searches, capturing parentheses are used if npar is greater than 1; in this case, the number of entries in the beg[], end[] arrays must be npar also. If either beg or end or both are NULL, internal arrays are used. [This API is still subject to change!!]
Return text position at given visible x,y coordinate.
Count number of rows; start should be on a row start.
Count number of columns; start should be on a row start.
Return position of begin of line containing position pos.
Return position of end of line containing position pos.
void FX::FXText::setTopLine | ( | FXint | pos | ) |
Make line containing pos the top line.
FXint FX::FXText::getTopLine | ( | ) | const |
Return position of top line.
void FX::FXText::setBottomLine | ( | FXint | pos | ) |
Make line containing pos the bottom line.
FXint FX::FXText::getBottomLine | ( | ) | const |
Return the position of the bottom line.
void FX::FXText::setCenterLine | ( | FXint | pos | ) |
Make line containing pos the center line.
void FX::FXText::setAnchorPos | ( | FXint | pos | ) |
Set the anchor position.
|
inline |
Return the anchor position.
Set the cursor position.
|
inline |
Return cursor row.
|
inline |
Return cursor row, i.e. indent position.
|
inline |
Return the cursor position.
|
inline |
Return selstartpos.
|
inline |
Return selendpos.
|
virtual |
Extend the selection from the anchor to the given position.
Select len characters starting at given position pos.
Highlight len characters starting at given position pos.
FXbool FX::FXText::killHighlight | ( | ) |
Unhighlight the text.
void FX::FXText::makePositionVisible | ( | FXint | pos | ) |
Scroll text to make the given position visible.
void FX::FXText::setTextStyle | ( | FXuint | style | ) |
Change text widget style.
FXuint FX::FXText::getTextStyle | ( | ) | const |
Return text widget style.
void FX::FXText::setVisibleRows | ( | FXint | rows | ) |
Change number of visible rows.
|
inline |
Return number of visible rows.
void FX::FXText::setVisibleColumns | ( | FXint | cols | ) |
Change number of visible columns.
|
inline |
Return number of visible columns.
|
inline |
Change brace and parenthesis match highlighting time, in ms.
A match highlight time of 0 disables brace matching.
|
inline |
Return brace and parenthesis match highlighting time, in ms.
void FX::FXText::setHiliteStyles | ( | const FXHiliteStyle * | styles | ) |
Set highlight styles.
|
inline |
Get highlight styles.
|
virtual |
Save to a stream.
Reimplemented from FX::FXWindow.
|
virtual |
Load from a stream.
Reimplemented from FX::FXWindow.
|
static |
![]() |