=head1 NAME

Win32::GUI::Scintilla - Add Scintilla edit control to Win32::GUI

=head1 SYNOPSIS

  use Win32::GUI;
  use Win32::GUI::Scintilla;

  # main Window
  $Window = new Win32::GUI::Window (
      -name     => "Window",
      -title    => "Scintilla test",
      -pos      => [100, 100],
      -size     => [400, 400],
  ) or die "new Window";


  # Create Scintilla Edit Window
  # $Edit = new Win32::GUI::Scintilla  (
  #               -parent  => $Window,
  # Or
  $Edit = $Window->AddScintilla  (
                 -name    => "Edit",
                 -pos     => [0, 0],
                 -size    => [400, 400],
                 -text    => "Test\n",
  ) or die "new Edit";

  # Call Some method
  $Edit->AddText ("add\n");
  $Edit->AppendText ("append\n");

  # Event loop
  $Window->Show();
  Win32::GUI::Dialog();

  # Main window event handler
  sub Window_Terminate {
   # Call Some method
   print "GetText = ", $Edit->GetText(), "\n";
   print "GetSelText = ", $Edit->GetSelText(), "\n";
   print "GetTextRange(2) = ", $Edit->GetTextRange(2), "\n";
   print "GetTextRange(2, 6) = ", $Edit->GetTextRange(2, 6), "\n";
   return -1;
  }
  # Main window resize
  sub Window_Resize {

    if (defined $Window) {
      ($width, $height) = ($Window->GetClientRect)[2..3];
      $Edit->Move   (0, 0);
      $Edit->Resize ($width, $height);
    }
  }

  # Scintilla Event Notification
  sub Edit_Notify {

    my (%evt) = @_;
    print "Edit Notify = ", %evt, "\n";
  }

=head1 DESCRIPTION

Scintilla is a free source code editing component.
L<http://www.scintilla.org/>

=head2 Scintilla creation

=over

=item C<new> (...)

Create a new Scintilla control.

Parameter :
    -name        : Window name
    -parent      : Parent window

    -left        : Left position
    -top         : Top  position
    -width       : Width
    -height      : Height

    -pos         : [x, y] position
    -size        : [w, h] size

    -text        : Text
    -visible     : Visible
    -readonly    : ReadOnly
    -hscroll     : Horizontal scroll
    -vscroll     : Vertical scroll

    -pushstyle   : Push style
    -addstyle    : Add style
    -popstyle    : Pop style
    -remstyle    : Remove style
    -notstyle    : Not style
    -negstyle    : Negation style
    -exstyle     : Extended style
    -pushexstyle : Push extended style
    -addexstyle  : Add extended style
    -popexstyle  : Pop extended style
    -remexstyle  : Remove extended style
    -notexstyle  : Not extended style
    -negexstyle  : Negation extended style

=item C<Win32::GUI::Window::AddScintilla> (...)

Add a scintilla control in a Win32::GUI::Window.
Parent window is automaticly add to new method.
See Win32::GUI::Scintilla new method for parameters.

=back

=head2 Scintilla Event

=over

=item C<Notify> (%evt)

  -code : Event Code

    SCN_STYLENEEDED
      -position
    SCN_CHARADDED
      -ch                : Character
    SCN_KEY
      -ch                : Character
      -modifiers         : Key mask
      -shift             : Shift key
      -control           : Control key
      -alt               : Alt key
    SCN_MODIFIED
      -position          : Position
      -modificationType  :
      -length            : Length
      -linesAdded        : Line added
      -line              : Line
      -foldLevelNow      :
      -foldLevelPrev     :
    SCN_MACRORECORD
      -message           : Message
    SCN_MARGINCLICK
      -position
      -modifiers         : Key mask
      -shift             : Shift key
      -control           : Control key
      -alt               : Alt key
      -margin            : Margin number
    SCN_USERLISTSELECTION
      -listType          : List item
    SCN_DWELLSTART
      -position          : Position
      -x                 : X position
      -y                 : Y position
    SCN_DWELLEND
      -position          : Position
      -x                 : X position
      -y                 : Y position
    SCN_SAVEPOINTREACHED
    SCN_SAVEPOINTLEFT
    SCN_MODIFYATTEMPTRO
    SCN_DOUBLECLICK
    SCN_UPDATEUI
    SCN_ZOOM
    SCN_URIDROPPED
    SCN_NEEDSHOWN
    SCN_PAINTED
    SCN_HOTSPOTCLICK & SCN_HOTSPOTDOUBLECLICK
      -position          : Position
      -modifiers         : Key mask
      -shift             : Shift key
      -control           : Control key
      -alt               : Alt key
    SCN_CALLTIPCLICK
      -position          : Position

=item C<Change>

Fire when Scintilla edit control text change.
See also Notify SCN_MODIFIED event.

=item C<GotFocus>

Fire when Scintilla edit control got focus.

=item C<LostFocus>

Fire when Scintilla edit control lost focus.

=back

=head2 Scintilla utility method

=over

=item C<NewFile>

Clean control for editing a new file.
  - Clear Text
  - Clear Undo buffer
  - Set save point

=item C<LoadFile> (filename)

Load a text file.
  - Clear undo buffer
  - Set save point

Return : bool

=item C<SaveFile> (filename)

Save text in file.
  - Set save point

Return : bool

=item C<StyleSetSpec> (style, stringstyle)

Set a style from a string style.

A string style is a comma separated property string.
Each property, is compose a property name, an optional value separate by a ':'.


Property :
    - fore:#RRGGBB  = Set foreground color (RRGGBB is a hexadecimal value)
    - back:#RRGGBB  = Set background color
    - face:name     = Set font
    - size:N        = Set font size (N is a numeric value)
    - bold          = Bold font
    - notbold       = Not Bold font
    - italic        = Italic font
    - notitalic     = Not Italic font
    - underline     = Underline font
    - notunderline  = Not Underline font
    - eolfilled     = eolfilled
    - noteolfilled  = Not eolfilled

Sample : "face:Times New Roman,size:12,fore:#0000FF,back#FF0000,bold,italic"

=item C<BraceHighEvent> (bracematch = "[](){}")

A standard brace highlighting event manager.

=item C<FolderEvent> (%evt)

A standard event manager.

  If Shift and Control are pressed, open or close all folder
  Else
    If Shift is pressed, Toggle 1 level of current folder
    Else If Control is pressed, expand all subfolder of current folder
    Else Toggle current folder

=item C<FolderAll>

Folding or Unfolding all text.

=item C<FolderExpand> (line, doExpand, force=0, visLevel=0, level=-1)

Manage Folder Expanding

=item C<FindAndSelect> (text, flag = SCFIND_WHOLEWORD, direction=1, wrap=1)

Find a text and select it.

Parameter:
    - text : Text to find (or regular expression).
    - flag : A Scintilla Find constante.
      SCFIND_WHOLEWORD
      SCFIND_MATCHCASE
      SCFIND_WORDSTART
      SCFIND_REGEXP

    - direction : ForWard >= 0, Backward < 0
    - wrap : Use Wrap mode.

=back

=head2 Scintilla standard method

For full documentation of Scintilla control see L<http://www.scintilla.org/>

=over

=item C<AddText> (text)

Add text to the document.

=item C<AddStyledText> (styledtext)

Add array of cells to document.

=item C<InsertText> (position, text)

Insert string at a position.

=item C<ClearAll>

Delete all text in the document.

=item C<ClearDocumentStyle>

Set all style bytes to 0, remove all folding information.

=item C<GetLength>

Return the number of characters in the document.

=item C<GetCharAt> (position)

Returns the character byte at the position.

=item C<GetCurrentPos>

Returns the position of the caret.

=item C<GetAnchor>

Returns the position of the opposite end of the selection to the caret.

=item C<GetStyleAt> (position)

Returns the style byte at the position.

=item C<Redo>

Redoes the next action on the undo history.

=item C<SetUndoCollection> (collectUndo)

Choose between collecting actions into the undo history and discarding them.

=item C<SelectAll>

Select all the text in the document.

=item C<SetSavePoint>

Remember the current position in the undo history as the position at which the document was saved.

=item C<GetStyledText> (start=0, end=TextLength)

Returns the number of bytes in the buffer not including terminating NULs.

=item C<CanRedo>

Are there any redoable actions in the undo history?

=item C<MarkerLineFromHandle> (handle)

Retrieve the line number at which a particular marker is located.

=item C<MarkerDeleteHandle> (handle)

Delete a marker.

=item C<GetUndoCollection>

Is undo history being collected?

=item C<WS Constant>

 SCWS_INVISIBLE, SCWS_VISIBLEALWAYS, SCWS_VISIBLEAFTERINDENT

=item C<GetViewWS>

Are white space characters currently visible?

=item C<SetViewWS> (viewWS)

Make white space characters invisible, always visible or visible outside indentation.

=item C<PositionFromPoint> (x, y)

Find the position from a point within the window.

=item C<PositionFromPointClose> (x, y)

Find the position from a point within the window but return INVALID_POSITION if not close to text.

=item C<GotoLine> (line)

Set caret to start of a line and ensure it is visible.

=item C<GotoPos> (position)

Set caret to a position and ensure it is visible.

=item C<SetAnchor> (position)

Set the selection anchor to a position. The anchor is the opposite end of the selection from the caret.

=item C<GetCurLine>

Return the text of the line containing the caret.

=item C<GetEndStyled>

Retrieve the position of the last correctly styled character.

=item C<EOL constant>

SC_EOL_CRLF, SC_EOL_CR, SC_EOL_LF.

=item C<ConvertEOLs> (eolMode)

Convert all line endings in the document to one mode.

=item C<GetEOLMode>

Retrieve the current end of line mode - one of CRLF, CR, or LF.

=item C<SetEOLMode> (eolMode)

Set the current end of line mode.

=item C<StartStyling> (position, mask)

Set the current styling position to pos and the styling mask to mask.
The styling mask can be used to protect some bits in each styling byte from modification.

=item C<SetStyling> (length, style)

Change style from current styling position for length characters to a style
and move the current styling position to after this newly styled segment.

=item C<GetBufferedDraw>

Is drawing done first into a buffer or direct to the screen?

=item C<SetBufferedDraw> (buffered)

If drawing is buffered then each line of text is drawn into a bitmap buffer
before drawing it to the screen to avoid flicker.

=item C<SetTabWidth> (tabWidth)

Change the visible size of a tab to be a multiple of the width of a space character.

=item C<GetTabWidth>

Retrieve the visible size of a tab.

=item C<Constant code page>

  SC_CP_UTF8, SC_CP_DBCS

=item C<SetCodePage> (codepage)

Set the code page used to interpret the bytes of the document as characters.

=item C<SetUsePalette> (usePalette)

In palette mode, Scintilla uses the environment's palette calls to display
more colours. This may lead to ugly displays.

=item C<MARK constant>

Shapes
    SC_MARK_CIRCLE
    SC_MARK_ROUNDRECT
    SC_MARK_ARROW
    SC_MARK_SMALLRECT
    SC_MARK_SHORTARROW
    SC_MARK_EMPTY
    SC_MARK_ARROWDOWN
    SC_MARK_MINUS
    SC_MARK_PLUS
Shapes used for outlining column.
    SC_MARK_VLINE
    SC_MARK_LCORNER
    SC_MARK_TCORNER
    SC_MARK_BOXPLUS
    SC_MARK_BOXPLUSCONNECTED
    SC_MARK_BOXMINUS
    SC_MARK_BOXMINUSCONNECTED
    SC_MARK_LCORNERCURVE
    SC_MARK_TCORNERCURVE
    SC_MARK_CIRCLEPLUS
    SC_MARK_CIRCLEPLUSCONNECTED
    SC_MARK_CIRCLEMINUS
    SC_MARK_CIRCLEMINUSCONNECTED
Invisible mark that only sets the line background color.
    SC_MARK_BACKGROUND
    SC_MARK_DOTDOTDOT
    SC_MARK_ARROWS
    SC_MARK_PIXMAP
    SC_MARK_CHARACTER
Markers used for outlining column.
    SC_MARKNUM_FOLDEREND
    SC_MARKNUM_FOLDEROPENMID
    SC_MARKNUM_FOLDERMIDTAIL
    SC_MARKNUM_FOLDERTAIL
    SC_MARKNUM_FOLDERSUB
    SC_MARKNUM_FOLDER
    SC_MARKNUM_FOLDEROPEN
Mask folder
    SC_MASK_FOLDERS

=item C<MarkerDefine> (markerNumber, markerSymbol)

Set the symbol used for a particular marker number.

=item C<MarkerSetFore> (markerNumber, fore)

Set the foreground colour used for a particular marker number.

=item C<MarkerSetBack> (markerNumber, back)

Set the background colour used for a particular marker number.

=item C<MarkerAdd> (line, markerNumber)

Add a marker to a line, returning an ID which can be used to find or delete the marker.

=item C<MarkerDelete> (line, markerNumber)

Delete a marker from a line.

=item C<MarkerDeleteAll> (markerNumber)

Delete all markers with a particular number from all lines.

=item C<MarkerGet> (line)

Get a bit mask of all the markers set on a line.

=item C<MarkerNext> (lineStart, markerMask)

Find the next line after lineStart that includes a marker in mask.

=item C<MarkerPrevious> (lineStart, markerMask)

Find the previous line before lineStart that includes a marker in mask.

=item C<MarkerDefinePixmap> (markerNumber, pixmap)

Define a marker from a pixmap.

=item C<MarkerAddSet> (line, set)

Add a set of markers to a line.

=item C<MARGIN constant>

  SC_MARGIN_SYMBOL, SC_MARGIN_NUMBER

=item C<SetMarginTypeN> (margin, marginType)

Set a margin to be either numeric or symbolic.

=item C<GetMarginTypeN> (margin)

Retrieve the type of a margin.

=item C<SetMarginWidthN> (margin, pixelWidth)

Set the width of a margin to a width expressed in pixels.

=item C<GetMarginWidthN> (margin)

Retrieve the width of a margin in pixels.

=item C<SetMarginMaskN> (margin, mask)

Set a mask that determines which markers are displayed in a margin.

=item C<GetMarginMaskN> (margin)

Retrieve the marker mask of a margin.

=item C<SetMarginSensitiveN> (margin, sensitive)

Make a margin sensitive or insensitive to mouse clicks.

=item C<GetMarginSensitiveN> (margin)

Retrieve the mouse click sensitivity of a margin.

=item C<Style constant>

Styles in range 32..37 are predefined for parts of the UI and are not used as normal styles.
Styles 38 and 39 are for future use.
  STYLE_DEFAULT
  STYLE_LINENUMBER
  STYLE_BRACELIGHT
  STYLE_BRACEBAD
  STYLE_CONTROLCHAR
  STYLE_INDENTGUIDE
  STYLE_LASTPREDEFINED
  STYLE_MAX

=item C<StyleClearAll>

Clear all the styles and make equivalent to the global default style.

=item C<StyleSetFore> (style, color)

Set the foreground colour of a style.
Color format : '#RRGGBB'

=item C<StyleSetBack> (style, color)

Set the background colour of a style.
Color format : '#RRGGBB'

=item C<StyleSetBold> (style, bool)

Set a style to be bold or not.

=item C<StyleSetItalic> (style, bool)

Set a style to be italic or not.

=item C<StyleSetSize> (style, size)

Set the size of characters of a style.

=item C<StyleSetFont> (style, fontname)

Set the font of a style.

=item C<StyleSetEOLFilled> (style, bool)

Set a style to have its end of line filled or not.

=item C<StyleResetDefault>

Reset the default style to its state at startup

=item C<StyleSetUnderline> (style, bool)

Set a style to be underlined or not.

=item C<CASE constant>

  SC_CASE_MIXED
  SC_CASE_UPPER
  SC_CASE_LOWER

=item C<StyleSetCase> (style, case)

Set a style to be mixed case, or to force upper or lower case.

=item C<CHARSET constant>

  SC_CHARSET_ANSI
  SC_CHARSET_DEFAULT
  SC_CHARSET_BALTIC
  SC_CHARSET_CHINESEBIG5
  SC_CHARSET_EASTEUROPE
  SC_CHARSET_GB2312
  SC_CHARSET_GREEK
  SC_CHARSET_HANGUL
  SC_CHARSET_MAC
  SC_CHARSET_OEM
  SC_CHARSET_RUSSIAN
  SC_CHARSET_SHIFTJIS
  SC_CHARSET_SYMBOL
  SC_CHARSET_TURKISH
  SC_CHARSET_JOHAB
  SC_CHARSET_HEBREW
  SC_CHARSET_ARABIC
  SC_CHARSET_VIETNAMESE
  SC_CHARSET_THAI

=item C<StyleSetCharacterSet> (style, characterSet)

Set the character set of the font in a style.

=item C<StyleSetHotSpot> (style, hotspot)

Set a style to be a hotspot or not.

=item C<SetSelFore> (useSetting, color)

Set the foreground colour of the selection and whether to use this setting.

=item C<SetSelBack> (useSetting, color)

Set the background colour of the selection and whether to use this setting.

=item C<SetCaretFore> (color)

Set the foreground colour of the caret.

=item C<AssignCmdKey> (key, modifiers, msg)

When key+modifier combination km is pressed perform msg.

=item C<ClearCmdKey> (key, modifiers)

When key+modifier combination km is pressed do nothing.

=item C<ClearAllCmdKeys>

Drop all key mappings.

=item C<SetStylingEx> (length, styles)

Set the styles for a segment of the document.

=item C<StyleSetVisible> (style, bool)

Set a style to be visible or not.

=item C<GetCaretPeriod>

Get the time in milliseconds that the caret is on and off.

=item C<SetCaretPeriod> (period)

Set the time in milliseconds that the caret is on and off. 0 = steady on.

=item C<SetWordChars> (characters)

Set the set of characters making up words for when moving or selecting by word.
First sets defaults like SetCharsDefault.

=item C<BeginUndoAction>

Start a sequence of actions that is undone and redone as a unit.

=item C<EndUndoAction>

End a sequence of actions that is undone and redone as a unit.

=item C<STYLE constant>

  INDIC_PLAIN
  INDIC_SQUIGGLE
  INDIC_TT
  INDIC_DIAGONAL
  INDIC_STRIKE
  INDIC_HIDDEN
  INDIC_BOX
  INDIC0_MASK
  INDIC1_MASK
  INDIC2_MASK
  INDICS_MASK

=item C<IndicSetStyle> (indic, style)

Set an indicator to plain, squiggle or TT.

=item C<IndicGetStyle> (indic)

Retrieve the style of an indicator.

=item C<IndicSetFore> (indic, color)

Set the foreground colour of an indicator

=item C<IndicGetFore> (indic)

Retrieve the foreground colour of an indicator.

=item C<SetWhitespaceFore> (useSetting, color)

Set the foreground colour of all whitespace and whether to use this setting.

=item C<SetWhitespaceBack> (useSetting, color)

Set the background colour of all whitespace and whether to use this setting.

=item C<SetStyleBits> (bits)

Divide each styling byte into lexical class bits (default: 5) and indicator
bits (default: 3). If a lexer requires more than 32 lexical states, then this
is used to expand the possible states.

=item C<GetStyleBits>

Retrieve number of bits in style bytes used to hold the lexical state.

=item C<SetLineState> (line, state)

Used to hold extra styling information for each line.

=item C<GetLineState> (line)

Retrieve the extra styling information for a line.

=item C<GetMaxLineState>

Retrieve the last line number that has line state.

=item C<GetCaretLineVisible>

Is the background of the line containing the caret in a different colour?

=item C<SetCaretLineVisible> (show)

Display the background of the line containing the caret in a different colour.

=item C<GetCaretLineBack>

Get the colour of the background of the line containing the caret.

=item C<SetCaretLineBack> (color)

Set the colour of the background of the line containing the caret.

=item C<StyleSetChangeable> (style, bool)

Set a style to be changeable or not (read only).

=item C<AutoCShow> (lenEntered, itemList))

Display a auto-completion list.
The lenEntered parameter indicates how many characters before
the caret should be used to provide context.

=item C<AutoCCancel>

Remove the auto-completion list from the screen.

=item C<AutoCActive>

Is there an auto-completion list visible?

=item C<AutoCPosStart>

Retrieve the position of the caret when the auto-completion list was displayed.

=item C<AutoCComplete>

User has selected an item so remove the list and insert the selection.

=item C<AutoCStops> (characterSet)

Define a set of character that when typed cancel the auto-completion list.

=item C<AutoCSetSeparator> (characterSet)

Change the separator character in the string setting up an auto-completion list.
Default is space but can be changed if items contain space.

=item C<AutoCGetSeparator>

Retrieve the auto-completion list separator character.

=item C<AutoCSelect> (text)

Select the item in the auto-completion list that starts with a string.

=item C<AutoCSetCancelAtStart> (cancel)

Should the auto-completion list be cancelled if the user backspaces to a
position before where the box was created.

=item C<AutoCGetCancelAtStart>

Retrieve whether auto-completion cancelled by backspacing before start.

=item C<AutoCSetFillUps> (characterSet)

Define a set of characters that when typed will cause the autocompletion to
choose the selected item.

=item C<AutoCSetChooseSingle> (chooseSingle)

Should a single item auto-completion list automatically choose the item.

=item C<AutoCGetChooseSingle>

Retrieve whether a single item auto-completion list automatically choose the item.

=item C<AutoCSetIgnoreCase> (ignoreCase)

Set whether case is significant when performing auto-completion searches.

=item C<AutoCGetIgnoreCase>

Retrieve state of ignore case flag.

=item C<UserListShow> (listType, itemList)

Display a list of strings and send notification when user chooses one.

=item C<AutoCSetAutoHide> (autoHide)

Set whether or not autocompletion is hidden automatically when nothing matches.

=item C<AutoCGetAutoHide>

Retrieve whether or not autocompletion is hidden automatically when nothing matches.

=item C<AutoCSetDropRestOfWord> (auutoHide)

Retrieve whether or not autocompletion is hidden automatically when nothing matches.

=item C<AutoCGetDropRestOfWord>

Retrieve whether or not autocompletion is hidden automatically when nothing matches.

=item C<RegisterImage> (type, xpmData)

Register an XPM image for use in autocompletion lists.

=item C<ClearRegisteredImages>

Clear all the registered XPM images.

=item C<AutoCGetTypeSeparator>

Retrieve the auto-completion list type-separator character.

=item C<AutoCSetTypeSeparator>

Change the type-separator character in the string setting up an auto-completion list.
Default is '?' but can be changed if items contain '?'.

=item C<AutoCGetMaxHeight>

Set the maximum height, in rows, of auto-completion and user lists.

=item C<AutoCSetMaxHeight> (rowCount)

Set the maximum height, in rows, of auto-completion and user lists.
The default is 5 rows.

=item C<AutoCGetMaxWidth>

Get the maximum width, in characters, of auto-completion and user lists.

=item C<AutoCSetMaxWidth> (characterCount)

Set the maximum width, in characters, of auto-completion and user lists.
Set to 0 to autosize to fit longest item, which is the default.

=item C<SetIndent> (indentSize)

Set the number of spaces used for one level of indentation.

=item C<GetIndent>

Retrieve indentation size.

=item C<SetUseTabs> (useTabs)

Indentation will only use space characters if useTabs is false, otherwise
it will use a combination of tabs and spaces.

=item C<GetUseTabs>

Retrieve whether tabs will be used in indentation.

=item C<SetLineIndentation> (line, indentSize)

Change the indentation of a line to a number of columns.

=item C<GetLineIndentation> (line)

Retrieve the number of columns that a line is indented.

=item C<GetLineIndentPosition> (line)

Retrieve the position before the first non indentation character on a line.

=item C<GetColumn> (pos)

Retrieve the column number of a position, taking tab width into account.

=item C<SetHScrollBar> (show)

Show or hide the horizontal scroll bar.

=item C<GetHScrollBar>

Is the horizontal scroll bar visible?

=item C<SetIndentationGuides> (bool)

Show or hide indentation guides.

=item C<GetIndentationGuides>

Are the indentation guides visible?

=item C<SetHighlightGuide> (column)

Set the highlighted indentation guide column.
0 = no highlighted guide.

=item C<GetHighlightGuide>

Get the highlighted indentation guide column.

=item C<GetLineEndPosition> (line)

Get the position after the last visible characters on a line.

=item C<GetCodePage>

Get the code page used to interpret the bytes of the document as characters.

=item C<GetCaretFore> (color)

Get the foreground colour of the caret.

=item C<GetUsePalette>

In palette mode?

=item C<GetReadOnly>

In read-only mode?

=item C<SetCurrentPos> (position)

Sets the position of the caret.

=item C<SetSelectionStart> (position)

Sets the position that starts the selection - this becomes the anchor.

=item C<GetSelectionStart>

Returns the position at the start of the selection.

=item C<SetSelectionEnd> (position)

Sets the position that ends the selection - this becomes the currentPosition.

=item C<GetSelectionEnd>

Returns the position at the start of the selection.

=item C<SetPrintMagnification> (magnification)

Sets the print magnification added to the point size of each style for printing.

=item C<GetPrintMagnification>

Returns the print magnification.

=item C<PRINT constant>

PrintColourMode - use same colours as screen.
    SC_PRINT_NORMAL
PrintColourMode - invert the light value of each style for printing.
    SC_PRINT_INVERTLIGHT
PrintColourMode - force black text on white background for printing.
    SC_PRINT_BLACKONWHITE
PrintColourMode - text stays coloured, but all background is forced to be white for printing.
    SC_PRINT_COLOURONWHITE
PrintColourMode - only the default-background is forced to be white for printing.
  SC_PRINT_COLOURONWHITEDEFAULTBG

=item C<SetPrintColourMode> (mode)

Modify colours when printing for clearer printed text.

=item C<GetPrintColourMode>

Returns the print colour mode.

=item C<FIND constant>

  SCFIND_WHOLEWORD
  SCFIND_MATCHCASE
  SCFIND_WORDSTART
  SCFIND_REGEXP
  SCFIND_POSIX

=item C<FindText> (textToFind, start=0, end=GetLength(), flag = SCFIND_WHOLEWORD)

Find some text in the document.

=item C<FormatRange> (start=0, end=GetLength(), draw=1)

On Windows, will draw the document into a display context such as a printer.

=item C<GetFirstVisibleLine>

Retrieve the display line at the top of the display.

=item C<GetLine> (line)

Return text of line.

=item C<GetLineCount>

Returns the number of lines in the document. There is always at least one.

=item C<SetMarginLeft> (pixelWidth)

Sets the size in pixels of the left margin.

=item C<GetMarginLeft>

Returns the size in pixels of the left margin.

=item C<SetMarginRight> (pixelWidth)

Sets the size in pixels of the right margin.

=item C<GetMarginRight>

Returns the size in pixels of the right margin.

=item C<GetModify>

Is the document different from when it was last saved?

=item C<SetSel> (start, end)

Select a range of text.

=item C<GetSelText>

Retrieve the selected text.

=item C<GetTextRange> (start=0, end=Length)

Retrieve a range of text.

=item C<HideSelection> (normal)

Draw the selection in normal style or with selection highlighted.

=item C<PointXFromPosition> (position)

Retrieve the x value of the point in the window where a position is displayed.

=item C<PointYFromPosition> (position)

Retrieve the y value of the point in the window where a position is displayed.

=item C<LineFromPosition> (position)

Retrieve the line containing a position.

=item C<PositionFromLine> (line)

Retrieve the position at the start of a line.

=item C<LineScroll> (columns, lines)

Scroll horizontally and vertically.

=item C<ScrollCaret>

Ensure the caret is visible.

=item C<ReplaceSel> (text)

Replace the selected text with the argument text.

=item C<SetReadOnly> (bool)

Set to read only or read write.

=item C<Null>

Null operation.

=item C<CanPaste>

Will a paste succeed?

=item C<CanUndo>

Are there any undoable actions in the undo history?

=item C<EmptyUndoBuffer>

Delete the undo history.

=item C<Undo>

Undo one action in the undo history.

=item C<Cut>

Cut the selection to the clipboard.

=item C<Copy>

Copy the selection to the clipboard.

=item C<Paste>

Paste the contents of the clipboard into the document replacing the selection.

=item C<Clear>

Clear the selection.

=item C<SetText> (text)

Replace the contents of the document with the argument text.

=item C<GetText>

Retrieve all the text in the document.

=item C<GetTextLength>

Retrieve the number of characters in the document.

=item C<GetDirectFunction>

Retrieve a pointer to a function that processes messages for this Scintilla.

=item C<GetDirectPointer>

Retrieve a pointer to a function that processes messages for this Scintilla.

=item C<SetOvertype> (overtype)

Set to overtype (true) or insert mode.

=item C<GetOvertype>

Returns true if overtype mode is active otherwise false is returned.

=item C<SetCaretWidth> (pixelWidth)

Set the width of the insert mode caret.

=item C<GetCaretWidth>

Returns the width of the insert mode caret.

=item C<SetTargetStart> (position)

Sets the position that starts the target which is used for updating the
document without affecting the scroll position.

=item C<GetTargetStart>

Get the position that starts the target.

=item C<SetTargetEnd> (position)

Sets the position that ends the target which is used for updating the
document without affecting the scroll position.

=item C<GetTargetEnd>

Get the position that ends the target.

=item C<ReplaceTarget> (text)

Replace the target text with the argument text.
Text is counted so it can contain NULs.
Returns the length of the replacement text.

=item C<ReplaceTargetRE> ($text)

Replace the target text with the argument text after \d processing.
Text is counted so it can contain NULs.
Looks for \d where d is between 1 and 9 and replaces these with the strings
matched in the last search operation which were surrounded by \( and \).
Returns the length of the replacement text including any change
caused by processing the \d patterns

=item C<SearchInTarget> (text)

Search for a counted string in the target and set the target to the found
range. Text is counted so it can contain NULs.
Returns length of range or -1 for failure in which case target is not moved.

=item C<SetSearchFlags> (flags)

Set the search flags used by SearchInTarget.

=item C<GetSearchFlags>

Get the search flags used by SearchInTarget.

=item C<CallTipShow> (position, definition)

Show a call tip containing a definition near position pos.

=item C<CallTipCancel>

Remove the call tip from the screen.

=item C<CallTipActive>

Is there an active call tip?

=item C<CallTipPosStart>

Retrieve the position where the caret was before displaying the call tip.

=item C<CallTipSetHlt> (start, end)

Highlight a segment of the definition.

=item C<CallTipSetBack> (color)

Set the background colour for the call tip.

=item C<CallTipSetFore> (color)

Set the foreground colour for the call tip.

=item C<CallTipSetForeHlt> (color)

Set the foreground colour for the highlighted part of the call tip.

=item C<CallTipUseStyle> (tabSize)

Enable use of STYLE_CALLTIP and set call tip tab size in pixels.

=item C<VisibleFromDocLine> (line)

Find the display line of a document line taking hidden lines into account.

=item C<DocLineFromVisible> (lineDisplay)

Find the document line of a display line taking hidden lines into account.

=item C<WrapCount> (line)

The number of display lines needed to wrap a document line

=item C<FOLDERLEVEL constant>

  SC_FOLDLEVELBASE
  SC_FOLDLEVELWHITEFLAG
  SC_FOLDLEVELHEADERFLAG
  SC_FOLDLEVELBOXHEADERFLAG
  SC_FOLDLEVELBOXFOOTERFLAG
  SC_FOLDLEVELCONTRACTED
  SC_FOLDLEVELUNINDENT
  SC_FOLDLEVELNUMBERMASK

=item C<SetFoldLevel> (line, level)

Set the fold level of a line.
This encodes an integer level along with flags indicating whether the
line is a header and whether it is effectively white space.

=item C<GetFoldLevel> (line)

Retrieve the fold level of a line.

=item C<GetLastChild> (line, level)

Find the last child line of a header line.

=item C<GetFoldParent> (line)

Find the parent line of a child line.

=item C<ShowLines> (lineStart, lineEnd)

Make a range of lines visible.

=item C<HideLines> (lineStart, lineEnd)

Make a range of lines invisible.

=item C<GetLineVisible> (line)

Is a line visible?

=item C<SetFoldExpanded> (line, expanded)

Show the children of a header line.

=item C<GetFoldExpanded> (line)

Is a header line expanded ?

=item C<ToggleFold> (line)

Switch a header line between expanded and contracted.

=item C<EnsureVisible> (line)

Ensure a particular line is visible by expanding any header line hiding it.

=item C<FOLDFLAG constant>

  SC_FOLDFLAG_LINEBEFORE_EXPANDED
  SC_FOLDFLAG_LINEBEFORE_CONTRACTED
  SC_FOLDFLAG_LINEAFTER_EXPANDED
  SC_FOLDFLAG_LINEAFTER_CONTRACTED
  SC_FOLDFLAG_LEVELNUMBERS
  SC_FOLDFLAG_BOX

=item C<SetFoldFlags> (flags)

Set some style options for folding.

=item C<EnsureVisibleEnforcePolicy> (line)

Ensure a particular line is visible by expanding any header line hiding it.
Use the currently set visibility policy to determine which range to display.

=item C<SetTabIndents> (tabIndents)

Sets whether a tab pressed when caret is within indentation indents.

=item C<GetTabIndents>

Does a tab pressed when caret is within indentation indent?

=item C<SetBackSpaceUnIndents> (bsUnIndents)

Sets whether a backspace pressed when caret is within indentation unindents.

=item C<GetBackSpaceUnIndents>

Does a backspace pressed when caret is within indentation unindent?

=item C<TIME constant>

  SC_TIME_FOREVER

=item C<SetMouseDwellTime> (period)

Sets the time the mouse must sit still to generate a mouse dwell event.

=item C<GetMouseDwellTime>

Retrieve the time the mouse must sit still to generate a mouse dwell event.

=item C<WordStartPosition> (pos, onlyWordCharacters)

Get position of start of word.

=item C<WordEndPosition> (pos, onlyWordCharacters)

Get position of end of word.

=item C<WRAP constant>

  SC_WRAP_NONE
  SC_WRAP_WORD
  SC_WRAP_CHAR

=item C<SetWrapMode> (mode)

Sets whether text is word wrapped.

=item C<GetWrapMode>

Retrieve whether text is word wrapped.

=item C<WRAPVISUALFLAG constant>

  SC_WRAPVISUALFLAG_NONE
  SC_WRAPVISUALFLAG_END
  SC_WRAPVISUALFLAG_START

=item C<SetWrapVisualFlags> (wrapVisualFlags)

Set the display mode of visual flags for wrapped lines.

=item C<GetWrapVisualFlags>

Retrive the display mode of visual flags for wrapped lines.

=item C<WRAPVISUALFLAGLOC constant>

  SC_WRAPVISUALFLAGLOC_DEFAULT
  SC_WRAPVISUALFLAGLOC_END_BY_TEXT
  SC_WRAPVISUALFLAGLOC_START_BY_TEXT

=item C<SetWrapVisualFlagsLocation> (wrapVisualFlagsLocation)

Set the location of visual flags for wrapped lines.

=item C<GetWrapVisualFlagsLocation>

Retrive the location of visual flags for wrapped lines.

=item C<SetWrapStartIndent> (indent)

Set the start indent for wrapped lines.

=item C<GetWrapStartIndent>

Retrive the start indent for wrapped lines.

=item C<CACHE constant>

  SC_CACHE_NONE
  SC_CACHE_CARET
  SC_CACHE_PAGE
  SC_CACHE_DOCUMENT

=item C<SetLayoutCache> (mode)

Sets the degree of caching of layout information.

=item C<GetLayoutCache>

Retrieve the degree of caching of layout information.

=item C<SetScrollWidth> (pixelWidth)

Sets the document width assumed for scrolling.

=item C<GetScrollWidth>

Retrieve the document width assumed for scrolling.

=item C<TextWidth> (style, text)

Measure the pixel width of some text in a particular style.
NUL terminated text argument.
Does not handle tab or control characters.

=item C<SetEndAtLastLine> (endAtLastLine)

Sets the scroll range so that maximum scroll position has
the last line at the bottom of the view (default).
Setting this to false allows scrolling one page below the last line.

=item C<GetEndAtLastLine>

Retrieve whether the maximum scroll position has the last
line at the bottom of the view.

=item C<TextHeight> (line)

Retrieve the height of a particular line of text in pixels.

=item C<SetVScrollBar> (bool)

Show or hide the vertical scroll bar.

=item C<GetVScrollBar>

Is the vertical scroll bar visible?

=item C<AppendText> (text)

Append a string to the end of the document without changing the selection.

=item C<GetTwoPhaseDraw>

Is drawing done in two phases with backgrounds drawn before faoregrounds?

=item C<SetTwoPhaseDraw>(bool twoPhase)

In twoPhaseDraw mode, drawing is performed in two phases, first the background
and then the foreground. This avoids chopping off characters that overlap the next run.

=item C<TargetFromSelection>

Make the target range start and end be the same as the selection range start and end.

=item C<LinesJoin>

Join the lines in the target.
This is an experimental feature and may be changed or removed.

=item C<LinesSplit>(pixelWidth)

Split the lines in the target into lines that are less wide than pixelWidth where possible.

=item C<SetFoldMarginColour>(bool useSetting, color back)

Set the colours used as a chequerboard pattern in the fold margin

=item C<SetFoldMarginHiColour>(bool useSetting, color back)

Set the colours used as a chequerboard pattern in the fold margin

=item C<LineDown>

Move caret down one line.

=item C<LineDownExtend>

Move caret down one line extending selection to new caret position.

=item C<LineUp>

Move caret up one line.

=item C<LineUpExtend>

Move caret up one line extending selection to new caret position.

=item C<CharLeft>

Move caret left one character.

=item C<CharLeftExtend>

Move caret left one character extending selection to new caret position.

=item C<CharRight>

Move caret right one character.

=item C<CharRightExtend>

Move caret right one character extending selection to new caret position.

=item C<WordLeft>

Move caret left one word.

=item C<WordLeftExtend>

Move caret left one word extending selection to new caret position.

=item C<WordRight>

Move caret right one word.

=item C<WordRightExtend>

Move caret right one word extending selection to new caret position.

=item C<Home>

Move caret to first position on line.

=item C<HomeExtend>

Move caret to first position on line extending selection to new caret position.

=item C<LineEnd>

Move caret to last position on line.

=item C<LineEndExtend>

Move caret to last position on line extending selection to new caret position.

=item C<DocumentStart>

Move caret to first position in document.

=item C<DocumentStartExtend>

Move caret to first position in document extending selection to new caret position.

=item C<DocumentEnd>

Move caret to last position in document.

=item C<DocumentEndExtend>

Move caret to last position in document extending selection to new caret position.

=item C<PageUp>

Move caret one page up.

=item C<PageUpExtend>

Move caret one page up extending selection to new caret position.

=item C<PageDown>

Move caret one page down.

=item C<PageDownExtend>

Move caret one page down extending selection to new caret position.

=item C<EditToggleOvertype>

Switch from insert to overtype mode or the reverse.

=item C<Cancel>

Cancel any modes such as call tip or auto-completion list display.

=item C<DeleteBack>

Delete the selection or if no selection, the character before the caret.

=item C<Tab>

If selection is empty or all on one line replace the selection with a tab character.
If more than one line selected, indent the lines.

=item C<BackTab>

Dedent the selected lines.

=item C<NewLine>

Insert a new line, may use a CRLF, CR or LF depending on EOL mode.

=item C<FormFeed>

Insert a Form Feed character.

=item C<VCHome>

Move caret to before first visible character on line.
If already there move to first character on line.

=item C<VCHomeExtend>

Like VCHome but extending selection to new caret position.

=item C<ZoomIn>

Magnify the displayed text by increasing the sizes by 1 point.

=item C<ZoomOut>

Make the displayed text smaller by decreasing the sizes by 1 point.

=item C<DelWordLeft>

Delete the word to the left of the caret.

=item C<DelWordRight>

Delete the word to the right of the caret.

=item C<LineCut>

Cut the line containing the caret.

=item C<LineDelete>

Delete the line containing the caret.

=item C<LineTranspose>

Switch the current line with the previous.

=item C<LineDuplicate>

Duplicate the current line.

=item C<LowerCase>

Transform the selection to lower case.

=item C<UpperCase>

Transform the selection to upper case.

=item C<LineScrollDown>

Scroll the document down, keeping the caret visible.

=item C<LineScrollUp>

Scroll the document up, keeping the caret visible.

=item C<DeleteBackNotLine>

Delete the selection or if no selection, the character before the caret.
Will not delete the character before at the start of a line.

=item C<HomeDisplay>

Move caret to first position on display line.

=item C<HomeDisplayExtend>

Move caret to first position on display line extending selection to
new caret position.

=item C<LineEndDisplay>

Move caret to last position on display line.

=item C<LineEndDisplayExtend>

Move caret to last position on display line extending selection to new
caret position.

=item C<HomeWrap>

These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
except they behave differently when word-wrap is enabled:
They go first to the start / end of the display line, like (Home|LineEnd)Display
The difference is that, the cursor is already at the point, it goes on to the start
or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.

=item C<HomeWrapExtend>

See HomeWrap

=item C<LineEndWrap>

See HomeWrap

=item C<LineEndWrapExtend>

See HomeWrap

=item C<VCHomeWrap>

See HomeWrap

=item C<VCHomeWrapExtend>

See HomeWrap

=item C<LineCopy>

Copy the line containing the caret.

=item C<MoveCaretInsideView>

Move the caret inside current view if it's not there already.

=item C<LineLength> (line)

How many characters are on a line, not including end of line characters?

=item C<BraceHighlight> (pos1, pos2)

Highlight the characters at two positions.

=item C<BraceBadLight> (pos)

Highlight the character at a position indicating there is no matching brace.

=item C<BraceMatch> (pos)

Find the position of a matching brace or INVALID_POSITION if no match.

=item C<GetViewEOL>

Are the end of line characters visible?

=item C<SetViewEOL> (visible)

Make the end of line characters visible or invisible.

=item C<GetDocPointer>

Retrieve a pointer to the document object.

=item C<SetDocPointer> (pointer)

Change the document object used.

=item C<SetModEventMask> (mask)

Set which document modification events are sent to the container.

=item C<EDGE constant>

  EDGE_NONE
  EDGE_LINE
  EDGE_BACKGROUND

=item C<GetEdgeColumn>

Retrieve the column number which text should be kept within.

=item C<SetEdgeColumn> (column)

Set the column number of the edge.
If text goes past the edge then it is highlighted.

=item C<GetEdgeMode>

Retrieve the edge highlight mode.

=item C<SetEdgeMode> (mode)

The edge may be displayed by a line (EDGE_LINE) or by highlighting text that
goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).

=item C<GetEdgeColour>

Retrieve the colour used in edge indication.

=item C<SetEdgeColour> (color)

Change the colour used in edge indication.

=item C<SearchAnchor>

Sets the current caret position to be the search anchor.

=item C<SearchNext> (flags, text)

Find some text starting at the search anchor.
Does not ensure the selection is visible.

=item C<SearchPrev> (flags, text)

Find some text starting at the search anchor and moving backwards.
Does not ensure the selection is visible.

=item C<LinesOnScreen>

Retrieves the number of lines completely visible.

=item C<UsePopUp> (allowPopUp)

Set whether a pop up menu is displayed automatically when the user presses
the wrong mouse button

=item C<SelectionIsRectangle>

Is the selection rectangular? The alternative is the more common stream selection.

=item C<SetZoom> (zoom)

Set the zoom level. This number of points is added to the size of all fonts.
It may be positive to magnify or negative to reduce.

=item C<GetZoom>

Retrieve the zoom level.

=item C<CreateDocument>

Create a new document object.
Starts with reference count of 1 and not selected into editor.

=item C<AddRefDocument> (doc)

Extend life of document.

=item C<ReleaseDocument> (doc)

Release a reference to the document, deleting document if it fades to black.

=item C<GetModEventMask>

Get which document modification events are sent to the container.

=item C<SetFocus> (flag)

Change internal focus flag.

=item C<GetFocus>

Get internal focus flag.

=item C<SetStatus>

Change error status - 0 = OK.

=item C<GetStatus>

Get error status.

=item C<SetMouseDownCaptures> (capture)

Set whether the mouse is captured when its button is pressed.

=item C<GetMouseDownCaptures>

Get whether mouse gets captured.

=item C<CURSOR constant>

  SC_CURSORNORMAL
  SC_CURSORWAIT

=item C<SetCursor> (cursorType)

Sets the cursor to one of the SC_CURSOR* values.

=item C<GetCursor>

Get cursor type.

=item C<SetControlCharSymbol> (symbol)

Change the way control characters are displayed:
If symbol is < 32, keep the drawn way, else, use the given character.

=item C<GetControlCharSymbol>

Get the way control characters are displayed.

=item C<WordPartLeft>

Move to the previous change in capitalisation.

=item C<WordPartLeftExtend>

Move to the previous change in capitalisation extending selection
to new caret position.

=item C<WordPartRight>

Move to the change next in capitalisation.

=item C<WordPartRightExtend>

Move to the next change in capitalisation extending selection
to new caret position.

=item C<VISIBLE constant>

  VISIBLE_SLOP
  VISIBLE_STRICT

=item C<SetVisiblePolicy> (visiblePolicy, visibleSlop)

Set the way the display area is determined when a particular line
is to be moved to by Find, FindNext, GotoLine, etc.

=item C<DelLineLeft>

Delete back from the current position to the start of the line.

=item C<DelLineRight>

Delete forwards from the current position to the end of the line.

=item C<SetXOffset>

Set the xOffset (ie, horizonal scroll position).

=item C<GetXOffset>

Get the xOffset (ie, horizonal scroll position).

=item C<ChooseCaretX>

Set the last x chosen value to be the caret x position.

=item C<GrabFocus>

Set the focus to this Scintilla widget.

=item C<CARET constant>

  CARET_SLOP
  If CARET_SLOP is set, we can define a slop value: caretSlop.
  This value defines an unwanted zone (UZ) where the caret is... unwanted.
  This zone is defined as a number of pixels near the vertical margins,
  and as a number of lines near the horizontal margins.
  By keeping the caret away from the edges, it is seen within its context,
  so it is likely that the identifier that the caret is on can be completely seen,
  and that the current line is seen with some of the lines following it which are
  often dependent on that line.

  CARET_STRICT
  If CARET_STRICT is set, the policy is enforced... strictly.
  The caret is centred on the display if slop is not set,
  and cannot go in the UZ if slop is set.

  CARET_JUMPS
  If CARET_JUMPS is set, the display is moved more energetically
  so the caret can move in the same direction longer before the policy is applied again.

  CARET_EVEN
  If CARET_EVEN is not set, instead of having symmetrical UZs,
  the left and bottom UZs are extended up to right and top UZs respectively.
  This way, we favour the displaying of useful information: the begining of lines,
  where most code reside, and the lines after the caret, eg. the body of a function.

=item C<SetXCaretPolicy> (caretPolicy, caretSlop)

Set the way the caret is kept visible when going sideway.
The exclusion zone is given in pixels.

=item C<SetYCaretPolicy> (caretPolicy, caretSlop)

Set the way the line the caret is on is kept visible.
The exclusion zone is given in lines.

=item C<SetPrintWrapMode> (mode)

Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE).

=item C<GetPrintWrapMode>

Is printing line wrapped?

=item C<SetHotspotActiveFore> (useSetting, color)

Set a fore colour for active hotspots.

=item C<SetHotspotActiveBack> (useSetting, color)

Set a back colour for active hotspots.

=item C<SetHotspotActiveUnderline> (underline)

Enable / Disable underlining active hotspots.

=item C<SetHotspotSingleLine> (singleLine)

Limit hotspots to single line so hotspots on two lines don't merge.

=item C<ParaDown>

Move caret between paragraphs (delimited by empty lines).

=item C<ParaDownExtend>

Move caret between paragraphs (delimited by empty lines).

=item C<ParaUp>

Move caret between paragraphs (delimited by empty lines).

=item C<ParaUpExtend>

Move caret between paragraphs (delimited by empty lines).

=item C<PositionBefore> (pos)

Given a valid document position, return the previous position taking code
page into account. Returns 0 if passed 0.

=item C<PositionAfter>(pos)

Given a valid document position, return the next position taking code
page into account. Maximum value returned is the last position in the document.

=item C<CopyRange>(start, end)

Copy a range of text to the clipboard. Positions are clipped into the document.

=item C<CopyText> (length, text)

Copy argument text to the clipboard.

=item C<SetSelectionMode> (mode)

Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE) or by lines (SC_SEL_LINES).

=item C<GetSelectionMode>

Get the mode of the current selection.

=item C<GetLineSelStartPosition> (line)

Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line).

=item C<GetLineSelEndPosition> (line)

Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line).

=item C<LineDownRectExtend>

Move caret down one line, extending rectangular selection to new caret position.

=item C<LineUpRectExtend>

Move caret up one line, extending rectangular selection to new caret position.

=item C<CharLeftRectExtend>

Move caret left one character, extending rectangular selection to new caret position.

=item C<CharRightRectExtend>

Move caret right one character, extending rectangular selection to new caret position.

=item C<HomeRectExtend>

Move caret to first position on line, extending rectangular selection to new caret position.

=item C<VCHomeRectExtend>

Move caret to before first visible character on line.
If already there move to first character on line.
In either case, extend rectangular selection to new caret position.

=item C<LineEndRectExtend>

Move caret to last position on line, extending rectangular selection to new caret position.

=item C<PageUpRectExtend>

Move caret one page up, extending rectangular selection to new caret position.

=item C<PageDownRectExtend>

Move caret one page down, extending rectangular selection to new caret position.

=item C<StutteredPageUp>

Move caret to top of page, or one page up if already at top of page.

=item C<StutteredPageUpExtend>

Move caret to top of page, or one page up if already at top of page, extending selection to new caret position.

=item C<StutteredPageDown>

Move caret to bottom of page, or one page down if already at bottom of page.

=item C<StutteredPageDownExtend>

Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position.

=item C<WordLeftEnd>

Move caret left one word, position cursor at end of word.

=item C<WordLeftEndExtend>

Move caret left one word, position cursor at end of word, extending selection to new caret position.

=item C<WordRightEnd>

Move caret right one word, position cursor at end of word.

=item C<WordRightEndExtend>

Move caret right one word, position cursor at end of word, extending selection to new caret position.

=item C<SetWhitespaceChars> (characters)

Set the set of characters making up whitespace for when moving or selecting by word.
Should be called after SetWordChars.

=item C<SetCharsDefault>

Reset the set of characters for whitespace and word characters to the defaults.

=item C<AutoCGetCurrent>

Get currently selected item position in the auto-completion list.

=item C<Allocate> (bytes)

Enlarge the document to a particular size of text bytes.

=item C<TargetAsUTF8>

Returns the target converted to UTF8.

=item C<SetLengthForEncode> (num_bytes)

Set the length of the utf8 argument for calling EncodedFromUTF8.
Set to -1 and the string will be measured to the first nul.

=item C<EncodedFromUTF8> (utf8string)

Translates a UTF8 string into the document encoding.
On error returns undef.

=item C<FindColumn> (line, column)

Find the position of a column on a line taking into account tabs and
multi-byte characters. If beyond end of line, return line end position.

=item C<GetCaretSticky>

Can the caret preferred x position only be changed by explicit movement commands?

=item C<SetCaretSticky> (useCaretStickyBehaviour)

Stop the caret preferred x position changing when the user types.

=item C<ToggleCaretSticky>

Switch between sticky and non-sticky: meant to be bound to a key.

=item C<SetPasteConvertEndings> (convert)

Enable/Disable convert-on-paste for line endings

=item C<GetPasteConvertEndings>

Get convert-on-paste setting

=item C<SelectionDuplicate>

Duplicate the selection. If selection empty duplicate the line containing the caret.

=item C<SetCaretLineBackAlpha> (alpha)

Set background alpha of the caret line.

=item C<GetCaretLineBackAlpha>

Get the background alpha of the caret line.

=item C<StartRecord>

Start notifying the container of all key presses and commands.

=item C<StopRecord>

Stop notifying the container of all key presses and commands.

=item C<SetLexer> (lexer)

Set the lexing language of the document.

=item C<GetLexer>

Retrieve the lexing language of the document.

=item C<Colourise> (start, end)

Colourise a segment of the document using the current lexing language.

=item C<SetProperty> (key, value)

Set up a value that may be used by a lexer for some optional feature.

=item C<GetProperty> (key)

Retrieve a "property" value previously set with SetProperty.

=item C<GetPropertyExpanded> (key)

Retrieve a "property" value previously set with SetProperty,
with "$()" variable replacement on returned buffer.

=item C<GetPropertyInt> (key)

Retrieve a "property" value previously set with SetProperty,
interpreted as an int AFTER any "$()" variable replacement.

=item C<GetStyleBitsNeeded>

Retrieve the number of bits the current lexer needs for styling.

=item C<SetKeyWords> (keywordSet, keyWords)

Set up the key words used by the lexer.

Maximum value of keywordSet parameter of SetKeyWordsis defined by KEYWORDSET_MAX.

=item C<SetLexerLanguage> (language)

Set the lexing language of the document based on string name.

=item C<LoadLexerLibrary> (path)

Load a lexer library (dll / so).

=item C<Lexer constant>

See Scintilla.pm

  SCLEX_* contant for lexer language.
  SCE_* for lexer constant.

See comment for relation between Lexer language and lexer constant.

=back
 
=head2 Scintilla deprecated method

=over

=item C<SetCaretPolicy> (path)

CARET_POLICY changed in 1.47

=back

=head1 DEPENDENCIES

This module requires these other modules and libraries:

   Win32::GUI - L<http://perl-win32-gui.sourceforge.net/>
   Scintilla  - L<http://www.scintilla.org/>

=head1 SEE ALSO

L<Win32::GUI|Win32::GUI>

=head1 AUTHOR

Laurent Rocher (C<lrocher@cpan.org>).
Additional Coding:
Robert May (C<robertemay@users.sourceforge.net>).

=head1 COPYRIGHT AND LICENCE

Copyright 2003..2005 by Laurent Rocher (lrocher@cpan.org).

Copyright 2006..2008 by Robert May (robertemay@users.sourceforge.net).

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

This program distributes the dynamic link library SciLexer.dll from
the Scintilla distribution.  Source distributions include header files
and interface definitions from the same project.  These components
come with the following copyright and licence:

Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>.
All Rights Reserved.

  Permission to use, copy, modify, and distribute this software and its 
  documentation for any purpose and without fee is hereby granted, 
  provided that the above copyright notice appear in all copies and that 
  both that copyright notice and this permission notice appear in 
  supporting documentation. 

  NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 
  SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 
  AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY 
  SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 
  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 
  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 
  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE 
  OR PERFORMANCE OF THIS SOFTWARE. 

=cut