Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXText Class Reference

#include <FXText.h>

Inheritance diagram for FX::FXText:
FX::FXScrollArea FX::FXComposite FX::FXWindow FX::FXDrawable FX::FXId FX::FXObject

Public Types

enum  {
  STYLE_UNDERLINE = 0x0001,
  STYLE_STRIKEOUT = 0x0002,
  STYLE_BOLD = 0x0004
}
 
- Public Types inherited from FX::FXWindow
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
}
 

Public Member Functions

 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)
 
virtual void create ()
 
virtual void detach ()
 
virtual void layout ()
 
virtual FXint getDefaultWidth ()
 
virtual FXint getDefaultHeight ()
 
virtual void enable ()
 
virtual void disable ()
 
virtual void recalc ()
 
virtual FXint getContentWidth ()
 
virtual FXint getContentHeight ()
 
virtual bool canFocus () const
 
virtual void setFocus ()
 
virtual void killFocus ()
 
void setMarginTop (FXint pt)
 
FXint getMarginTop () const
 
void setMarginBottom (FXint pb)
 
FXint getMarginBottom () const
 
void setMarginLeft (FXint pl)
 
FXint getMarginLeft () const
 
void setMarginRight (FXint pr)
 
FXint getMarginRight () const
 
FXint getWrapColumns () const
 
void setWrapColumns (FXint cols)
 
FXint getTabColumns () const
 
void setTabColumns (FXint cols)
 
FXint getBarColumns () const
 
void setBarColumns (FXint cols)
 
FXbool isModified () const
 
void setModified (FXbool mod=TRUE)
 
void setEditable (FXbool edit=TRUE)
 
FXbool isEditable () const
 
void setOverstrike (FXbool over=TRUE)
 
FXbool isOverstrike () const
 
void setStyled (FXbool styled=TRUE)
 
FXbool isStyled () const
 
void setDelimiters (const FXchar *delims=textDelimiters)
 
const FXchargetDelimiters () const
 
void setFont (FXFont *fnt)
 
FXFontgetFont () const
 
void setTextColor (FXColor clr)
 
FXColor getTextColor () const
 
void setSelBackColor (FXColor clr)
 
FXColor getSelBackColor () const
 
void setSelTextColor (FXColor clr)
 
FXColor getSelTextColor () const
 
void setHiliteTextColor (FXColor clr)
 
FXColor getHiliteTextColor () const
 
void setHiliteBackColor (FXColor clr)
 
FXColor getHiliteBackColor () const
 
void setActiveBackColor (FXColor clr)
 
FXColor getActiveBackColor () const
 
void setCursorColor (FXColor clr)
 
FXColor getCursorColor () const
 
void setNumberColor (FXColor clr)
 
FXColor getNumberColor () const
 
void setBarColor (FXColor clr)
 
FXColor getBarColor () const
 
void setHelpText (const FXString &text)
 
FXString getHelpText () const
 
void setTipText (const FXString &text)
 
FXString getTipText () const
 
FXint getByte (FXint pos) const
 
FXwchar getChar (FXint pos) const
 
FXint getCharLen (FXint pos) const
 
FXint getStyle (FXint pos) const
 
void extractText (FXchar *text, FXint pos, FXint n) const
 
void extractText (FXString &text, FXint pos, FXint n) const
 
void extractStyle (FXString &text, FXint pos, FXint n) const
 
void extractStyle (FXchar *style, FXint pos, FXint n) const
 
virtual void replaceText (FXint pos, FXint m, const FXchar *text, FXint n, FXbool notify=FALSE)
 
virtual void replaceText (FXint pos, FXint m, const FXString &text, FXbool notify=FALSE)
 
virtual void replaceStyledText (FXint pos, FXint m, const FXchar *text, FXint n, FXint style=0, FXbool notify=FALSE)
 
virtual void replaceStyledText (FXint pos, FXint m, const FXString &text, FXint style=0, FXbool notify=FALSE)
 
virtual void appendText (const FXchar *text, FXint n, FXbool notify=FALSE)
 
virtual void appendText (const FXString &text, FXbool notify=FALSE)
 
virtual void appendStyledText (const FXchar *text, FXint n, FXint style=0, FXbool notify=FALSE)
 
virtual void appendStyledText (const FXString &text, FXint style=0, FXbool notify=FALSE)
 
virtual void insertText (FXint pos, const FXchar *text, FXint n, FXbool notify=FALSE)
 
virtual void insertText (FXint pos, const FXString &text, FXbool notify=FALSE)
 
virtual void insertStyledText (FXint pos, const FXchar *text, FXint n, FXint style=0, FXbool notify=FALSE)
 
virtual void insertStyledText (FXint pos, const FXString &text, FXint style=0, FXbool notify=FALSE)
 
virtual void removeText (FXint pos, FXint n, FXbool notify=FALSE)
 
virtual void changeStyle (FXint pos, FXint n, FXint style)
 
virtual void changeStyle (FXint pos, const FXchar *style, FXint n)
 
virtual void changeStyle (FXint pos, const FXString &style)
 
virtual void setText (const FXchar *text, FXint n, FXbool notify=FALSE)
 
virtual void setText (const FXString &text, FXbool notify=FALSE)
 
virtual void setStyledText (const FXchar *text, FXint n, FXint style=0, FXbool notify=FALSE)
 
virtual void setStyledText (const FXString &text, FXint style=0, FXbool notify=FALSE)
 
void getText (FXchar *text, FXint n) const
 
void getText (FXString &text) const
 
FXString getText () const
 
FXint getLength () const
 
FXint getNumRows () const
 
FXint shiftText (FXint start, FXint end, FXint amount, FXbool notify=FALSE)
 
FXbool findText (const FXString &string, FXint *beg=NULL, FXint *end=NULL, FXint start=0, FXuint flags=SEARCH_FORWARD|SEARCH_WRAP|SEARCH_EXACT, FXint npar=1)
 
FXbool isPosSelected (FXint pos) const
 
FXbool isPosVisible (FXint pos) const
 
FXint getPosAt (FXint x, FXint y) const
 
FXint countRows (FXint start, FXint end) const
 
FXint countCols (FXint start, FXint end) const
 
FXint countLines (FXint start, FXint end) const
 
FXint lineStart (FXint pos) const
 
FXint lineEnd (FXint pos) const
 
FXint nextLine (FXint pos, FXint nl=1) const
 
FXint prevLine (FXint pos, FXint nl=1) const
 
FXint rowStart (FXint pos) const
 
FXint rowEnd (FXint pos) const
 
FXint nextRow (FXint pos, FXint nr=1) const
 
FXint prevRow (FXint pos, FXint nr=1) const
 
FXint leftWord (FXint pos) const
 
FXint rightWord (FXint pos) const
 
FXint wordStart (FXint pos) const
 
FXint wordEnd (FXint pos) const
 
FXint validPos (FXint pos) const
 
FXint dec (FXint pos) const
 
FXint inc (FXint pos) const
 
void setTopLine (FXint pos)
 
FXint getTopLine () const
 
void setBottomLine (FXint pos)
 
FXint getBottomLine () const
 
void setCenterLine (FXint pos)
 
void setAnchorPos (FXint pos)
 
FXint getAnchorPos () const
 
virtual void setCursorPos (FXint pos, FXbool notify=FALSE)
 
void setCursorRow (FXint row, FXbool notify=FALSE)
 
FXint getCursorRow () const
 
void setCursorColumn (FXint col, FXbool notify=FALSE)
 
FXint getCursorColumn () const
 
FXint getCursorPos () const
 
FXint getSelStartPos () const
 
FXint getSelEndPos () const
 
FXbool selectAll (FXbool notify=FALSE)
 
virtual FXbool extendSelection (FXint pos, FXTextSelectionMode select=SELECT_CHARS, FXbool notify=FALSE)
 
FXbool setSelection (FXint pos, FXint len, FXbool notify=FALSE)
 
virtual FXbool killSelection (FXbool notify=FALSE)
 
FXbool setHighlight (FXint start, FXint len)
 
FXbool killHighlight ()
 
void makePositionVisible (FXint pos)
 
void setTextStyle (FXuint style)
 
FXuint getTextStyle () const
 
void setVisibleRows (FXint rows)
 
FXint getVisibleRows () const
 
void setVisibleColumns (FXint cols)
 
FXint getVisibleColumns () const
 
void setHiliteMatchTime (FXuint t)
 
FXuint getHiliteMatchTime () const
 
void setHiliteStyles (const FXHiliteStyle *styles)
 
const FXHiliteStylegetHiliteStyles () const
 
virtual void save (FXStream &store) const
 
virtual void load (FXStream &store)
 
virtual ~FXText ()
 
- Public Member Functions inherited from FX::FXScrollArea
virtual FXint getViewportHeight ()
 
virtual FXint getViewportWidth ()
 
void setScrollStyle (FXuint style)
 
FXuint getScrollStyle () const
 
FXbool isHorizontalScrollable () const
 
FXbool isVerticalScrollable () const
 
FXScrollBarhorizontalScrollBar () const
 
FXScrollBarverticalScrollBar () const
 
FXint getXPosition () const
 
FXint getYPosition () const
 
void setPosition (FXint x, FXint y)
 
void getPosition (FXint &x, FXint &y) const
 
virtual ~FXScrollArea ()
 
- Public Member Functions inherited from FX::FXComposite
 FXComposite (FXComposite *p, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
 
virtual void destroy ()
 
FXint maxChildWidth () const
 
FXint maxChildHeight () const
 
virtual bool isComposite () const
 
virtual ~FXComposite ()
 
- Public Member Functions inherited from FX::FXWindow
 FXWindow (FXComposite *p, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
 
FXWindowgetParent () const
 
FXWindowgetOwner () const
 
FXWindowgetShell () const
 
FXWindowgetRoot () const
 
FXWindowgetNext () const
 
FXWindowgetPrev () const
 
FXWindowgetFirst () const
 
FXWindowgetLast () const
 
FXWindowgetFocus () const
 
void setKey (FXuint k)
 
FXuint getKey () const
 
void setTarget (FXObject *t)
 
FXObjectgetTarget () const
 
void setSelector (FXSelector sel)
 
FXSelector getSelector () const
 
FXint getX () const
 
FXint getY () const
 
virtual FXint getWidthForHeight (FXint givenheight)
 
virtual FXint getHeightForWidth (FXint givenwidth)
 
void setX (FXint x)
 
void setY (FXint y)
 
void setWidth (FXint w)
 
void setHeight (FXint h)
 
void setLayoutHints (FXuint lout)
 
FXuint getLayoutHints () const
 
FXAccelTablegetAccelTable () const
 
void setAccelTable (FXAccelTable *acceltable)
 
void addHotKey (FXHotKey code)
 
void remHotKey (FXHotKey code)
 
void setHelpTag (const FXString &text)
 
const FXStringgetHelpTag () const
 
bool isShell () const
 
bool isOwnerOf (const FXWindow *window) const
 
bool isChildOf (const FXWindow *window) const
 
bool containsChild (const FXWindow *child) const
 
FXWindowgetChildAt (FXint x, FXint y) const
 
FXint numChildren () const
 
FXint indexOfChild (const FXWindow *window) const
 
FXWindowchildAtIndex (FXint index) const
 
FXComposeContextgetComposeContext () const
 
void createComposeContext ()
 
void destroyComposeContext ()
 
void setDefaultCursor (FXCursor *cur)
 
FXCursorgetDefaultCursor () const
 
void setDragCursor (FXCursor *cur)
 
FXCursorgetDragCursor () const
 
FXint getCursorPosition (FXint &x, FXint &y, FXuint &buttons) const
 
FXint setCursorPosition (FXint x, FXint y)
 
bool isEnabled () const
 
bool isActive () const
 
bool hasFocus () const
 
bool inFocusChain () const
 
virtual void changeFocus (FXWindow *child)
 
virtual void setDefault (FXbool enable=TRUE)
 
bool isDefault () const
 
void setInitial (bool enable=true)
 
bool isInitial () const
 
virtual void attach (FXID w)
 
virtual void setShape (const FXRegion &region)
 
virtual void setShape (FXBitmap *bitmap)
 
virtual void setShape (FXIcon *icon)
 
virtual void clearShape ()
 
virtual void raise ()
 
virtual void lower ()
 
virtual void move (FXint x, FXint y)
 
virtual void resize (FXint w, FXint h)
 
virtual void position (FXint x, FXint y, FXint w, FXint h)
 
void forceRefresh ()
 
virtual void reparent (FXWindow *father, FXWindow *other=NULL)
 
void scroll (FXint x, FXint y, FXint w, FXint h, FXint dx, FXint dy) const
 
void update (FXint x, FXint y, FXint w, FXint h) const
 
void update () const
 
void repaint (FXint x, FXint y, FXint w, FXint h) const
 
void repaint () const
 
void grab ()
 
void ungrab ()
 
bool grabbed () const
 
void grabKeyboard ()
 
void ungrabKeyboard ()
 
bool grabbedKeyboard () const
 
virtual void show ()
 
virtual void hide ()
 
bool shown () const
 
bool underCursor () const
 
bool hasSelection () const
 
bool acquireSelection (const FXDragType *types, FXuint numtypes)
 
bool releaseSelection ()
 
bool hasClipboard () const
 
bool acquireClipboard (const FXDragType *types, FXuint numtypes)
 
bool releaseClipboard ()
 
virtual void dropEnable ()
 
virtual void dropDisable ()
 
bool isDropEnabled () const
 
bool isDragging () const
 
bool beginDrag (const FXDragType *types, FXuint numtypes)
 
bool handleDrag (FXint x, FXint y, FXDragAction action=DRAG_COPY)
 
FXDragAction endDrag (bool drop=true)
 
bool isDropTarget () const
 
void setDragRectangle (FXint x, FXint y, FXint w, FXint h, bool wantupdates=true) const
 
void clearDragRectangle () const
 
void acceptDrop (FXDragAction action=DRAG_ACCEPT) const
 
FXDragAction didAccept () const
 
void dropFinished (FXDragAction action=DRAG_REJECT) const
 
bool inquireDNDTypes (FXDNDOrigin origin, FXDragType *&types, FXuint &numtypes) const
 
bool offeredDNDType (FXDNDOrigin origin, FXDragType type) const
 
FXDragAction inquireDNDAction () const
 
bool setDNDData (FXDNDOrigin origin, FXDragType type, FXuchar *data, FXuint size) const
 
bool setDNDData (FXDNDOrigin origin, FXDragType type, const FXString &string) const
 
bool getDNDData (FXDNDOrigin origin, FXDragType type, FXuchar *&data, FXuint &size) const
 
bool getDNDData (FXDNDOrigin origin, FXDragType type, FXString &string) const
 
virtual bool contains (FXint parentx, FXint parenty) const
 
void translateCoordinatesFrom (FXint &tox, FXint &toy, const FXWindow *fromwindow, FXint fromx, FXint fromy) const
 
void translateCoordinatesTo (FXint &tox, FXint &toy, const FXWindow *towindow, FXint fromx, FXint fromy) const
 
virtual void setBackColor (FXColor clr)
 
FXColor getBackColor () const
 
virtual bool doesSaveUnder () const
 
virtual const FXchartr (const FXchar *message, const FXchar *hint=NULL) const
 
virtual ~FXWindow ()
 
- Public Member Functions inherited from FX::FXDrawable
FXint getWidth () const
 
FXint getHeight () const
 
FXVisualgetVisual () const
 
void setVisual (FXVisual *vis)
 
virtual ~FXDrawable ()
 
- Public Member Functions inherited from FX::FXId
FXAppgetApp () const
 
FXID id () const
 
void setUserData (void *ptr)
 
void * getUserData () const
 
virtual ~FXId ()
 
- Public Member Functions inherited from FX::FXObject
virtual long onDefault (FXObject *, FXSelector, void *)
 
const FXchargetClassName () const
 
bool isMemberOf (const FXMetaClass *metaclass) const
 
virtual long tryHandle (FXObject *sender, FXSelector sel, void *ptr)
 
virtual ~FXObject ()
 

Static Public Attributes

static const FXchar textDelimiters []
 
- Static Public Attributes inherited from FX::FXWindow
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 Public Member Functions inherited from FX::FXWindow
static FXWindowcommonAncestor (FXWindow *a, FXWindow *b)
 
static bool before (const FXWindow *a, const FXWindow *b)
 
static bool after (const FXWindow *a, const FXWindow *b)
 

Detailed Description

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:

Member Enumeration Documentation

anonymous enum
Enumerator
STYLE_UNDERLINE 

Underline text.

STYLE_STRIKEOUT 

Strike out text.

STYLE_BOLD 

Bold text.

Constructor & Destructor Documentation

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 FX::FXText::~FXText ( )
virtual

Destructor.

Member Function Documentation

virtual void FX::FXText::create ( )
virtual

Create server-side resources.

Reimplemented from FX::FXComposite.

virtual void FX::FXText::detach ( )
virtual

Detach server-side resources.

Reimplemented from FX::FXComposite.

virtual void FX::FXText::layout ( )
virtual

Perform layout.

Reimplemented from FX::FXScrollArea.

virtual FXint FX::FXText::getDefaultWidth ( )
virtual

Return default width.

Reimplemented from FX::FXScrollArea.

virtual FXint FX::FXText::getDefaultHeight ( )
virtual

Return default height.

Reimplemented from FX::FXScrollArea.

virtual void FX::FXText::enable ( )
virtual

Enable the text widget.

Reimplemented from FX::FXWindow.

virtual void FX::FXText::disable ( )
virtual

Disable the text widget.

Reimplemented from FX::FXWindow.

virtual void FX::FXText::recalc ( )
virtual

Need to recalculate size.

Reimplemented from FX::FXWindow.

virtual FXint FX::FXText::getContentWidth ( )
virtual

Get default width.

Reimplemented from FX::FXScrollArea.

virtual FXint FX::FXText::getContentHeight ( )
virtual

Get default height.

Reimplemented from FX::FXScrollArea.

virtual bool FX::FXText::canFocus ( ) const
virtual

Returns true because a text widget can receive focus.

Reimplemented from FX::FXWindow.

virtual void FX::FXText::setFocus ( )
virtual

Move the focus to this window.

Reimplemented from FX::FXWindow.

virtual void FX::FXText::killFocus ( )
virtual

Remove the focus from this window.

Reimplemented from FX::FXWindow.

void FX::FXText::setMarginTop ( FXint  pt)

Change top margin.

FXint FX::FXText::getMarginTop ( ) const
inline

Return top margin.

void FX::FXText::setMarginBottom ( FXint  pb)

Change bottom margin.

FXint FX::FXText::getMarginBottom ( ) const
inline

Return bottom margin.

void FX::FXText::setMarginLeft ( FXint  pl)

Change left margin.

FXint FX::FXText::getMarginLeft ( ) const
inline

Return left margin.

void FX::FXText::setMarginRight ( FXint  pr)

Change right margin.

FXint FX::FXText::getMarginRight ( ) const
inline

Return right margin.

FXint FX::FXText::getWrapColumns ( ) const
inline

Return wrap columns.

void FX::FXText::setWrapColumns ( FXint  cols)

Set wrap columns.

FXint FX::FXText::getTabColumns ( ) const
inline

Return tab columns.

void FX::FXText::setTabColumns ( FXint  cols)

Change tab columns.

FXint FX::FXText::getBarColumns ( ) const
inline

Return number of columns used for line numbers.

void FX::FXText::setBarColumns ( FXint  cols)

Change number of columns used for line numbers.

FXbool FX::FXText::isModified ( ) const
inline

Return TRUE if text was modified.

void FX::FXText::setModified ( FXbool  mod = TRUE)
inline

Set modified flag.

void FX::FXText::setEditable ( FXbool  edit = TRUE)

Set editable mode.

FXbool FX::FXText::isEditable ( ) const

Return TRUE if text is editable.

void FX::FXText::setOverstrike ( FXbool  over = TRUE)

Set overstrike mode.

FXbool FX::FXText::isOverstrike ( ) const

Return TRUE if overstrike mode in effect.

void FX::FXText::setStyled ( FXbool  styled = TRUE)

Set styled text mode.

FXbool FX::FXText::isStyled ( ) const
inline

Return TRUE if style buffer.

void FX::FXText::setDelimiters ( const FXchar delims = textDelimiters)
inline

Change delimiters of words.

const FXchar* FX::FXText::getDelimiters ( ) const
inline

Return word delimiters.

void FX::FXText::setFont ( FXFont fnt)

Change text font.

FXFont* FX::FXText::getFont ( ) const
inline

Return text font.

void FX::FXText::setTextColor ( FXColor  clr)

Change text color.

FXColor FX::FXText::getTextColor ( ) const
inline

Return text color.

void FX::FXText::setSelBackColor ( FXColor  clr)

Change selected background color.

FXColor FX::FXText::getSelBackColor ( ) const
inline

Return selected background color.

void FX::FXText::setSelTextColor ( FXColor  clr)

Change selected text color.

FXColor FX::FXText::getSelTextColor ( ) const
inline

Return selected text color.

void FX::FXText::setHiliteTextColor ( FXColor  clr)

Change highlighted text color.

FXColor FX::FXText::getHiliteTextColor ( ) const
inline

Return highlighted text color.

void FX::FXText::setHiliteBackColor ( FXColor  clr)

Change highlighted background color.

FXColor FX::FXText::getHiliteBackColor ( ) const
inline

Return highlighted background color.

void FX::FXText::setActiveBackColor ( FXColor  clr)

Change active background color.

FXColor FX::FXText::getActiveBackColor ( ) const
inline

Return active background color.

void FX::FXText::setCursorColor ( FXColor  clr)

Change cursor color.

FXColor FX::FXText::getCursorColor ( ) const
inline

Return cursor color.

void FX::FXText::setNumberColor ( FXColor  clr)

Change line number color.

FXColor FX::FXText::getNumberColor ( ) const
inline

Return line number color.

void FX::FXText::setBarColor ( FXColor  clr)

Change bar color.

FXColor FX::FXText::getBarColor ( ) const
inline

Return bar color.

void FX::FXText::setHelpText ( const FXString text)
inline

Set help text.

FXString FX::FXText::getHelpText ( ) const
inline

Return help text.

void FX::FXText::setTipText ( const FXString text)
inline

Set the tool tip message for this text widget.

FXString FX::FXText::getTipText ( ) const
inline

Get the tool tip message for this text widget.

FXint FX::FXText::getByte ( FXint  pos) const

Get character at position in text buffer.

FXwchar FX::FXText::getChar ( FXint  pos) const

Get wide character at position pos.

FXint FX::FXText::getCharLen ( FXint  pos) const

Get length of wide character at position pos.

FXint FX::FXText::getStyle ( FXint  pos) const

Get style at position pos.

void FX::FXText::extractText ( FXchar text,
FXint  pos,
FXint  n 
) const

Extract n bytes of text from position pos.

void FX::FXText::extractText ( FXString text,
FXint  pos,
FXint  n 
) const
void FX::FXText::extractStyle ( FXString text,
FXint  pos,
FXint  n 
) const

Extract n bytes of style info from position pos.

void FX::FXText::extractStyle ( FXchar style,
FXint  pos,
FXint  n 
) const
virtual void FX::FXText::replaceText ( FXint  pos,
FXint  m,
const FXchar text,
FXint  n,
FXbool  notify = FALSE 
)
virtual

Replace m bytes at pos by n characters.

virtual void FX::FXText::replaceText ( FXint  pos,
FXint  m,
const FXString text,
FXbool  notify = FALSE 
)
virtual
virtual void FX::FXText::replaceStyledText ( FXint  pos,
FXint  m,
const FXchar text,
FXint  n,
FXint  style = 0,
FXbool  notify = FALSE 
)
virtual

Replace m bytes at pos by n characters.

virtual void FX::FXText::replaceStyledText ( FXint  pos,
FXint  m,
const FXString text,
FXint  style = 0,
FXbool  notify = FALSE 
)
virtual
virtual void FX::FXText::appendText ( const FXchar text,
FXint  n,
FXbool  notify = FALSE 
)
virtual

Append n bytes of text at the end of the buffer.

virtual void FX::FXText::appendText ( const FXString text,
FXbool  notify = FALSE 
)
virtual
virtual void FX::FXText::appendStyledText ( const FXchar text,
FXint  n,
FXint  style = 0,
FXbool  notify = FALSE 
)
virtual

Append n bytes of text at the end of the buffer.

virtual void FX::FXText::appendStyledText ( const FXString text,
FXint  style = 0,
FXbool  notify = FALSE 
)
virtual
virtual void FX::FXText::insertText ( FXint  pos,
const FXchar text,
FXint  n,
FXbool  notify = FALSE 
)
virtual

Insert n bytes of text at position pos into the buffer.

virtual void FX::FXText::insertText ( FXint  pos,
const FXString text,
FXbool  notify = FALSE 
)
virtual
virtual void FX::FXText::insertStyledText ( FXint  pos,
const FXchar text,
FXint  n,
FXint  style = 0,
FXbool  notify = FALSE 
)
virtual

Insert n bytes of text at position pos into the buffer.

virtual void FX::FXText::insertStyledText ( FXint  pos,
const FXString text,
FXint  style = 0,
FXbool  notify = FALSE 
)
virtual
virtual void FX::FXText::removeText ( FXint  pos,
FXint  n,
FXbool  notify = FALSE 
)
virtual

Remove n bytes of text at position pos from the buffer.

virtual void FX::FXText::changeStyle ( FXint  pos,
FXint  n,
FXint  style 
)
virtual

Change style of text range.

virtual void FX::FXText::changeStyle ( FXint  pos,
const FXchar style,
FXint  n 
)
virtual

Change style of text range from style-array.

virtual void FX::FXText::changeStyle ( FXint  pos,
const FXString style 
)
virtual
virtual void FX::FXText::setText ( const FXchar text,
FXint  n,
FXbool  notify = FALSE 
)
virtual

Change the text in the buffer to new text.

virtual void FX::FXText::setText ( const FXString text,
FXbool  notify = FALSE 
)
virtual
virtual void FX::FXText::setStyledText ( const FXchar text,
FXint  n,
FXint  style = 0,
FXbool  notify = FALSE 
)
virtual

Change the text in the buffer to new text.

virtual void FX::FXText::setStyledText ( const FXString text,
FXint  style = 0,
FXbool  notify = FALSE 
)
virtual
void FX::FXText::getText ( FXchar text,
FXint  n 
) const

Retrieve text into buffer.

void FX::FXText::getText ( FXString text) const
FXString FX::FXText::getText ( ) const

Return text in the widget.

FXint FX::FXText::getLength ( ) const
inline

Return length of buffer.

FXint FX::FXText::getNumRows ( ) const
inline

Return number of rows in buffer.

FXint FX::FXText::shiftText ( FXint  start,
FXint  end,
FXint  amount,
FXbool  notify = FALSE 
)

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!!]

FXbool FX::FXText::isPosSelected ( FXint  pos) const

Return TRUE if position pos is selected.

FXbool FX::FXText::isPosVisible ( FXint  pos) const

Return TRUE if position is fully visible.

FXint FX::FXText::getPosAt ( FXint  x,
FXint  y 
) const

Return text position at given visible x,y coordinate.

FXint FX::FXText::countRows ( FXint  start,
FXint  end 
) const

Count number of rows; start should be on a row start.

FXint FX::FXText::countCols ( FXint  start,
FXint  end 
) const

Count number of columns; start should be on a row start.

FXint FX::FXText::countLines ( FXint  start,
FXint  end 
) const

Count number of newlines.

FXint FX::FXText::lineStart ( FXint  pos) const

Return position of begin of line containing position pos.

FXint FX::FXText::lineEnd ( FXint  pos) const

Return position of end of line containing position pos.

FXint FX::FXText::nextLine ( FXint  pos,
FXint  nl = 1 
) const

Return start of next line.

FXint FX::FXText::prevLine ( FXint  pos,
FXint  nl = 1 
) const

Return start of previous line.

FXint FX::FXText::rowStart ( FXint  pos) const

Return row start.

FXint FX::FXText::rowEnd ( FXint  pos) const

Return row end.

FXint FX::FXText::nextRow ( FXint  pos,
FXint  nr = 1 
) const

Return start of next row.

FXint FX::FXText::prevRow ( FXint  pos,
FXint  nr = 1 
) const

Return start of previous row.

FXint FX::FXText::leftWord ( FXint  pos) const

Return end of previous word.

FXint FX::FXText::rightWord ( FXint  pos) const

Return begin of next word.

FXint FX::FXText::wordStart ( FXint  pos) const

Return begin of word.

FXint FX::FXText::wordEnd ( FXint  pos) const

Return end of word.

FXint FX::FXText::validPos ( FXint  pos) const

Return validated utf8 character start position.

FXint FX::FXText::dec ( FXint  pos) const

Retreat to the previous valid utf8 character start.

FXint FX::FXText::inc ( FXint  pos) const

Advance to the next valid utf8 character start.

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.

FXint FX::FXText::getAnchorPos ( ) const
inline

Return the anchor position.

virtual void FX::FXText::setCursorPos ( FXint  pos,
FXbool  notify = FALSE 
)
virtual

Set the cursor position.

void FX::FXText::setCursorRow ( FXint  row,
FXbool  notify = FALSE 
)

Set cursor row.

FXint FX::FXText::getCursorRow ( ) const
inline

Return cursor row.

void FX::FXText::setCursorColumn ( FXint  col,
FXbool  notify = FALSE 
)

Set cursor column.

FXint FX::FXText::getCursorColumn ( ) const
inline

Return cursor row, i.e. indent position.

FXint FX::FXText::getCursorPos ( ) const
inline

Return the cursor position.

FXint FX::FXText::getSelStartPos ( ) const
inline

Return selstartpos.

FXint FX::FXText::getSelEndPos ( ) const
inline

Return selendpos.

FXbool FX::FXText::selectAll ( FXbool  notify = FALSE)

Select all text.

virtual FXbool FX::FXText::extendSelection ( FXint  pos,
FXTextSelectionMode  select = SELECT_CHARS,
FXbool  notify = FALSE 
)
virtual

Extend the selection from the anchor to the given position.

FXbool FX::FXText::setSelection ( FXint  pos,
FXint  len,
FXbool  notify = FALSE 
)

Select len characters starting at given position pos.

virtual FXbool FX::FXText::killSelection ( FXbool  notify = FALSE)
virtual

Unselect the text.

FXbool FX::FXText::setHighlight ( FXint  start,
FXint  len 
)

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.

FXint FX::FXText::getVisibleRows ( ) const
inline

Return number of visible rows.

void FX::FXText::setVisibleColumns ( FXint  cols)

Change number of visible columns.

FXint FX::FXText::getVisibleColumns ( ) const
inline

Return number of visible columns.

void FX::FXText::setHiliteMatchTime ( FXuint  t)
inline

Change brace and parenthesis match highlighting time, in ms.

A match highlight time of 0 disables brace matching.

FXuint FX::FXText::getHiliteMatchTime ( ) const
inline

Return brace and parenthesis match highlighting time, in ms.

void FX::FXText::setHiliteStyles ( const FXHiliteStyle styles)

Set highlight styles.

const FXHiliteStyle* FX::FXText::getHiliteStyles ( ) const
inline

Get highlight styles.

virtual void FX::FXText::save ( FXStream store) const
virtual

Save to a stream.

Reimplemented from FX::FXWindow.

virtual void FX::FXText::load ( FXStream store)
virtual

Load from a stream.

Reimplemented from FX::FXWindow.

Member Data Documentation

const FXchar FX::FXText::textDelimiters[]
static

Copyright © 1997-2005 Jeroen van der Zijp