Class: Fox::FXText

Inherits:
FXScrollArea show all
Defined in:
rdoc-sources/FXText.rb

Overview

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.

Events

The following messages are sent by FXText to its target:

SEL_KEYPRESS

sent when a key is pressed; the message data is an FXEvent instance.

SEL_KEYRELEASE

sent when a key is released; the message data is an FXEvent instance.

SEL_LEFTBUTTONPRESS

sent when the left mouse button goes down; the message data is an FXEvent instance.

SEL_LEFTBUTTONRELEASE

sent when the left mouse button goes up; the message data is an FXEvent instance.

SEL_MIDDLEBUTTONPRESS

sent when the middle mouse button goes down; the message data is an FXEvent instance.

SEL_MIDDLEBUTTONRELEASE

sent when the middle mouse button goes up; the message data is an FXEvent instance.

SEL_RIGHTBUTTONPRESS

sent when the right mouse button goes down; the message data is an FXEvent instance.

SEL_RIGHTBUTTONRELEASE

sent when the right mouse button goes up; the message data is an FXEvent instance.

SEL_INSERTED

sent after text is inserted into the text buffer; the message data is a reference to an FXTextChange instance.

SEL_DELETED

sent after text is removed from the text buffer; the message data is a reference to an FXTextChange instance.

SEL_REPLACED

sent after some text is replaced in the text buffer; the message data is a reference to an FXTextChange instance.

SEL_CHANGED

sent when the contents of the text buffer change in any way; the message data is an integer indicating the cursor position.

SEL_SELECTED

sent after text is selected; the message data is a two-element array indicating the starting position of the selected text and the number of characters selected.

SEL_DESELECTED

sent before text is deselected; the message data is a two-element array indicating the starting position of the deselected text and the number of characters deselected.

Text widget options

TEXT_READONLY

Text is not editable

TEXT_WORDWRAP

Wrap at word breaks

TEXT_OVERSTRIKE

Overstrike mode

TEXT_FIXEDWRAP

Fixed wrap columns

TEXT_NO_TABS

Insert spaces for tabs

TEXT_AUTOINDENT

Autoindent

TEXT_SHOWACTIVE

Show active line

TEXT_AUTOSCROLL

Logging mode, keeping last line visible

Selection modes

SELECT_CHARS SELECT_WORDS SELECT_LINES

Text styles

STYLE_UNDERLINE

underline text

STYLE_STRIKEOUT

strike out text

STYLE_BOLD_

bold text

Message identifiers

ID_CURSOR_TOP
ID_CURSOR_BOTTOM
ID_CURSOR_HOME
ID_CURSOR_END
ID_CURSOR_RIGHT
ID_CURSOR_LEFT
ID_CURSOR_UP
ID_CURSOR_DOWN
ID_CURSOR_WORD_LEFT
ID_CURSOR_WORD_RIGHT
ID_CURSOR_PAGEDOWN
ID_CURSOR_PAGEUP
ID_CURSOR_SCRNTOP
ID_CURSOR_SCRNBTM
ID_CURSOR_SCRNCTR
ID_CURSOR_PAR_HOME
ID_CURSOR_PAR_END
ID_SCROLL_UP
ID_SCROLL_DOWN
ID_MARK
ID_EXTEND
ID_OVERST_STRING
ID_INSERT_STRING
ID_INSERT_NEWLINE
ID_INSERT_TAB
ID_CUT_SEL
ID_COPY_SEL
ID_PASTE_SEL
ID_DELETE_SEL
ID_SELECT_CHAR
ID_SELECT_WORD
ID_SELECT_LINE
ID_SELECT_ALL
ID_SELECT_MATCHING
ID_SELECT_BRACE
ID_SELECT_BRACK
ID_SELECT_PAREN
ID_SELECT_ANG
ID_DESELECT_ALL
ID_BACKSPACE
ID_BACKSPACE_WORD
ID_BACKSPACE_BOL
ID_DELETE
ID_DELETE_WORD
ID_DELETE_EOL
ID_DELETE_LINE
ID_TOGGLE_EDITABLE
ID_TOGGLE_OVERSTRIKE
ID_CURSOR_ROW
ID_CURSOR_COLUMN
ID_CLEAN_INDENT
ID_SHIFT_LEFT
ID_SHIFT_RIGHT
ID_SHIFT_TABLEFT
ID_SHIFT_TABRIGHT
ID_UPPER_CASE
ID_LOWER_CASE
ID_GOTO_MATCHING
ID_GOTO_SELECTED
ID_GOTO_LINE
ID_SEARCH_FORW_SEL
ID_SEARCH_BACK_SEL
ID_SEARCH
ID_REPLACE
ID_LEFT_BRACE
ID_LEFT_BRACK
ID_LEFT_PAREN
ID_LEFT_ANG
ID_RIGHT_BRACE
ID_RIGHT_BRACK
ID_RIGHT_PAREN
ID_RIGHT_ANG
ID_BLINK
ID_FLASH

Direct Known Subclasses

FXIrb

Instance Attribute Summary collapse

Attributes inherited from FXScrollArea

#contentHeight, #contentWidth, #horizontalScrollBar, #scrollStyle, #verticalScrollBar, #viewportHeight, #viewportWidth, #xPosition, #yPosition

Attributes inherited from FXWindow

#accelTable, #backColor, #defaultCursor, #dragCursor, #first, #focus, #key, #last, #layoutHints, #next, #numChildren, #owner, #parent, #prev, #root, #selector, #shell, #target, #x, #y

Attributes inherited from FXDrawable

#height, #visual, #width

Attributes inherited from FXId

#app, #userData, #xid

Instance Method Summary collapse

Methods inherited from FXScrollArea

#horizontalScrollable?, #position, #scrollCorner, #setPosition, #verticalScrollable?

Methods inherited from FXComposite

#maxChildHeight, #maxChildWidth

Methods inherited from FXWindow

#acceptDrop, #acquireClipboard, #acquireSelection, #active?, #addHotKey, #after?, after?, #before?, before?, #beginDrag, #canFocus?, #changeFocus, #childAtIndex, #childOf?, #children, #clearDragRectangle, #clearShape, colorType, colorTypeName, commonAncestor, #composeContext, #composite?, #contains?, #containsChild?, #create, #createComposeContext, #cursorPosition, #default?, #defaultHeight, #defaultWidth, deleteType, deleteTypeName, #destroy, #destroyComposeContext, #detach, #didAccept, #disable, #doesSaveUnder?, #dragging?, #dropDisable, #dropEnable, #dropEnabled?, #dropFinished, #dropTarget?, #each_child, #each_child_recursive, #enable, #enabled?, #endDrag, #forceRefresh, #getChildAt, #getDNDData, #getHeightForWidth, #getWidthForHeight, #grab, #grabKeyboard, #grabbed?, #grabbedKeyboard?, #handleDrag, #hasClipboard?, #hasFocus?, #hasSelection?, #height, #height=, #hide, imageType, #inFocusChain?, #indexOfChild, #initial?, #inquireDNDAction, #inquireDNDTypes, #killFocus, #layout, #linkAfter, #linkBefore, #lower, #move, octetType, octetTypeName, #offeredDNDType?, #position, #raiseWindow, #recalc, #releaseClipboard, #releaseSelection, #remHotKey, #removeChild, #repaint, #reparent, #resize, #scroll, #setCursorPosition, #setDNDData, #setDefault, #setDragRectangle, #setFocus, #setInitial, #setShape, #shell?, #show, #shown?, stringType, textType, textTypeName, #tr, #translateCoordinatesFrom, #translateCoordinatesTo, #underCursor?, #ungrab, #ungrabKeyboard, #update, urilistType, urilistTypeName, utf16Type, utf16TypeName, utf8Type, utf8TypeName, #visible=, #width, #width=

Methods included from Responder2

#connect

Methods inherited from FXDrawable

#resize

Methods inherited from FXId

#create, #created?, #destroy, #detach, #runOnUiThread

Methods inherited from FXObject

#bind, #handle, #load, #save, subclasses

Constructor Details

#initialize(p, target = nil, selector = 0, opts = 0, x = 0, y = 0, width = 0, height = 0, padLeft = 3, padRight = 3, padTop = 2, padBottom = 2) ⇒ FXText

Return an initialized FXText instance.

Parameters:

p

the parent window for this text widget Fox::FXComposite

target

the message target, if any, for this text widget Fox::FXObject

selector

the message identifier for this text widget [Integer]

opts

text options [Integer]

x

initial x-position [Integer]

y

initial y-position [Integer]

width

initial width [Integer]

height

initial height [Integer]



324
325
# File 'rdoc-sources/FXText.rb', line 324

def initialize(p, target=nil, selector=0, opts=0, x=0, y=0, width=0, height=0, padLeft=3, padRight=3, padTop=2, padBottom=2) # :yields: theText
end

Instance Attribute Details

#activeBackColorObject

Active background color Fox::FXColor



251
252
253
# File 'rdoc-sources/FXText.rb', line 251

def activeBackColor
  @activeBackColor
end

#anchorPosObject

Anchor position [Integer]



275
276
277
# File 'rdoc-sources/FXText.rb', line 275

def anchorPos
  @anchorPos
end

#barColorObject

Bar color Fox::FXColor



260
261
262
# File 'rdoc-sources/FXText.rb', line 260

def barColor
  @barColor
end

#barColumnsObject

Number of columns used for line numbers [Integer]



218
219
220
# File 'rdoc-sources/FXText.rb', line 218

def barColumns
  @barColumns
end

#cursorColObject

Cursor column [Integer]



281
282
283
# File 'rdoc-sources/FXText.rb', line 281

def cursorCol
  @cursorCol
end

#cursorColorObject

Cursor color Fox::FXColor



254
255
256
# File 'rdoc-sources/FXText.rb', line 254

def cursorColor
  @cursorColor
end

#cursorPosObject (readonly)

Cursor position [Integer]



284
285
286
# File 'rdoc-sources/FXText.rb', line 284

def cursorPos
  @cursorPos
end

#cursorRowObject

Cursor row [Integer]



278
279
280
# File 'rdoc-sources/FXText.rb', line 278

def cursorRow
  @cursorRow
end

#delimitersObject

Word delimiters [String]



230
231
232
# File 'rdoc-sources/FXText.rb', line 230

def delimiters
  @delimiters
end

#editable=(value) ⇒ Object (writeonly)

Indicates whether text is editable [Boolean]



224
225
226
# File 'rdoc-sources/FXText.rb', line 224

def editable=(value)
  @editable = value
end

#fontObject

Text font Fox::FXFont



233
234
235
# File 'rdoc-sources/FXText.rb', line 233

def font
  @font
end

#helpTextObject

Status line help text [String]



263
264
265
# File 'rdoc-sources/FXText.rb', line 263

def helpText
  @helpText
end

#hiliteBackColorObject

Highlight text background color Fox::FXColor



248
249
250
# File 'rdoc-sources/FXText.rb', line 248

def hiliteBackColor
  @hiliteBackColor
end

#hiliteMatchTimeObject

Brace and parenthesis match highlighting time, in milliseconds [Integer]. A hiliteMatchTime of 0 disables brace matching.



305
306
307
# File 'rdoc-sources/FXText.rb', line 305

def hiliteMatchTime
  @hiliteMatchTime
end

#hiliteStylesObject

Array of hilite styles [an Array of FXHiliteStyle instances]



308
309
310
# File 'rdoc-sources/FXText.rb', line 308

def hiliteStyles
  @hiliteStyles
end

#hiliteTextColorObject

Highlight text color Fox::FXColor



245
246
247
# File 'rdoc-sources/FXText.rb', line 245

def hiliteTextColor
  @hiliteTextColor
end

#lengthObject (readonly)

The length of the text buffer [Integer]



272
273
274
# File 'rdoc-sources/FXText.rb', line 272

def length
  @length
end

#marginBottomObject

Bottom margin [Integer]



203
204
205
# File 'rdoc-sources/FXText.rb', line 203

def marginBottom
  @marginBottom
end

#marginLeftObject

Left margin [Integer]



206
207
208
# File 'rdoc-sources/FXText.rb', line 206

def marginLeft
  @marginLeft
end

#marginRightObject

Right margin [Integer]



209
210
211
# File 'rdoc-sources/FXText.rb', line 209

def marginRight
  @marginRight
end

#marginTopObject

Top margin [Integer]



200
201
202
# File 'rdoc-sources/FXText.rb', line 200

def marginTop
  @marginTop
end

#modified=(value) ⇒ Object (writeonly)

Indicates whether text is modified [Boolean]



221
222
223
# File 'rdoc-sources/FXText.rb', line 221

def modified=(value)
  @modified = value
end

#numberColorObject

Line number color Fox::FXColor



257
258
259
# File 'rdoc-sources/FXText.rb', line 257

def numberColor
  @numberColor
end

#selBackColorObject

Selected text background color Fox::FXColor



239
240
241
# File 'rdoc-sources/FXText.rb', line 239

def selBackColor
  @selBackColor
end

#selEndPosObject (readonly)

Selection end position [Integer]



290
291
292
# File 'rdoc-sources/FXText.rb', line 290

def selEndPos
  @selEndPos
end

#selStartPosObject (readonly)

Selection start position [Integer]



287
288
289
# File 'rdoc-sources/FXText.rb', line 287

def selStartPos
  @selStartPos
end

#selTextColorObject

Selected text color Fox::FXColor



242
243
244
# File 'rdoc-sources/FXText.rb', line 242

def selTextColor
  @selTextColor
end

#styled=(value) ⇒ Object (writeonly)

Indicates whether text is styled [Boolean]



227
228
229
# File 'rdoc-sources/FXText.rb', line 227

def styled=(value)
  @styled = value
end

#tabColumnsObject

Tab columns [Integer]



215
216
217
# File 'rdoc-sources/FXText.rb', line 215

def tabColumns
  @tabColumns
end

#textObject

The text buffer [String]



269
270
271
# File 'rdoc-sources/FXText.rb', line 269

def text
  @text
end

#textColorObject

Text color Fox::FXColor



236
237
238
# File 'rdoc-sources/FXText.rb', line 236

def textColor
  @textColor
end

#textStyleObject

Text widget style [Integer]



293
294
295
# File 'rdoc-sources/FXText.rb', line 293

def textStyle
  @textStyle
end

#tipTextObject

Tool tip message [String]



266
267
268
# File 'rdoc-sources/FXText.rb', line 266

def tipText
  @tipText
end

#visibleColumnsObject

Number of visible columns [Integer]



299
300
301
# File 'rdoc-sources/FXText.rb', line 299

def visibleColumns
  @visibleColumns
end

#visibleRowsObject

Number of visible rows [Integer]



296
297
298
# File 'rdoc-sources/FXText.rb', line 296

def visibleRows
  @visibleRows
end

#wrapColumnsObject

Wrap columns [Integer]



212
213
214
# File 'rdoc-sources/FXText.rb', line 212

def wrapColumns
  @wrapColumns
end

Instance Method Details

#appendStyledText(text, style = 0, notify = false) ⇒ Object

Append text to the end of the text buffer. If notify is true, SEL_INSERTED and SEL_CHANGED messages are sent to the text widget’s message target after the new text is added.



387
# File 'rdoc-sources/FXText.rb', line 387

def appendStyledText(text, style=0, notify=false); end

#appendText(text, notify = false) ⇒ Object

Append text to the end of the text buffer. If notify is true, SEL_INSERTED and SEL_CHANGED messages are sent to the text widget’s message target after the new text is added.



381
# File 'rdoc-sources/FXText.rb', line 381

def appendText(text, notify=false); end

#changeStyle(pos, style) ⇒ Object

Change the style of text range at position pos in the text buffer to style. Here, style an array of bytes indicating the new style.



410
# File 'rdoc-sources/FXText.rb', line 410

def changeStyle(pos, n, style); end

#countCols(start, end_) ⇒ Object

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



465
# File 'rdoc-sources/FXText.rb', line 465

def countCols(start, end_); end

#countLines(start, end_) ⇒ Object

Count number of newlines



468
# File 'rdoc-sources/FXText.rb', line 468

def countLines(start, end_); end

#countRows(start, end_) ⇒ Object

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



462
# File 'rdoc-sources/FXText.rb', line 462

def countRows(start, end_); end

#dec(pos) ⇒ Object

Retreat to the previous valid UTF8 character start



510
# File 'rdoc-sources/FXText.rb', line 510

def dec(pos); end

#editable?Boolean

Return true if text is editable

Returns:

  • (Boolean)


334
# File 'rdoc-sources/FXText.rb', line 334

def editable? ; end

#extendSelection(pos, textSelectionMode = SELECT_CHARS, notify = false) ⇒ Object

Extend selection to pos. If notify is true, a SEL_DESELECTED message is sent to the text widget’s message target before any previously selected text is deselected, then a SEL_SELECTED message is sent after the new text is selected.



564
# File 'rdoc-sources/FXText.rb', line 564

def extendSelection(pos, textSelectionMode=SELECT_CHARS, notify=false); end

#extractStyle(pos, n) ⇒ Object

Extract n bytes of style info from position pos in the style buffer



361
# File 'rdoc-sources/FXText.rb', line 361

def extractStyle(pos, n); end

#extractText(pos, n) ⇒ Object

Extract n bytes of text from position pos in the text buffer



358
# File 'rdoc-sources/FXText.rb', line 358

def extractText(pos, n); end

#findText(string, start = 0, flags = SEARCH_FORWARD|SEARCH_WRAP|SEARCH_EXACT) ⇒ Object

Search for string in text buffer, and return the extent of the string as a two-element array of arrays. The first array contains the beginning index (or indices if SEARCH_REGEX) and the second array contains the ending index (or indices if SEARCH_REGEX) of the first match. The search starts from the given start 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, the found regex match begin and end is returned at index 0 and captures are returned as entries starting at index 1 in both beginning and ending arrays.



450
# File 'rdoc-sources/FXText.rb', line 450

def findText(string, start=0, flags=SEARCH_FORWARD|SEARCH_WRAP|SEARCH_EXACT); end

#getBottomLineObject

Return the position of the bottom line



525
# File 'rdoc-sources/FXText.rb', line 525

def getBottomLine(); end

#getByte(pos) ⇒ Object

Get character at position pos in text buffer



346
# File 'rdoc-sources/FXText.rb', line 346

def getByte(pos); end

#getChar(pos) ⇒ Object

Get wide character at position pos.



349
# File 'rdoc-sources/FXText.rb', line 349

def getChar(pos); end

#getCharLen(pos) ⇒ Object

Get length of wide character at position pos.



352
# File 'rdoc-sources/FXText.rb', line 352

def getCharLen(pos); end

#getPosAt(x, y) ⇒ Object

Return text position at given visible (x, y) coordinate



459
# File 'rdoc-sources/FXText.rb', line 459

def getPosAt(x, y); end

#getStyle(pos) ⇒ Object

Get style at position pos in style buffer



355
# File 'rdoc-sources/FXText.rb', line 355

def getStyle(pos); end

#getTopLineObject

Return position of top line



519
# File 'rdoc-sources/FXText.rb', line 519

def getTopLine(); end

#inc(pos) ⇒ Object

Advance to the next valid UTF8 character start



513
# File 'rdoc-sources/FXText.rb', line 513

def inc(pos); end

#insertStyledText(pos, text, style = 0, notify = false) ⇒ Object

Insert text at position pos in the text buffer. If notify is true, SEL_INSERTED and SEL_CHANGED messages are sent to the text widget’s message target after the new text is inserted.



399
# File 'rdoc-sources/FXText.rb', line 399

def insertStyledText(pos, text, style=0, notify=false); end

#insertText(pos, text, notify = false) ⇒ Object

Insert text at position pos in the text buffer. If notify is true, SEL_INSERTED and SEL_CHANGED messages are sent to the text widget’s message target after the new text is inserted.



393
# File 'rdoc-sources/FXText.rb', line 393

def insertText(pos, text, notify=false); end

#killHighlightObject

Unhighlight the text



575
# File 'rdoc-sources/FXText.rb', line 575

def killHighlight(); end

#killSelection(notify = false) ⇒ Object

Kill the selection. If notify is true, a SEL_DESELECTED message is sent to the text widget’s message target before the text is deselected.



569
# File 'rdoc-sources/FXText.rb', line 569

def killSelection(notify=false); end

#leftWord(pos) ⇒ Object

Return end of previous word



495
# File 'rdoc-sources/FXText.rb', line 495

def leftWord(pos); end

#lineEnd(pos) ⇒ Object

Return position of end of line containing position pos



474
# File 'rdoc-sources/FXText.rb', line 474

def lineEnd(pos); end

#lineStart(pos) ⇒ Object

Return position of beginning of line containing position pos



471
# File 'rdoc-sources/FXText.rb', line 471

def lineStart(pos); end

#makePositionVisible(pos) ⇒ Object

Scroll text to make the given position visible



578
# File 'rdoc-sources/FXText.rb', line 578

def makePositionVisible(pos); end

#modified?Boolean

Return true if text was modified

Returns:

  • (Boolean)


331
# File 'rdoc-sources/FXText.rb', line 331

def modified? ; end

#nextLine(pos, nl = 1) ⇒ Object

Return start of next line



477
# File 'rdoc-sources/FXText.rb', line 477

def nextLine(pos, nl=1); end

#nextRow(pos, nr = 1) ⇒ Object

Return start of next row



489
# File 'rdoc-sources/FXText.rb', line 489

def nextRow(pos, nr=1); end

#numRowsObject

Return number of rows in buffer.



581
# File 'rdoc-sources/FXText.rb', line 581

def numRows; end

#overstrike=(os) ⇒ Object

Set overstrike mode to true or false.



337
# File 'rdoc-sources/FXText.rb', line 337

def overstrike=(os); end

#overstrike?Boolean

Return true if overstrike mode is activated.

Returns:

  • (Boolean)


340
# File 'rdoc-sources/FXText.rb', line 340

def overstrike? ; end

#positionSelected?(pos) ⇒ Boolean

Return true if position pos is selected

Returns:

  • (Boolean)


453
# File 'rdoc-sources/FXText.rb', line 453

def positionSelected?(pos); end

#positionVisible?(pos) ⇒ Boolean

Return true if position pos is fully visible

Returns:

  • (Boolean)


456
# File 'rdoc-sources/FXText.rb', line 456

def positionVisible?(pos); end

#prevLine(pos, nl = 1) ⇒ Object

Return start of previous line



480
# File 'rdoc-sources/FXText.rb', line 480

def prevLine(pos, nl=1); end

#prevRow(pos, nr = 1) ⇒ Object

Return start of previous row



492
# File 'rdoc-sources/FXText.rb', line 492

def prevRow(pos, nr=1); end

#removeText(pos, n, notify = false) ⇒ Object

Remove n characters of text at position pos in the buffer If notify is true, a SEL_DELETED message is sent to the text widget’s message target before the text is removed and a SEL_CHANGED message is sent after the change occurs.



405
# File 'rdoc-sources/FXText.rb', line 405

def removeText(pos, n, notify=false); end

#replaceStyledText(pos, m, text, style = 0, notify = false) ⇒ Object

Replace the m characters at pos with text. If notify is true, a SEL_DELETED message is sent to the text widget’s message target before the old text is removed, and a SEL_INSERTED and SEL_CHANGED message is sent after the new text is inserted.



375
# File 'rdoc-sources/FXText.rb', line 375

def replaceStyledText(pos, m, text, style=0, notify=false); end

#replaceText(pos, m, text, notify = false) ⇒ Object

Replace the m characters at pos with text. If notify is true, a SEL_DELETED message is sent to the text widget’s message target before the old text is removed, and a SEL_INSERTED and SEL_CHANGED message is sent after the new text is inserted.



368
# File 'rdoc-sources/FXText.rb', line 368

def replaceText(pos, m, text, notify=false); end

#rightWord(pos) ⇒ Object

Return begin of next word



498
# File 'rdoc-sources/FXText.rb', line 498

def rightWord(pos); end

#rowEnd(pos) ⇒ Object

Return row end



486
# File 'rdoc-sources/FXText.rb', line 486

def rowEnd(pos); end

#rowStart(pos) ⇒ Object

Return row start



483
# File 'rdoc-sources/FXText.rb', line 483

def rowStart(pos); end

#selectAll(notify = false) ⇒ Object

Select all text. If notify is true, a SEL_DESELECTED message is sent to the text widget’s message target before any previously selected text is deselected, then a SEL_SELECTED message is sent after the new text is selected.



550
# File 'rdoc-sources/FXText.rb', line 550

def selectAll(notify=false); end

#setBottomLine(pos) ⇒ Object

Make line containing pos the bottom line



522
# File 'rdoc-sources/FXText.rb', line 522

def setBottomLine(pos); end

#setCenterLine(pos) ⇒ Object

Make line containing pos the center line



528
# File 'rdoc-sources/FXText.rb', line 528

def setCenterLine(pos); end

#setCursorCol(col, notify = false) ⇒ Object

Set cursor column. If notify is true, a SEL_CHANGED message is sent to the text widget’s message target after the change occurs.



538
# File 'rdoc-sources/FXText.rb', line 538

def setCursorCol(col, notify=false); end

#setCursorPos(pos, notify = false) ⇒ Object

Set cursor position. If notify is true, a SEL_CHANGED message is sent to the text widget’s message target after the change occurs.



543
# File 'rdoc-sources/FXText.rb', line 543

def setCursorPos(pos, notify=false); end

#setCursorRow(row, notify = false) ⇒ Object

Set cursor row. If notify is true, a SEL_CHANGED message is sent to the text widget’s message target after the change occurs.



533
# File 'rdoc-sources/FXText.rb', line 533

def setCursorRow(row, notify=false); end

#setHighlight(pos, len) ⇒ Object

Highlight len characters starting at position pos



572
# File 'rdoc-sources/FXText.rb', line 572

def setHighlight(pos, len); end

#setSelection(pos, len, notify = false) ⇒ Object

Select len characters starting at position pos. If notify is true, a SEL_DESELECTED message is sent to the text widget’s message target before any previously selected text is deselected, then a SEL_SELECTED message is sent after the new text is selected.



557
# File 'rdoc-sources/FXText.rb', line 557

def setSelection(pos, len, notify=false); end

#setStyledText(text, style = 0, notify = false) ⇒ Object

Change the text in the buffer to new text If notify is true, SEL_INSERTED and SEL_CHANGED messages are sent to the text widget’s message target after the new text is set.



427
# File 'rdoc-sources/FXText.rb', line 427

def setStyledText(text, style=0, notify=false); end

#setText(text, notify = false) ⇒ Object

Change the text If notify is true, SEL_INSERTED and SEL_CHANGED messages are sent to the text widget’s message target after the new text is set.



421
# File 'rdoc-sources/FXText.rb', line 421

def setText(text, notify=false); end

#setTopLine(pos) ⇒ Object

Make line containing pos the top line



516
# File 'rdoc-sources/FXText.rb', line 516

def setTopLine(pos); end

#shiftText(startPos, endPos, amount, notify = false) ⇒ Object

Shift block of lines from position startPos up to endPos by given amount. If notify is true, a SEL_DELETED message is sent to the text widget’s message target before the old text is removed, and a SEL_INSERTED and SEL_CHANGED message is sent after the new text is inserted.



434
# File 'rdoc-sources/FXText.rb', line 434

def shiftText(startPos, endPos, amount, notify=false); end

#styled?Boolean

Return true if styled text

Returns:

  • (Boolean)


343
# File 'rdoc-sources/FXText.rb', line 343

def styled? ; end

#to_sObject

Return the text buffer’s value



328
# File 'rdoc-sources/FXText.rb', line 328

def to_s; text; end

#validPos(pos) ⇒ Object

Return validated UTF8 character start position



507
# File 'rdoc-sources/FXText.rb', line 507

def validPos(pos); end

#wordEnd(pos) ⇒ Object

Return end of word



504
# File 'rdoc-sources/FXText.rb', line 504

def wordEnd(pos); end

#wordStart(pos) ⇒ Object

Return begin of word



501
# File 'rdoc-sources/FXText.rb', line 501

def wordStart(pos); end