📄 scintilladoc.html
字号:
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator"
content="HTML Tidy for Windows (vers 1st August 2002), see www.w3.org" />
<meta name="generator" content="SciTE" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Scintilla and SciTE</title>
<style type="text/css">
<!--
/*<![CDATA[*/
CODE { font-family: "Courier New", monospace; }
A:visited { color: blue; }
A:hover { text-decoration: underline ! important; }
A.message { text-decoration: none; font-family: "Courier New", monospace; }
A.toc { text-decoration: none; }
A.jump { text-decoration: none; }
/*]]>*/
-->
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table bgcolor="#000000" width="100%" cellspacing="0" cellpadding="0" border="0"
summary="Banner">
<tr>
<td><img src="SciTEIco.png" border="3" height="64" width="64" alt="Scintilla icon" /></td>
<td><a href="index.html"
style="color:white;text-decoration:none;font-size:200%">Scintilla</a></td>
</tr>
</table>
<h1>Scintilla Documentation</h1>
<p>Last edited 16/May/2003 NH</p>
<p>There is <a class="jump" href="Design.html">an overview of the internal design of
Scintilla</a>.<br />
<a class="jump" href="ScintillaUsage.html">Some notes on using Scintilla</a>.<br />
<a class="jump" href="Steps.html">How to use the Scintilla Edit Control on Windows</a>.<br />
<a class="jump" href="http://www.scintilla.org/dmapp.zip">A simple sample using Scintilla from
C++ on Windows</a>.<br />
<a class="jump" href="http://www.scintilla.org/SciTry.vb">A simple sample using Scintilla from
Visual Basic</a>.<br />
<a class="jump" href="http://www.scintilla.org/bait.zip">Bait is a tiny sample using Scintilla
on GTK+</a>.<br />
<a class="jump" href="Lexer.txt">A detailed description of how to write a lexer, including a
discussion of folding</a>.<br />
The <a class="jump" href="SciCoding.html">coding style</a> used in Scintilla and SciTE is
worth following if you want to contribute code to Scintilla but is not compulsory.</p>
<h2>Introduction</h2>
<p>The Windows version of Scintilla is a Windows Control. As such, its primary programming
interface is through Windows messages. Early versions of Scintilla emulated much of the API
defined by the standard Windows Edit and RichEdit controls but those APIs are now deprecated in
favour of Scintilla's own, more consistent API. In addition to messages performing the actions
of a normal Edit control, Scintilla allows control of syntax styling, markers, auto-completion
and call tips.</p>
<p>The GTK+ version also uses messages in a similar way to the Windows version. This is
different to normal GTK+ practice but made it easier to implement rapidly.</p>
<p>This documentation describes the individual messages and notifications used by Scintilla. It
does not describe how to link them together to form a useful editor. For now, the best way to
work out how to develop using Scintilla is to see how SciTE uses it. SciTE exercises most of
Scintilla's facilities.</p>
<p>In the descriptions that follow, the messages are described as function calls with zero, one
or two arguments. These two arguments are the standard <code>wParam</code> and
<code>lParam</code> familiar to Windows programmers. Although the commands only use the
arguments described, because all messages have two arguments whether Scintilla uses them or
not, it is strongly recommended that any unused arguments are set to 0. This allows future
enhancement of messages without the risk of breaking existing code. Common argument types
are:</p>
<table cellpadding="1" cellspacing="2" border="0" summary="Common argument types">
<tbody valign="top">
<tr>
<th align="left">bool</th>
<td>Arguments expect the values 0 for <code>false</code> and 1 for
<code>true</code>.</td>
</tr>
<tr>
<th align="left">int</th>
<td>Arguments are 32-bit signed integers.</td>
</tr>
<tr>
<th align="left">const char*</th>
<td>Arguments point at text that is being passed to Scintilla but not modified. The text
may be zero terminated or another argument may specify the character count, the
description will make this clear.</td>
</tr>
<tr>
<th align="left">char*</th>
<td>Arguments point at text buffers that Scintilla will fill with text. In some cases,
another argument will tell Scintilla the buffer size. In others, you must make sure that
the buffer is big enough to hold the requested text.</td>
</tr>
<tr>
<th align="left" id="colour">colour</th>
<td>Colours are set using the RGB format (Red, Green, Blue). The intensity of each colour
is set in the range 0 to 255. If you have three such intensities, they are combined as:
red | (green << 8) | (blue << 16). If you set all intensities to 255, the
colour is white. If you set all intensities to 0, the colour is black. When you set a
colour, you are making a request. What you will get depends on the capabilities of the
system and the current screen mode.</td>
</tr>
<tr>
<th align="left"><unused></th>
<td>This is an unused argument. Setting it to 0 will ensure compatibility with future
enhancements.</td>
</tr>
</tbody>
</table>
<h2 id="MessageCategories">Contents</h2>
<table cellpadding="4" cellspacing="2" border="0" summary="Message categories">
<tbody>
<tr>
<td>o <a class="toc" href="#TextRetrievalAndModification">Text retrieval and
modification</a></td>
<td>o <a class="toc" href="#Searching">Searching and replacing</a></td>
<td>o <a class="toc" href="#Overtype">Overtype</a></td>
</tr>
<tr>
<td>o <a class="toc" href="#CutCopyAndPaste">Cut, copy and paste</a></td>
<td>o <a class="toc" href="#ErrorHandling">Error handling</a></td>
<td>o <a class="toc" href="#UndoAndRedo">Undo and Redo</a></td>
</tr>
<tr>
<td>o <a class="toc" href="#SelectionAndInformation">Selection and information</a></td>
<td>o <a class="toc" href="#ScrollingAndAutomaticScrolling">Scrolling and automatic
scrolling</a></td>
<td>o <a class="toc" href="#WhiteSpace">White space</a></td>
</tr>
<tr>
<td>o <a class="toc" href="#Cursor">Cursor</a></td>
<td>o <a class="toc" href="#MouseCapture">Mouse capture</a></td>
<td>o <a class="toc" href="#LineEndings">Line endings</a></td>
</tr>
<tr>
<td>o <a class="toc" href="#Styling">Styling</a></td>
<td>o <a class="toc" href="#StyleDefinition">Style definition</a></td>
<td>o <a class="toc" href="#CaretAndSelectionStyles">Caret, selection, and hotspot styles</a></td>
</tr>
<tr>
<td>o <a class="toc" href="#Margins">Margins</a></td>
<td>o <a class="toc" href="#OtherSettings">Other settings</a></td>
<td>o <a class="toc" href="#BraceHighlighting">Brace highlighting</a></td>
</tr>
<tr>
<td>o <a class="toc" href="#TabsAndIndentationGuides">Tabs and Indentation
Guides</a></td>
<td>o <a class="toc" href="#Markers">Markers</a></td>
<td>o <a class="toc" href="#Indicators">Indicators</a></td>
</tr>
<tr>
<td>o <a class="toc" href="#Autocompletion">Autocompletion</a></td>
<td>o <a class="toc" href="#UserLists">User lists</a></td>
<td>o <a class="toc" href="#CallTips">Call tips</a></td>
</tr>
<tr>
<td>o <a class="toc" href="#KeyboardCommands">Keyboard commands</a></td>
<td>o <a class="toc" href="#KeyBindings">Key bindings</a></td>
<td>o <a class="toc" href="#PopupEditMenu">Popup edit menu</a></td>
</tr>
<tr>
<td>o <a class="toc" href="#MacroRecording">Macro recording</a></td>
<td>o <a class="toc" href="#Printing">Printing</a></td>
<td>o <a class="toc" href="#DirectAccess">Direct access</a></td>
</tr>
<tr>
<td>o <a class="toc" href="#MultipleViews">Multiple views</a></td>
<td>o <a class="toc" href="#Folding">Folding</a></td>
<td>o <a class="toc" href="#LineWrapping">Line wrapping</a></td>
</tr>
<tr>
<td>o <a class="toc" href="#Zooming">Zooming</a></td>
<td>o <a class="toc" href="#LongLines">Long lines</a></td>
<td>o <a class="toc" href="#Lexer">Lexer</a></td>
</tr>
<tr>
<td>o <a class="toc" href="#Notifications">Notifications</a></td>
<td>o <a class="toc" href="#DeprecatedMessages">Deprecated messages</a></td>
<td>o <a class="toc" href="#EditMessagesNeverSupportedByScintilla">Edit messages never
supported by Scintilla</a></td>
</tr>
<tr>
<td>o <a class="toc" href="#BuildingScintilla">Building Scintilla</a></td>
</tr>
</tbody>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -