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


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

def countCols(start, end_); end

#countLines(start, end_) ⇒ Object

Count number of newlines


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

def countLines(start, end_); end

#countRows(start, end_) ⇒ Object

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


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

def countRows(start, end_); end

#dec(pos) ⇒ Object

Retreat to the previous valid UTF8 character start


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

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.


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

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) and the second array contains the ending index (or indices). 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).


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

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

#getBottomLineObject

Return the position of the bottom line


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

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


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

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


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

def getTopLine(); end

#inc(pos) ⇒ Object

Advance to the next valid UTF8 character start


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

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


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

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.


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

def killSelection(notify=false); end

#leftWord(pos) ⇒ Object

Return end of previous word


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

def leftWord(pos); end

#lineEnd(pos) ⇒ Object

Return position of end of line containing position pos


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

def lineEnd(pos); end

#lineStart(pos) ⇒ Object

Return position of beginning of line containing position pos


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

def lineStart(pos); end

#makePositionVisible(pos) ⇒ Object

Scroll text to make the given position visible


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

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


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

def nextLine(pos, nl=1); end

#nextRow(pos, nr = 1) ⇒ Object

Return start of next row


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

def nextRow(pos, nr=1); end

#numRowsObject

Return number of rows in buffer.


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

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)

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

def positionSelected?(pos); end

#positionVisible?(pos) ⇒ Boolean

Return true if position pos is fully visible

Returns:

  • (Boolean)

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

def positionVisible?(pos); end

#prevLine(pos, nl = 1) ⇒ Object

Return start of previous line


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

def prevLine(pos, nl=1); end

#prevRow(pos, nr = 1) ⇒ Object

Return start of previous row


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

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


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

def rightWord(pos); end

#rowEnd(pos) ⇒ Object

Return row end


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

def rowEnd(pos); end

#rowStart(pos) ⇒ Object

Return row start


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

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.


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

def selectAll(notify=false); end

#setBottomLine(pos) ⇒ Object

Make line containing pos the bottom line


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

def setBottomLine(pos); end

#setCenterLine(pos) ⇒ Object

Make line containing pos the center line


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

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.


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

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.


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

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.


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

def setCursorRow(row, notify=false); end

#setHighlight(pos, len) ⇒ Object

Highlight len characters starting at position pos


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

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.


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

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


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

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


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

def validPos(pos); end

#wordEnd(pos) ⇒ Object

Return end of word


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

def wordEnd(pos); end

#wordStart(pos) ⇒ Object

Return begin of word


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

def wordStart(pos); end