Class: Iup::Scintilla

Inherits:
Widget
  • Object
show all
Includes:
ButtonCallback
Defined in:
lib/wrapped/scintilla.rb

Overview

A powerful text element. The API documentation can only hint at the use of this control. For more information see Tecgraf's documentation on IupScintilla and the Scintilla website.

Example

The following example sets up a Scintilla text widget handling some cpp code. Notice the setup of the keywords and styling settings. Also, the text widget must be placed into a dialog and mapped before its other attributes are set and the dialog shown.

text = Iup::Scintilla.new 

dlg = Iup::Dialog.new(text) do |d|
d.title = 'Scintilla example'
d.size = '300x200'
end.map

text.expand = 'YES'
text.lexerlanguage = 'cpp'
text.keywords(0, "void struct union enum char short int long double float
signed unsigned const static extern auto register volatile bool class
private protected public friend inline template virtual asm explicit
typename mutable if else switch case default break goto return for while
do continue typedef sizeof NULL new delete throw try catch namespace
operator this const_cast static_cast dynamic_cast reinterpret_cast true
false using typeid and and_eq bitand bitor compl not not_eq or or_eq xor
xor_eq")
text.stylefont(32, 'Consolas')
text.stylefontsize(32, 11)
text.styleclearall = 'Yes'
text.stylefgcolor(1, '0 128 0') # 1 - C Comment
text.stylefgcolor(2, '0 128 0') # 2 - C++ Comment line
text.stylefgcolor(4, '128 0 0') # 4 - Number
text.stylefgcolor(5, '0 0 255') # 5 - Keyword
text.stylefgcolor(6, '160 20 20') # 6 - String
text.stylefgcolor(7, '128 0 0') # 7 - Character
text.stylefgcolor(9, '0 0 255') # 9 - Preprocessor block
text.stylefgcolor(10, '255 0 255') # 10 - Operator
text.stylebold(10, 'YES')
text.stylehotspot(6, 'YES')
text.marginwidth(0, 50)
text.property('fold', 1)
text.property('fold.compact', 0)
text.property('fold.comment', 1)
text.property('fold.preprocessor', 1)
text.marginwidth(1, 20)
text.margintype(1, 'SYMBOL')
text.marginmaskfolders(1, 'Yes')

text.markerdefine('folder', 'plus')
text.markerdefine('folderopen', 'minus')
text.markerdefine('folderend', 'empty')
text.markerdefine('foldermidtail', 'empty')
text.markerdefine('folderopenmid', 'empty')
text.markerdefine('foldersub', 'empty')
text.markerdefine('foldertail', 'empty')

text.foldflags = 'lineafter_contracted'

text.marginsensitive(1, 'YES')

dlg.show

-- TODO: This class's actions are incomplete

Constant Summary collapse

@@opened =
false

Instance Attribute Summary

Attributes inherited from Widget

#handle

Instance Method Summary collapse

Methods included from ButtonCallback

#button_cb=

Methods inherited from Widget

#active, #assign_handle, #destroy, #enterwindow_cb=, #fgcolor, #font, #getfocus_cb=, #help_cb=, #k_any=, #killfocus_cb=, #leavewindow_cb=, #map_cb=, #maxsize, #minsize, #open_controls, #unmap_cb=, #visible, #wid, #zorder

Methods included from AttributeBuilders

#define_attribute, #define_id_attribute, #define_id_reader, #define_id_writer, #define_property_attribute, #define_property_reader, #define_property_writer, #define_reader, #define_writer

Methods included from CallbackSetter

#define_callback

Constructor Details

#initialize {|_self| ... } ⇒ Scintilla

Creates a new instance. If a block is given, the new instance is yielded to it.

Yields:

  • (_self)

Yield Parameters:



76
77
78
79
80
81
82
83
84
85
# File 'lib/wrapped/scintilla.rb', line 76

def initialize
  unless @@opened
    # make sure the scintilla library is opened on first use
    ScintillaLib.IupScintillaOpen
    @@opened = true
  end
  @handle = ScintillaLib.IupScintilla

  yield self if block_given?
end

Instance Method Details

#action=(callback) ⇒ Object

--



1045
1046
1047
1048
1049
1050
1051
1052
1053
# File 'lib/wrapped/scintilla.rb', line 1045

def action= callback
  unless callback.arity == 4
    raise ArgumentError, 'action callback must take 4 arguments: (insert, position, length, text)'
  end
  cb = Proc.new do |ih, insert, pos, length, text|
    callback.call insert, pos, length, text
  end
  define_callback cb, 'ACTION', :iiis_i
end

#addObject

:attr_writer: add Inserts a string at the current position.



164
# File 'lib/wrapped/scintilla.rb', line 164

define_writer :add

#annotationclearallObject

:attr: annotationclearall Deletes all annotations.



271
# File 'lib/wrapped/scintilla.rb', line 271

define_attribute :annotationclearall

#annotationstyleObject

:method: annotationstyle :call-seq:

text.annotationstyle(id)
text.annotationstyle(id, val)

For the "id" line number, accesses its style.



255
# File 'lib/wrapped/scintilla.rb', line 255

define_id_attribute :annotationstyle

#annotationstyleoffsetObject

:attr: annotationstyleoffset A style offset separates the annotation and text.



260
# File 'lib/wrapped/scintilla.rb', line 260

define_attribute :annotationstyleoffset

#annotationtextObject

:method: annotationtext :call-seq:

text.annotationtext(id)
text.annotationtext(id, val)

For the "id" line number, accesses its annotation.



246
# File 'lib/wrapped/scintilla.rb', line 246

define_id_attribute :annotationtext

#annotationvisibleObject

:attr: annotationvisible Setting to enable or display annotations. Values 'hidden' / 'standard' / 'boxed'.



266
# File 'lib/wrapped/scintilla.rb', line 266

define_attribute :annotationvisible

#appendObject

:attr_writer: append Inserts a string at the end of the text.



169
# File 'lib/wrapped/scintilla.rb', line 169

define_writer :append

#autocactiveObject

:attr_reader: autocactive Returns "YES" if there is an auto-completion list showing.



292
# File 'lib/wrapped/scintilla.rb', line 292

define_reader :autocactive

#autoccancelObject

:attr_writer: autoccancel Removes any displayed auto-completion list.



287
# File 'lib/wrapped/scintilla.rb', line 287

define_writer :autoccancel

#autoccompleteObject

:attr_writer: autoccomplete Starts the auto-completion.



302
# File 'lib/wrapped/scintilla.rb', line 302

define_writer :autoccomplete

#autocdroprestofwordObject

:attr: autocdroprestofword Controls if remaining characters are deleted once an item is selected. Values 'yes' / 'no'.



319
# File 'lib/wrapped/scintilla.rb', line 319

define_attribute :autocdroprestofword

#autocmaxheightObject

:attr: autocmaxheight Controls number of rows visible in auto-completion list.



324
# File 'lib/wrapped/scintilla.rb', line 324

define_attribute :autocmaxheight

#autocmaxwidthObject

:attr: autocmaxwidth Controls width of auto-completion list, in characters.



329
# File 'lib/wrapped/scintilla.rb', line 329

define_attribute :autocmaxwidth

#autocposstartObject

:attr_reader: autocposstart Returns current start position of auto-completion list.



297
# File 'lib/wrapped/scintilla.rb', line 297

define_reader :autocposstart

#autocselectObject

:attr_writer: autocselect Select an item from auto-completion list.



307
# File 'lib/wrapped/scintilla.rb', line 307

define_writer :autocselect

#autocselectedindexObject

:attr_reader: autocselectedindex Returns index of currently selected item.



312
# File 'lib/wrapped/scintilla.rb', line 312

define_reader :autocselectedindex

#autocshowObject

:method: autocshow :call-seq:

text.autocshow(id, val)

Shows a list of words with "id" being the number of characters entered by user.



282
# File 'lib/wrapped/scintilla.rb', line 282

define_id_writer :autocshow

#bgcolorObject

:method: bgcolor :call-seq:

text.markerbgcolor(id, val)

Defines background color of given marker number. Values as 'r g b'.



575
# File 'lib/wrapped/scintilla.rb', line 575

define_id_writer :bgcolor

#borderObject

:attr: border Sets border around widget, values 'yes' / 'no'.



92
# File 'lib/wrapped/scintilla.rb', line 92

define_attribute :border

#bracebadlightObject

:attr_writer: bracebadlight Using format "pos1:pos2", highlights a mis-matching brace.



341
# File 'lib/wrapped/scintilla.rb', line 341

define_writer :bracebadlight

#bracehighlightObject

:attr_writer: bracehighlight Using format "pos1:pos2", highlights the brace.



336
# File 'lib/wrapped/scintilla.rb', line 336

define_writer :bracehighlight

#bracematchObject

:method: bracematch :call-seq:

text.bracematch(id)

Finds a match for the brace at character position "id".



349
# File 'lib/wrapped/scintilla.rb', line 349

define_id_reader :bracematch

#canfocusObject

:attr: canfocus If set, the control can gain focus, values 'yes' / 'no'.



97
# File 'lib/wrapped/scintilla.rb', line 97

define_attribute :canfocus

#caretObject

:attr: caret Position of the insertion point, in "lin,col" format.



356
# File 'lib/wrapped/scintilla.rb', line 356

define_attribute :caret

#caret_cb=(callback) ⇒ Object

--



1066
1067
1068
1069
1070
1071
1072
1073
1074
# File 'lib/wrapped/scintilla.rb', line 1066

def caret_cb= callback
  unless callback.arity == 3
    raise ArgumentError, 'caret_cb callback must take 3 arguments: (line, column, position)'
  end
  cb = Proc.new do |ih, lin, col, pos|
    callback.call lin, col, pos
  end
  define_callback cb, 'CARET_CB', :iii_i
end

#caretposObject

:attr: caretpos Position of the insertion point, as a 0-based character position.



361
# File 'lib/wrapped/scintilla.rb', line 361

define_attribute :caretpos

#carettoviewObject

:attr_writer: carettoview Ensures caret is on a visible line.



366
# File 'lib/wrapped/scintilla.rb', line 366

define_writer :carettoview

#charObject

:method: char :call-seq:

text.char(id)
  • id - position in the text. Returns the character at a given position.


178
# File 'lib/wrapped/scintilla.rb', line 178

define_id_reader :char

#clearallObject

:attr_writer: clearall Deletes all text, unless the control is readonly.



183
# File 'lib/wrapped/scintilla.rb', line 183

define_writer :clearall

#cleardocumentstyleObject

:attr_writer: cleardocumentstyle Resets and clears styling and folding.



897
# File 'lib/wrapped/scintilla.rb', line 897

define_writer :cleardocumentstyle

#clipboardObject

:attr: clipboard 'clear' / 'copy' / 'cut' / 'paste', access the clipboard with the current selection.



102
# File 'lib/wrapped/scintilla.rb', line 102

define_attribute :clipboard

#countObject

:attr_reader: count Returns the number of characters in the text.



188
# File 'lib/wrapped/scintilla.rb', line 188

define_reader :count

#cursorObject

:attr: cursor Defines the mouse shape / cursor for the canvas. Available cursors are shown in the Tecgraf documentation.



109
# File 'lib/wrapped/scintilla.rb', line 109

define_attribute :cursor

#deleterange(pos, len) ⇒ Object

Deletes a range of text:

  • pos - position of start of range in text
  • len - number of characters to delete


194
195
196
# File 'lib/wrapped/scintilla.rb', line 194

def deleterange(pos, len)
  IupLib.IupSetAttribute(@handle, "DELETERANGE", "#{pos},#{len}")
end

#expandObject

:attr: expand Allows control to fill available space in indicated direction. Values 'no' / 'horizontal' / 'vertical' / 'yes'.



1011
# File 'lib/wrapped/scintilla.rb', line 1011

define_attribute :expand

#extraascentObject

:attr: extraascent Controls extra space between lines, beyond maximum ascent.



960
# File 'lib/wrapped/scintilla.rb', line 960

define_attribute :extraascent

#extradescentObject

:attr: extradescent Controls extra space between lines, beyond maximum descent.



965
# File 'lib/wrapped/scintilla.rb', line 965

define_attribute :extradescent

#foldflagsObject

:attr_writer: foldflags Style of drawn fold lines, one of: 'LINEBEFORE_EXPANDED' / 'LINEBEFORE_CONTRACTED' / 'LINEAFTER_EXPANDED' / 'LINEAFTER_CONTRACTED'



391
# File 'lib/wrapped/scintilla.rb', line 391

define_writer :foldflags

#foldlevelObject

:method: foldlevel :call-seq:

text.foldlevel(id)
text.foldlevel(id, val)

The fold level of line "id".



400
# File 'lib/wrapped/scintilla.rb', line 400

define_id_attribute :foldlevel

#foldtoggleObject

:attr_writer: foldtoggle Expands or closes fold point, based on line number



405
# File 'lib/wrapped/scintilla.rb', line 405

define_writer :foldtoggle

#highlightguideObject

:attr: highlightguide Highlights indentation guide of a given column.



928
# File 'lib/wrapped/scintilla.rb', line 928

define_attribute :highlightguide

#indentationguidesObject

:attr: indentationguides Controls dotted vertical lines to show indentation white space, values 'none' / 'real' / 'lookforward' / 'lookboth'.



923
# File 'lib/wrapped/scintilla.rb', line 923

define_attribute :indentationguides

#insertObject

:method: insert :call-seq:

text.insert(id, str)
  • id - position in the text
  • str - text string Inserts a text string at position "id".


206
# File 'lib/wrapped/scintilla.rb', line 206

define_id_writer :insert

#keywordsObject

:method: keywords :call-seq:

text.keywords(id, val)

Creates a keyword list with an id in range 0 to 8.



415
# File 'lib/wrapped/scintilla.rb', line 415

define_id_writer :keywords

#keywordsetsObject

:attr_reader: keywordsets Returns description of all keyword lists.



420
# File 'lib/wrapped/scintilla.rb', line 420

define_reader :keywordsets

#lastmarkeraddhandleObject

:attr_reader: lastmarkeraddhandle Returns the last handle created by #markeradd.



684
# File 'lib/wrapped/scintilla.rb', line 684

define_reader :lastmarkeraddhandle

#lastmarkerfoundObject

:attr_reader: lastmarkerfound Returns last line number with marker found by #markernext.



689
# File 'lib/wrapped/scintilla.rb', line 689

define_reader :lastmarkerfound

#lexerlanguageObject

:attr: lexerlanguage Any name supported by Scintilla, e.g. 'ruby' / 'bash' / 'tex'.



425
# File 'lib/wrapped/scintilla.rb', line 425

define_attribute :lexerlanguage

#lineObject

:method: line :call-seq:

text.line(id)
  • id - position in the text. Returns the text of the line referenced by given "id".


215
# File 'lib/wrapped/scintilla.rb', line 215

define_id_reader :line

#linecountObject

:attr_reader: linecount Returns the number of lines in the text.



220
# File 'lib/wrapped/scintilla.rb', line 220

define_reader :linecount

#linevalueObject

:attr_reader: linevalue Returns the text of the line where the caret is.



225
# File 'lib/wrapped/scintilla.rb', line 225

define_reader :linevalue

#loadlexerlibraryObject

:attr_writer: loadlexerlibrary Loads a lexer from a given filename.



430
# File 'lib/wrapped/scintilla.rb', line 430

define_writer :loadlexerlibrary

#margincursorObject

:method: margincursor :call-seq:

text.margincursor(id)
text.margincursor(id, val)

Accesses the cursor for margin, values 'reversearrow' / 'arrow'.



538
# File 'lib/wrapped/scintilla.rb', line 538

define_id_attribute :margincursor

#marginleftObject

:method: marginleft :call-seq:

text.marginleft(id)
text.marginleft(id, val)

Defines size of blank margin on the left size.



491
# File 'lib/wrapped/scintilla.rb', line 491

define_id_attribute :marginleft

#marginmaskfoldersObject

:method: marginmaskfolders :call-seq:

text.marginmaskfolders(id)
text.marginmaskfolders(id, val)

Define if margin "id" is folding or non-folding, values 'yes' / 'no'.



456
# File 'lib/wrapped/scintilla.rb', line 456

define_id_attribute :marginmaskfolders

#marginrightObject

:method: marginright :call-seq:

text.marginright(id)
text.marginright(id, val)

Defines size of blank margin on the right size.



500
# File 'lib/wrapped/scintilla.rb', line 500

define_id_attribute :marginright

#marginsensitiveObject

:method: marginsensitive :call-seq:

text.marginsensitive(id)
text.marginsensitive(id, val)

Define if margin "id" is sensitive or not, values 'yes' / 'no'.



466
# File 'lib/wrapped/scintilla.rb', line 466

define_id_attribute :marginsensitive

#margintextObject

:method: margintext :call-seq:

text.margintext(id)
text.margintext(id, val)
  • id - the line number Controls text of each line.


510
# File 'lib/wrapped/scintilla.rb', line 510

define_id_attribute :margintext

#margintextclearallObject

:method: margintextclearall :call-seq:

text.margintextclearall(id)

Clears text and styles of given margin "id".



528
# File 'lib/wrapped/scintilla.rb', line 528

define_id_writer :margintextclearall

#margintextstyleObject

:method: margintextstyle :call-seq:

text.margintextstyle(id)
text.margintextstyle(id, val)
  • id - the line number Controls style of text of each line.


520
# File 'lib/wrapped/scintilla.rb', line 520

define_id_attribute :margintextstyle

#margintypeObject

:method: margintype Define and set type of margin "id". Values 'symbol' / 'number' / 'text' / 'rtext' / 'background' / 'foreground'



473
# File 'lib/wrapped/scintilla.rb', line 473

define_id_attribute :margintype

#marginwidthObject

:method: marginwidth :call-seq:

text.marginwidth(id)
text.marginwidth(id, val)

Defines width of a margin "id" in pixels.



482
# File 'lib/wrapped/scintilla.rb', line 482

define_id_attribute :marginwidth

#markeraddObject

:method: markeradd :call-seq:

text.markeradd(id, val)

Adds marker number to given line "id".



623
# File 'lib/wrapped/scintilla.rb', line 623

define_id_writer :markeradd

#markeralphaObject

:method: markeralpha :call-seq:

text.markeralpha(id, val)

Defines alpha value of given marker number.



592
# File 'lib/wrapped/scintilla.rb', line 592

define_id_writer :markeralpha

#markerbgcolorselObject

:method: markerbgcolorsel :call-seq:

text.markerbgcolorsel(id, val)

Defines highlight background color of given marker number. Values as 'r g b'.



584
# File 'lib/wrapped/scintilla.rb', line 584

define_id_writer :markerbgcolorsel

#markerdefineObject

:method: markerdefine :call-seq:

text.markerdefine(number, marker)

Sets marker for given number.



548
# File 'lib/wrapped/scintilla.rb', line 548

define_property_writer :markerdefine

#markerdeleteObject

:method: markerdelete :call-seq:

text.markerdelete(id, val)

Deletes marker number to given line "id".



631
# File 'lib/wrapped/scintilla.rb', line 631

define_id_writer :markerdelete

#markerdeleteall(val) ⇒ Object

:call-seq:

text.markerdeleteall(val)

Removes given marker from all lines.



638
639
640
# File 'lib/wrapped/scintilla.rb', line 638

def markerdeleteall(val)
  IupLib.IupSetAttribute(@handle, "MARKERDELETEALL", val.to_s)
end

#markerdeletehandleObject

:attr_writer: markerdeletehandle Searches for a marker given its handle "id" and deletes it, if found.



679
# File 'lib/wrapped/scintilla.rb', line 679

define_writer :markerdeletehandle

#markerfgcolorObject

:method: markerfgcolor :call-seq:

text.markerfgcolor(id, val)

Defines foreground color of given marker number. Values as 'r g b'.



566
# File 'lib/wrapped/scintilla.rb', line 566

define_id_writer :markerfgcolor

#markergetObject

:method: markerget :call-seq:

text.markerget(id)

Returns marker mask with markers for given line "id".



648
# File 'lib/wrapped/scintilla.rb', line 648

define_id_reader :markerget

#markerhighlightObject

:attr: markerhighlight Accesses highlight of folding block when selected. Values 'yes' / 'no'.



615
# File 'lib/wrapped/scintilla.rb', line 615

define_attribute :markerhighlight

#markerlinefromhandleObject

:method: markerlinefromhandle :call-seq:

text.markerlinefromhandle(id)

Searches for a marker given its handle "id".



674
# File 'lib/wrapped/scintilla.rb', line 674

define_id_reader :markerlinefromhandle

#markernextObject

:method: markernext :call-seq:

text.markernext(id, mask)

Searches for a given marker mask, starting from line "id" and moving forwards.



657
# File 'lib/wrapped/scintilla.rb', line 657

define_id_writer :markernext

#markerpreviousObject

:method: markerprevious :call-seq:

text.markerprevious(id, mask)

Searches for a given marker mask, starting from line "id" and moving backwards.



666
# File 'lib/wrapped/scintilla.rb', line 666

define_id_writer :markerprevious

#markerrgbaimageObject

:method: markerrgbaimage :call-seq:

text.markerrgbaimage(id, val)

Defines image to be used on a marker number: must be an Iup::ImageRGBA.



601
# File 'lib/wrapped/scintilla.rb', line 601

define_id_writer :markerrgbaimage

#markerrgbaimagescaleObject

:method: markerrgbaimagescale :call-seq:

text.markerrgbaimagescale(id, val)

Defines image scale factor, as a percent (1-100).



609
# File 'lib/wrapped/scintilla.rb', line 609

define_id_writer :markerrgbaimagescale

#markersymbolObject

:method: markersymbol :call-seq:

text.marginsymbol(id)
text.marginsymbol(id, val)

Associates marker number with symbol.



557
# File 'lib/wrapped/scintilla.rb', line 557

define_id_attribute :markersymbol

#motion_cb=(callback) ⇒ Object

--



1085
1086
1087
1088
1089
1090
1091
1092
1093
# File 'lib/wrapped/scintilla.rb', line 1085

def motion_cb= callback
  unless callback.arity == 3
    raise ArgumentError, 'motion_cb callback must take 3 arguments: (x, y, state)'
  end
  cb = Proc.new do |ih, x, y, state|
    callback.call x, y, state
  end
  define_callback cb, 'MOTION_CB', :iis_i
end

#overwriteObject

:attr: overwrite 'off' / 'on', when enabled, new characters replace the one to the right of the text caret.



115
# File 'lib/wrapped/scintilla.rb', line 115

define_attribute :overwrite

#positionObject

:attr_reader: position Returns position in pixels within client window as "x,y".



1016
# File 'lib/wrapped/scintilla.rb', line 1016

define_reader :position

#prependObject

:attr_writer: prepend Inserts a string at the beginning of the text.



230
# File 'lib/wrapped/scintilla.rb', line 230

define_writer :prepend

#propertyObject

:method: property :call-seq:

text.property(name)
text.property(name, value)

Access lexer properties.



439
# File 'lib/wrapped/scintilla.rb', line 439

define_property_attribute :property

#propertynamesObject

:attr_reader: propertynames Returns a list of property names.



444
# File 'lib/wrapped/scintilla.rb', line 444

define_reader :propertynames

#rastersizeObject

:attr: rastersize Size of the button, in pixels, value as "widthxheight".



1021
# File 'lib/wrapped/scintilla.rb', line 1021

define_attribute :rastersize

#readonlyObject

:attr: readonly 'no' / 'yes' setting to restrict editing of text.



120
# File 'lib/wrapped/scintilla.rb', line 120

define_attribute :readonly

#redoObject

:attr: redo Redo the last operation if set to 'yes', or all operations if set to 'all'.



942
# File 'lib/wrapped/scintilla.rb', line 942

define_attribute :redo

#replacetargetObject

:attr: replacetarget Replaces the target text.



746
# File 'lib/wrapped/scintilla.rb', line 746

define_writer :replacetarget

#screenpositionObject

:attr_reader: screenposition Returns position in pixels on screen as "x,y".



1026
# File 'lib/wrapped/scintilla.rb', line 1026

define_reader :screenposition

#scrollbarObject

:attr: scrollbar Adds a scrollbar to the widget. Values 'horizontal' / 'vertical' / 'yes' / 'no'.



697
# File 'lib/wrapped/scintilla.rb', line 697

define_attribute :scrollbar

#scrolltocaretObject

:attr_writer: scrolltocaret Make given caret position visible.



702
# File 'lib/wrapped/scintilla.rb', line 702

define_writer :scrolltocaret

#scrollwidthObject

:attr: scrollwidth Controls document width in pixels, default: 2000.



707
# File 'lib/wrapped/scintilla.rb', line 707

define_attribute :scrollwidth

#searchflagsObject

:attr: searchflags Accesses flags - possible values are 'MATCHCASE' / 'WHOLEWORD' / 'WORDSTART' / 'REGEXP' / 'POSIX'. Combine flags using '|', and clear with nil.



721
# File 'lib/wrapped/scintilla.rb', line 721

define_attribute :searchflags

#searchintargetObject

:attr_writer: searchintarget Searches for text string within #targetstart #targetend bounds.



714
# File 'lib/wrapped/scintilla.rb', line 714

define_writer :searchintarget

#selectedtextObject

:attr: selectedtext Accesses the currently selected text.



371
# File 'lib/wrapped/scintilla.rb', line 371

define_attribute :selectedtext

#selectionObject

:attr: selection Identifies selection in format "lin1,col1:lin2,col2" / 'all' / 'none'.



376
# File 'lib/wrapped/scintilla.rb', line 376

define_attribute :selection

#selectionposObject

:attr: selectionpos Identifies selection in 0-based character position format "pos1:pos2" / 'all' / 'none'.



382
# File 'lib/wrapped/scintilla.rb', line 382

define_attribute :selectionpos

#sizeObject

:attr: size Size of the container, in character units, value as "widthxheight".



125
# File 'lib/wrapped/scintilla.rb', line 125

define_attribute :size

#startstylingObject

:attr_writer: startstyling Prepares for styling, setting the start position.



902
# File 'lib/wrapped/scintilla.rb', line 902

define_writer :startstyling

#stylebgcolorObject

:method: stylebgcolor :call-seq:

text.stylebgcolor(id)
text.stylebgcolor(id, val)

Background color for a style, as 'r g b'.



757
# File 'lib/wrapped/scintilla.rb', line 757

define_id_attribute :stylebgcolor

#styleboldObject

:method: stylebold :call-seq:

text.stylebold(id)
text.stylebold(id, val)

Bold setting for a style.



766
# File 'lib/wrapped/scintilla.rb', line 766

define_id_attribute :stylebold

#stylecaseObject

:method: stylecase :call-seq:

text.stylecase(id)
text.stylecase(id, val)

Text characteristics for a style.



775
# File 'lib/wrapped/scintilla.rb', line 775

define_id_attribute :stylecase

#stylecharsetObject

:method: stylecharset :call-seq:

text.stylecharset(id)
text.stylecharset(id, val)

Alter charset for a style, values include 'ANSI' / 'EASTEUROPE' / 'RUSSIAN' / 'GB2312' / 'HANGUL' / 'SHIFTJIS'.



785
# File 'lib/wrapped/scintilla.rb', line 785

define_id_attribute :stylecharset

#styleclearallObject

:attr: styleclearall Returns all styles to attributes of the default style.



790
# File 'lib/wrapped/scintilla.rb', line 790

define_attribute :styleclearall

#styleeolfilledObject

:method: styleeolfilled :call-seq:

text.styleeolfilled(id)
text.styleeolfilled(id, val)

Whether to set a line to same color set as last character on line, values 'yes' / 'no'.



800
# File 'lib/wrapped/scintilla.rb', line 800

define_id_attribute :styleeolfilled

#stylefgcolorObject

:method: stylefgcolor :call-seq:

text.stylefgcolor(id)
text.stylefgcolor(id, val)

Foreground color for a style, as 'r g b'.



809
# File 'lib/wrapped/scintilla.rb', line 809

define_id_attribute :stylefgcolor

#stylefontObject

:method: stylefont :call-seq:

text.stylefont(id)
text.stylefont(id, val)

Font name for a style.



818
# File 'lib/wrapped/scintilla.rb', line 818

define_id_attribute :stylefont

#stylefontsizeObject

:method: stylefontsize :call-seq:

text.stylefontsize(id)
text.stylefontsize(id, val)

Font size for a style.



827
# File 'lib/wrapped/scintilla.rb', line 827

define_id_attribute :stylefontsize

#stylefontsizefracObject

:method: stylefontsizefrac :call-seq:

text.stylefontsizefrac(id)
text.stylefontsizefrac(id, val)

Font size as a fractional point size for a style.



836
# File 'lib/wrapped/scintilla.rb', line 836

define_id_attribute :stylefontsizefrac

#stylehotspotObject

:method: stylehotspot :call-seq:

text.stylehotspot(id)
text.stylehotspot(id, val)

Marks ranges to respond to mouse clicks.



845
# File 'lib/wrapped/scintilla.rb', line 845

define_id_attribute :stylehotspot

#styleitalicObject

:method: styleitalic :call-seq:

text.styleitalic(id)
text.styleitalic(id, val)

Italic setting for a style.



854
# File 'lib/wrapped/scintilla.rb', line 854

define_id_attribute :styleitalic

#styleresetObject

:method: stylereset :call-seq:

text.stylereset(id)
text.stylereset(id, val)

Resets style to default.



863
# File 'lib/wrapped/scintilla.rb', line 863

define_id_attribute :stylereset

#styleunderlineObject

:method: styleunderline :call-seq:

text.styleunderline(id)
text.styleunderline(id, val)

Underline setting for a style.



872
# File 'lib/wrapped/scintilla.rb', line 872

define_id_attribute :styleunderline

#stylevisibleObject

:method: stylevisible :call-seq:

text.stylevisible(id)
text.stylevisible(id, val)

Values 'yes' / 'no', for visible text.



881
# File 'lib/wrapped/scintilla.rb', line 881

define_id_attribute :stylevisible

#styleweightObject

:method: styleweight :call-seq:

text.styleweight(id)
text.styleweight(id, val)

Font weight for a style.



890
# File 'lib/wrapped/scintilla.rb', line 890

define_id_attribute :styleweight

#stylingObject

:method: styling :call-seq:

text.styling(id, length)

Sets style of given length characters using style "id".



910
# File 'lib/wrapped/scintilla.rb', line 910

define_id_writer :styling

#tabsizeObject

:attr: tabsize Number of characters for a tab. Default is 8.



917
# File 'lib/wrapped/scintilla.rb', line 917

define_attribute :tabsize

#targetendObject

:attr: targetend Character position of end of target.



731
# File 'lib/wrapped/scintilla.rb', line 731

define_attribute :targetend

#targetfromselectionObject

:attr_writer: targetfromselection Sets target start and end based on current selection.



736
# File 'lib/wrapped/scintilla.rb', line 736

define_writer :targetfromselection

#targetstartObject

:attr: targetstart Character position of start of target.



726
# File 'lib/wrapped/scintilla.rb', line 726

define_attribute :targetstart

#targetwholedocumentObject

:attr_writer: targetwholedocument Sets target start and end to the whole document.



741
# File 'lib/wrapped/scintilla.rb', line 741

define_writer :targetwholedocument

#tipObject

:attr: tip Tooltip string.



1031
# File 'lib/wrapped/scintilla.rb', line 1031

define_attribute :tip

#undoObject

:attr: undo Undo the last operation if set to 'yes', or all operations if set to 'all'.



948
# File 'lib/wrapped/scintilla.rb', line 948

define_attribute :undo

#undocollectObject

:attr: undocollect Controls collection of undo information, value 'yes' / 'no'.



953
# File 'lib/wrapped/scintilla.rb', line 953

define_attribute :undocollect

#usepopupObject

:attr: usepopup 'yes' / 'no' controls visibility of right-click popup menu available to user.



131
# File 'lib/wrapped/scintilla.rb', line 131

define_attribute :usepopup

#usetabsObject

:attr: usetabs Use tabs for indentation or only spaces, values 'yes' / 'no'.



934
# File 'lib/wrapped/scintilla.rb', line 934

define_attribute :usetabs

#valueObject

:attr: value Text entered by the user.



235
# File 'lib/wrapped/scintilla.rb', line 235

define_attribute :value

#valuechanged_cb=(callback) ⇒ Object

--



1102
1103
1104
1105
1106
1107
1108
1109
1110
# File 'lib/wrapped/scintilla.rb', line 1102

def valuechanged_cb= callback
  unless callback.arity.zero?
    raise ArgumentError, 'valuechanged_cb callback must take 0 arguments'
  end
  cb = Proc.new do |ih|
    callback.call
  end
  define_callback cb, 'VALUECHANGED_CB', :plain
end

#visiblecolumnsObject

:attr: visiblecolumns Accesses the number of visible columns for the control's natural size.



136
# File 'lib/wrapped/scintilla.rb', line 136

define_attribute :visiblecolumns

#visiblelinesObject

:attr: visiblelines Accesses the number of visible lines for the control's natural size.



141
# File 'lib/wrapped/scintilla.rb', line 141

define_attribute :visiblelines

#visiblelinescountObject

:attr_reader: visiblelinescount Returns the number of lines which are visible.



146
# File 'lib/wrapped/scintilla.rb', line 146

define_reader :visiblelinescount

#whitespacebgcolorObject

:attr_writer: whitespacebgcolor Defines background color of visible white space, in 'r g b' format.



986
# File 'lib/wrapped/scintilla.rb', line 986

define_writer :whitespacebgcolor

#whitespacefgcolorObject

:attr_writer: whitespacefgcolor Defines foreground color of visible white space, in 'r g b' format.



981
# File 'lib/wrapped/scintilla.rb', line 981

define_writer :whitespacefgcolor

#whitespacesizeObject

:attr: whitespacesize Size of dots when separating space characters, default is 3.



976
# File 'lib/wrapped/scintilla.rb', line 976

define_attribute :whitespacesize

#whitespaceviewObject

:attr: whitespaceview Controls the display of white space, values 'invisible' / 'visiblealways' / 'visibleafterindent'.



971
# File 'lib/wrapped/scintilla.rb', line 971

define_attribute :whitespaceview

#wordwrapObject

:attr: wordwrap Values 'yes' / 'no'.



151
# File 'lib/wrapped/scintilla.rb', line 151

define_attribute :wordwrap

#wordwrapvisualflagsObject

:attr: wordwrapvisualflags Controls the drawing of visual flags to show word-wrap has occurred. Values 'yes' / 'no'.



157
# File 'lib/wrapped/scintilla.rb', line 157

define_attribute :wordwrapvisualflags

#zoomObject

:attr: zoom Accesses the zoom factor, range -10 to 20.



1003
# File 'lib/wrapped/scintilla.rb', line 1003

define_attribute :zoom

#zoominObject

:attr_writer: zoomin Increase zoom factor by one point.



993
# File 'lib/wrapped/scintilla.rb', line 993

define_writer :zoomin

#zoomoutObject

:attr_writer: zoomout Decrease zoom factor by one point.



998
# File 'lib/wrapped/scintilla.rb', line 998

define_writer :zoomout