geesas-devs Mailing List for GPL SWF Authoring Software
Status: Abandoned
Brought to you by:
creek23
You can subscribe to this list here.
2009 |
Jan
|
Feb
(53) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(1) |
Jul
(5) |
Aug
(3) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(18) |
Aug
(4) |
Sep
(5) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Stuart L. (VK4MSL) <me...@vk...> - 2012-12-23 03:08:54
|
Hi, I've recently downloaded and installed Clash from source. I discovered Pencil some time back and today decided I'd have a tinker with it. Having played with it a little, I had an idea for an effect I wanted to create, but found Pencil really didn't offer it; the ability to capture the sequence of brush strokes as an animation. I asked about it here… http://pencil-animation.org/forum/viewtopic.php?id=3174 Doing some further research, I stumbled across Clash. It's a step up in this regard, in that there is at least a keystroke for duplicating a key frame. The keystroke however, is a little inconvenient on the keyboard, especially if you're on an Apple keyboard like I am, as one has to press Fn to hit any of the Function keys. Some IBM clone laptops are like this too. Thus the first patch changes the shortcuts to something easily accessed with one hand. To implement automatic keyframes, I then created a class that uses a QTimer object to trigger the duplicateKey event repeatedly at a set interval. This is what the second patch does. A caveat, I note that if you leave the stylus down, the stroke doesn't appear until you lift the stylus — and even then, it only appears on the last frame. I suspect somewhere there'd need to be some logic to seamlessly break the stroke up, but the workaround is to just use short strokes. Anyway, I've attached the two patches that implement this feature. Regards, -- Stuart Longland (aka Redhatter, VK4MSL) .'''. Gentoo Linux/MIPS Cobalt and Docs Developer '.'` : . . . . . . . . . . . . . . . . . . . . . . .'.' http://dev.gentoo.org/~redhatter :.' I haven't lost my mind... ...it's backed up on a tape somewhere. |
From: Aiscanf <ai...@gm...> - 2010-09-28 16:10:18
|
I have solved this problem by adding libpng,libming to /mingw/lib. another question: I found a swf file in http://geesas.sourceforge.net/clash/ : Skater | animated with Pencil Animation (WIP) *Animator : * Mj Mendoza IV *Software : * Pencil Animation 0.4.5b-rev5 Does anybody have the "source file" of this flash, so that i can open it with pencil.exe and edit it directly。 Best regards! 在 2010年9月28日 下午7:07,Aiscanf <ai...@gm...>写道: > Hi All, > I want to compile the source code in QT Creator(version2.0.0),but it > failed. > could someone tell me how to do that? > > I also followed the "steps" in "notes-win32.txt" : > ===== > To compile Pencil for Windows "out of the box" > 1) Install Qt from TrollTech if you haven't done it > (the installer will propose to install MinGW if you don't have any C++ > compiler) > 2) From the Start menu (for example), launch the Qt Command Prompt (a kind > of DOS Terminal) > 4) (Using DOS commands like cd) go to the directory where you saved Pencil > source, > ie the directory where the file pencil.pro is located. > Then type "qmake". This should generate a makefile from the pencil.profile. > 5) Then type "make". This should compile Pencil. > ===== > and got error in step 5) > > Thanks! > > > -- > best regards > -- best regards |
From: Aiscanf <ai...@gm...> - 2010-09-28 11:07:08
|
Hi All, I want to compile the source code in QT Creator(version2.0.0),but it failed. could someone tell me how to do that? I also followed the "steps" in "notes-win32.txt" : ===== To compile Pencil for Windows "out of the box" 1) Install Qt from TrollTech if you haven't done it (the installer will propose to install MinGW if you don't have any C++ compiler) 2) From the Start menu (for example), launch the Qt Command Prompt (a kind of DOS Terminal) 4) (Using DOS commands like cd) go to the directory where you saved Pencil source, ie the directory where the file pencil.pro is located. Then type "qmake". This should generate a makefile from the pencil.profile. 5) Then type "make". This should compile Pencil. ===== and got error in step 5) Thanks! -- best regards |
From: SourceForge.net <no...@so...> - 2010-09-23 13:42:57
|
The following forum message was posted by Anonymous at http://sourceforge.net/projects/geesas/forums/forum/917628/topic/3863339: hello, thank you for this software - please, keep going! now the bug: I cannot open saved file on another comp with the same version of Clash (0.9.7b_rev9). I´m using XP SP2 on both computers. and bug no. 2: if I want to resize brush, I have to do it twice - for the first time it doesn´t resize now the wish: could you please do something about visual of timeline? it´s too big - layers could be bit smaller to save some space... |
From: SourceForge.net <no...@so...> - 2010-09-17 18:58:36
|
The following forum message was posted by Anonymous at http://sourceforge.net/projects/geesas/forums/forum/917628/topic/3839557: interesante :) seria genial si el codigo abierto no se basara en adobe mas bien lograr consolidar nuevas ideas :) |
From: SourceForge.net <no...@so...> - 2010-09-05 19:38:24
|
The following forum message was posted by Anonymous at http://sourceforge.net/projects/geesas/forums/forum/917628/topic/3839557: I'm a Flash user and I've recently started using Pencil in my open time to help with its development. I noticed you made a forked development called Clash with aims to develop an open-source version of Flash itself. Version 0.5 is coming out soon with several developers mentioning that the program will also allow ports and modules, I figured this would be a good time to suggest that with a modular port for scripting in Pencil, that would allow for it to function in a similar manner as Flash. Thoughts? ~Ayetach |
From: SourceForge.net <no...@so...> - 2010-08-04 04:51:31
|
The following forum message was posted by creek23 at http://sourceforge.net/projects/geesas/forums/forum/917628/topic/3372070: He can be found on the Pencil forums. He posted a link there somewhere. |
From: SourceForge.net <no...@so...> - 2010-08-03 19:40:31
|
The following forum message was posted by Anonymous at http://sourceforge.net/projects/geesas/forums/forum/917628/topic/3372070: where can I find his version? |
From: SourceForge.net <no...@so...> - 2010-08-03 06:18:05
|
The following forum message was posted by creek23 at http://sourceforge.net/projects/geesas/forums/forum/917628/topic/3372070: An active Pencil contributor already merged Clash improvements back to Pencil. His release is dubbed Pencil 0.5.Enjoy! |
From: SourceForge.net <no...@so...> - 2010-08-02 18:14:29
|
The following forum message was posted by Anonymous at http://sourceforge.net/projects/geesas/forums/forum/917628/topic/3372070: the dependencies on Lucid 10.04 don\'t allow the installation, why don\'t you merge the good work you done with pencil? |
From: SourceForge.net <no...@so...> - 2010-07-30 04:00:45
|
The following forum message was posted by creek23 at http://sourceforge.net/projects/geesas/forums/forum/917628/topic/3774563: Err? I\'m only saying that you Private Message me on Pencil forum since you don\'t seem to care creating an account at SourceForge in order to send me email. At least on Pencil forum, we both have accounts already. That is all. I don\'t care if most Pencil users want to keep Pencil that way -- it is why I forked it in the first place. |
From: SourceForge.net <no...@so...> - 2010-07-27 06:46:59
|
The following forum message was posted by Anonymous at http://sourceforge.net/projects/geesas/forums/forum/917628/topic/3774563: I can describe it here or make a link to it from here but not on the pencil site. Pencil will have nothing to do with actionscripting. It is not that kind of program. All of the main developers agree that pencil will remain a traditional animation software. if you want me to describe it to you let me know. |
From: SourceForge.net <no...@so...> - 2010-07-21 04:43:51
|
The following forum message was posted by creek23 at http://sourceforge.net/projects/geesas/forums/forum/917628/topic/3774563: Thank you. PM me on Pencil forum and send me link to the file. ;) |
From: <cr...@us...> - 2010-07-19 12:31:37
|
Revision: 54 http://geesas.svn.sourceforge.net/geesas/?rev=54&view=rev Author: creek23 Date: 2010-07-19 12:31:30 +0000 (Mon, 19 Jul 2010) Log Message: ----------- deleted Geany Project File Removed Paths: ------------- pencilanimation/src/pencilanimation.geany Deleted: pencilanimation/src/pencilanimation.geany =================================================================== --- pencilanimation/src/pencilanimation.geany 2010-07-16 14:54:44 UTC (rev 53) +++ pencilanimation/src/pencilanimation.geany 2010-07-19 12:31:30 UTC (rev 54) @@ -1,15 +0,0 @@ - -[project] -name=pencilanimation -base_path=C:\\pencilanimation\\src\\ -make_in_base_path=false - -[files] -current_page=0 -FILE_NAME_0=11042;C++;0;16;1;1;0;C:\\pencilanimation\\src\\interface\\mainwindow.cpp; -FILE_NAME_1=50446;C++;0;16;1;1;0;C:\\pencilanimation\\src\\interface\\editor.cpp; -FILE_NAME_2=6061;C;0;16;1;1;0;C:\\pencilanimation\\src\\interface\\editor.h; -FILE_NAME_3=22194;C++;0;16;1;1;0;C:\\pencilanimation\\src\\interface\\toolset.cpp; -FILE_NAME_4=524;C;0;16;1;1;0;C:\\pencilanimation\\src\\interface\\toolset.h; -FILE_NAME_5=2443;C;0;16;1;1;0;C:\\pencilanimation\\src\\interface\\mainwindow.h; -FILE_NAME_6=6691;C++;0;16;1;1;0;C:\\pencilanimation\\src\\structure\\layer.cpp; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2010-07-17 06:15:40
|
The following forum message was posted by Anonymous at http://sourceforge.net/projects/geesas/forums/forum/917628/topic/3774563: Hi, I am Ian from the pencil animation website. You were talking about adding actionscript development to Clash via a panel built into pencil. I am writing a totally separate program- an SVG animation editor. One of the features it will have is being able to animate from actionscript. I have already developed a simple actionscript animation to swf device using mtasc. I am quite willing to share this with you either over the website or via a private email. Please respond to this message giving your preference. |
From: <cr...@us...> - 2010-07-16 14:54:52
|
Revision: 53 http://geesas.svn.sourceforge.net/geesas/?rev=53&view=rev Author: creek23 Date: 2010-07-16 14:54:44 +0000 (Fri, 16 Jul 2010) Log Message: ----------- Scintilla headers Added Paths: ----------- QScintillAS/include/ QScintillAS/include/Accessor.h QScintillAS/include/Face.py QScintillAS/include/HFacer.py QScintillAS/include/KeyWords.h QScintillAS/include/License.txt QScintillAS/include/Platform.h QScintillAS/include/PropSet.h QScintillAS/include/SString.h QScintillAS/include/SciLexer.h QScintillAS/include/Scintilla.h QScintillAS/include/Scintilla.iface QScintillAS/include/ScintillaWidget.h QScintillAS/include/WindowAccessor.h Added: QScintillAS/include/Accessor.h =================================================================== --- QScintillAS/include/Accessor.h (rev 0) +++ QScintillAS/include/Accessor.h 2010-07-16 14:54:44 UTC (rev 53) @@ -0,0 +1,79 @@ +// Scintilla source code edit control +/** @file Accessor.h + ** Rapid easy access to contents of a Scintilla. + **/ +// Copyright 1998-2001 by Neil Hodgson <ne...@sc...> +// The License.txt file describes the conditions under which this software may be distributed. + +enum { wsSpace = 1, wsTab = 2, wsSpaceTab = 4, wsInconsistent=8}; + +class Accessor; + +typedef bool (*PFNIsCommentLeader)(Accessor &styler, int pos, int len); + +/** + * Interface to data in a Scintilla. + */ +class Accessor { +protected: + enum {extremePosition=0x7FFFFFFF}; + /** @a bufferSize is a trade off between time taken to copy the characters + * and retrieval overhead. + * @a slopSize positions the buffer before the desired position + * in case there is some backtracking. */ + enum {bufferSize=4000, slopSize=bufferSize/8}; + char buf[bufferSize+1]; + int startPos; + int endPos; + int codePage; + + virtual bool InternalIsLeadByte(char ch)=0; + virtual void Fill(int position)=0; + +public: + Accessor() : startPos(extremePosition), endPos(0), codePage(0) {} + virtual ~Accessor() {} + char operator[](int position) { + if (position < startPos || position >= endPos) { + Fill(position); + } + return buf[position - startPos]; + } + /** Safe version of operator[], returning a defined value for invalid position. */ + char SafeGetCharAt(int position, char chDefault=' ') { + if (position < startPos || position >= endPos) { + Fill(position); + if (position < startPos || position >= endPos) { + // Position is outside range of document + return chDefault; + } + } + return buf[position - startPos]; + } + bool IsLeadByte(char ch) { + return codePage && InternalIsLeadByte(ch); + } + void SetCodePage(int codePage_) { codePage = codePage_; } + + virtual bool Match(int pos, const char *s)=0; + virtual char StyleAt(int position)=0; + virtual int GetLine(int position)=0; + virtual int LineStart(int line)=0; + virtual int LevelAt(int line)=0; + virtual int Length()=0; + virtual void Flush()=0; + virtual int GetLineState(int line)=0; + virtual int SetLineState(int line, int state)=0; + virtual int GetPropertyInt(const char *key, int defaultValue=0)=0; + virtual char *GetProperties()=0; + + // Style setting + virtual void StartAt(unsigned int start, char chMask=31)=0; + virtual void SetFlags(char chFlags_, char chWhile_)=0; + virtual unsigned int GetStartSegment()=0; + virtual void StartSegment(unsigned int pos)=0; + virtual void ColourTo(unsigned int pos, int chAttr)=0; + virtual void SetLevel(int line, int level)=0; + virtual int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0)=0; + virtual void IndicatorFill(int start, int end, int indicator, int value)=0; +}; Added: QScintillAS/include/Face.py =================================================================== --- QScintillAS/include/Face.py (rev 0) +++ QScintillAS/include/Face.py 2010-07-16 14:54:44 UTC (rev 53) @@ -0,0 +1,107 @@ +# Module for reading and parsing Scintilla.iface file +import string + +def sanitiseLine(line): + if line[-1:] == '\n': line = line[:-1] + if string.find(line, "##") != -1: + line = line[:string.find(line, "##")] + line = string.strip(line) + return line + +def decodeFunction(featureVal): + retType, rest = string.split(featureVal, " ", 1) + nameIdent, params = string.split(rest, "(") + name, value = string.split(nameIdent, "=") + params, rest = string.split(params, ")") + param1, param2 = string.split(params, ",")[0:2] + return retType, name, value, param1, param2 + +def decodeEvent(featureVal): + retType, rest = string.split(featureVal, " ", 1) + nameIdent, params = string.split(rest, "(") + name, value = string.split(nameIdent, "=") + return retType, name, value + +def decodeParam(p): + param = string.strip(p) + type = "" + name = "" + value = "" + if " " in param: + type, nv = string.split(param, " ") + if "=" in nv: + name, value = string.split(nv, "=") + else: + name = nv + return type, name, value + +class Face: + + def __init__(self): + self.order = [] + self.features = {} + self.values = {} + self.events = {} + + def ReadFromFile(self, name): + currentCategory = "" + currentComment = [] + currentCommentFinished = 0 + file = open(name) + for line in file.readlines(): + line = sanitiseLine(line) + if line: + if line[0] == "#": + if line[1] == " ": + if currentCommentFinished: + currentComment = [] + currentCommentFinished = 0 + currentComment.append(line[2:]) + else: + currentCommentFinished = 1 + featureType, featureVal = string.split(line, " ", 1) + if featureType in ["fun", "get", "set"]: + retType, name, value, param1, param2 = decodeFunction(featureVal) + p1 = decodeParam(param1) + p2 = decodeParam(param2) + self.features[name] = { + "FeatureType": featureType, + "ReturnType": retType, + "Value": value, + "Param1Type": p1[0], "Param1Name": p1[1], "Param1Value": p1[2], + "Param2Type": p2[0], "Param2Name": p2[1], "Param2Value": p2[2], + "Category": currentCategory, "Comment": currentComment + } + if self.values.has_key(value): + raise "Duplicate value " + value + " " + name + self.values[value] = 1 + self.order.append(name) + elif featureType == "evt": + retType, name, value = decodeEvent(featureVal) + self.features[name] = { + "FeatureType": featureType, + "ReturnType": retType, + "Value": value, + "Category": currentCategory, "Comment": currentComment + } + if self.events.has_key(value): + raise "Duplicate event " + value + " " + name + self.events[value] = 1 + self.order.append(name) + elif featureType == "cat": + currentCategory = featureVal + elif featureType == "val": + name, value = string.split(featureVal, "=", 1) + self.features[name] = { + "FeatureType": featureType, + "Category": currentCategory, + "Value": value } + self.order.append(name) + elif featureType == "enu" or featureType == "lex": + name, value = string.split(featureVal, "=", 1) + self.features[name] = { + "FeatureType": featureType, + "Category": currentCategory, + "Value": value } + self.order.append(name) + Added: QScintillAS/include/HFacer.py =================================================================== --- QScintillAS/include/HFacer.py (rev 0) +++ QScintillAS/include/HFacer.py 2010-07-16 14:54:44 UTC (rev 53) @@ -0,0 +1,76 @@ +# HFacer.py - regenerate the Scintilla.h and SciLexer.h files from the Scintilla.iface interface +# definition file. +# The header files are copied to a temporary file apart from the section between a //++Autogenerated +# comment and a //--Autogenerated comment which is generated by the printHFile and printLexHFile +# functions. After the temporary file is created, it is copied back to the original file name. + +import string +import sys +import os +import Face + +def Contains(s,sub): + return string.find(s, sub) != -1 + +def printLexHFile(f,out): + for name in f.order: + v = f.features[name] + if v["FeatureType"] in ["val"]: + if Contains(name, "SCE_") or Contains(name, "SCLEX_"): + out.write("#define " + name + " " + v["Value"] + "\n") + +def printHFile(f,out): + for name in f.order: + v = f.features[name] + if v["Category"] != "Deprecated": + if v["FeatureType"] in ["fun", "get", "set"]: + featureDefineName = "SCI_" + string.upper(name) + out.write("#define " + featureDefineName + " " + v["Value"] + "\n") + elif v["FeatureType"] in ["evt"]: + featureDefineName = "SCN_" + string.upper(name) + out.write("#define " + featureDefineName + " " + v["Value"] + "\n") + elif v["FeatureType"] in ["val"]: + if not (Contains(name, "SCE_") or Contains(name, "SCLEX_")): + out.write("#define " + name + " " + v["Value"] + "\n") + +def CopyWithInsertion(input, output, genfn, definition): + copying = 1 + for line in input.readlines(): + if copying: + output.write(line) + if Contains(line, "//++Autogenerated"): + copying = 0 + genfn(definition, output) + if Contains(line, "//--Autogenerated"): + copying = 1 + output.write(line) + +def contents(filename): + f = file(filename) + t = f.read() + f.close() + return t + +def Regenerate(filename, genfn, definition): + inText = contents(filename) + tempname = "HFacer.tmp" + out = open(tempname,"w") + hfile = open(filename) + CopyWithInsertion(hfile, out, genfn, definition) + out.close() + hfile.close() + outText = contents(tempname) + if inText == outText: + os.unlink(tempname) + else: + os.unlink(filename) + os.rename(tempname, filename) + +f = Face.Face() +try: + f.ReadFromFile("Scintilla.iface") + Regenerate("Scintilla.h", printHFile, f) + Regenerate("SciLexer.h", printLexHFile, f) + print "Maximum ID is", max([x for x in f.values if int(x) < 3000]) +except: + raise Added: QScintillAS/include/KeyWords.h =================================================================== --- QScintillAS/include/KeyWords.h (rev 0) +++ QScintillAS/include/KeyWords.h 2010-07-16 14:54:44 UTC (rev 53) @@ -0,0 +1,90 @@ +// Scintilla source code edit control +/** @file KeyWords.h + ** Colourise for particular languages. + **/ +// Copyright 1998-2001 by Neil Hodgson <ne...@sc...> +// The License.txt file describes the conditions under which this software may be distributed. + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +typedef void (*LexerFunction)(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler); + +/** + * A LexerModule is responsible for lexing and folding a particular language. + * The class maintains a list of LexerModules which can be searched to find a + * module appropriate to a particular language. + */ +class LexerModule { +protected: + const LexerModule *next; + int language; + LexerFunction fnLexer; + LexerFunction fnFolder; + const char * const * wordListDescriptions; + int styleBits; + + static const LexerModule *base; + static int nextLanguage; + +public: + const char *languageName; + LexerModule(int language_, + LexerFunction fnLexer_, + const char *languageName_=0, + LexerFunction fnFolder_=0, + const char * const wordListDescriptions_[] = NULL, + int styleBits_=5); + virtual ~LexerModule() { + } + int GetLanguage() const { return language; } + + // -1 is returned if no WordList information is available + int GetNumWordLists() const; + const char *GetWordListDescription(int index) const; + + int GetStyleBitsNeeded() const; + + virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const; + virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const; + static const LexerModule *Find(int language); + static const LexerModule *Find(const char *languageName); +}; + +#ifdef SCI_NAMESPACE +} +#endif + +/** + * Check if a character is a space. + * This is ASCII specific but is safe with chars >= 0x80. + */ +inline bool isspacechar(unsigned char ch) { + return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); +} + +inline bool iswordchar(char ch) { + return isascii(ch) && (isalnum(ch) || ch == '.' || ch == '_'); +} + +inline bool iswordstart(char ch) { + return isascii(ch) && (isalnum(ch) || ch == '_'); +} + +inline bool isoperator(char ch) { + if (isascii(ch) && isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '%' /*|| ch == '^'*/ || ch == '&' || ch == '*' || + ch == '(' || ch == ')' || ch == '-' || ch == '+' || + ch == '=' || ch == '|' || ch == '{' || ch == '}' || + ch == '[' || ch == ']' || ch == ':' || ch == ';' || + ch == '<' || ch == '>' || ch == ',' || ch == '/' || + ch == '?' || ch == '!' /*|| ch == '.'*/ || ch == '~') + return true; + return false; +} Added: QScintillAS/include/License.txt =================================================================== --- QScintillAS/include/License.txt (rev 0) +++ QScintillAS/include/License.txt 2010-07-16 14:54:44 UTC (rev 53) @@ -0,0 +1,20 @@ +License for Scintilla and SciTE + +Copyright 1998-2003 by Neil Hodgson <ne...@sc...> + +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. \ No newline at end of file Added: QScintillAS/include/Platform.h =================================================================== --- QScintillAS/include/Platform.h (rev 0) +++ QScintillAS/include/Platform.h 2010-07-16 14:54:44 UTC (rev 53) @@ -0,0 +1,573 @@ +// Scintilla source code edit control +/** @file Platform.h + ** Interface to platform facilities. Also includes some basic utilities. + ** Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows. + **/ +// Copyright 1998-2003 by Neil Hodgson <ne...@sc...> +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef PLATFORM_H +#define PLATFORM_H + +// PLAT_QT is Qt on any supported platform +// PLAT_GTK = GTK+ on Linux or Win32 +// PLAT_GTK_WIN32 is defined additionally when running PLAT_GTK under Win32 +// PLAT_WIN = Win32 API on Win32 OS +// PLAT_WX is wxWindows on any supported platform + +#define PLAT_QT 0 +#define PLAT_GTK 0 +#define PLAT_GTK_WIN32 0 +#define PLAT_MACOSX 0 +#define PLAT_WIN 0 +#define PLAT_WX 0 +#define PLAT_FOX 0 + +#if defined(FOX) +#undef PLAT_FOX +#define PLAT_FOX 1 + +#elif defined(QT) +#undef PLAT_QT +#define PLAT_QT 1 +// This is needed to work around an HP-UX bug with Qt4. +#include <qnamespace.h> + +#elif defined(__WX__) +#undef PLAT_WX +#define PLAT_WX 1 + +#elif defined(GTK) +#undef PLAT_GTK +#define PLAT_GTK 1 + +#if defined(__WIN32__) || defined(_MSC_VER) +#undef PLAT_GTK_WIN32 +#define PLAT_GTK_WIN32 1 +#endif + +#elif defined(MACOSX) +#undef PLAT_MACOSX +#define PLAT_MACOSX 1 + +#else +#undef PLAT_WIN +#define PLAT_WIN 1 + +#endif + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +// Underlying the implementation of the platform classes are platform specific types. +// Sometimes these need to be passed around by client code so they are defined here + +typedef void *FontID; +typedef void *SurfaceID; +typedef void *WindowID; +typedef void *MenuID; +typedef void *TickerID; +typedef void *Function; +typedef void *IdlerID; + +/** + * A geometric point class. + * Point is exactly the same as the Win32 POINT and GTK+ GdkPoint so can be used interchangeably. + */ +class Point { +public: + int x; + int y; + + explicit Point(int x_=0, int y_=0) : x(x_), y(y_) { + } + + // Other automatically defined methods (assignment, copy constructor, destructor) are fine + + static Point FromLong(long lpoint); +}; + +/** + * A geometric rectangle class. + * PRectangle is exactly the same as the Win32 RECT so can be used interchangeably. + * PRectangles contain their top and left sides, but not their right and bottom sides. + */ +class PRectangle { +public: + int left; + int top; + int right; + int bottom; + + PRectangle(int left_=0, int top_=0, int right_=0, int bottom_ = 0) : + left(left_), top(top_), right(right_), bottom(bottom_) { + } + + // Other automatically defined methods (assignment, copy constructor, destructor) are fine + + bool operator==(PRectangle &rc) { + return (rc.left == left) && (rc.right == right) && + (rc.top == top) && (rc.bottom == bottom); + } + bool Contains(Point pt) { + return (pt.x >= left) && (pt.x <= right) && + (pt.y >= top) && (pt.y <= bottom); + } + bool Contains(PRectangle rc) { + return (rc.left >= left) && (rc.right <= right) && + (rc.top >= top) && (rc.bottom <= bottom); + } + bool Intersects(PRectangle other) { + return (right > other.left) && (left < other.right) && + (bottom > other.top) && (top < other.bottom); + } + void Move(int xDelta, int yDelta) { + left += xDelta; + top += yDelta; + right += xDelta; + bottom += yDelta; + } + int Width() { return right - left; } + int Height() { return bottom - top; } + bool Empty() { + return (Height() <= 0) || (Width() <= 0); + } +}; + +/** + * In some circumstances, including Win32 in paletted mode and GTK+, each colour + * must be allocated before use. The desired colours are held in the ColourDesired class, + * and after allocation the allocation entry is stored in the ColourAllocated class. In other + * circumstances, such as Win32 in true colour mode, the allocation process just copies + * the RGB values from the desired to the allocated class. + * As each desired colour requires allocation before it can be used, the ColourPair class + * holds both a ColourDesired and a ColourAllocated + * The Palette class is responsible for managing the palette of colours which contains a + * list of ColourPair objects and performs the allocation. + */ + +/** + * Holds a desired RGB colour. + */ +class ColourDesired { + long co; +public: + ColourDesired(long lcol=0) { + co = lcol; + } + + ColourDesired(unsigned int red, unsigned int green, unsigned int blue) { + Set(red, green, blue); + } + + bool operator==(const ColourDesired &other) const { + return co == other.co; + } + + void Set(long lcol) { + co = lcol; + } + + void Set(unsigned int red, unsigned int green, unsigned int blue) { + co = red | (green << 8) | (blue << 16); + } + + static inline unsigned int ValueOfHex(const char ch) { + if (ch >= '0' && ch <= '9') + return ch - '0'; + else if (ch >= 'A' && ch <= 'F') + return ch - 'A' + 10; + else if (ch >= 'a' && ch <= 'f') + return ch - 'a' + 10; + else + return 0; + } + + void Set(const char *val) { + if (*val == '#') { + val++; + } + unsigned int r = ValueOfHex(val[0]) * 16 + ValueOfHex(val[1]); + unsigned int g = ValueOfHex(val[2]) * 16 + ValueOfHex(val[3]); + unsigned int b = ValueOfHex(val[4]) * 16 + ValueOfHex(val[5]); + Set(r, g, b); + } + + long AsLong() const { + return co; + } + + unsigned int GetRed() { + return co & 0xff; + } + + unsigned int GetGreen() { + return (co >> 8) & 0xff; + } + + unsigned int GetBlue() { + return (co >> 16) & 0xff; + } +}; + +/** + * Holds an allocated RGB colour which may be an approximation to the desired colour. + */ +class ColourAllocated { + long coAllocated; + +public: + + ColourAllocated(long lcol=0) { + coAllocated = lcol; + } + + void Set(long lcol) { + coAllocated = lcol; + } + + long AsLong() const { + return coAllocated; + } +}; + +/** + * Colour pairs hold a desired colour and an allocated colour. + */ +struct ColourPair { + ColourDesired desired; + ColourAllocated allocated; + + ColourPair(ColourDesired desired_=ColourDesired(0,0,0)) { + desired = desired_; + allocated.Set(desired.AsLong()); + } + void Copy() { + allocated.Set(desired.AsLong()); + } +}; + +class Window; // Forward declaration for Palette + +/** + * Colour palette management. + */ +class Palette { + int used; + int size; + ColourPair *entries; +#if PLAT_GTK + void *allocatedPalette; // GdkColor * + int allocatedLen; +#endif + // Private so Palette objects can not be copied + Palette(const Palette &) {} + Palette &operator=(const Palette &) { return *this; } +public: +#if PLAT_WIN + void *hpal; +#endif + bool allowRealization; + + Palette(); + ~Palette(); + + void Release(); + + /** + * This method either adds a colour to the list of wanted colours (want==true) + * or retrieves the allocated colour back to the ColourPair. + * This is one method to make it easier to keep the code for wanting and retrieving in sync. + */ + void WantFind(ColourPair &cp, bool want); + + void Allocate(Window &w); +}; + +/** + * Font management. + */ +class Font { +protected: + FontID id; +#if PLAT_WX + int ascent; +#endif + // Private so Font objects can not be copied + Font(const Font &) {} + Font &operator=(const Font &) { id=0; return *this; } +public: + Font(); + virtual ~Font(); + + virtual void Create(const char *faceName, int characterSet, int size, + bool bold, bool italic, bool extraFontFlag=false); + virtual void Release(); + + FontID GetID() { return id; } + // Alias another font - caller guarantees not to Release + void SetID(FontID id_) { id = id_; } + friend class Surface; + friend class SurfaceImpl; +}; + +/** + * A surface abstracts a place to draw. + */ +#if defined(PLAT_QT) +class XPM; +class QPainter; +#endif + +class Surface { +private: + // Private so Surface objects can not be copied + Surface(const Surface &) {} + Surface &operator=(const Surface &) { return *this; } +public: + Surface() {}; + virtual ~Surface() {}; + static Surface *Allocate(); + + virtual void Init(WindowID wid)=0; + virtual void Init(SurfaceID sid, WindowID wid)=0; + virtual void InitPixMap(int width, int height, Surface *surface_, WindowID wid)=0; + + virtual void Release()=0; + virtual bool Initialised()=0; + virtual void PenColour(ColourAllocated fore)=0; + virtual int LogPixelsY()=0; + virtual int DeviceHeightFont(int points)=0; + virtual void MoveTo(int x_, int y_)=0; + virtual void LineTo(int x_, int y_)=0; + virtual void Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back)=0; + virtual void RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; + virtual void FillRectangle(PRectangle rc, ColourAllocated back)=0; + virtual void FillRectangle(PRectangle rc, Surface &surfacePattern)=0; + virtual void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; + virtual void AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill, + ColourAllocated outline, int alphaOutline, int flags)=0; + virtual void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; + virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource)=0; + + virtual void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0; + virtual void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0; + virtual void DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore)=0; + virtual void MeasureWidths(Font &font_, const char *s, int len, int *positions)=0; + virtual int WidthText(Font &font_, const char *s, int len)=0; + virtual int WidthChar(Font &font_, char ch)=0; + virtual int Ascent(Font &font_)=0; + virtual int Descent(Font &font_)=0; + virtual int InternalLeading(Font &font_)=0; + virtual int ExternalLeading(Font &font_)=0; + virtual int Height(Font &font_)=0; + virtual int AverageCharWidth(Font &font_)=0; + + virtual int SetPalette(Palette *pal, bool inBackGround)=0; + virtual void SetClip(PRectangle rc)=0; + virtual void FlushCachedState()=0; + + virtual void SetUnicodeMode(bool unicodeMode_)=0; + virtual void SetDBCSMode(int codePage)=0; + +#if defined(PLAT_QT) + virtual void Init(QPainter *p)=0; + virtual void DrawXPM(PRectangle rc, const XPM *xpm)=0; +#endif +}; + +/** + * A simple callback action passing one piece of untyped user data. + */ +typedef void (*CallBackAction)(void*); + +/** + * Class to hide the details of window manipulation. + * Does not own the window which will normally have a longer life than this object. + */ +class Window { +protected: + WindowID id; +#if PLAT_MACOSX + void *windowRef; + void *control; +#endif +public: + Window() : id(0), cursorLast(cursorInvalid) { +#if PLAT_MACOSX + windowRef = 0; + control = 0; +#endif + } + Window(const Window &source) : id(source.id), cursorLast(cursorInvalid) { +#if PLAT_MACOSX + windowRef = 0; + control = 0; +#endif + } + virtual ~Window(); + Window &operator=(WindowID id_) { + id = id_; + return *this; + } + WindowID GetID() const { return id; } + bool Created() const { return id != 0; } + void Destroy(); + bool HasFocus(); + PRectangle GetPosition(); + void SetPosition(PRectangle rc); + void SetPositionRelative(PRectangle rc, Window relativeTo); + PRectangle GetClientPosition(); + void Show(bool show=true); + void InvalidateAll(); + void InvalidateRectangle(PRectangle rc); + virtual void SetFont(Font &font); + enum Cursor { cursorInvalid, cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow, cursorHand }; + void SetCursor(Cursor curs); + void SetTitle(const char *s); + PRectangle GetMonitorRect(Point pt); +#if PLAT_MACOSX + void SetWindow(void *ref) { windowRef = ref; }; + void SetControl(void *_control) { control = _control; }; +#endif +private: + Cursor cursorLast; +}; + +/** + * Listbox management. + */ + +class ListBox : public Window { +public: + ListBox(); + virtual ~ListBox(); + static ListBox *Allocate(); + + virtual void SetFont(Font &font)=0; + virtual void Create(Window &parent, int ctrlID, Point location, int lineHeight_, bool unicodeMode_)=0; + virtual void SetAverageCharWidth(int width)=0; + virtual void SetVisibleRows(int rows)=0; + virtual int GetVisibleRows() const=0; + virtual PRectangle GetDesiredRect()=0; + virtual int CaretFromEdge()=0; + virtual void Clear()=0; + virtual void Append(char *s, int type = -1)=0; + virtual int Length()=0; + virtual void Select(int n)=0; + virtual int GetSelection()=0; + virtual int Find(const char *prefix)=0; + virtual void GetValue(int n, char *value, int len)=0; + virtual void RegisterImage(int type, const char *xpm_data)=0; + virtual void ClearRegisteredImages()=0; + virtual void SetDoubleClickAction(CallBackAction, void *)=0; + virtual void SetList(const char* list, char separator, char typesep)=0; +}; + +/** + * Menu management. + */ +class Menu { + MenuID id; +public: + Menu(); + MenuID GetID() { return id; } + void CreatePopUp(); + void Destroy(); + void Show(Point pt, Window &w); +}; + +class ElapsedTime { + long bigBit; + long littleBit; +public: + ElapsedTime(); + double Duration(bool reset=false); +}; + +/** + * Dynamic Library (DLL/SO/...) loading + */ +class DynamicLibrary { +public: + virtual ~DynamicLibrary() {}; + + /// @return Pointer to function "name", or NULL on failure. + virtual Function FindFunction(const char *name) = 0; + + /// @return true if the library was loaded successfully. + virtual bool IsValid() = 0; + + /// @return An instance of a DynamicLibrary subclass with "modulePath" loaded. + static DynamicLibrary *Load(const char *modulePath); +}; + +/** + * Platform class used to retrieve system wide parameters such as double click speed + * and chrome colour. Not a creatable object, more of a module with several functions. + */ +class Platform { + // Private so Platform objects can not be copied + Platform(const Platform &) {} + Platform &operator=(const Platform &) { return *this; } +public: + // Should be private because no new Platforms are ever created + // but gcc warns about this + Platform() {} + ~Platform() {} + static ColourDesired Chrome(); + static ColourDesired ChromeHighlight(); + static const char *DefaultFont(); + static int DefaultFontSize(); + static unsigned int DoubleClickTime(); + static bool MouseButtonBounce(); + static void DebugDisplay(const char *s); + static bool IsKeyDown(int key); + static long SendScintilla( + WindowID w, unsigned int msg, unsigned long wParam=0, long lParam=0); + static long SendScintillaPointer( + WindowID w, unsigned int msg, unsigned long wParam=0, void *lParam=0); + static bool IsDBCSLeadByte(int codePage, char ch); + static int DBCSCharLength(int codePage, const char *s); + static int DBCSCharMaxLength(); + + // These are utility functions not really tied to a platform + static int Minimum(int a, int b); + static int Maximum(int a, int b); + // Next three assume 16 bit shorts and 32 bit longs + static long LongFromTwoShorts(short a,short b) { + return (a) | ((b) << 16); + } + static short HighShortFromLong(long x) { + return static_cast<short>(x >> 16); + } + static short LowShortFromLong(long x) { + return static_cast<short>(x & 0xffff); + } + static void DebugPrintf(const char *format, ...); + static bool ShowAssertionPopUps(bool assertionPopUps_); + static void Assert(const char *c, const char *file, int line); + static int Clamp(int val, int minVal, int maxVal); +}; + +#ifdef QT_NO_DEBUG +#define PLATFORM_ASSERT(c) ((void)0) +#else +#ifdef SCI_NAMESPACE +#define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Scintilla::Platform::Assert(#c, __FILE__, __LINE__)) +#else +#define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Platform::Assert(#c, __FILE__, __LINE__)) +#endif +#endif + +#ifdef SCI_NAMESPACE +} +#endif + +// Shut up annoying Visual C++ warnings: +#ifdef _MSC_VER +#pragma warning(disable: 4244 4309 4514 4710) +#endif + +#endif Added: QScintillAS/include/PropSet.h =================================================================== --- QScintillAS/include/PropSet.h (rev 0) +++ QScintillAS/include/PropSet.h 2010-07-16 14:54:44 UTC (rev 53) @@ -0,0 +1,104 @@ +// Scintilla source code edit control +/** @file PropSet.h + ** A Java style properties file module. + **/ +// Copyright 1998-2002 by Neil Hodgson <ne...@sc...> +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef PROPSET_H +#define PROPSET_H +#include "SString.h" + +bool EqualCaseInsensitive(const char *a, const char *b); + +bool isprefix(const char *target, const char *prefix); + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +struct Property { + unsigned int hash; + char *key; + char *val; + Property *next; + Property() : hash(0), key(0), val(0), next(0) {} +}; + +/** + */ +class PropSet { +protected: + enum { hashRoots=31 }; + Property *props[hashRoots]; + Property *enumnext; + int enumhash; + static unsigned int HashString(const char *s, size_t len) { + unsigned int ret = 0; + while (len--) { + ret <<= 4; + ret ^= *s; + s++; + } + return ret; + } + +public: + PropSet *superPS; + PropSet(); + ~PropSet(); + void Set(const char *key, const char *val, int lenKey=-1, int lenVal=-1); + void Set(const char *keyVal); + void Unset(const char *key, int lenKey=-1); + void SetMultiple(const char *s); + SString Get(const char *key) const; + SString GetExpanded(const char *key) const; + SString Expand(const char *withVars, int maxExpands=100) const; + int GetInt(const char *key, int defaultValue=0) const; + void Clear(); + char *ToString() const; // Caller must delete[] the return value + +private: + // copy-value semantics not implemented + PropSet(const PropSet ©); + void operator=(const PropSet &assign); +}; + +/** + */ +class WordList { +public: + // Each word contains at least one character - a empty word acts as sentinel at the end. + char **words; + char *list; + int len; + bool onlyLineEnds; ///< Delimited by any white space or only line ends + bool sorted; + int starts[256]; + WordList(bool onlyLineEnds_ = false) : + words(0), list(0), len(0), onlyLineEnds(onlyLineEnds_), + sorted(false) + {} + ~WordList() { Clear(); } + operator bool() { return len ? true : false; } + void Clear(); + void Set(const char *s); + bool InList(const char *s); + bool InListAbbreviated(const char *s, const char marker); +}; + +inline bool IsAlphabetic(unsigned int ch) { + return ((ch >= 'A') && (ch <= 'Z')) || ((ch >= 'a') && (ch <= 'z')); +} + +#ifdef SCI_NAMESPACE +} +#endif + +#ifdef _MSC_VER +// Visual C++ doesn't like the private copy idiom for disabling +// the default copy constructor and operator=, but it's fine. +#pragma warning(disable: 4511 4512) +#endif + +#endif Added: QScintillAS/include/SString.h =================================================================== --- QScintillAS/include/SString.h (rev 0) +++ QScintillAS/include/SString.h 2010-07-16 14:54:44 UTC (rev 53) @@ -0,0 +1,289 @@ +// SciTE - Scintilla based Text Editor +/** @file SString.h + ** A simple string class. + **/ +// Copyright 1998-2004 by Neil Hodgson <ne...@sc...> +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef SSTRING_H +#define SSTRING_H + + +// These functions are implemented because each platform calls them something different. +int CompareCaseInsensitive(const char *a, const char *b); +int CompareNCaseInsensitive(const char *a, const char *b, size_t len); +bool EqualCaseInsensitive(const char *a, const char *b); + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +// Define another string class. +// While it would be 'better' to use std::string, that doubles the executable size. +// An SString may contain embedded nul characters. + +/** + * Base class from which the two other classes (SBuffer & SString) + * are derived. + */ +class SContainer { +public: + /** Type of string lengths (sizes) and positions (indexes). */ + typedef size_t lenpos_t; + /** Out of bounds value indicating that the string argument should be measured. */ + enum { measure_length=0xffffffffU}; + +protected: + char *s; ///< The C string + lenpos_t sSize; ///< The size of the buffer, less 1: ie. the maximum size of the string + + SContainer() : s(0), sSize(0) {} + ~SContainer() { + delete []s; // Suppose it was allocated using StringAllocate + s = 0; + sSize = 0; + } + /** Size of buffer. */ + lenpos_t size() const { + if (s) { + return sSize; + } else { + return 0; + } + } +public: + /** + * Allocate uninitialized memory big enough to fit a string of the given length. + * @return the pointer to the new string + */ + static char *StringAllocate(lenpos_t len); + /** + * Duplicate a buffer/C string. + * Allocate memory of the given size, or big enough to fit the string if length isn't given; + * then copy the given string in the allocated memory. + * @return the pointer to the new string + */ + static char *StringAllocate( + const char *s, ///< The string to duplicate + lenpos_t len=measure_length); ///< The length of memory to allocate. Optional. +}; + + +/** + * @brief A string buffer class. + * + * Main use is to ask an API the length of a string it can provide, + * then to allocate a buffer of the given size, and to provide this buffer + * to the API to put the string. + * This class is intended to be shortlived, to be transformed as SString + * as soon as it holds the string, so it has little members. + * Note: we assume the buffer is filled by the API. If the length can be shorter, + * we should set sLen to strlen(sb.ptr()) in related SString constructor and assignment. + */ +class SBuffer : protected SContainer { +public: + SBuffer(lenpos_t len) { + s = StringAllocate(len); + if (s) { + *s = '\0'; + sSize = len; + } else { + sSize = 0; + } + } +private: + /// Copy constructor + // Here only to be on the safe size, user should avoid returning SBuffer values. + SBuffer(const SBuffer &source) : SContainer() { + s = StringAllocate(source.s, source.sSize); + sSize = (s) ? source.sSize : 0; + } + /// Default assignment operator + // Same here, shouldn't be used + SBuffer &operator=(const SBuffer &source) { + if (this != &source) { + delete []s; + s = StringAllocate(source.s, source.sSize); + sSize = (s) ? source.sSize : 0; + } + return *this; + } +public: + /** Provide direct read/write access to buffer. */ + char *ptr() { + return s; + } + /** Ownership of the buffer have been taken, so release it. */ + void reset() { + s = 0; + sSize = 0; + } + /** Size of buffer. */ + lenpos_t size() const { + return SContainer::size(); + } +}; + + +/** + * @brief A simple string class. + * + * Hold the length of the string for quick operations, + * can have a buffer bigger than the string to avoid too many memory allocations and copies. + * May have embedded zeroes as a result of @a substitute, but relies too heavily on C string + * functions to allow reliable manipulations of these strings, other than simple appends, etc. + */ +class SString : protected SContainer { + lenpos_t sLen; ///< The size of the string in s + lenpos_t sizeGrowth; ///< Minimum growth size when appending strings + enum { sizeGrowthDefault = 64 }; + + bool grow(lenpos_t lenNew); + SString &assign(const char *sOther, lenpos_t sSize_=measure_length); + +public: + SString() : sLen(0), sizeGrowth(sizeGrowthDefault) {} + SString(const SString &source) : SContainer(), sizeGrowth(sizeGrowthDefault) { + s = StringAllocate(source.s, source.sLen); + sSize = sLen = (s) ? source.sLen : 0; + } + SString(const char *s_) : sizeGrowth(sizeGrowthDefault) { + s = StringAllocate(s_); + sSize = sLen = (s) ? strlen(s) : 0; + } + SString(SBuffer &buf) : sizeGrowth(sizeGrowthDefault) { + s = buf.ptr(); + sSize = sLen = buf.size(); + // Consumes the given buffer! + buf.reset(); + } + SString(const char *s_, lenpos_t first, lenpos_t last) : sizeGrowth(sizeGrowthDefault) { + // note: expects the "last" argument to point one beyond the range end (a la STL iterators) + s = StringAllocate(s_ + first, last - first); + sSize = sLen = (s) ? last - first : 0; + } + SString(int i); + SString(double d, int precision); + ~SString() { + sLen = 0; + } + void clear() { + if (s) { + *s = '\0'; + } + sLen = 0; + } + /** Size of buffer. */ + lenpos_t size() const { + return SContainer::size(); + } + /** Size of string in buffer. */ + lenpos_t length() const { + return sLen; + } + /** Read access to a character of the string. */ + char operator[](lenpos_t i) const { + return (s && i < sSize) ? s[i] : '\0'; + } + SString &operator=(const char *source) { + return assign(source); + } + SString &operator=(const SString &source) { + if (this != &source) { + assign(source.s, source.sLen); + } + return *this; + } + bool operator==(const SString &sOther) const; + bool operator!=(const SString &sOther) const { + return !operator==(sOther); + } + bool operator==(const char *sOther) const; + bool operator!=(const char *sOther) const { + return !operator==(sOther); + } + bool contains(char ch) const { + return (s && *s) ? strchr(s, ch) != 0 : false; + } + void setsizegrowth(lenpos_t sizeGrowth_) { + sizeGrowth = sizeGrowth_; + } + const char *c_str() const { + return s ? s : ""; + } + /** Give ownership of buffer to caller which must use delete[] to free buffer. */ + char *detach() { + char *sRet = s; + s = 0; + sSize = 0; + sLen = 0; + return sRet; + } + SString substr(lenpos_t subPos, lenpos_t subLen=measure_length) const; + SString &lowercase(lenpos_t subPos = 0, lenpos_t subLen=measure_length); + SString &uppercase(lenpos_t subPos = 0, lenpos_t subLen=measure_length); + SString &append(const char *sOther, lenpos_t sLenOther=measure_length, char sep = '\0'); + SString &operator+=(const char *sOther) { + return append(sOther, static_cast<lenpos_t>(measure_length)); + } + SString &operator+=(const SString &sOther) { + return append(sOther.s, sOther.sLen); + } + SString &operator+=(char ch) { + return append(&ch, 1); + } + SString &appendwithseparator(const char *sOther, char sep) { + return append(sOther, strlen(sOther), sep); + } + SString &insert(lenpos_t pos, const char *sOther, lenpos_t sLenOther=measure_length); + + /** + * Remove @a len characters from the @a pos position, included. + * Characters at pos + len and beyond replace characters at pos. + * If @a len is 0, or greater than the length of the string + * starting at @a pos, the string is just truncated at @a pos. + */ + void remove(lenpos_t pos, lenpos_t len); + + SString &change(lenpos_t pos, char ch) { + if (pos < sLen) { // character changed must be in string bounds + *(s + pos) = ch; + } + return *this; + } + /** Read an integral numeric value from the string. */ + int value() const { + return s ? atoi(s) : 0; + } + bool startswith(const char *prefix); + bool endswith(const char *suffix); + int search(const char *sFind, lenpos_t start=0) const; + bool contains(const char *sFind) const { + return search(sFind) >= 0; + } + int substitute(char chFind, char chReplace); + int substitute(const char *sFind, const char *sReplace); + int remove(const char *sFind) { + return substitute(sFind, ""); + } +}; + + +/** + * Duplicate a C string. + * Allocate memory of the given size, or big enough to fit the string if length isn't given; + * then copy the given string in the allocated memory. + * @return the pointer to the new string + */ +inline char *StringDup( + const char *s, ///< The string to duplicate + SContainer::lenpos_t len=SContainer::measure_length) ///< The length of memory to allocate. Optional. +{ + return SContainer::StringAllocate(s, len); +} + +#ifdef SCI_NAMESPACE +} +#endif + +#endif Added: QScintillAS/include/SciLexer.h =================================================================== --- QScintillAS/include/SciLexer.h (rev 0) +++ QScintillAS/include/SciLexer.h 2010-07-16 14:54:44 UTC (rev 53) @@ -0,0 +1,1279 @@ +// Scintilla source code edit control +/** @file SciLexer.h + ** Interface to the added lexer functions in the SciLexer version of the edit control. + **/ +// Copyright 1998-2002 by Neil Hodgson <ne...@sc...> +// The License.txt file describes the conditions under which this software may be distributed. + +// Most of this file is automatically generated from the Scintilla.iface interface definition +// file which contains any comments about the definitions. HFacer.py does the generation. + +#ifndef SCILEXER_H +#define SCILEXER_H + +// SciLexer features - not in standard Scintilla + +//++Autogenerated -- start of section automatically generated from Scintilla.iface +#define SCLEX_CONTAINER 0 +#define SCLEX_NULL 1 +/*#define SCLEX_PYTHON 2 +#define SCLEX_CPP 3 +#define SCLEX_HTML 4 +#define SCLEX_XML 5 +#define SCLEX_PERL 6 +#define SCLEX_SQL 7 +#define SCLEX_VB 8 +#define SCLEX_PROPERTIES 9 +#define SCLEX_ERRORLIST 10 +#define SCLEX_MAKEFILE 11 +#define SCLEX_BATCH 12 +#define SCLEX_XCODE 13 +#define SCLEX_LATEX 14 +#define SCLEX_LUA 15 +#define SCLEX_DIFF 16 +#define SCLEX_CONF 17 +#define SCLEX_PASCAL 18 +#define SCLEX_AVE 19 +#define SCLEX_ADA 20 +#define SCLEX_LISP 21 +#define SCLEX_RUBY 22 +#define SCLEX_EIFFEL 23 +#define SCLEX_EIFFELKW 24 +#define SCLEX_TCL 25 +#define SCLEX_NNCRONTAB 26 +#define SCLEX_BULLANT 27 +#define SCLEX_VBSCRIPT 28 +#define SCLEX_BAAN 31 +#define SCLEX_MATLAB 32 +#define SCLEX_SCRIPTOL 33 +#define SCLEX_ASM 34 +#define SCLEX_CPPNOCASE 35 +#define SCLEX_FORTRAN 36 +#define SCLEX_F77 37 +#define SCLEX_CSS 38 +#define SCLEX_POV 39 +#define SCLEX_LOUT 40 +#define SCLEX_ESCRIPT 41 +#define SCLEX_PS 42 +#define SCLEX_NSIS 43 +#define SCLEX_MMIXAL 44 +#define SCLEX_CLW 45 +#define SCLEX_CLWNOCASE 46 +#define SCLEX_LOT 47 +#define SCLEX_YAML 48 +#define SCLEX_TEX 49 +#define SCLEX_METAPOST 50 +#define SCLEX_POWERBASIC 51 +#define SCLEX_FORTH 52 +#define SCLEX_ERLANG 53 +#define SCLEX_OCTAVE 54 +#define SCLEX_MSSQL 55 +#define SCLEX_VERILOG 56 +#define SCLEX_KIX 57 +#define SCLEX_GUI4CLI 58 +#define SCLEX_SPECMAN 59 +#define SCLEX_AU3 60 +#define SCLEX_APDL 61 +#define SCLEX_BASH 62 +#define SCLEX_ASN1 63 +#define SCLEX_VHDL 64 +#define SCLEX_CAML 65 +#define SCLEX_BLITZBASIC 66 +#define SCLEX_PUREBASIC 67 +#define SCLEX_HASKELL 68 +#define SCLEX_PHPSCRIPT 69 +#define SCLEX_TADS3 70 +#define SCLEX_REBOL 71 +#define SCLEX_SMALLTALK 72 +#define SCLEX_FLAGSHIP 73 +#define SCLEX_CSOUND 74 +#define SCLEX_FREEBASIC 75 +#define SCLEX_INNOSETUP 76 +#define SCLEX_OPAL 77 +#define SCLEX_SPICE 78 +#define SCLEX_D 79 +#define SCLEX_CMAKE 80 +#define SCLEX_GAP 81 +#define SCLEX_PLM 82 +#define SCLEX_PROGRESS 83 +#define SCLEX_ABAQUS 84 +#define SCLEX_ASYMPTOTE 85 +#define SCLEX_R 86 +#define SCLEX_MAGIK 87 +#define SCLEX_POWERSHELL 88 +#define SCLEX_MYSQL 89 +#define SCLEX_PO 90*/ +#define SCLEX_AUTOMATIC 1000 +#define SCLEX_ACTIONSCRIPT 99 +#define SCE_P_DEFAULT 0 +#define SCE_P_COMMENTLINE 1 +#define SCE_P_NUMBER 2 +#define SCE_P_STRING 3 +#define SCE_P_CHARACTER 4 +#define SCE_P_WORD 5 +#define SCE_P_TRIPLE 6 +#define SCE_P_TRIPLEDOUBLE 7 +#define SCE_P_CLASSNAME 8 +#define SCE_P_DEFNAME 9 +#define SCE_P_OPERATOR 10 +#define SCE_P_IDENTIFIER 11 +#define SCE_P_COMMENTBLOCK 12 +#define SCE_P_STRINGEOL 13 +#define SCE_P_WORD2 14 +#define SCE_P_DECORATOR 15 +#define SCE_C_DEFAULT 0 +#define SCE_C_COMMENT 1 +#define SCE_C_COMMENTLINE 2 +#define SCE_C_COMMENTDOC 3 +#define SCE_C_NUMBER 4 +#define SCE_C_WORD 5 +#define SCE_C_STRING 6 +#define SCE_C_CHARACTER 7 +#define SCE_C_UUID 8 +#define SCE_C_PREPROCESSOR 9 +#define SCE_C_OPERATOR 10 +#define SCE_C_IDENTIFIER 11 +#define SCE_C_STRINGEOL 12 +#define SCE_C_VERBATIM 13 +#define SCE_C_REGEX 14 +#define SCE_C_COMMENTLINEDOC 15 +#define SCE_C_WORD2 16 +#define SCE_C_COMMENTDOCKEYWORD 17 +#define SCE_C_COMMENTDOCKEYWORDERROR 18 +#define SCE_C_GLOBALCLASS 19 +/*#define SCE_D_DEFAULT 0 +#define SCE_D_COMMENT 1 +#define SCE_D_COMMENTLINE 2 +#define SCE_D_COMMENTDOC 3 +#define SCE_D_COMMENTNESTED 4 +#define SCE_D_NUMBER 5 +#define SCE_D_WORD 6 +#define SCE_D_WORD2 7 +#define SCE_D_WORD3 8 +#define SCE_D_TYPEDEF 9 +#define SCE_D_STRING 10 +#define SCE_D_STRINGEOL 11 +#define SCE_D_CHARACTER 12 +#define SCE_D_OPERATOR 13 +#define SCE_D_IDENTIFIER 14 +#define SCE_D_COMMENTLINEDOC 15 +#define SCE_D_COMMENTDOCKEYWORD 16 +#define SCE_D_COMMENTDOCKEYWORDERROR 17 +#define SCE_TCL_DEFAULT 0 +#define SCE_TCL_COMMENT 1 +#define SCE_TCL_COMMENTLINE 2 +#define SCE_TCL_NUMBER 3 +#define SCE_TCL_WORD_IN_QUOTE 4 +#define SCE_TCL_IN_QUOTE 5 +#define SCE_TCL_OPERATOR 6 +#define SCE_TCL_IDENTIFIER 7 +#define SCE_TCL_SUBSTITUTION 8 +#define SCE_TCL_SUB_BRACE 9 +#define SCE_TCL_MODIFIER 10 +#define SCE_TCL_EXPAND 11 +#define SCE_TCL_WORD 12 +#define SCE_TCL_WORD2 13 +#define SCE_TCL_WORD3 14 +#define SCE_TCL_WORD4 15 +#define SCE_TCL_WORD5 16 +#define SCE_TCL_WORD6 17 +#define SCE_TCL_WORD7 18 +#define SCE_TCL_WORD8 19 +#define SCE_TCL_COMMENT_BOX 20 +#define SCE_TCL_BLOCK_COMMENT 21*/ +#define SCE_H_DEFAULT 0 +#define SCE_H_TAG 1 +#define SCE_H_TAGUNKNOWN 2 +#define SCE_H_ATTRIBUTE 3 +#define SCE_H_ATTRIBUTEUNKNOWN 4 +#define SCE_H_NUMBER 5 +#define SCE_H_DOUBLESTRING 6 +#define SCE_H_SINGLESTRING 7 +#define SCE_H_OTHER 8 +#define SCE_H_COMMENT 9 +#define SCE_H_ENTITY 10 +#define SCE_H_TAGEND 11 +#define SCE_H_XMLSTART 12 +#define SCE_H_XMLEND 13 +#define SCE_H_SCRIPT 14 +#define SCE_H_ASP 15 +#define SCE_H_ASPAT 16 +#define SCE_H_CDATA 17 +#define SCE_H_QUESTION 18 +#define SCE_H_VALUE 19 +#define SCE_H_XCCOMMENT 20 +#define SCE_H_SGML_DEFAULT 21 +#define SCE_H_SGML_COMMAND 22 +#define SCE_H_SGML_1ST_PARAM 23 +#define SCE_H_SGML_DOUBLESTRING 24 +#define SCE_H_SGML_SIMPLESTRING 25 +#define SCE_H_SGML_ERROR 26 +#define SCE_H_SGML_SPECIAL 27 +#define SCE_H_SGML_ENTITY 28 +#define SCE_H_SGML_COMMENT 29 +#define SCE_H_SGML_1ST_PARAM_COMMENT 30 +#define SCE_H_SGML_BLOCK_DEFAULT 31 +#define SCE_HJ_START 40 +#define SCE_HJ_DEFAULT 41 +#define SCE_HJ_COMMENT 42 +#define SCE_HJ_COMMENTLINE 43 +#define SCE_HJ_COMMENTDOC 44 +#define SCE_HJ_NUMBER 45 +#define SCE_HJ_WORD 46 +#define SCE_HJ_KEYWORD 47 +#define SCE_HJ_DOUBLESTRING 48 +#define SCE_HJ_SINGLESTRING 49 +#define SCE_HJ_SYMBOLS 50 +#define SCE_HJ_STRINGEOL 51 +#define SCE_HJ_REGEX 52 +#define SCE_HJA_START 55 +#define SCE_HJA_DEFAULT 56 +#define SCE_HJA_COMMENT 57 +#define SCE_HJA_COMMENTLINE 58 +#define SCE_HJA_COMMENTDOC 59 +#define SCE_HJA_NUMBER 60 +#define SCE_HJA_WORD 61 +#define SCE_HJA_KEYWORD 62 +#define SCE_HJA_DOUBLESTRING 63 +#define SCE_HJA_SINGLESTRING 64 +#define SCE_HJA_SYMBOLS 65 +#define SCE_HJA_STRINGEOL 66 +#define SCE_HJA_REGEX 67 +#define SCE_HB_START 70 +#define SCE_HB_DEFAULT 71 +#define SCE_HB_COMMENTLINE 72 +#define SCE_HB_NUMBER 73 +#define SCE_HB_WORD 74 +#define SCE_HB_STRING 75 +#define SCE_HB_IDENTIFIER 76 +#define SCE_HB_STRINGEOL 77 +#define SCE_HBA_START 80 +#define SCE_HBA_DEFAULT 81 +#define SCE_HBA_COMMENTLINE 82 +#define SCE_HBA_NUMBER 83 +#define SCE_HBA_WORD 84 +#define SCE_HBA_STRING 85 +#define SCE_HBA_IDENTIFIER 86 +#define SCE_HBA_STRINGEOL 87 +#define SCE_HP_START 90 +#define SCE_HP_DEFAULT 91 +#define SCE_HP_COMMENTLINE 92 +#define SCE_HP_NUMBER 93 +#define SCE_HP_STRING 94 +#define SCE_HP_CHARACTER 95 +#define SCE_HP_WORD 96 +#define SCE_HP_TRIPLE 97 +#define SCE_HP_TRIPLEDOUBLE 98 +#define SCE_HP_CLASSNAME 99 +#define SCE_HP_DEFNAME 100 +#define SCE_HP_OPERATOR 101 +#define SCE_HP_IDENTIFIER 102 +#define SCE_HPHP_COMPLEX_VARIABLE 104 +#define SCE_HPA_START 105 +#define SCE_HPA_DEFAULT 106 +#define SCE_HPA_COMMENTLINE 107 +#define SCE_HPA_NUMBER 108 +#define SCE_HPA_STRING 109 +#define SCE_HPA_CHARACTER 110 +#define SCE_HPA_WORD 111 +#define SCE_HPA_TRIPLE 112 +#define SCE_HPA_TRIPLEDOUBLE 113 +#define SCE_HPA_CLASSNAME 114 +#define SCE_HPA_DEFNAME 115 +#define SCE_HPA_OPERATOR 116 +#define SCE_HPA_IDENTIFIER 117 +#define SCE_HPHP_DEFAULT 118 +#define SCE_HPHP_HSTRING 119 +#define SCE_HPHP_SIMPLESTRING 120 +#define SCE_HPHP_WORD 121 +#define SCE_HPHP_NUMBER 122 +#define SCE_HPHP_VARIABLE 123 +#define SCE_HPHP_COMMENT 124 +#define SCE_HPHP_COMMENTLINE 125 +#define SCE_HPHP_HSTRING_VARIABLE 126 +#define SCE_HPHP_OPERATOR 127 +/*#define SCE_PL_DEFAULT 0 +#define SCE_PL_ERROR 1 +#define SCE_PL_COMMENTLINE 2 +#define SCE_PL_POD 3 +#define SCE_PL_NUMBER 4 +#define SCE_PL_WORD 5 +#define SCE_PL_STRING 6 +#define SCE_PL_CHARACTER 7 +#define SCE_PL_PUNCTUATION 8 +#define SCE_PL_PREPROCESSOR 9 +#define SCE_PL_OPERATOR 10 +#define SCE_PL_IDENTIFIER 11 +#define SCE_PL_SCALAR 12 +#define SCE_PL_ARRAY 13 +#define SCE_PL_HASH 14 +#define SCE_PL_SYMBOLTABLE 15 +#define SCE_PL_VARIABLE_INDEXER 16 +#define SCE_PL_REGEX 17 +#define SCE_PL_REGSUBST 18 +#define SCE_PL_LONGQUOTE 19 +#define SCE_PL_BACKTICKS 20 +#define SCE_PL_DATASECTION 21 +#define SCE_PL_HERE_DELIM 22 +#define SCE_PL_HERE_Q 23 +#define SCE_PL_HERE_QQ 24 +#define SCE_PL_HERE_QX 25 +#define SCE_PL_STRING_Q 26 +#define SCE_PL_STRING_QQ 27 +#define SCE_PL_STRING_QX 28 +#define SCE_PL_STRING_QR 29 +#define SCE_PL_STRING_QW 30 +#define SCE_PL_POD_VERB 31 +#define SCE_PL_SUB_PROTOTYPE 40 +#define SCE_PL_FORMAT_IDENT 41 +#define SCE_PL_FORMAT 42*/ +#define SCE_RB_DEFAULT 0 +#define SCE_RB_ERROR 1 +#define SCE_RB_COMMENTLINE 2 +#define SCE_RB_POD 3 +#define SCE_RB_NUMBER 4 +#define SCE_RB_WORD 5 +#define SCE_RB_STRING 6 +#define SCE_RB_CHARACTER 7 +#define SCE_RB_CLASSNAME 8 +#define SCE_RB_DEFNAME 9 +#define SCE_RB_OPERATOR 10 +#define SCE_RB_IDENTIFIER 11 +#define SCE_RB_REGEX 12 +#define SCE_RB_GLOBAL 13 +#define SCE_RB_SYMBOL 14 +#define SCE_RB_MODULE_NAME 15 +#define SCE_RB_INSTANCE_VAR 16 +#define SCE_RB_CLASS_VAR 17 +#define SCE_RB_BACKTICKS 18 +#define SCE_RB_DATASECTION 19 +#define SCE_RB_HERE_DELIM 20 +#define SCE_RB_HERE_Q 21 +#define SCE_RB_HERE_QQ 22 +#define SCE_RB_HERE_QX 23 +#define SCE_RB_STRING_Q 24 +#define SCE_RB_STRING_QQ 25 +#define SCE_RB_STRING_QX 26 +#define SCE_RB_STRING_QR 27 +#define SCE_RB_STRING_QW 28 +#define SCE_RB_WORD_DEMOTED 29 +#define SCE_RB_STDIN 30 +#define SCE_RB_STDOUT 31 +#define SCE_RB_STDERR 40 +#define SCE_RB_UPPER_BOUND 41 +#define SCE_B_DEFAULT 0 +#define SCE_B_COMMENT 1 +#define SCE_B_NUMBER 2 +#define SCE_B_KEYWORD 3 +#define SCE_B_STRING 4 +#define SCE_B_PREPROCESSOR 5 +#define SCE_B_OPERATOR 6 +#define SCE_B_IDENTIFIER 7 +#define SCE_B_DATE 8 +#define SCE_B_STRINGEOL 9 +#define SCE_B_KEYWORD2 10 +#define SCE_B_KEYWORD3 11 +#define SCE_B_KEYWORD4 12 +#define SCE_B_CONSTANT 13 +#define SCE_B_ASM 14 +#define SCE_B_LABEL 15 +#define SCE_B_ERROR 16 +#define SCE_B_HEXNUMBER 17 +#define SCE_B_BINNUMBER 18 +#define SCE_PROPS_DEFAULT 0 +#define SCE_PROPS_COMMENT 1 +#define SCE_PROPS_SECTION 2 +#define SCE_PROPS_ASSIGNMENT 3 +#define SCE_PROPS_DEFVAL 4 +#define SCE_PROPS_KEY 5 +#define SCE_L_DEFAULT 0 +#define SCE_L_COMMAND 1 +#define SCE_L_TAG 2 +#define SCE_L_MATH 3 +#define SCE_L_COMMENT 4 +/*#define SCE_LUA_DEFAULT 0 +#define SCE_LUA_COMMENT 1 +#define SCE_LUA_COMMENTLINE 2 +#define SCE_LUA_COMMENTDOC 3 +#define SCE_LUA_NUMBER 4 +#define SCE_LUA_WORD 5 +#define SCE_LUA_STRING 6 +#define SCE_LUA_CHARACTER 7 +#define SCE_LUA_LITERALSTRING 8 +#define SCE_LUA_PREPROCESSOR 9 +#define SCE_LUA_OPERATOR 10 +#define SCE_LUA_IDENTIFIER 11 +#define SCE_LUA_STRINGEOL 12 +#define SCE_LUA_WORD2 13 +#define SCE_LUA_WORD3 14 +#define SCE_LUA_WORD4 15 +#define SCE_LUA_WORD5 16 +#define SCE_LUA_WORD6 17 +#define SCE_LUA_WORD7 18 +#define SCE_LUA_WORD8 19*/ +#define SCE_ERR_DEFAULT 0 +#define SCE_ERR_PYTHON 1 +#define SCE_ERR_GCC 2 +#define SCE_ERR_MS 3 +#define SCE_ERR_CMD 4 +#define SCE_ERR_BORLAND 5 +#define SCE_ERR_PERL 6 +#define SCE_ERR_NET 7 +#define SCE_ERR_LUA 8 +#define SCE_ERR_CTAG 9 +#define SCE_ERR_DIFF_CHANGED 10 +#define SCE_ERR_DIFF_ADDITION 11 +#define SCE_ERR_DIFF_DELETION 12 +#define SCE_ERR_DIFF_MESSAGE 13 +#define SCE_ERR_PHP 14 +#define SCE_ERR_ELF 15 +#define SCE_ERR_IFC 16 +#define SCE_ERR_IFORT 17 +#define SCE_ERR_ABSF 18 +#define SCE_ERR_TIDY 19 +#define SCE_ERR_JAVA_STACK 20 +#define SCE_ERR_VALUE 21 +/*#define SCE_BAT_DEFAULT 0 +#define SCE_BAT_COMMENT 1 +#define SCE_BAT_WORD 2 +#define SCE_BAT_LABEL 3 +#define SCE_BAT_HIDE 4 +#define SCE_BAT_COMMAND 5 +#define SCE_BAT_IDENTIFIER 6 +#define SCE_BAT_OPERATOR 7 +#define SCE_MAKE_DEFAULT 0 +#define SCE_MAKE_COMMENT 1 +#define SCE_MAKE_PREPROCESSOR 2 +#define SCE_MAKE_IDENTIFIER 3 +#define SCE_MAKE_OPERATOR 4 +#define SCE_MAKE_TARGET 5 +#define SCE_MAKE_IDEOL 9 +#define SCE_DIFF_DEFAULT 0 +#define SCE_DIFF_COMMENT 1 +#define SCE_DIFF_COMMAND 2 +#define SCE_DIFF_HEADER 3 +#define SCE_DIFF_POSITION 4 +#define SCE_DIFF_DELETED 5 +#define SCE_DIFF_ADDED 6 +#define SCE_DIFF_CHANGED 7 +#define SCE_CONF_DEFAULT 0 +#define SCE_CONF_COMMENT 1 +#define SCE_CONF_NUMBER 2 +#define SCE_CONF_IDENTIFIER 3 +#define SCE_CONF_EXTENSION 4 +#define SCE_CONF_PARAMETER 5 +#define SCE_CONF_STRING 6 +#define SCE_CONF_OPERATOR 7 +#define SCE_CONF_IP 8 +#define SCE_CONF_DIRECTIVE 9*/ +#define SCE_AVE_DEFAULT 0 +#define SCE_AVE_COMMENT 1 +#define SCE_AVE_NUMBER 2 +#define SCE_AVE_WORD 3 +#define SCE_AVE_STRING 6 +#define SCE_AVE_ENUM 7 +#define SCE_AVE_STRINGEOL 8 +#define SCE_AVE_IDENTIFIER 9 +#define SCE_AVE_OPERATOR 10 +#define SCE_AVE_WORD1 11 +#define SCE_AVE_WORD2 12 +#define SCE_AVE_WORD3 13 +#define SCE_AVE_WORD4 14 +#define SCE_AVE_WORD5 15 +#define SCE_AVE_WORD6 16 +/*#define SCE_ADA_DEFAULT 0 +#define SCE_ADA_WORD 1 +#define SCE_ADA_IDENTIFIER 2 +#define SCE_ADA_NUMBER 3 +#define SCE_ADA_DELIMITER 4 +#define SCE_ADA_CHARACTER 5 +#define SCE_ADA_CHARACTEREOL 6 +#define SCE_ADA_STRING 7 +#define SCE_ADA_STRINGEOL 8 +#define SCE_ADA_LABEL 9 +#define SCE_ADA_COMMENTLINE 10 +#define SCE_ADA_ILLEGAL 11*/ +#define SCE_BAAN_DEFAULT 0 +#define SCE_BAAN_COMMENT 1 +#define SCE_BAAN_COMMENTDOC 2 +#define SCE_BAAN_NUMBER 3 +#define SCE_BAAN_WORD 4 +#define SCE_BAAN_STRING 5 +#define SCE_BAAN_PREPROCESSOR 6 +#define SCE_BAAN_OPERATOR 7 +#define SCE_BAAN_IDENTIFIER 8 +#define SCE_BAAN_STRINGEOL 9 +#define SCE_BAAN_WORD2 10 +/*#define SCE_LISP_DEFAULT 0 +#define SCE_LISP_COMMENT 1 +#define SCE_LISP_NUMBER 2 +#define SCE_LISP_KEYWORD 3 +#define SCE_LISP_KEYWORD_KW 4 +#define SCE_LISP_SYMBOL 5 +#define SCE_LISP_STRING 6 +#define SCE_LISP_STRINGEOL 8 +#define SCE_LISP_IDENTIFIER 9 +#define SCE_LISP_OPERATOR 10 +#define SCE_LISP_SPECIAL 11 +#define SCE_LISP_MULTI_COMMENT 12 +#define SCE_EIFFEL_DEFAULT 0 +#define SCE_EIFFEL_COMMENTLINE 1 +#define SCE_EIFFEL_NUMBER 2 +#define SCE_EIFFEL_WORD 3 +#define SCE_EIFFEL_STRING 4 +#define SCE_EIFFEL_CHARACTER 5 +#define SCE_EIFFEL_OPERATOR 6 +#define SCE_EIFFEL_IDENTIFIER 7 +#define SCE_EIFFEL_STRINGEOL 8*/ +#define SCE_NNCRONTAB_DEFAULT 0 +#define SCE_NNCRONTAB_COMMENT 1 +#define SCE_NNCRONTAB_TASK 2 +#define SCE_NNCRONTAB_SECTION 3 +#define SCE_NNCRONTAB_KEYWORD 4 +#define SCE_NNCRONTAB_MODIFIER 5 +#define SCE_NNCRONTAB_ASTERISK 6 +#define SCE_NNCRONTAB_NUMBER 7 +#define SCE_NNCRONTAB_STRING 8 +#define SCE_NNCRONTAB_ENVIRONMENT 9 +#define SCE_NNCRONTAB_IDENTIFIER 10 +/*#define SCE_FORTH_DEFAULT 0 +#define SCE_FORTH_COMMENT 1 +#define SCE_FORTH_COMMENT_ML 2 +#define SCE_FORTH_IDENTIFIER 3 +#define SCE_FORTH_CONTROL 4 +#define SCE_FORTH_KEYWORD 5 +#define SCE_FORTH_DEFWORD 6 +#define SCE_FORTH_PREWORD1 7 +#define SCE_FORTH_PREWORD2 8 +#define SCE_FORTH_NUMBER 9 +#define SCE_FORTH_STRING 10 +#define SCE_FORTH_LOCALE 11 +#define SCE_MATLAB_DEFAULT 0 +#define SCE_MATLAB_COMMENT 1 +#define SCE_MATLAB_COMMAND 2 +#define SCE_MATLAB_NUMBER 3 +#define SCE_MATLAB_KEYWORD 4 +#define SCE_MATLAB_STRING 5 +#define SCE_MATLAB_OPERATOR 6 +#define SCE_MATLAB_IDENTIFIER 7 +#define SCE_MATLAB_DOUBLEQUOTESTRING 8*/ +#define SCE_SCRIPTOL_DEFAULT 0 +#define SCE_SCRIPTOL_WHITE 1 +#define SCE_SCRIPTOL_COMMENTLINE 2 +#define SCE_SCRIPTOL_PERSISTENT 3 +#define SCE_SCRIPTOL_CSTYLE 4 +#define SCE_SCRIPTOL_COMMENTBLOCK 5 +#define SCE_SCRIPTOL_NUMBER 6 +#define SCE_SCRIPTOL_STRING 7 +#define SCE_SCRIPTOL_CHARACTER 8 +#define SCE_SCRIPTOL_STRINGEOL 9 +#define SCE_SCRIPTOL_KEYWORD 10 +#define SCE_SCRIPTOL_OPERATOR 11 +#define SCE_SCRIPTOL_IDENTIFIER 12 +#define SCE_SCRIPTOL_TRIPLE 13 +#define SCE_SCRIPTOL_CLASSNAME 14 +#define SCE_SCRIPTOL_PREPROCESSOR 15 +/*#define SCE_ASM_DEFAULT 0 +#define SCE_ASM_COMMENT 1 +#define SCE_ASM_NUMBER 2 +#define SCE_ASM_STRING 3 +#define SCE_ASM_OPERATOR 4 +#define SCE_ASM_IDENTIFIER 5 +#define SCE_ASM_CPUINSTRUCTION 6 +#define SCE_ASM_MATHINSTRUCTION 7 +#define SCE_ASM_REGISTER 8 +#define SCE_ASM_DIRECTIVE 9 +#define SCE_ASM_DIRECTIVEOPERAND 10 +#define SCE_ASM_COMMENTBLOCK 11 +#define SCE_ASM_CHARACTER 12 +#define SCE_ASM_STRINGEOL 13 +#define SCE_ASM_EXTINSTRUCTION 14*/ +#define SCE_F_DEFAULT 0 +#define SCE_F_COMMENT 1 +#define SCE_F_NUMBER 2 +#define SCE_F_STRING1 3 +#define SCE_F_STRING2 4 +#define SCE_F_STRINGEOL 5 +#define SCE_F_OPERATOR 6 +#define SCE_F_IDENTIFIER 7 +#define SCE_F_WORD 8 +#define SCE_F_WORD2 9 +#define SCE_F_WORD3 10 +#define SCE_F_PREPROCESSOR 11 +#define SCE_F_OPERATOR2 12 +#define SCE_F_LABEL 13 +#define SCE_F_CONTINUATION 14 +/*#define SCE_CSS_DEFAULT 0 +#define SCE_CSS_TAG 1 +#define SCE_CSS_CLASS 2 +#define SCE_CSS_PSEUDOCLASS 3 +#define SCE_CSS_UNKNOWN_PSEUDOCLASS 4 +#define SCE_CSS_OPERATOR 5 +#define SCE_CSS_IDENTIFIER 6 +#define SCE_CSS_UNKNOWN_IDENTIFIER 7 +#define SCE_CSS_VALUE 8 +#define SCE_CSS_COMMENT 9 +#define SCE_CSS_ID 10 +#define SCE_CSS_IMPORTANT 11 +#define SCE_CSS_DIRECTIVE 12 +#define SCE_CSS_DOUBLESTRING 13 +#define SCE_CSS_SINGLESTRING 14 +#define SCE_CSS_IDENTIFIER2 15 +#define SCE_CSS_ATTRIBUTE 16 +#define SCE_CSS_IDENTIFIER3 17 +#define SCE_CSS_PSEUDOELEMENT 18 +#define SCE_CSS_EXTENDED_IDENTIFIER 19 +#define SCE_CSS_EXTENDED_PSEUDOCLASS 20 +#define SCE_CSS_EXTENDED_PSEUDOELEMENT 21*/ +#define SCE_POV_DEFAULT 0 +#define SCE_POV_COMMENT 1 +#define SCE_POV_COMMENTLINE 2 +#define SCE_POV_NUMBER 3 +#define SCE_POV_OPERATOR 4 +#define SCE_POV_IDENTIFIER 5 +#define SCE_POV_STRING 6 +#define SCE_POV_STRINGEOL 7 +#define SCE_POV_DIRECTIVE 8 +#define SCE_POV_BADDIRECTIVE 9 +#define SCE_POV_WORD2 10 +#define SCE_POV_WORD... [truncated message content] |
From: <cr...@us...> - 2010-07-16 14:54:12
|
Revision: 52 http://geesas.svn.sourceforge.net/geesas/?rev=52&view=rev Author: creek23 Date: 2010-07-16 14:54:05 +0000 (Fri, 16 Jul 2010) Log Message: ----------- Scintilla/QScintilla/QScintillAS license Added Paths: ----------- QScintillAS/ChangeLog QScintillAS/GPL_EXCEPTION.TXT QScintillAS/GPL_EXCEPTION_ADDENDUM.TXT QScintillAS/LICENSE.GPL2 QScintillAS/LICENSE.GPL3 QScintillAS/NEWS QScintillAS/OPENSOURCE-NOTICE.TXT QScintillAS/README Added: QScintillAS/ChangeLog =================================================================== --- QScintillAS/ChangeLog (rev 0) +++ QScintillAS/ChangeLog 2010-07-16 14:54:05 UTC (rev 52) @@ -0,0 +1,1713 @@ +2008/11/17 13:52:19 phil +Released as v2.3.2. + + +2008/11/16 17:04:59 phil +The default lexer is now SCLEX_CONTAINER rather than SCLEX_NULL. + + +2008/11/14 13:40:36 phil +The XML lexer now styles embedded scripts properly. (An API call to disable +this will be added in a future version.) + + +2008/11/14 12:17:54 phil +Fixed a regression in measuring character widths introduced when fixing the +problem with kerned fonts. + + +2008/11/08 12:07:58 phil +Released as v2.3.1. + + +2008/11/08 11:45:06 phil +Added QsciScintilla::wordAtPoint() based on a patch from Andrea Battisti. + + +2008/11/07 15:05:35 phil +Changing the current lexer while text is displayed should now be handled +properly. (However the XML lexer seems buggy in this regard.) + + +2008/11/07 11:11:25 phil +Fixed a bug in the calculation of character positions when kerning was in +effect. This cause the caret to be displayed too far to the right. + + +2008/11/01 19:28:27 phil +Updated the NEWS file. + + +2008/10/21 22:36:50 phil +Updated German translations from Detlev. + + +2008/10/20 20:12:12 phil +Updated the QScintilla API to accomodate changes in Scintilla v1.77. + + +2008/10/20 17:21:44 phil +Initial merge of Scintilla 1.77. + + +2008/10/12 17:16:13 phil +Applied a patch from Detlev that fixes issues with the document modification +notification and setting different fold margins. + + +2008/10/12 16:35:19 phil +Added the read() and write() methods to QsciScintilla in anticipation of PyQt +dropping support for QStrings. This will allow file to be read and written +while keeping the number of conversions to the minimum. + + +2008/10/12 14:32:05 phil +QsciScintilla::setSelection() is now implemented using SCI_SETSEL so that the +carat can be left at either the start or the end of the selection. +Exposed QsciScintilla::positionFromLineIndex() and +QsciScintilla::lineIndexFromPosition(). + + +2008/10/04 17:37:59 phil +The modified status of a document is now maintained on a per document basis +rather than a per editor basis. + + +2008/10/02 18:17:35 phil +Added 'with' to the list of keywords in the Python lexer for Python v2.6. + + +2008/09/20 15:28:22 phil +Released as v2.3. + + +2008/09/17 15:46:16 phil +Added QsciScintilla::apiContext() for further open up the auto-completion and +call tips support. + + +2008/09/16 16:37:00 phil +Added the API file for Python v2.6rc1. +Fixed a typo in the help for the Python bindings configure.py. + + +2008/09/03 9:18:31 phil +Updated the i18n .ts files. + + +2008/09/01 23:52:46 phil +Updated the Windows installation notes to cover the need to manually install +the DLL when using Qt3. + + +2008/09/01 23:07:05 phil +Fixed a regression in the highlighting of call tip arguments. +Updated the Windows installation notes to say that any header files installed +from a previous build should first be removed. + + +2008/08/31 18:41:08 phil +Added the QsciAbstractAPIs class to allow applications to provide their own +implementation of APIs. + + +2008/08/31 13:31:21 phil +Merged the v2.2 maintenance branch. + + +2008/08/31 13:13:45 phil +Updated German translations from Detlev. + + +2008/08/17 18:10:46 phil +Added the QsciLexerYAML class. + + +2008/08/17 17:30:04 phil +The fold margin can now be specified by an extra argument to +QsciScintilla::setFolding(). + + +2008/08/17 16:54:05 phil +Implemented autoCompletionWordSeparators() for QsciLexerPerl and QsciLexerLua. + + +2008/08/17 15:52:36 phil +User lists can now handle entries with embedded spaces. +Updated German translations from Detlev. + + +2008/08/16 17:43:17 phil +Added the QsciLexerXML class. + + +2008/08/16 16:01:05 phil +Added the QsciLexerPostScript class. +Updated German translations from Detlev. + + +2008/08/10 18:54:46 phil +Added the QsciLexerPascal class. + + +2008/08/10 17:45:53 phil +Added the QsciLexerFortran77 and QsciLexerFortran classes. + + +2008/07/03 13:25:47 phil +Updated the Windows installation instructions for Qt3. +Backed out the use of version numbers on Windows because it breaks +compatibility with Qt3. (It may go back for Qt4 if that proves not to be a +problem.) + + +2008/06/19 17:42:53 phil +Added the DLL metadata for Windows. + + +2008/06/16 20:53:40 phil +Added support for the new Scintilla 1.76 features and lexers. + + +2008/06/16 20:25:34 phil +Merged Scintilla v1.76. + + +2008/06/10 14:19:21 phil +Fixed a configuration problem with the Python bindings when building against a +Windows DLL of QScintilla. + + +2008/06/07 13:55:24 phil +Fixed a regression in macro recording. + + +2008/03/09 10:22:54 phil +Fixed the doxygen configuration file for Qt4. + + +2008/03/06 20:40:26 phil +Updated German translations from Detlev. + + +2008/03/06 12:09:18 phil +By default build with (possibly over-aggressive) assertions disabled. + + +2008/03/05 9:37:38 phil +Updated the doxygen configuration to remove some warnings. + + +2008/03/04 23:12:39 phil +Added the QsciLexerTCL class. + + +2008/02/27 19:47:39 phil +Updated the licenses to be in line with the the current Qt licenses, including +GPL v3. +Released as v2.2. + + +2008/02/23 13:48:11 phil +Switched to Qt v4.3.4. +Further tweaks for Windows64 support. + + +2008/02/22 10:35:36 phil +Several fixes for Windows64 support based on a patch from Randall Frank. + + +2008/02/09 14:17:57 phil +It's no longer necessary to set DYLD_LIBRARY_PATH when using the Python +bindings. + + +2008/02/03 22:05:12 phil +Added the missing QsciLexerRuby.Error to the Python bindings. + + +2008/01/20 17:04:08 phil +Fixed a problem with the Qt4 Designer plugin on Leopard. + + +2008/01/11 18:59:28 phil +Hopefully fixed shortcuts and accelerators when the autocompletion list is +displayed. + + +2008/01/06 0:03:39 phil +Hopefully fixed a bug stopping normal typing when the autocompletion list is +being displayed. + + +2008/01/03 19:20:41 phil +Fixed a Qt3 compilation bug. +Updated the copyright notices. + + +2007/12/30 16:52:51 phil +Hopefully fixed the problems with the auto-completion popup on all platforms +(not tested on Mac). + + +2007/12/29 17:23:12 phil +Remove the use of the internal Tooltip widget flag so that the X11 +auto-completion list now has the same problems as the Windows version. (Prior +to fixing the problem properly.) + + +2007/12/23 14:24:02 phil +Fixed DND problems with Qt4. + + +2007/12/23 10:40:52 phil +Fix from Detlev for an infinite loop caused by calling getCursorPosition() when +Scintilla reports a position past the end of the text. + + +2007/12/05 19:39:59 phil +Fixed a silly typo in the updated Perl lexer. + + +2007/12/05 19:35:37 phil +Updated German translations from Detlev. + + +2007/12/05 17:23:12 phil +Switched the internal build system to Qt v4.3.3. + + +2007/12/04 10:53:18 phil +Updated the translation source files. + + +2007/12/04 10:51:45 phil +Merged Scintilla v1.75. + + +2007/11/17 17:34:39 phil +Bug fixes for selectAll() and getCursorPosition() from Baz Walter. + + +2007/10/24 14:05:30 phil +Fixed folding for HTML. + + +2007/10/14 18:24:32 phil +Control characters that are not bound to commands (or shortcuts) now default to +doing nothing (rather than inserting the character into the text). +Aligned the GPL license with Trolltech's exceptions. + + +2007/10/12 18:45:19 phil +Fixed the Scintilla HTML lexer's handling of characters >= 0x80. + + +2007/10/05 9:31:12 phil +Used NoSystemBackground rather than OpaquePaintEvent to eliminate flicker. + + +2007/10/04 21:19:01 phil +Fixed a flashing effect visible with a non-standard background. +Switched to Qt v4.3.2. + + +2007/09/23 13:16:30 phil +Made the recent portabilty changes Mac specific as AIX has a problem with them. + + +2007/09/16 11:29:29 phil +A lexer's default colour, paper and font are now written to and read from the +settings. + + +2007/09/15 17:42:23 phil +Fixed the MacOS build problems when using the binary installer version of Qt. + + +2007/09/15 17:12:26 phil +Added the missing WaitMouseMoved() implementation on MacOS. + + +2007/09/10 22:31:53 phil +QsciScintilla::setFont() now calls QWidget::setFont() so that font() returns +the expected value. + + +2007/09/02 16:01:31 phil +Fixed problems which the font size of STYLE_DEFAULT not being updated when the +font of style 0 was changed. Hopefully this fixes the problems with edge +columns and indentation guides. + + +2007/08/12 10:44:45 phil +Applied .pro file fix from Dirk Mueller to add a proper install rule. + + +2007/07/22 15:54:47 phil +Made sure that the backgound colour of areas of the widget with no text is +updated when QsciLexer.setDefaultPaper() is called. + + +2007/07/09 21:18:01 phil +Explicitly set the style for STYLE_DEFAULT when setting a lexer. + + +2007/06/30 18:41:59 phil +Merged Scintilla v1.74. + + +2007/06/30 16:55:45 phil +Fixed comment folding in the Bash lexer. +A style is properly restored when read from QSettings. +Removed ./Qsci from the qmake INCLUDEPATH. +Removed the Scintilla version number from generated filenames. +Used fully qualified enum names in the Python lexer so that the QMetaObject is +correct. + + +2007/06/01 18:09:56 phil +Released as v2.1. + + +2007/05/30 22:39:31 phil +Switched the internal build system to Qt v4.3.0. + + +2007/05/30 17:46:59 phil +Lexers now remember their style settings. A lexer no longer has to be the +current lexer when changing a style's color, end-of-line fill, font or paper. +The color(), eolFill(), font() and paper() methods of QsciLexer now return the +current values for a style rather than the default values. +The setDefaultColor(), setDefaultFont() and setDefaultPaper() methods of +QsciLexer are no longer slots and no longer virtual. +The defaultColor(), defaultFont() and defaultPaper() methods of QsciLexer are +no longer virtual. +The color(), eolFill(), font() and paper() methods of all QsciLexer derived +classes (except for QsciLexer itself) have been renamed defaultColor(), +defaultEolFill(), defaultFont() and defaultPaper() respectively. + + +2007/05/28 19:36:27 phil +Set the number of style bits after we've set the lexer. + + +2007/05/28 9:37:03 phil +Fixed the handling of the %Timeline in the Python bindings. + + +2007/05/27 12:27:16 phil +Updated the sub-class convertor code in the Python bindings for the Cmake and +VHDL lexers. + + +2007/05/26 10:58:49 phil +Updated the NEWS file. +Released as v2.0. + + +2007/05/19 23:52:45 phil +Added basic input method support for Qt4 so that accented characters now work. +(Although there is still a font problem - at least a text colour problem.) + + +2007/05/19 16:54:26 phil +Fixed building against Qt v3. + + +2007/05/17 23:28:26 phil +Fixed an autocompletion problem where an empty list was being displayed. + + +2007/05/16 19:50:50 phil +Fixed a bug where autocompleting from the document was looking for preceeding +non-word characters as well. + + +2007/05/16 19:12:08 phil +Fixed silly typo that broke call tips. + + +2007/05/09 20:34:14 phil +Fiex an autocompletion bug for words that only had preceding whitespace. + + +2007/05/09 12:36:29 phil +Call tips shouldn't now get confused with commas in the text after the argument +list. +The included API files for Python should now be complete and properly exclude +anything beginning with an underscore. +The Python bindings configure.py can now install the API file in a user +supplied directory. + + +2007/05/09 10:37:39 phil +Ran lrelease on the project. + + +2007/05/09 10:36:04 phil +Updated the internal build system to Qt v4.3.0rc1. +Ran lupdate on the project. + + +2007/05/08 23:54:19 phil +Call tips will now show all the tips for a function (in all scopes) if the +current context/scope isn't known. + + +2007/05/08 15:04:08 phil +Added callTipsStyle() and setCallTipsStyle() to QsciScintilla. + + +2007/05/07 16:10:29 phil +Autocompletion from documents should now work the same as QScintilla v1. The +only difference is that the list does not contain the preceding context so it +is consistent with autocompletion from APIs. + + +2007/05/07 10:10:16 phil +Added the Czech translations from Zdenek Bohm. + + +2007/04/30 15:13:26 phil +Added QsciScintilla::wordCharacters(). + + +2007/04/29 17:14:36 phil +Added lots of consts to QsciScintilla getter methods. + + +2007/04/29 12:39:46 phil +Added caseSensitive() and isWordCharacter() to QsciScintilla. +Updated translations from Detlev. + + +2007/04/10 15:10:25 phil +Added the QsciLexerVHDL class. + + +2007/04/10 13:08:26 phil +Added the QsciLexerCmake class. + + +2007/04/09 23:12:52 phil +Finished call tip support. + + +2007/04/07 18:02:23 phil +Some refactoring in preparation for getting call tips working. + + +2007/04/06 15:06:28 phil +Fixed autoindenting. + + +2007/04/05 23:42:50 phil +Fixed autocompletion so that it works with lexers that don't define word +separators, and lexers that are case insensitive. + + +2007/04/04 21:04:13 phil +Fixed the horizontal scrollbar when word wrapping. + + +2007/04/03 16:15:20 phil +Merged Scintilla v1.73. + + +2007/03/18 21:39:02 phil +Switched the internal build system to Qt v4.2.3. +Added the D lexer support from Detlev. + + +2007/03/04 17:25:11 phil +Fixed a bug in default font handling. +Removed use of QIODevice::Text in the example as it is unnecessary and a +performance hog. +Moved the internal Qt3 build system to Qt v3.3.8. +Auto-indentation should now work (as badly) as it did with QScintilla v1. + + +2007/01/17 14:28:35 phil +Added defaultPreparedName() to QsciAPIs. + + +2007/01/17 12:51:43 phil +Fixed the Qt4 Designer plugin include file value. + + +2007/01/16 18:24:44 phil +Added cancelPreparation() and apiPreparationCancelled() to QsciAPIs. + + +2007/01/16 17:29:37 phil +Updated the copyright notices. +Added selectionToEol() and setSelectionToEol() to QsciScintilla. +Added the other 1.72 changes to the low level API. + + +2007/01/16 16:27:16 phil +Merged Scintilla v1.72, but any new features are not yet exploited. + + +2007/01/09 9:03:05 phil +Fixed bug in configure.py when the -p flag wasn't specified. + + +2007/01/04 10:42:23 phil +Backported to Qt v3. Note that this will probably break again in the future +when call tips are redone. + + +2007/01/02 16:55:31 phil +Added the Python v2.4 and v2.5 API files. +Added the generation of the QScintilla2.api file. + + +2007/01/01 23:53:10 phil +Added autoCompletionFillupsEnabled() and setAutoCompletionFillupsEnabled() to +QsciScintilla. +Updated the Python bindings. + + +2007/01/01 20:54:41 phil +Implemented loadPrepared() and savePrepared() in QsciAPIs. +Added isPrepared() to QsciAPIs. +Updated the Python bindings. + + +2007/01/01 17:54:17 phil +Added installAPIFiles() and stubs for loadPrepared() and savePrepared() to +QsciAPIs. + + +2007/01/01 16:02:01 phil +Added the missing qsciapis.sip file. + + +2007/01/01 16:01:16 phil +Fixed the generation of the API documentation. +Added apis() and setAPIs() to QsciLexer. +Removed apiAdd(), apiClear(), apiLoad(), apiRemove(), apiProcessingStarted() +and apiProcessingFinished() from QsciLexer. +Added apiPreparationStarted() and apiPreparationFinished() to QsciAPIs. +Made QsciAPIs part of the API again. +Updated the Python bindings. + + +2006/12/20 14:33:50 phil +Updated the internal build system to Qt v4.2.2. +More work on auto-completion. + + +2006/11/26 12:47:36 phil +More work on the auto-completion code. + + +2006/11/22 12:24:20 phil +Changed the handling of case sensitivity in auto-completion lists. Lexers now +say if they are case sensitive. + + +2006/11/17 18:20:43 phil +Fixed the name of the generated source packages. +Reorganised so that the header files are in a separate sub-directory. +Updated the designer plugins and examples for the changing in header file +structure. +More work on autocompletion. Basic functionality is there, but no support for +the "current context" yet. + + +2006/11/04 15:39:38 phil +Designer plugin fixes for Qt4 from DavidB. + + +2006/11/03 16:11:29 phil +Fixed QsciLexer::setPaper() so that it also sets the background colour of the +default style. + + +2006/10/21 14:04:10 phil +Switched the internal build system to Qt v3.3.7 and v4.2.1. +Portability fixes for Qt3. + + +2006/10/20 16:42:43 phil +Renamed the base package QScintilla2. +Platform portability fixes from Ulli. +The qsci data directory is now installed (where API files will be kept). + + +2006/10/13 19:46:36 phil +Added QsciScintilla::linesChanged() from Detlev. +Removed QsciScintilla::markerChanged(). +Renamed the Brazilian Portugese translation files. + + +2006/10/13 16:29:33 phil +Added apiRemove(), apiProcessingStarted() and apiProcessingFinished() to +QsciLexer. + + +2006/10/08 17:06:53 phil +Reset the text and paper colours and font when removing a lexer. + + +2006/10/08 9:53:35 phil +Fixed Qt3 specific problem with most recent changes. + + +2006/10/06 17:52:02 phil +Made QsciAPIs an internal class and instead added apiAdd(), apiClear() and +apiLoad() to QsciLexer. +Replaced setAutoCompletionStartCharacters() with +setAutoCompletionWordSeparators() in QsciScintilla. +Removed autoCompletionFillupsEnabled(), setAutoCompletionFillupsEnabled(), +setAutoCompletionAPIs() and setCallTipsAPIs() from QsciScintilla. +Added AcsNone to QsciScintilla::AutoCompletionSource. +Horizontal scrollbars are displayed as needed in autocompletion lists. +Added QsciScintilla::lexer(). +Fixed setFont(), setColor(), setEolFill() and setPaper() in QsciLexer so that +they handle all styles as documented. +Removed all occurences of QString::null. +Fixed the problem with indentation guides not changing when the size of a space +changed. +Added the QsciScintilla::markerChanged() signal. +Updated the Python bindings. + + +2006/10/01 16:57:31 phil +Fixed a silly line drawing bug. + + +2006/09/30 19:22:15 phil +Fixes for building on Windows and MacOS/X. + + +2006/09/29 16:01:00 phil +Fixed the documentation bug in QsciScintilla::insert(). +Fixed the mouse shape changing properly. +Fixed the drawing of fold markers. + + +2006/09/23 22:53:46 phil +Improved the README for the pedants amongst us. + + +2006/09/23 19:01:27 phil +The Qt4 Designer plugin now loads - thanks to DavidB. + + +2006/09/16 17:22:26 phil +Fixed the Qt3 designer plugin. +Added the Qt4 designer plugin based on Andrius Ozelis's work. (But it doesn't +load for me - does anybody else have a problem?) + + +2006/09/09 18:00:27 phil +QsciScintilla's setFont(), setColor() and setPaper() now work as expected when +there is no lexer (and have no effect if there is a lexer). + + +2006/08/28 23:50:42 phil +Fixed a crash when double-clicking on an auto-completion list entry. + + +2006/08/27 17:22:47 phil +Merged Scintilla v1.71. +The SCN_DOUBLECLICK() signal now passes the line and position of the click. + + +2006/08/17 20:50:56 phil +Fixed pasting when Unicode mode is set. + + +2006/08/17 11:05:20 phil +Fixed the internal build system leaving SVN remnants around. + + +2006/07/30 17:19:44 phil +Added autoCompletionFillupsEnabled() and setAutoCompletionFillupsEnabled() to +QsciScintilla. +Don't auto-complete numbers. +Removed QsciCommandList. + + +2006/07/29 17:34:40 phil +Debugged the Qt3 backport - all seems to work. + + +2006/07/29 12:37:52 phil +The PyQt3 bindings now work. +Updated the documentation and build system for both Qt3 and Qt4. + + +2006/07/28 22:39:16 phil +Backed out the QsciTypes namespace now that the Qt3/4 source code has been +consolidated. + + +2006/07/28 18:26:25 phil +Integated the Qt3 and Qt4 source files. + + +2006/07/28 16:52:03 phil +The Qt3 port now compiles, but otherwise untested. + + +2006/07/28 1:50:31 phil +Changes to QsciMacro so that it has a more consistent API across Qt3 and Qt4. +Backported to Qt3 - doesn't yet build because Qt3 qmake doesn't understand the +preprocessor. + + +2006/07/27 15:28:27 phil +Updated the documentation. + + +2006/07/26 17:54:21 phil +Changed the build system to add the Python bindings. + + +2006/07/26 17:22:31 phil +Debugged the Python bindings - not yet part of the snapshots. + + +2006/07/26 0:20:47 phil +Ported the .sip files from v1. (Not yet part of the snapshot.) + + +2006/07/25 18:34:24 phil +The .pro file should now work with both Qt v3 and v4. + + +2006/07/25 18:09:57 phil +Some file reorganisation for when the backport to Qt3 is done. + + +2006/07/25 17:52:41 phil +Moved the Scintilla API enums out of QsciScintillaBase and into the new +QsciTypes namespace. + + +2006/07/25 15:58:11 phil +Triple clicking now works. + + +2006/07/23 18:41:19 phil +Fixed incorrect selection after dropping text. + + +2006/07/23 2:37:13 phil +Dropping text seems (mostly) to work. + + +2006/07/22 19:01:13 phil +Scrollbars now work. +The context menu now works. +The clipboard and mouse selection now works. +Dragging to external windows now works (but not dropping). + + +2006/07/18 18:37:38 phil +Ported the rest of the API to Qt4. +Finished porting the example to Qt4. + + +2006/07/18 0:17:47 phil +More porting to Qt4 - just the lexers remaining. + + +2006/07/17 15:33:01 phil +Further Qt4 changes so that Q3Support is no longer needed. + + +2006/07/17 12:12:48 phil +Ported the auto-completion list implementation to Qt4. + + +2006/07/16 17:59:27 phil +Drawing now seems Ok. +Keyboard support now seems Ok. +Start of the mouse support. + + +2006/07/12 22:34:42 phil +Painting now seems to happen only within paint events - but incorrectly. + + +2006/07/12 19:07:32 phil +Recoded the implementation of surfaces so that painters are only active during +paint events. Not yet debugged. + + +2006/07/12 16:15:37 phil +Recoded the handling of key presses so that it doesn't use any Qt3 specific +features and should be backported to QScintilla v1. It also should work better +in Unicode mode. + + +2006/07/11 20:20:00 phil +Whole raft of changes starting QScintilla2. + + +2006/07/09 15:26:26 phil +Updated translations from Detlev. + + +2006/07/08 19:24:04 phil +Added QextScintilla::isCallTipActive(). + + +2006/07/08 15:28:11 phil +Changed the autoindentation to be slightly cleverer when handling Python. If a +lexer does not define block end words then a block start word is ignored unless +it is the last significant word in a line. + + +2006/07/02 16:19:16 phil +Possibly fixed a possible problem with double clicking under Windows. + + +2006/07/02 14:27:26 phil +Added setWrapVisualFlags(), WrapMode::WrapCharacter, WrapVisualFlag to +QextScintilla. +The layout cache is now set according to the wrap mode. +Setting a wrap mode now disables the horizontal scrollbar. + + +2006/07/01 18:52:37 phil +Added cancelList(), firstVisibleLine(), isListActive(), showUserList(), +textHeight() and userListActivated() to QextScintilla. + + +2006/07/01 16:49:53 phil +Auto-completion changed so that subsequent start characters cause the list to +be re-created (containing a subset of the previous one). + + +2006/06/28 22:12:23 phil +Handle Key_Enter the same as Key_Return. +QextScintilla::foldAll() can now optionally fold all child fold points. +Added autoCompleteFromAll() and setAutoCompletionStartCharacters() to +QextScintilla. +Vastly improved the way auto-completion and call tips work. + + +2006/06/25 23:51:44 phil +The default fore and background colours now default to the application palette +rather than being hardcoded to black and white. + + +2006/06/25 21:51:58 phil +Added defaultColor() and setDefaultColor() to QextScintillaLexer. +Added color() and setColor() to QextScintilla. +Renamed eraseColor() and setEraseColor() to paper() and setPaper() in +QextScintilla. + + +2006/06/25 16:21:02 phil +Added a couple of extra SendScintilla overloads. One is needed for PyQt because +of the change in SIP's handling of unsigned values. The other is needed to +solve C++ problems caused by the first. +Autocompletion list entries from APIs may now contain spaces. +Added defaultPaper() and setDefaultPaper() to QextScintillaLexer. +Added eraseColor() and setEraseColor() to QextScintilla. + + +2006/06/21 22:41:28 phil +Removed QextScintillaLexer::styleBits() now that SCI_GETSTYLEBITSNEEDED is +available. + + +2006/06/21 14:39:50 phil +QextScintilla::setSelectionBackgroundColor(), +QextScintilla::setMarkerBackgroundColor() and +QextScintilla::setCaretLineBackgroundColor() now respect the alpha component. + + +2006/06/20 16:02:08 phil +Merged Scintilla v1.70. + + +2006/06/19 21:02:01 phil +Significant, and incompatible, updates to the QextScintillaLexerRuby class. + + +2006/06/19 15:56:38 phil +Fix for qsort helpers linkage from Ulli. (Patch sent upstream.) + + +2006/06/18 23:50:33 phil +Ctrl-D is now duplicate selection rather than duplicate line. +Updated the Python lexer to add support for hightlighted identifiers and +decorators. + + +2006/06/18 16:41:17 phil +Added the Scintilla 1.69 extensions to the low level API. + + +2006/06/18 14:51:41 phil +Removed the redundant .repoman file. +Synced with Scintilla v1.69 with only the minimal changes needed to compile it. + + +2006/06/18 13:02:16 phil +Minor repairs to the .srepo control file from the move to SVN. + + +2006/03/21 16:45:54 phil +Added a multi-byte character fix to QextScintilla::posFromLineIndex() from +Dandrea Francesco. + + +2006/03/11 19:15:56 phil +Changed the internal build system to use Qt v3.3.6. + + +2005/12/12 17:10:15 phil +Fixed the second occurance of the autoindenting bug. +Send context menu events (rather than execute the handler directly) so that +they can be filtered. + + +2005/11/03 22:39:10 phil +Fixed the leak of the standard command set when a QextScintilla instance is +destroyed. + + +2005/09/24 11:14:26 phil +Fixed a bug in autoindenting with AiOpening and AiClosing. + + +2005/09/19 16:59:01 phil +QextScintilla now disables mouse captures in it's ctor. This appeared to cause +problems on multi-head systems (and Qt should do the right thing anyway). + + +2005/09/13 19:53:04 phil +Fixed bug in drawing a filled rectangle without setting the pen. This caused +the fold margin to have a border after a marker had been drawn. + + +2005/08/30 16:29:57 phil +Released as v1.6. + + +2005/08/21 18:22:05 phil +Updated translations from Detlev. + + +2005/08/12 17:55:39 phil +Updated the Brazilian Portuguese and French translations. +Added an install target to the project file. + + +2005/08/10 21:52:38 phil +Added the QextScintillaLexerBatch class from Detlev. +Added the Brazilian Portuguese translations from Douglas Soares de Andrade. +Changed the default fonts for all lexers to match those used in current +versions of SciTE. + + +2005/08/08 20:55:49 phil +Completed the merge of Scintilla v1.65. + + +2005/07/27 20:45:46 phil +Updated French translations from Jul Vienne. + + +2005/07/27 17:32:53 phil +Updated translations from Detlev. + + +2005/07/26 19:49:39 phil +Added Detlev's latest translations. + + +2005/07/26 11:08:01 phil +Added the QextScintillaLexerDiff, QextScintillaLexerMakefile and +QextScintillaLexerProperties classes. + + +2005/07/24 17:11:51 phil +Added the QextScintillaLexerCSS and QextScintillaLexerTeX classes. + + +2005/07/20 17:04:47 phil +Added some comments about the confusing interpretation of KEYWORDSET_MAX. + + +2005/07/19 20:45:27 phil +Added the new German translations from Detlev. +Fixed a bug in the handling of keyword sets. + + +2005/07/10 11:05:35 phil +Applied the two focus fixes from Harri Porten. + + +2005/07/09 17:55:05 phil +Updated QextScintillaLexerSQL for Scintilla v1.64. + + +2005/07/06 17:47:13 phil +Added the missing #includes. +Completed the QextScintillaLexerPOV class. + + +2005/07/05 21:05:31 phil +Added the extra flag to QextScintilla::findFirst(). +Started QextScintillaLexerPOV - not yet finished. + + +2005/07/04 19:18:08 phil +Added all the new v1.63 and v1.64 functionality. + + +2005/07/04 17:28:32 phil +Now compiles and runs. + + +2005/07/03 20:59:01 phil +Resolved all the CVS conflicts from merging Scintilla 1.64. Almost certain not +to compile yet. + + +2005/03/11 19:21:56 phil +Updated French translations from Jul Vienne. + + +2005/03/06 10:05:56 phil +Released as v1.5.1. + + +2005/02/20 08:48:49 phil +Added updated German translations from Detlev. + + +2005/02/19 15:18:55 phil +Added the QextScintillaLexerLua class. +Released as v1.5. + + +2005/02/11 22:53:09 phil +Updated the NEWS file. + + +2005/01/22 00:28:28 phil +Tidy up properly when destroying a QScintilla instance. + + +2005/01/21 17:36:26 phil +Restored the missing translation files. + + +2005/01/21 17:30:35 phil +Fixed bug where the widget would shrink if a scrollbar was hidden. +Added the QextScintillaBase::viewport() and QextScintillaBase::startDrag() +methods. + + +2005/01/14 17:34:23 phil +Updated the copyright notices. +Changes to the internal build system and to the code so that it builds with the +Borland compiler. + + +2005/01/05 06:54:01 phil +Updated translations from Detlev. + + +2004/12/26 12:31:18 phil +Added the QextScintillaLexerRuby class. + + +2004/10/31 16:32:17 phil +Completed the merge of Scintilla v1.62. It builds, but is otherwise untested. + + +2004/09/18 17:31:23 phil +Added the port of the Qt application example. + + +2004/09/16 08:26:31 phil +Released as v1.4. + + +2004/09/14 07:43:58 phil +Added French translations from Julien Vienne. + + +2004/09/13 17:33:54 phil +Updated the German translations from Detlev. +Probably fixed (ie. hacked) the AltGr support under Windows. + + +2004/09/12 15:15:31 phil +Changed the implementation of QextScintilla::isModified() to work around an +apparent bug in Scintilla. + + +2004/09/12 11:41:21 phil +Added the QextScintillaLexerBash class. + + +2004/08/25 15:34:05 phil +Added the Qt Designer plugin. +Fixed the Russian translations. + + +2004/08/22 15:41:59 phil +Added insert(), edgeColor(), setEdgeColor(), edgeColumn(), setEdgeColumn(), +edgeMode(), setEdgeMode(), wrapMode(), setWrapMode(), +resetSelectionBackgroundColor() and resetSelectionForegroundColor() to +QextScintilla. +Added clearKeys() and clearAlternateKeys() to QextScintillaCommandSet. + + +2004/07/03 14:46:33 phil +Merged Scintilla v1.61. +Added Russian translations from Alexander Daroksky. + + +2004/05/09 10:30:31 phil +Changed the build system so that the platform name is no longer included in the +package filename. +Released as v1.3. + + +2004/05/02 00:36:46 phil +Completed the merge of Scintilla v1.60. + + +2004/04/27 17:57:39 phil +Fixed potential buffer overflow problem in QextScintilla::text(int line). + + +2004/04/24 20:12:38 phil +Fixed a bug with autocompleting from the current document. + + +2004/04/24 09:01:37 phil +Added README.MacOS which includes the required patch to Qt v3.3.2 and earlier +versions. +Updated the NEWS file. + + +2004/04/18 13:35:06 phil +Fixed up the internal mini-editor test application. +Fixed the problem preventing QextScintillaDocument being usable on Windows. + + +2004/04/14 18:24:29 phil +Added new German translations from Detlev. +Fixed problem with losing double-clicks on Windows. +Fixed the copyright notices. + + +2004/04/12 19:13:52 phil +Some changes for Windows - still doesn't build there though. + + +2004/04/12 14:49:01 phil +Added the QextScintillaLexerPerl class. +Lexers can now provide a specific set of word characters. + + +2004/04/07 21:02:00 phil +Changed the implementation of the Copy() method when doing double buffered +drawing. It is now faster and, hopefully, has fixed the redraw bug on X11 (and +might also make a difference on MacOS/X). +The read-only flag only applies to user input and not program changes (to mimic +QTextEdit). + + +2004/04/04 16:59:56 phil +Added the QextScintillaDocument class. +Added pool() to QextScintillaBase. +Added document() and setDocument() to QextScintilla. + + +2004/03/28 15:16:26 phil +Renamed QextScintilla.setCaretColor() to setCaretForegroundColor(). +Added recolor(), setCaretWidth(), setCaretLineVisible() and +setCaretLineBackgroundColor() to QextScintilla. +Added STYLE_MAX to QextScintillaBase. + + +2004/03/27 18:25:28 phil +Added setCaretColor(), setSelectionForegroundColor() and +setSelectionBackgroundColor() to QextScintilla. + + +2004/03/22 18:53:41 phil +Fixed QextScintilla.textChanged() so that it really is emitted only when text +has been inserted or deleted. + + +2004/03/22 17:51:14 phil +Fixed bug in auto-completion using the current document. +Fixed bug in dropping text into a UTF8 document. +Some other tidy ups to drag'n'drops. + + +2004/03/21 20:47:56 phil +Updated the default command set to match Scintilla v1.59. +Now builds successfully, but otherwise untested. + + +2004/03/20 18:50:39 phil +Added INDIC_BOX. +Added SC_SEL_*. +Added the SCI_SETSELECTIONMODE, SCI_GETSELECTIONMODE, +SCI_GETLINESELSTARTPOSITION, SCI_GETLINESELENDPOSITION, SCI_LINEDOWNRECTEXTEND, +SCI_LINEUPRECTEXTEND, SCI_CHARLEFTRECTEXTEND, SCI_CHARRIGHTRECTEXTEND, +SCI_HOMERECTEXTEND, SCI_VCHOMERECTEXTEND, SCI_LINEENDRECTEXTEND, +SCI_PAGEUPRECTEXTEND, SCI_PAGEDOWNRECTEXTEND, SCI_STUTTEREDPAGEUP, +SCI_STUTTEREDPAGEUPEXTEND, SCI_STUTTEREDPAGEDOWN, SCI_STUTTEREDPAGEDOWNEXTEND, +SCI_WORDLEFTEND, SCI_WORDLEFTENDEXTEND, SCI_WORDRIGHTEND, +SCI_WORDRIGHTENDEXTEND, SCI_SETWHITESPACECHARS, SCI_SETCHARSDEFAULT, +SCI_AUTOCGETCURRENT, SCI_ALLOCATE functions. +Added the SCLEX_CLW, SCLEX_CLWNOCASE, SCLEX_LOT, SCLEX_YAML, SCLEX_TEX, +SCLEX_METAPOST, SCLEX_POWERBASIC, SCLEX_FORTH, SCLEX_ERLANG, SCLEX_OCTAVE, +SCLEX_MSSQL, SCLEX_VERILOG lexers. + + +2004/03/20 13:33:14 phil +Changes to the internal build system to use repo rather than repoman. +Merged Scintilla v1.59. (Not tested at all - probably won't compile.) + + +2003/08/16 20:46:15 phil +Released as v1.2. + + +2003/08/12 14:56:05 phil +Merged Scintilla v1.54. +Changed the library version to 3.0.0. + + +2003/08/12 12:25:19 phil +Added the internal TODO file. + + +2003/05/23 07:22:15 phil +Updated the documentation. +Released as v1.1. + + +2003/05/20 10:37:03 phil +Updated translations from Detlev. +Added QextScintilla::modificationAttempted(). + + +2003/05/16 21:30:45 phil +Merged Scintilla v1.53. +Added GlobalClass as a style of the C++ lexer (using keyword set 4). +Added foldAtElse() and setFoldAtElse() to QextScintillaLexerCPP. + + +2003/05/16 11:34:27 phil +Added QextScintillaBase::SCN_MODIFYATTEMPTRO. + + +2003/05/11 10:26:11 phil +Increased the maximum number of keyword sets to match Scintilla. +Changed references to WhiteSpace in lexers to Default (but kept WhiteSpace for +backwards compatibility). +By default the C++ lexer now folds preprocessor blocks (to match the default +SciTE properties file rather than the code). +Hopefully fixed auto-completion lists and call tips under Windows without +breaking them under X11. +Added the QextScintillaLexerHTML class. +Fixed bug where abandoned paints weren't handled properly. + + +2003/05/07 22:07:22 phil +Fixed the window decorations for auto-completion lists and call tips under +Windows. + + +2003/05/07 16:52:11 phil +Added the QextScintillaLexerSQL class. +Changed the library version number to 1.1.0. + + +2003/05/03 14:26:31 phil +Fixed a bug when trying to paste an empty clipboard. +Changed the library version to 1.0.1. + + +2003/04/26 13:59:53 phil +Updated German translations from Detlev. +Released as v1.0. + + +2003/04/18 22:20:13 phil +Merged Scintilla v1.52. +Added QextScintillaLexer.setDefaultFont(). +Added setCallTipsForegroundColor() and setCallTipsHighlightColor() to +QextScintilla. +Changed QextScintilla.setCallTipsVisible() to interpret a negative argument as +meaning display call tips one at a time with scrolling arrows. + + +2003/04/13 15:11:07 phil +Foxed a documentation bug in QextScintilla.setCallTipsVisible(). +Made sure that call tips are unique. + + +2003/04/07 11:52:00 phil +Ensured that the current item of an auto-completion list is always visible. +Fixed QextScintilla::append(). +Call tips and auto-completion lists should now be non-modal. + + +2003/04/01 20:41:55 phil +Added the missing educational license files. + + +2003/04/01 20:40:50 phil +Added support for the educational version. +Fixed a few Windows build problems. + + +2003/03/22 16:44:11 phil +Updated German translations from Detlev. + + +2003/03/16 16:23:47 phil +Fully implemented the high level API to macros. +Re-ordered the default command table. + + +2003/03/15 23:41:40 phil +Added the QextScintillaCommand, QextScintillaCommandSet and QextScintillaMacro +classes. (The latter is not yet fully implemented.) +Added QextScintilla.standardCommands(). +Brought the documentation up to date. + + +2003/03/14 19:48:48 phil +Fixed another Windows compile problem. +Control characters are now passed properly to Scintilla so that they can be +recognised as command keys. + + +2003/03/13 12:59:10 phil +Added QextScintillaAPIs.add(). +The caret is now displayed when either a call tip or auto-completion list is +displayed. +Fully implemented the high level API to call tips. +Fixed bug compiling against Qt v3.0.x. + + +2003/03/09 18:36:46 phil +Removed the DBCS functions as QScintilla doesn't support DBCS. +Minor portability fixes for Windows. +The high level API auto-completion methods are now fully implemented. + + +2003/03/06 10:37:27 phil +Added QextScintilla.AutoCompletionSource, QextScintilla.autoCompleteFromAPIs(), +QextScintilla.autoCompleteFromDocument(), QextScintilla.autoCompletionSource(), +QextScintilla.autoCompletionThreshold(), QextScintilla.setAutoCompletionAPIs(), +QextScintilla.setAutoCompletionSource(), +QextScintilla.setAutoCompletionThreshold(). Note that these are just hooks and +haven't yet been implemented. + + +2003/03/03 18:04:52 phil +The low-level APIs to call tips and autocompletion lists should now work. +Added the QextScintillaAPIs class. + + +2003/03/01 14:46:48 phil +Added missing #include of stdlib.h. + + +2003/03/01 09:21:20 phil +Fixed compile problem for Qt v3.0.x. + + +2003/02/27 16:19:52 phil +Updated dates on the copyright notices. + + +2003/02/26 23:41:23 phil +Merged Scintilla v1.51. +Added QextScintilla.resetFoldMarginColors() and +QextScintilla.setFoldMarginColors(). + + +2003/02/26 19:30:25 phil +Updated to Scintilla v1.50. +Added the QextScintillaBase.SendScintilla() overload that takes a QPixmap *. +SCI_MARKERDEFINEPIXMAP now takes a pointer to a QPixmap instance rather than a +pointer to raw or textual XPM image data. +QextScintilla.markerDefine() now takes a QPixmap rather than an XPM image. +Added QSCINTILLA_VERSION, QSCINTILLA_VERSION_STR and QSCINTILLA_BUILD. +Added QextScintilla.WrapMode, QextScintillaPrinter.setWrapMode() and +QextScintillaPrinter.wrapMode(). + + +2003/01/20 09:04:46 phil +Minor tweak to build properly under IRIX. +Added QextScintilla.lineAt(). + + +2002/12/25 10:47:33 phil +Added QextScintilla.ensureCursorVisible(). + + +2002/12/17 13:19:42 phil +Added the QextScintillaBase::SendScintilla() overload that hides the Scintilla +RangeToFormat structure. +Added the QextScintillaPrinter class. +Changed the low level implementation of a Scintilla Surface to be a QPainter +with an attached QPaintDevice rather than a QPaintDevice. This allows the +printing code to have complete control over the QPainter. + + +2002/12/16 11:14:48 phil +Fixed a bug entering double-byte encoded characters in UTF-8 mode. + + +2002/12/15 18:31:45 phil +Fix a crash when pasting an empty string. + + +2002/12/11 13:48:02 phil +Released as v0.3. + + +2002/12/07 14:01:09 phil +Brought the documentation up to date. +Minor changes needed to build properly under Windows. +Changed the default fonts under Windows to match the SciTE ones. + + +2002/12/01 22:27:47 phil +Added drag'n'drop support. + + +2002/11/26 12:47:38 phil +Fixed bug in selectToMatchingBrace() and moveToMatchingBrace() in +QextScintilla. +Added the QextScintilla.markerDefine() overload that handles XPM pixmaps. + + +2002/11/22 22:42:37 phil +Added Detlev's support for different folding styles. +Added the QextScintillaBase.SendScintilla() overload that handles colours. + + +2002/11/21 18:56:37 phil +Fixed the value of QextScintilla.AiClosing. +Added braceMatching(), setBraceMatching(), moveToMatchingBrace(), +selectToMatchingBrace(), setMatchedBraceBackgroundColor(), +setMatchedBraceForegroundColor(), setUnmatchedBraceBackgroundColor, +setUnmatchedBraceForegroundColor() to QextScintilla. +Fixed the default lexer colours so that they match SciTE. + + +2002/11/18 19:35:19 phil +Added the binary versions of the translations to CVS so that the build machine +doesn't need Qt installed. +Added the QextScintillaBase.SendScintilla() that allows messages that need a +TextRange structure to be handled. +Added autoIndentStyle() and setAutoIndentStyle() to QextScintillaLexer. +Added autoIndent() and setAutoIndent() to QextScintilla. + + +2002/11/14 22:30:51 phil +Added full i18n support and German translations (thanks to Detlev of course). +Minor fixes for building under Windows. + + +2002/11/13 20:25:28 phil +Fixed QextScintilla::indent() and QextScintilla::unindent(). +Removed QextScintillaBase::setScintillaProperty() (the SCI_SETPROPERTY message +should be used instead). +Added another QextScintillaBase::sendScintilla() overload to make using +SCI_SETPROPERTY easier to use. +Added convertEols(), eolMode(), setEolMode(), eolVisibility(), +setEolVisibility(), whitespaceVisibility(), setWhitespaceVisibility() to +QextScintilla. +Added foldComments(), setFoldComments(), foldQuotes(), setFoldQuotes(), +indentationWarning(), setIndentationWarning() to QextScintillaLexerPython. +Added foldComments(), setFoldComments(), foldCompact(), setFoldCompact(), +foldPreprocessor(), setFoldPreprocessor(), stylePreprocessor(), +setStylePreprocessor() to QextScintillaLexerCPP. +Added support for case insensitive keywords to QextScintillaLexerCPP. +Added various methods to transparently handle lexer properties including +reading and writing them from and to settings files. +Fixed the handling of the context menu. + + +2002/11/03 20:17:03 phil +Updated to Scintilla v1.49. +Fixed bugs in end-of-line fill settings in QextScintillaLexer. +Fixed bugs in UTF support (thanks to Nickolay Kolchin-Semyonov). +Added isUtf8() and setUtf8() to QextScintilla. +Removed SCN_MODIFYATTEMPTRO as it is now deprecated. + + +2002/10/25 18:59:58 phil +Added QextScintilla::lines(). +Fixed a copy/paste bug. +Removed the incorrect fix for the Scintilla indentation guides bug and worked +around it, rather than fixing it properly. + + +2002/10/24 08:41:54 phil +Added foldAll(), folding() and setFolding() to QextScintilla. +Added setScintillaProperty() to QextScintillaBase. +Released as v0.2. + + +2002/10/23 17:26:44 phil +Fixed a Scintilla bug where indentation guides were being displayed incorrectly +when indentations didn't use tabs. +Fixed pasting from the clipboard. + + +2002/10/22 21:27:39 phil +Added cursorPositionChanged(), replace(), zoomIn(), zoomOut() and zoomTo() to +QextScintilla. +Fixed some bugs in QextScintilla::findFirst(). + + +2002/10/21 21:26:53 phil +Added findFirst(), findNext(), removeSelectedText(), getCursorPosition(), +beginUndoAction(), endUndoAction(), redo(), undo(), isRedoAvailable(), +isUndoAvailable() and the text() overload to QextScintilla. + + +2002/10/20 21:59:44 phil +Added backspaceDeindents(), setBackspaceDeindents(), tabIndents(), +setTabIndents(), tabWidth(), setTabWidth(), indent(), unindent(), +indentation(), setIndentation(), indentationWidth(), setIndentationWidth(), +indentationsUseTabs(), setIndentationsUseTabs() to QextScintilla. +Made some changes to the clipboard management, but more work is still needed. + + +2002/10/19 18:41:23 phil +Added clear(), copy(), copyAvailable(), cut(), getSelection(), +hasSelectedText(), indentationGuides(), insertAt(), paste(), selectAll(), +selectedText(), selectionChanged(), setCursorPosition(), +setIndentationGuides(), setIndentationGuidesBackgroundColor(), +setIndentationGuidesForegroundColor() setSelection() to QextScintilla. +Added QSCN_SELCHANGED() to QextScintillaBase. + + +2002/10/18 17:29:06 phil +Added the QextScintillaLexerCPP, QextScintillaLexerCSharp, +QextScintillaLexerIDL, QextScintillaLexerJava and QextScintillaLexerJavaScript +classes. +Fixed incorrect font defaults for the Python lexer. + + +2002/10/12 23:44:51 phil +Fixed the QextScintilla::marginClicked() signature and changed it to pass the +line number rather than the pixel position. +Added mouse wheel support from Detlev. +Setting the lexer no longer resets all the styles. +The cursor shape now changes when moved across the text area and margins. +Added ensureLineVisible(), setMarginsBackgroundColor(), +setMarginsForegroundColor(), setMarginsFont() and the overloaded +setMarginWidth() to QextScintilla. +Changed the visible policy to match SciTE's default. + + +2002/10/11 14:14:19 phil +Added the end-of-line fill as a lexer stype options to the high-level API. +Fixed the default Python styles so that they are the same as SciTE (at least on +UNIX). +Fixed the bug that left cursor artefacts lying around. + + +2002/10/06 16:00:05 phil +Removed QextScintillaBase::Colourise(). +Added QextScintillaLexer and QextScintillaLexerPython. + + +2002/10/05 13:33:23 phil +Documented margins and markers. +Added support for margins and markers to QextScintilla. + + +2002/10/03 10:45:34 phil +Fixed the README regarding building as a static library. +QextScintilla::append() behaves more like QTextEdit::append(). +Added setText(), text(), textChanged(), isReadOnly(), setReadOnly(), +isModified(), setModified(), modificationChanged() and length() to +QextScintilla. +More documentation. + + +2002/10/01 17:37:10 phil +Changes required to build under Windows. + + +2002/09/30 15:31:10 phil +Added the QextScintillaBase::SendScintilla() overload to make it easier to pass +strings from PyQt. + + +2002/09/28 08:56:05 phil +Added the doxygen configuration file. +The internal build system now creates the doxygen documentation. +The original Scintilla documentation is now installed in a sub-directory of the +doc directory. +Added QextScintillaBase::Colourise(). + + +2002/09/18 14:46:34 phil +Released as v0.1. + + +2002/09/18 08:35:31 phil +Changed the re-implemented protected methods in QextScintillaBase so that they +are like the rest of Qt. + + +2002/09/17 18:17:41 phil +The context menu now works. +Key presses are now handled. +Focus changes are now handled. +Added all the installation/licensing infrastructure. + + +2002/09/17 11:08:34 phil +The mouse handling now seems to be correct. +The context menu is displayed, but none of the options yet do anything. + + +2002/09/16 18:53:31 phil +Scrollbars now seem to be working. + + +2002/09/16 08:09:40 phil +Further refined the low-level API so that it is as close as possible to the +standard Scintilla API. + + +2002/09/16 00:35:44 phil +Completed the implementation of the low-level API (ie. QextScintillaBase). +Disabled INCLUDE_DEPRECATED_FEATURES for the Qt port and fixed the bugs in the +main code that appear as a consequence. + + +2002/09/15 19:00:10 phil +Fixed the paint event handling - we now seem to have a basically working +editor. + + +2002/09/14 21:49:56 phil +Added the start of the Qt port, including a simple test editor. As yet nothing +works, but everything compiles. + Added: QScintillAS/GPL_EXCEPTION.TXT =================================================================== --- QScintillAS/GPL_EXCEPTION.TXT (rev 0) +++ QScintillAS/GPL_EXCEPTION.TXT 2010-07-16 14:54:05 UTC (rev 52) @@ -0,0 +1,90 @@ + +Riverbank GPL Exception version 1.1 +=================================== + +Additional rights granted beyond the GPL (the "Exception"). + +As a special exception to the terms and conditions of version 2.0 of the GPL, +Riverbank hereby grants you the rights described below, provided you agree to +the terms and conditions in this Exception, including its obligations and +restrictions on use. + +Nothing in this Exception gives you or anyone else the right to change the +licensing terms of the QScintilla Open Source Edition. + +Below, "Licensed Software" shall refer to the software licensed under the GPL +and this exception. + +1) The right to use Open Source Licenses not compatible with the GNU +General Public License: Your software (hereafter referred to as "Your +Software") may import the Licensed Software and/or distribute binaries of Your +Software that imports the Licensed Software, provided that: + +A) Your Software is licensed under one of the following licenses: + + +License name Version(s)/Copyright Date +Academic Free License 2.0, 2.1, 3.0 +Apache Software License 1.0 or 1.1 +Apache License 2.0 +Apple Public Source License 2.0 +Artistic license From Perl 5.8.0 +BSD license "July 22 1999" +Common Development and + Distribution License (CDDL) 1.0 +Common Public License 1.0 +Eclipse Public License 1.0 +GNU Library or "Lesser" +General Public License (LGPL) 2.0 or 2.1 +Jabber Open Source License 1.0 +MIT License (as set forth in the addendum file) +Mozilla Public License (MPL) 1.0 or 1.1 +Open Software License 2.0, 3.0 +OpenSSL license (with original +SSLeay license) "2003" ("1998") +PHP License 3.0 +Python license (CNRI Python License) (as set forth in the addendum file) +Python Software Foundation License 2.1.1 +Q Public License v1.0 +Sleepycat License "1999" +W3C License "2001" +X11 License X11R6.6 +Zlib/libpng License (as set forth in the addendum file) +Zope Public License 2.0, 2.1 + + +(Licenses without a specific version number or date are reproduced +in the file GPL_Exception_Addendum.txt in your source package). + + +and + +B) You must, on request, make a complete package including + the complete source code of Your Software (as defined + in the GNU General Public License version 2, section 3, + but excluding anything excluded by the special + exception in the same section) available to Riverbank + under the same license as that granted to other + recipients of the source code of Your Software. + +and + +C) Your or any other contributor's rights to: + + i) distribute the source code of Your Software to anyone for + any purpose; + + and + + ii) publicly discuss the development project for Your + Software and its goals in any form and in any forum + +are not prohibited by any legal instrument, including but not limited to +contracts, non-disclosure agreements, and employee contracts. + + +2) The right to link non-Open Source applications with pre-installed versions of +the Licensed Software: You may link applications with binary pre-installed +versions of the Licensed Software, provided that such applications have been +developed and are deployed in accordance with the terms and conditions of the +QScintilla Commercial License Agreement. Added: QScintillAS/GPL_EXCEPTION_ADDENDUM.TXT =================================================================== --- QScintillAS/GPL_EXCEPTION_ADDENDUM.TXT (rev 0) +++ QScintillAS/GPL_EXCEPTION_ADDENDUM.TXT 2010-07-16 14:54:05 UTC (rev 52) @@ -0,0 +1,248 @@ +Addendum to the Riverbank GPL Exception version 1.1 +=================================================== + + +-------------------------------------------------------------------------- + + The "Artistic License" + + Preamble + +The intent of this document is to state the conditions under which a +Package may be copied, such that the Copyright Holder maintains some +semblance of artistic control over the development of the package, +while giving the users of the package the right to use and distribute +the Package in a more-or-less customary fashion, plus the right to make +reasonable modifications. + +Definitions: + + "Package" refers to the collection of files distributed by the + Copyright Holder, and derivatives of that collection of files + created through textual modification. + + "Standard Version" refers to such a Package if it has not been + modified, or has been modified in accordance with the wishes + of the Copyright Holder as specified below. + + "Copyright Holder" is whoever is named in the copyright or + copyrights for the package. + + "You" is you, if you're thinking about copying or distributing + this Package. + + "Reasonable copying fee" is whatever you can justify on the + basis of media cost, duplication charges, time of people involved, + and so on. (You will not be required to justify it to the + Copyright Holder, but only to the computing community at large + as a market that must bear the fee.) + + "Freely Available" means that no fee is charged for the item + itself, though there may be fees involved in handling the item. + It also means that recipients of the item may redistribute it + under the same conditions they received it. + +1. You may make and give away verbatim copies of the source form of the +Standard Version of this Package without restriction, provided that you +duplicate all of the original copyright notices and associated disclaimers. + +2. You may apply bug fixes, portability fixes and other modifications +derived from the Public Domain or from the Copyright Holder. A Package +modified in such a way shall still be considered the Standard Version. + +3. You may otherwise modify your copy of this Package in any way, provided +that you insert a prominent notice in each changed file stating how and +when you changed that file, and provided that you do at least ONE of the +following: + +a) place your modifications in the Public Domain or otherwise make them +Freely Available, such as by posting said modifications to Usenet or +an equivalent medium, or placing the modifications on a major archive +site such as uunet.uu.net, or by allowing the Copyright Holder to include +your modifications in the Standard Version of the Package. + +b) use the modified Package only within your corporation or organization. + +c) rename any non-standard executables so the names do not conflict +with standard executables, which must also be provided, and provide +a separate manual page for each non-standard executable that clearly +documents how it differs from the Standard Version. + +d) make other distribution arrangements with the Copyright Holder. + +4. You may distribute the programs of this Package in object code or +executable form, provided that you do at least ONE of the following: + +a) distribute a Standard Version of the executables and library files, +together with instructions (in the manual page or equivalent) on where +to get the Standard Version. + +b) accompany the distribution with the machine-readable source of +the Package with your modifications. + +c) give non-standard executables non-standard names, and clearly +document the differences in manual pages (or equivalent), together +with instructions on where to get the Standard Version. + +d) make other distribution arrangements with the Copyright Holder. + +5. You may charge a reasonable copying fee for any distribution of this +Package. You may charge any fee you choose for support of this +Package. You may not charge a fee for this Package itself. However, +you may distribute this Package in aggregate with other (possibly +commercial) programs as part of a larger (possibly commercial) software +distribution provided that you do not advertise this Package as a +product of your own. You may embed this Package's interpreter within +an executable of yours (by linking); this shall be construed as a mere +form of aggregation, provided that the complete Standard Version of the +interpreter is so embedded. + +6. The scripts and library files supplied as input to or produced as +output from the programs of this Package do not automatically fall +under the copyright of this Package, but belong to whoever generated +them, and may be sold commercially, and may be aggregated with this +Package. If such scripts or library files are aggregated with this +Package via the so-called "undump" or "unexec" methods of producing a +binary executable image, then distribution of such an image shall +neither be construed as a distribution of this Package nor shall it +fall under the restrictions of Paragraphs 3 and 4, provided that you do +not represent such an executable image as a Standard Version of this +Package. + +7. C subroutines (or comparably compiled subroutines in other +languages) supplied by you and linked into this Package in order to +emulate subroutines and variables of the language defined by this +Package shall not be considered part of this Package, but are the +equivalent of input as in Paragraph 6, provided these subroutines do +not change the language in any way that would cause it to fail the +regression tests for the language. + +8. Aggregation of this Package with a commercial distribution is always +permitted provided that the use of this Package is embedded; that is, +when no overt attempt is made to make this Package's interfaces visible +to the end user of the commercial distribution. Such use shall not be +construed as a distribution of this Package. + +9. The name of the Copyright Holder may not be used to endorse or promote +products derived from this software without specific prior written permission. + +10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + The End + +-------------------------------------------------------------------------- + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-------------------------------------------------------------------------- + +Python License (CNRI Python License) + +CNRI OPEN SOURCE LICENSE AGREEMENT + +IMPORTANT: PLEASE READ THE FOLLOWING AGREEMENT CAREFULLY. + +BY CLICKING ON "ACCEPT" WHERE INDICATED BELOW, OR BY COPYING, INSTALLING OR +OTHERWISE USING PYTHON 1.6, beta 1 SOFTWARE, YOU ARE DEEMED TO HAVE AGREED TO +THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT. + +1. This LICENSE AGREEMENT is between the Corporation for National Research +Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 +("CNRI"), and the Individual or Organization ("Licensee") accessing and +otherwise using Python 1.6, beta 1 software in source or binary form and its +associated documentation, as released at the www.python.org Internet site on +August 4, 2000 ("Python 1.6b1"). + +2. Subject to ... [truncated message content] |
From: <cr...@us...> - 2010-07-16 14:41:13
|
Revision: 51 http://geesas.svn.sourceforge.net/geesas/?rev=51&view=rev Author: creek23 Date: 2010-07-16 14:41:05 +0000 (Fri, 16 Jul 2010) Log Message: ----------- Scintilla and QScintilla2 docs Added Paths: ----------- QScintillAS/doc/ QScintillAS/doc/Scintilla/ QScintillAS/doc/Scintilla/Design.html QScintillAS/doc/Scintilla/Icons.html QScintillAS/doc/Scintilla/Lexer.txt QScintillAS/doc/Scintilla/SciBreak.jpg QScintillAS/doc/Scintilla/SciCoding.html QScintillAS/doc/Scintilla/SciRest.jpg QScintillAS/doc/Scintilla/SciTEIco.png QScintillAS/doc/Scintilla/SciWord.jpg QScintillAS/doc/Scintilla/ScintillaDoc.html QScintillAS/doc/Scintilla/ScintillaDownload.html QScintillAS/doc/Scintilla/ScintillaHistory.html QScintillAS/doc/Scintilla/ScintillaRelated.html QScintillAS/doc/Scintilla/ScintillaToDo.html QScintillAS/doc/Scintilla/ScintillaUsage.html QScintillAS/doc/Scintilla/Steps.html QScintillAS/doc/Scintilla/index.html QScintillAS/doc/html-Qt4/ QScintillAS/doc/html-Qt4/annotated.html QScintillAS/doc/html-Qt4/classQsciAPIs-members.html QScintillAS/doc/html-Qt4/classQsciAPIs.html QScintillAS/doc/html-Qt4/classQsciAbstractAPIs-members.html QScintillAS/doc/html-Qt4/classQsciAbstractAPIs.html QScintillAS/doc/html-Qt4/classQsciCommand-members.html QScintillAS/doc/html-Qt4/classQsciCommand.html QScintillAS/doc/html-Qt4/classQsciCommandSet-members.html QScintillAS/doc/html-Qt4/classQsciCommandSet.html QScintillAS/doc/html-Qt4/classQsciDocument-members.html QScintillAS/doc/html-Qt4/classQsciDocument.html QScintillAS/doc/html-Qt4/classQsciLexer-members.html QScintillAS/doc/html-Qt4/classQsciLexer.html QScintillAS/doc/html-Qt4/classQsciLexerBash-members.html QScintillAS/doc/html-Qt4/classQsciLexerBash.html QScintillAS/doc/html-Qt4/classQsciLexerBatch-members.html QScintillAS/doc/html-Qt4/classQsciLexerBatch.html QScintillAS/doc/html-Qt4/classQsciLexerCMake-members.html QScintillAS/doc/html-Qt4/classQsciLexerCMake.html QScintillAS/doc/html-Qt4/classQsciLexerCPP-members.html QScintillAS/doc/html-Qt4/classQsciLexerCPP.html QScintillAS/doc/html-Qt4/classQsciLexerCSS-members.html QScintillAS/doc/html-Qt4/classQsciLexerCSS.html QScintillAS/doc/html-Qt4/classQsciLexerCSharp-members.html QScintillAS/doc/html-Qt4/classQsciLexerCSharp.html QScintillAS/doc/html-Qt4/classQsciLexerD-members.html QScintillAS/doc/html-Qt4/classQsciLexerD.html QScintillAS/doc/html-Qt4/classQsciLexerDiff-members.html QScintillAS/doc/html-Qt4/classQsciLexerDiff.html QScintillAS/doc/html-Qt4/classQsciLexerFortran-members.html QScintillAS/doc/html-Qt4/classQsciLexerFortran.html QScintillAS/doc/html-Qt4/classQsciLexerFortran77-members.html QScintillAS/doc/html-Qt4/classQsciLexerFortran77.html QScintillAS/doc/html-Qt4/classQsciLexerHTML-members.html QScintillAS/doc/html-Qt4/classQsciLexerHTML.html QScintillAS/doc/html-Qt4/classQsciLexerIDL-members.html QScintillAS/doc/html-Qt4/classQsciLexerIDL.html QScintillAS/doc/html-Qt4/classQsciLexerJava-members.html QScintillAS/doc/html-Qt4/classQsciLexerJava.html QScintillAS/doc/html-Qt4/classQsciLexerJavaScript-members.html QScintillAS/doc/html-Qt4/classQsciLexerJavaScript.html QScintillAS/doc/html-Qt4/classQsciLexerLua-members.html QScintillAS/doc/html-Qt4/classQsciLexerLua.html QScintillAS/doc/html-Qt4/classQsciLexerMakefile-members.html QScintillAS/doc/html-Qt4/classQsciLexerMakefile.html QScintillAS/doc/html-Qt4/classQsciLexerPOV-members.html QScintillAS/doc/html-Qt4/classQsciLexerPOV.html QScintillAS/doc/html-Qt4/classQsciLexerPascal-members.html QScintillAS/doc/html-Qt4/classQsciLexerPascal.html QScintillAS/doc/html-Qt4/classQsciLexerPerl-members.html QScintillAS/doc/html-Qt4/classQsciLexerPerl.html QScintillAS/doc/html-Qt4/classQsciLexerPostScript-members.html QScintillAS/doc/html-Qt4/classQsciLexerPostScript.html QScintillAS/doc/html-Qt4/classQsciLexerProperties-members.html QScintillAS/doc/html-Qt4/classQsciLexerProperties.html QScintillAS/doc/html-Qt4/classQsciLexerPython-members.html QScintillAS/doc/html-Qt4/classQsciLexerPython.html QScintillAS/doc/html-Qt4/classQsciLexerRuby-members.html QScintillAS/doc/html-Qt4/classQsciLexerRuby.html QScintillAS/doc/html-Qt4/classQsciLexerSQL-members.html QScintillAS/doc/html-Qt4/classQsciLexerSQL.html QScintillAS/doc/html-Qt4/classQsciLexerTCL-members.html QScintillAS/doc/html-Qt4/classQsciLexerTCL.html QScintillAS/doc/html-Qt4/classQsciLexerTeX-members.html QScintillAS/doc/html-Qt4/classQsciLexerTeX.html QScintillAS/doc/html-Qt4/classQsciLexerVHDL-members.html QScintillAS/doc/html-Qt4/classQsciLexerVHDL.html QScintillAS/doc/html-Qt4/classQsciLexerXML-members.html QScintillAS/doc/html-Qt4/classQsciLexerXML.html QScintillAS/doc/html-Qt4/classQsciLexerYAML-members.html QScintillAS/doc/html-Qt4/classQsciLexerYAML.html QScintillAS/doc/html-Qt4/classQsciMacro-members.html QScintillAS/doc/html-Qt4/classQsciMacro.html QScintillAS/doc/html-Qt4/classQsciPrinter-members.html QScintillAS/doc/html-Qt4/classQsciPrinter.html QScintillAS/doc/html-Qt4/classQsciScintilla-members.html QScintillAS/doc/html-Qt4/classQsciScintilla.html QScintillAS/doc/html-Qt4/classQsciScintillaBase-members.html QScintillAS/doc/html-Qt4/classQsciScintillaBase.html QScintillAS/doc/html-Qt4/dir_556434f8084a0975d5f9aa83df897544.html QScintillAS/doc/html-Qt4/dir_e71f21f8efaf379e3645c15d5d7e326c.html QScintillAS/doc/html-Qt4/dirs.html QScintillAS/doc/html-Qt4/doxygen.css QScintillAS/doc/html-Qt4/doxygen.png QScintillAS/doc/html-Qt4/functions.html QScintillAS/doc/html-Qt4/functions_0x62.html QScintillAS/doc/html-Qt4/functions_0x63.html QScintillAS/doc/html-Qt4/functions_0x64.html QScintillAS/doc/html-Qt4/functions_0x65.html QScintillAS/doc/html-Qt4/functions_0x66.html QScintillAS/doc/html-Qt4/functions_0x67.html QScintillAS/doc/html-Qt4/functions_0x68.html QScintillAS/doc/html-Qt4/functions_0x69.html QScintillAS/doc/html-Qt4/functions_0x6a.html QScintillAS/doc/html-Qt4/functions_0x6b.html QScintillAS/doc/html-Qt4/functions_0x6c.html QScintillAS/doc/html-Qt4/functions_0x6d.html QScintillAS/doc/html-Qt4/functions_0x6e.html QScintillAS/doc/html-Qt4/functions_0x6f.html QScintillAS/doc/html-Qt4/functions_0x70.html QScintillAS/doc/html-Qt4/functions_0x71.html QScintillAS/doc/html-Qt4/functions_0x72.html QScintillAS/doc/html-Qt4/functions_0x73.html QScintillAS/doc/html-Qt4/functions_0x74.html QScintillAS/doc/html-Qt4/functions_0x75.html QScintillAS/doc/html-Qt4/functions_0x76.html QScintillAS/doc/html-Qt4/functions_0x77.html QScintillAS/doc/html-Qt4/functions_0x78.html QScintillAS/doc/html-Qt4/functions_0x7a.html QScintillAS/doc/html-Qt4/functions_0x7e.html QScintillAS/doc/html-Qt4/functions_enum.html QScintillAS/doc/html-Qt4/functions_eval.html QScintillAS/doc/html-Qt4/functions_eval_0x62.html QScintillAS/doc/html-Qt4/functions_eval_0x63.html QScintillAS/doc/html-Qt4/functions_eval_0x64.html QScintillAS/doc/html-Qt4/functions_eval_0x65.html QScintillAS/doc/html-Qt4/functions_eval_0x66.html QScintillAS/doc/html-Qt4/functions_eval_0x67.html QScintillAS/doc/html-Qt4/functions_eval_0x68.html QScintillAS/doc/html-Qt4/functions_eval_0x69.html QScintillAS/doc/html-Qt4/functions_eval_0x6a.html QScintillAS/doc/html-Qt4/functions_eval_0x6b.html QScintillAS/doc/html-Qt4/functions_eval_0x6c.html QScintillAS/doc/html-Qt4/functions_eval_0x6d.html QScintillAS/doc/html-Qt4/functions_eval_0x6e.html QScintillAS/doc/html-Qt4/functions_eval_0x6f.html QScintillAS/doc/html-Qt4/functions_eval_0x70.html QScintillAS/doc/html-Qt4/functions_eval_0x71.html QScintillAS/doc/html-Qt4/functions_eval_0x72.html QScintillAS/doc/html-Qt4/functions_eval_0x73.html QScintillAS/doc/html-Qt4/functions_eval_0x74.html QScintillAS/doc/html-Qt4/functions_eval_0x75.html QScintillAS/doc/html-Qt4/functions_eval_0x76.html QScintillAS/doc/html-Qt4/functions_eval_0x77.html QScintillAS/doc/html-Qt4/functions_eval_0x78.html QScintillAS/doc/html-Qt4/functions_func.html QScintillAS/doc/html-Qt4/functions_func_0x62.html QScintillAS/doc/html-Qt4/functions_func_0x63.html QScintillAS/doc/html-Qt4/functions_func_0x64.html QScintillAS/doc/html-Qt4/functions_func_0x65.html QScintillAS/doc/html-Qt4/functions_func_0x66.html QScintillAS/doc/html-Qt4/functions_func_0x67.html QScintillAS/doc/html-Qt4/functions_func_0x68.html QScintillAS/doc/html-Qt4/functions_func_0x69.html QScintillAS/doc/html-Qt4/functions_func_0x6b.html QScintillAS/doc/html-Qt4/functions_func_0x6c.html QScintillAS/doc/html-Qt4/functions_func_0x6d.html QScintillAS/doc/html-Qt4/functions_func_0x70.html QScintillAS/doc/html-Qt4/functions_func_0x71.html QScintillAS/doc/html-Qt4/functions_func_0x72.html QScintillAS/doc/html-Qt4/functions_func_0x73.html QScintillAS/doc/html-Qt4/functions_func_0x74.html QScintillAS/doc/html-Qt4/functions_func_0x75.html QScintillAS/doc/html-Qt4/functions_func_0x76.html QScintillAS/doc/html-Qt4/functions_func_0x77.html QScintillAS/doc/html-Qt4/functions_func_0x7a.html QScintillAS/doc/html-Qt4/functions_func_0x7e.html QScintillAS/doc/html-Qt4/hierarchy.html QScintillAS/doc/html-Qt4/index.html QScintillAS/doc/html-Qt4/tab_b.gif QScintillAS/doc/html-Qt4/tab_l.gif QScintillAS/doc/html-Qt4/tab_r.gif QScintillAS/doc/html-Qt4/tabs.css Added: QScintillAS/doc/Scintilla/Design.html =================================================================== --- QScintillAS/doc/Scintilla/Design.html (rev 0) +++ QScintillAS/doc/Scintilla/Design.html 2010-07-16 14:41:05 UTC (rev 51) @@ -0,0 +1,249 @@ +<?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, 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> + </head> + <body bgcolor="#FFFFFF" text="#000000"> + <table bgcolor="#000000" width="100%" cellspacing="0" cellpadding="0" border="0"> + <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="5">Scintilla + Component Design</font></a> + </td> + </tr> + </table> + <h2> + Top level structure + </h2> + <p> + Scintilla consists of three major layers of C++ code + </p> + <ul> + <li> + Portability Library + </li> + <li> + Core Code + </li> + <li> + Platform Events and API + </li> + </ul> + <p> + The primary purpose of this structure is to separate the platform dependent code from the + platform independent core code. This makes it easier to port Scintilla to a new platform and + ensures that most readers of the code do not have to deal with platform details. To minimise + portability problems and avoid code bloat, a conservative subset of C++ is used in Scintilla + with no exception handling, run time type information or use of the standard C++ + library and with limited use of templates. + </p> + <p> + The currently supported platforms, Windows, GTK+/Linux and wxWindows are fairly similar in + many ways. + Each has windows, menus and bitmaps. These features generally work in similar ways so each + has a way to move a window or draw a red line. Sometimes one platform requires a sequence of + calls rather than a single call. At other times, the differences are more profound. Reading + the Windows clipboard occurs synchronously but reading the GTK+ clipboard requires a request + call that will be asynchronously answered with a message containing the clipboard data. + The wxWindows platform is available from the <a href="http://wxwindows.org/">wxWindows site</a> + </p> + <br /> + <h3> + Portability Library + </h3> + <p> + This is a fairly small and thin layer over the platform's native capabilities. + </p> + <p> + The portability library is defined in Platform.h and is implemented once for each platform. + PlatWin.cxx defines the Windows variants of the methods and PlatGTK.cxx the GTK+ variants. + </p> + <p> + Several of the classes here hold platform specific object identifiers and act as proxies to + these platform objects. Most client code can thus manipulate the platform objects without + caring which is the current platform. Sometimes client code needs access to the underlying + object identifiers and this is provided by the GetID method. The underlying types of the + platform specific identifiers are typedefed to common names to allow them to be transferred + around in client code where needed. + </p> + <h4> + Point, PRectangle + </h4> + <p> + These are simple classes provided to hold the commonly used geometric primitives. A + PRectangle follows the Mac / Windows convention of not including its bottom and right sides + instead of including all its sides as is normal in GTK+. It is not called Rectangle as this may be + the name of a macro on Windows. + </p> + <h4> + Colour, ColourPair, Palette + </h4> + <p> + Colour holds a platform specific colour identifier - COLORREF for Windows and GdkColor for + GTK+. The red, green and blue components that make up the colour are limited to the 8 bits of + precision available on Windows. ColourPairs are used because not all possible colours are + always available. Using an 8 bit colour mode, which is a common setting for both Windows and + GTK+, only 256 colours are possible on the display. Thus when an application asks for a dull + red, say #400000, it may only be allocated an already available colour such as #800000 or + #330000. With 16 or 2 colour modes even less choice is available and the application will + have to use the limited set of already available colours. + </p> + A Palette object holds a set of colour pairs and can make the appropriate calls to ask to + allocate these colours and to see what the platform has decided will be allowed. + <h4> + Font + </h4> + <p> + Font holds a platform specific font identifier - HFONT for Windows, GdkFont* for GTK+. It + does not own the identifier and so will not delete the platform font object in its + destructor. Client code should call Destroy at appropriate times. + </p> + <h4> + Surface + </h4> + <p> + Surface is an abstraction over each platform's concept of somewhere that graphical drawing + operations can be done. It may wrap an already created drawing place such as a window or be + used to create a bitmap that can be drawn into and later copied onto another surface. On + Windows it wraps a HDC and possibly a HBITMAP. On GTK+ it wraps a GdkDrawable* and possibly a + GdkPixmap*. Other platform specific objects are created (and correctly destroyed) whenever + required to perform drawing actions. + </p> + <p> + Drawing operations provided include drawing filled and unfilled polygons, lines, rectangles, + ellipses and text. The height and width of text as well as other details can be measured. + Operations can be clipped to a rectangle. Most of the calls are stateless with all parameters + being passed at each call. The exception to this is line drawing which is performed by + calling MoveTo and then LineTo. + </p> + <h4> + Window + </h4> + <p> + Window acts as a proxy to a platform window allowing operations such as showing, moving, + redrawing, and destroying to be performed. It contains a platform specific window identifier + - HWND for Windows, GtkWidget* for GTK+. + </p> + <h4> + ListBox + </h4> + <p> + ListBox is a subclass of Window and acts as a proxy to a platform listbox adding methods for + operations such as adding, retrieving, and selecting items. + </p> + <h4> + Menu + </h4> + <p> + Menu is a small helper class for constructing popup menus. It contains the platform specific + menu identifier - HMENU for Windows, GtkItemFactory* for GTK+. Most of the work in + constructing menus requires access to platform events and so is done in the Platform Events + and API layer. + </p> + <h4> + Platform + </h4> + <p> + The Platform class is used to access the facilities of the platform. System wide parameters + such as double click speed and chrome colour are available from Platform. Utility functions + such as DebugPrintf are also available from Platform. + </p> + <h3> + Core Code + </h3> + <p> + The bulk of Scintilla's code is platform independent. This is made up of the CellBuffer, + ContractionState, Document, Editor, Indicator, LineMarker, Style, ViewStyle, KeyMap, + ScintillaBase, CallTip, + and AutoComplete primary classes. + </p> + <h4> + CellBuffer + </h4> + <p> + A CellBuffer holds text and styling information, the undo stack, the assignment of line + markers to lines, and the fold structure. + </p> + <p> + A cell contains a character byte and its associated style byte. The current state of the + cell buffer is the sequence of cells that make up the text and a sequence of line information + containing the starting position of each line and any markers assigned to each line. + </p> + <p> + The undo stack holds a sequence of actions on the cell buffer. Each action is one of a text + insertion, a text deletion or an undo start action. The start actions are used to group + sequences of text insertions and deletions together so they can be undone together. To + perform an undo operation, each insertion or deletion is undone in reverse sequence. + Similarly, redo reapplies each action to the buffer in sequence. Whenever a character is + inserted in the buffer either directly through a call such as InsertString or through undo or + redo, its styling byte is initially set to zero. Client code is responsible for styling each + character whenever convenient. Styling information is not stored in undo actions. + </p> + <h4> + Document + </h4> + <p> + A document contains a CellBuffer and deals with some higher level abstractions such as + words, DBCS character sequences and line end character sequences. It is responsible for + managing the styling process and for notifying other objects when changes occur to the + document. + </p> + <h4> + Editor + </h4> + <p> + The Editor object is central to Scintilla. It is responsible for displaying a document and + responding to user actions and requests from the container. It uses ContractionState, Indicator, + LineMarker, Style, and ViewStyle objects to display the document and a KeyMap class to + map key presses to functions. + The visibility of each line is kept in the ContractionState which is also responsible for mapping + from display lines to documents lines and vice versa. + </p> + <p> + There may be multiple Editor objects attached to one Document object. Changes to a + document are broadcast to the editors through the DocWatcher mechanism. + </p> + <h4> + ScintillaBase + </h4> + <p> + ScintillaBase is a subclass of Editor and adds extra windowing features including display of + calltips, autocompletion lists and context menus. These features use CallTip and AutoComplete + objects. This class is optional so a lightweight implementation of Scintilla may bypass it if + the added functionality is not required. + </p> + <h3> + Platform Events and API + </h3> + <p> + Each platform uses different mechanisms for receiving events. On Windows, events are + received through messages and COM. On GTK+, callback functions are used. + </p> + <p> + For each platform, a class is derived from ScintillaBase (and thus from Editor). This is + ScintillaWin on Windows and ScintillaGTK on GTK+. These classes are responsible for + connecting to the platforms event mechanism and also to implement some virtual methods in + Editor and ScintillaBase which are different on the platforms. For example, this layer has to + support this difference between the synchronous Windows clipboard and the asynchronous GTK+ + clipboard. + </p> + <p> + The external API is defined in this layer as each platform has different preferred styles of + API - messages on Windows and function calls on GTK+. This also allows multiple APIs to be + defined on a platform. The currently available API on GTK+ is similar to the Windows API and + does not follow platform conventions well. A second API could be implemented here that did + follow platform conventions. + </p> + </body> +</html> + Added: QScintillAS/doc/Scintilla/Icons.html =================================================================== --- QScintillAS/doc/Scintilla/Icons.html (rev 0) +++ QScintillAS/doc/Scintilla/Icons.html 2010-07-16 14:41:05 UTC (rev 51) @@ -0,0 +1,56 @@ +<?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, see www.w3.org" /> + <meta name="generator" content="SciTE" /> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <title> + Scintilla icons + </title> + </head> + <body bgcolor="#FFFFFF" text="#000000"> + <table bgcolor="#000000" width="100%" cellspacing="0" cellpadding="0" border="0"> + <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="5">Scintilla + and SciTE</font></a> + </td> + </tr> + </table> + <h2> + Icons + </h2> + <p> + These images may be used under the same license as Scintilla. + </p> + <p> + Drawn by Iago Rubio, Philippe Lhoste, and Neil Hodgson. + </p> + <p> + <a href="http://prdownloads.sourceforge.net/scintilla/icons1.zip?download">zip format</a> (70K) + </p> + <table> + <tr> + <td>For autocompletion lists</td> + <td colspan="3">For margin markers</td> + </tr> + <tr> + <td>12x12</td> + <td>16x16</td> + <td>24x24</td> + <td>32x32</td> + </tr> + <tr> + <td valign="top"><img src="12.png" /></td> + <td valign="top"><img src="16.png" /></td> + <td valign="top"><img src="24.png" /></td> + <td valign="top"><img src="32.png" /></td> + </tr> + </table> + </body> +</html> Added: QScintillAS/doc/Scintilla/Lexer.txt =================================================================== --- QScintillAS/doc/Scintilla/Lexer.txt (rev 0) +++ QScintillAS/doc/Scintilla/Lexer.txt 2010-07-16 14:41:05 UTC (rev 51) @@ -0,0 +1,226 @@ +How to write a scintilla lexer + +A lexer for a particular language determines how a specified range of +text shall be colored. Writing a lexer is relatively straightforward +because the lexer need only color given text. The harder job of +determining how much text actually needs to be colored is handled by +Scintilla itself, that is, the lexer's caller. + + +Parameters + +The lexer for language LLL has the following prototype: + + static void ColouriseLLLDoc ( + unsigned int startPos, int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler); + +The styler parameter is an Accessor object. The lexer must use this +object to access the text to be colored. The lexer gets the character +at position i using styler.SafeGetCharAt(i); + +The startPos and length parameters indicate the range of text to be +recolored; the lexer must determine the proper color for all characters +in positions startPos through startPos+length. + +The initStyle parameter indicates the initial state, that is, the state +at the character before startPos. States also indicate the coloring to +be used for a particular range of text. + +Note: the character at StartPos is assumed to start a line, so if a +newline terminates the initStyle state the lexer should enter its +default state (or whatever state should follow initStyle). + +The keywordlists parameter specifies the keywords that the lexer must +recognize. A WordList class object contains methods that make simplify +the recognition of keywords. Present lexers use a helper function +called classifyWordLLL to recognize keywords. These functions show how +to use the keywordlists parameter to recognize keywords. This +documentation will not discuss keywords further. + + +The lexer code + +The task of a lexer can be summarized briefly: for each range r of +characters that are to be colored the same, the lexer should call + + styler.ColourTo(i, state) + +where i is the position of the last character of the range r. The lexer +should set the state variable to the coloring state of the character at +position i and continue until the entire text has been colored. + +Note 1: the styler (Accessor) object remembers the i parameter in the +previous calls to styler.ColourTo, so the single i parameter suffices to +indicate a range of characters. + +Note 2: As a side effect of calling styler.ColourTo(i,state), the +coloring states of all characters in the range are remembered so that +Scintilla may set the initStyle parameter correctly on future calls to +the +lexer. + + +Lexer organization + +There are at least two ways to organize the code of each lexer. Present +lexers use what might be called a "character-based" approach: the outer +loop iterates over characters, like this: + + lengthDoc = startPos + length ; + for (unsigned int i = startPos; i < lengthDoc; i++) { + chNext = styler.SafeGetCharAt(i + 1); + << handle special cases >> + switch(state) { + // Handlers examine only ch and chNext. + // Handlers call styler.ColorTo(i,state) if the state changes. + case state_1: << handle ch in state 1 >> + case state_2: << handle ch in state 2 >> + ... + case state_n: << handle ch in state n >> + } + chPrev = ch; + } + styler.ColourTo(lengthDoc - 1, state); + + +An alternative would be to use a "state-based" approach. The outer loop +would iterate over states, like this: + + lengthDoc = startPos+lenth ; + for ( unsigned int i = startPos ;; ) { + char ch = styler.SafeGetCharAt(i); + int new_state = 0 ; + switch ( state ) { + // scanners set new_state if they set the next state. + case state_1: << scan to the end of state 1 >> break ; + case state_2: << scan to the end of state 2 >> break ; + case default_state: + << scan to the next non-default state and set new_state >> + } + styler.ColourTo(i, state); + if ( i >= lengthDoc ) break ; + if ( ! new_state ) { + ch = styler.SafeGetCharAt(i); + << set state based on ch in the default state >> + } + } + styler.ColourTo(lengthDoc - 1, state); + +This approach might seem to be more natural. State scanners are simpler +than character scanners because less needs to be done. For example, +there is no need to test for the start of a C string inside the scanner +for a C comment. Also this way makes it natural to define routines that +could be used by more than one scanner; for example, a scanToEndOfLine +routine. + +However, the special cases handled in the main loop in the +character-based approach would have to be handled by each state scanner, +so both approaches have advantages. These special cases are discussed +below. + +Special case: Lead characters + +Lead bytes are part of DBCS processing for languages such as Japanese +using an encoding such as Shift-JIS. In these encodings, extended +(16-bit) characters are encoded as a lead byte followed by a trail byte. + +Lead bytes are rarely of any lexical significance, normally only being +allowed within strings and comments. In such contexts, lexers should +ignore ch if styler.IsLeadByte(ch) returns TRUE. + +Note: UTF-8 is simpler than Shift-JIS, so no special handling is +applied for it. All UTF-8 extended characters are >= 128 and none are +lexically significant in programming languages which, so far, use only +characters in ASCII for operators, comment markers, etc. + + +Special case: Folding + +Folding may be performed in the lexer function. It is better to use a +separate folder function as that avoids some troublesome interaction +between styling and folding. The folder function will be run after the +lexer function if folding is enabled. The rest of this section explains +how to perform folding within the lexer function. + +During initialization, lexers that support folding set + + bool fold = styler.GetPropertyInt("fold"); + +If folding is enabled in the editor, fold will be TRUE and the lexer +should call: + + styler.SetLevel(line, level); + +at the end of each line and just before exiting. + +The line parameter is simply the count of the number of newlines seen. +It's initial value is styler.GetLine(startPos) and it is incremented +(after calling styler.SetLevel) whenever a newline is seen. + +The level parameter is the desired indentation level in the low 12 bits, +along with flag bits in the upper four bits. The indentation level +depends on the language. For C++, it is incremented when the lexer sees +a '{' and decremented when the lexer sees a '}' (outside of strings and +comments, of course). + +The following flag bits, defined in Scintilla.h, may be set or cleared +in the flags parameter. The SC_FOLDLEVELWHITEFLAG flag is set if the +lexer considers that the line contains nothing but whitespace. The +SC_FOLDLEVELHEADERFLAG flag indicates that the line is a fold point. +This normally means that the next line has a greater level than present +line. However, the lexer may have some other basis for determining a +fold point. For example, a lexer might create a header line for the +first line of a function definition rather than the last. + +The SC_FOLDLEVELNUMBERMASK mask denotes the level number in the low 12 +bits of the level param. This mask may be used to isolate either flags +or level numbers. + +For example, the C++ lexer contains the following code when a newline is +seen: + + if (fold) { + int lev = levelPrev; + + // Set the "all whitespace" bit if the line is blank. + if (visChars == 0) + lev |= SC_FOLDLEVELWHITEFLAG; + + // Set the "header" bit if needed. + if ((levelCurrent > levelPrev) && (visChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + styler.SetLevel(lineCurrent, lev); + + // reinitialize the folding vars describing the present line. + lineCurrent++; + visChars = 0; // Number of non-whitespace characters on the line. + levelPrev = levelCurrent; + } + +The following code appears in the C++ lexer just before exit: + + // Fill in the real level of the next line, keeping the current flags + // as they will be filled in later. + if (fold) { + // Mask off the level number, leaving only the previous flags. + int flagsNext = styler.LevelAt(lineCurrent); + flagsNext &= ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); + } + + +Don't worry about performance + +The writer of a lexer may safely ignore performance considerations: the +cost of redrawing the screen is several orders of magnitude greater than +the cost of function calls, etc. Moreover, Scintilla performs all the +important optimizations; Scintilla ensures that a lexer will be called +only to recolor text that actually needs to be recolored. Finally, it +is not necessary to avoid extra calls to styler.ColourTo: the sytler +object buffers calls to ColourTo to avoid multiple updates of the +screen. + +Page contributed by Edward K. Ream \ No newline at end of file Added: QScintillAS/doc/Scintilla/SciBreak.jpg =================================================================== (Binary files differ) Property changes on: QScintillAS/doc/Scintilla/SciBreak.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: QScintillAS/doc/Scintilla/SciCoding.html =================================================================== --- QScintillAS/doc/Scintilla/SciCoding.html (rev 0) +++ QScintillAS/doc/Scintilla/SciCoding.html 2010-07-16 14:41:05 UTC (rev 51) @@ -0,0 +1,251 @@ +<?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="SciTE" /> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <title> + Scintilla and SciTE Code Style Preferences + </title> + <style> + .S0 { + color: #808080; + } + .S1 { + font-family: Comic Sans MS; + color: #007F00; + font-size: 9pt; + } + .S2 { + font-family: Comic Sans MS; + color: #007F00; + font-size: 9pt; + } + .S3 { + font-family: Comic Sans MS; + color: #3F703F; + font-size: 9pt; + } + .S4 { + color: #007F7F; + } + .S5 { + font-weight: bold; + color: #00007F; + } + .S6 { + color: #7F007F; + } + .S7 { + color: #7F007F; + } + .S8 { + color: #804080; + } + .S9 { + color: #7F7F00; + } + .S10 { + font-weight: bold; + color: #000000; + } + .S12 { + font-family: Courier New; + color: #000000; + background: #E0C0E0; + font-size: 10pt; + } + .S13 { + font-family: Courier New; + color: #007F00; + background: #E0FFE0; + font-size: 10pt; + } + .S14 { + font-family: Courier New; + color: #3F7F3F; + background: #E0F0FF; + font-size: 10pt; + } + .S15 { + font-family: Comic Sans MS; + color: #3F703F; + font-size: 9pt; + } + SPAN { + font-family: Verdana; + font-size: 10pt; + } + </style> + </head> + <body bgcolor="#FFFFFF" text="#000000"> + <table bgcolor="#000000" width="100%" cellspacing="0" cellpadding="0" border="0"> + <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="5">Scintilla + and SciTE</font></a> + </td> + </tr> + </table> + <h2> + Code Style + </h2> + <h3> + Introduction + </h3> + <p> + The source code of Scintilla and SciTE follow my preferences. + Some of these decisions are arbitrary and based on my sense of aesthetics + but its good to have all the code look the same even if its not exactly how + everyone would prefer. + </p> + <p> + Code that does not follow these conventions will be accepted, but will be modified + as time goes by to fit the conventions. Scintilla code follows the conventions more + closely than SciTE except for lexers which are relatively independent modules. + Lexers that are maintained by others are left as they are submitted except that + warnings will be fixed so the whole project can compile cleanly. + </p> + <p> + The <a href="http://astyle.sourceforge.net/">AStyle</a> formatting + program with a '-tapO' argument formats code in much the right way although + there are a few bugs in AStyle. The scite/scripts/Fixer.py script will run AStyle + over a C++ source file and fix up some of those bugs. + </p> + <h3> + Language features + </h3> + <p> + Design goals for Scintilla and SciTE include portability to currently available C++ + compilers on diverse platforms with high performance and low resource usage. + Scintilla has stricter portability requirements to SciTE as it may be ported to + low capability platforms such as Windows CE or PalmOS but it is less likely + SciTE will be. + </p> + <p> + To achieve portability, only a subset of C++ features are used. Exceptions are + not available on some platforms such as Windows CE so exceptions are not used + and thus the standard C++ library can not be used. + Template support differs between compilers so is not used in Scintilla but there + are some simple uses in SciTE. + Run-time type information adds to memory use so is turned off. + Name spaces are not used. + </p> + <p> + The goto statement is not used because of bad memories from my first job + maintaining FORTRAN programs. The union feature is not used as it can lead to + non-type-safe value access. + </p> + <h3> + Casting + </h3> + <p> + Do not use old C style casts like (char *)s. Instead use the most strict form of C++ + cast possible like const_cast<char *>(s). Use static_cast and const_cast + where possible rather than reinterpret_cast. Because the code is compiled with + run-time type information turned off, dynamic_cast will not work. + </p> + <p> + The benefit to using the new style casts is that they explicitly detail what evil is + occurring and act as signals that something potentially unsafe is being done. + </p> + <p> + Code that treats const seriously is easier to reason about both for humans + and compilers, so use const parameters and avoid const_cast. + </p> + <h3> + Warnings + </h3> + <p> + To help ensure code is well written and portable, it is compiled with almost all + warnings turned on. This sometimes results in warnings about code that is + completely good (false positives) but changing the code to avoid the warnings + is generally fast and has little impact on readability. + </p> + <p> + Initialise all variables and minimise the scope of variables. If a variable is defined + just before its use then it can't be misused by code before that point. + Use loop declarations that are compatible with both the C++ standard and currently + available compilers. + </p> + <h3> + Allocation + </h3> + <p> + As exceptions are not used, memory exhaustion can occur. + This should be checked for and handled but there is quite a lot of Scintilla and + SciTE code that doesn't yet. + Fixed length buffers are often used as these are simple and avoid the need to + worry about memory exhaustion but then require that buffer lengths are + respected. + </p> + <p> + The C++ new and delete operators are preferred over C's malloc and free + as new and delete are type safe. + </p> + <h3> + Bracketing + </h3> + <p> + Start brackets, '{', should be located on the line of the control structure they + start and end brackets, '}', should be at the indented start of a line. When there is + an else clause, this occurs on the same line as the '}'. + This format uses less lines than alternatives, allowing more code to be seen on screen. + Fully bracketed control + structures are preferred because this makes it more likely that modifications will + be correct and it allows Scintilla's folder to work. No braces on returned + expressions as return is a keyword, not a function call. + </p> +<SPAN class=S0></SPAN><SPAN class=S5>bool</SPAN><SPAN class=S0> </SPAN><SPAN class=S11>fn</SPAN><SPAN class=S10>(</SPAN><SPAN class=S5>int</SPAN><SPAN class=S0> </SPAN><SPAN class=S11>a</SPAN><SPAN class=S10>)</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>{</SPAN><SPAN class=S0><BR> + </SPAN><SPAN class=S5>if</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>(</SPAN><SPAN class=S11>a</SPAN><SPAN class=S10>)</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>{</SPAN><SPAN class=S0><BR> + </SPAN><SPAN class=S11>s</SPAN><SPAN class=S10>();</SPAN><SPAN class=S0><BR> + </SPAN><SPAN class=S11>t</SPAN><SPAN class=S10>();</SPAN><SPAN class=S0><BR> + </SPAN><SPAN class=S10>}</SPAN><SPAN class=S0> </SPAN><SPAN class=S5>else</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>{</SPAN><SPAN class=S0><BR> + </SPAN><SPAN class=S11>u</SPAN><SPAN class=S10>();</SPAN><SPAN class=S0><BR> + </SPAN><SPAN class=S10>}</SPAN><SPAN class=S0><BR> + </SPAN><SPAN class=S5>return</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>!</SPAN><SPAN class=S11>a</SPAN><SPAN class=S10>;</SPAN><SPAN class=S0><BR> +</SPAN><SPAN class=S10>}</SPAN><SPAN class=S0><BR> +</SPAN> <h3> + Spacing + </h3> + <p> + Spaces on both sides of '=' and comparison operators and no attempt to line up '='. + No space before or after '(', when used in calls, but a space after every ','. + No spaces between tokens in short expressions but may be present in + longer expressions. Space before '{'. No space before ';'. + No space after '*' when used to mean pointer and no space after '[' or ']'. + One space between keywords and '('. + </p> +<SPAN class=S0></SPAN><SPAN class=S5>void</SPAN><SPAN class=S0> </SPAN><SPAN class=S11>StoreConditionally</SPAN><SPAN class=S10>(</SPAN><SPAN class=S5>int</SPAN><SPAN class=S0> </SPAN><SPAN class=S11>c</SPAN><SPAN class=S10>,</SPAN><SPAN class=S0> </SPAN><SPAN class=S5>const</SPAN><SPAN class=S0> </SPAN><SPAN class=S5>char</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>*</SPAN><SPAN class=S11>s</SPAN><SPAN class=S10>)</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>{</SPAN><SPAN class=S0><BR> + </SPAN><SPAN class=S5>if</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>(</SPAN><SPAN class=S11>c</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>&&</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>(</SPAN><SPAN class=S11>baseSegment</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>==</SPAN><SPAN class=S0> </SPAN><SPAN class=S11>trustSegment</SPAN><SPAN class=S10>[</SPAN><SPAN class=S6>"html"</SPAN><SPAN class=S10>]))</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>{</SPAN><SPAN class=S0><BR> + </SPAN><SPAN class=S11>baseSegment</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>=</SPAN><SPAN class=S0> </SPAN><SPAN class=S11>s</SPAN><SPAN class=S10>+</SPAN><SPAN class=S4>1</SPAN><SPAN class=S10>;</SPAN><SPAN class=S0><BR> + </SPAN><SPAN class=S11>Store</SPAN><SPAN class=S10>(</SPAN><SPAN class=S11>s</SPAN><SPAN class=S10>,</SPAN><SPAN class=S0> </SPAN><SPAN class=S11>baseSegment</SPAN><SPAN class=S10>,</SPAN><SPAN class=S0> </SPAN><SPAN class=S6>"html"</SPAN><SPAN class=S10>);</SPAN><SPAN class=S0><BR> + </SPAN><SPAN class=S10>}</SPAN><SPAN class=S0><BR> +</SPAN><SPAN class=S10>}</SPAN> + <h3> + Names + </h3> + <p> + Identifiers use mixed case and no underscores. + Class, function and method names start with an uppercase letter and use + further upper case letters to distinguish words. Variables start with a lower + case letter and use upper case letters to distinguish words. + Loop counters and similar variables can have simple names like 'i'. + Function calls should be differentiated from method calls with an initial '::' + global scope modifier. + </p> +<SPAN class=S0></SPAN><SPAN class=S5>class</SPAN><SPAN class=S0> </SPAN><SPAN class=S11>StorageZone</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>{</SPAN><SPAN class=S0><BR> +</SPAN><SPAN class=S5>public</SPAN><SPAN class=S10>:</SPAN><SPAN class=S0><BR> + </SPAN><SPAN class=S5>void</SPAN><SPAN class=S0> </SPAN><SPAN class=S11>Store</SPAN><SPAN class=S10>(</SPAN><SPAN class=S5>const</SPAN><SPAN class=S0> </SPAN><SPAN class=S5>char</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>*</SPAN><SPAN class=S11>s</SPAN><SPAN class=S10>)</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>{</SPAN><SPAN class=S0><BR> + </SPAN><SPAN class=S11>Media</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>*</SPAN><SPAN class=S11>mediaStore</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>=</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>::</SPAN><SPAN class=S11>GetBaseMedia</SPAN><SPAN class=S10>(</SPAN><SPAN class=S11>zoneDefault</SPAN><SPAN class=S10>);</SPAN><SPAN class=S0><BR> + </SPAN><SPAN class=S5>for</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>(</SPAN><SPAN class=S5>int</SPAN><SPAN class=S0> </SPAN><SPAN class=S11>i</SPAN><SPAN class=S10>=</SPAN><SPAN class=S11>mediaStore</SPAN><SPAN class=S10>-></SPAN><SPAN class=S11>cursor</SPAN><SPAN class=S10>;</SPAN><SPAN class=S0> </SPAN><SPAN class=S11>mediaStore</SPAN><SPAN class=S10>[</SPAN><SPAN class=S11>i</SPAN><SPAN class=S10>],</SPAN><SPAN class=S0> </SPAN><SPAN class=S11>i</SPAN><SPAN class=S10>++)</SPAN><SPAN class=S0> </SPAN><SPAN class=S10>{</SPAN><SPAN class=S0><BR> + </SPAN><SPAN class=S11>mediaStore</SPAN><SPAN class=S10>-></SPAN><SPAN class=S11>Persist</SPAN><SPAN class=S10>(</SPAN><SPAN class=S11>s</SPAN><SPAN class=S10>[</SPAN><SPAN class=S11>i</SPAN><SPAN class=S10>]);</SPAN><SPAN class=S0><BR> + </SPAN><SPAN class=S10>}</SPAN><SPAN class=S0><BR> + </SPAN><SPAN class=S10>}</SPAN><SPAN class=S0><BR> +</SPAN><SPAN class=S10>};</SPAN> + </body> +</html> Added: QScintillAS/doc/Scintilla/SciRest.jpg =================================================================== (Binary files differ) Property changes on: QScintillAS/doc/Scintilla/SciRest.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: QScintillAS/doc/Scintilla/SciTEIco.png =================================================================== (Binary files differ) Property changes on: QScintillAS/doc/Scintilla/SciTEIco.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: QScintillAS/doc/Scintilla/SciWord.jpg =================================================================== (Binary files differ) Property changes on: QScintillAS/doc/Scintilla/SciWord.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: QScintillAS/doc/Scintilla/ScintillaDoc.html =================================================================== --- QScintillAS/doc/Scintilla/ScintillaDoc.html (rev 0) +++ QScintillAS/doc/Scintilla/ScintillaDoc.html 2010-07-16 14:41:05 UTC (rev 51) @@ -0,0 +1,5641 @@ +<?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 20/June/2007 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 /> + <a class="jump" href="http://sphere.sourceforge.net/flik/docs/scintilla-container_lexer.html"> + How to implement a lexer in the container</a>.<br /> + <a class="jump" href="http://sphere.sourceforge.net/flik/docs/scintilla-folding.html"> + How to implement 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, folding, markers, autocompletion + 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. These parameters are integers that + are large enough to hold pointers, and the return value is also an integer large enough to contain a + pointer. + 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. If a NULL pointer (0) is passed + then, for SCI_* calls, the length that should be allocated is returned.</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" id="alpha">alpha</th> + + <td>Translucency is set using an alpha value. + Alpha ranges from 0 (SC_ALPHA_TRANSPARENT) which is completely transparent to + 255 (SC_ALPHA_OPAQUE) which is opaque. The value 256 (SC_ALPHA_NOALPHA) + is opaque and uses code that is not alpha-aware and may be faster. Not all platforms support + translucency and only some Scintilla features implement translucency. + The default alpha value for most features is SC_ALPHA_NOALPHA.</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="#GTK">GTK+</a></td> + + <td>o <a class="toc" href="#DeprecatedMessages">Deprecated messages</a></td> + </tr> + + <tr> + <td>o <a class="toc" href="#EditMessagesNeverSupportedByScintilla">Edit messages never + supported by Scintilla</a></td> + + <td>o <a class="toc" href="#BuildingScintilla">Building Scintilla</a></td> + </tr> + </tbody> + </table> + + <p>Messages with names of the form <code>SCI_SETxxxxx</code> often have a companion + <code>SCI_GETxxxxx</code>. To save tedious repetition, if the <code>SCI_GETxxxxx</code> message + returns the value set by the <code>SCI_SETxxxxx</code> message, the <code>SET</code> routine is + described and the <code>GET</code> routine is left to your imagination.</p> + + <h2 id="TextRetrievalAndModification">Text retrieval and modification</h2> + + <p>Each character in a Scintilla document is followed by an associated byte of styling + information. The combination of a character byte and a style byte is called a cell. Style bytes + are interpreted an index into an array of styles. + Style bytes may be split into an index and a set of indicator bits + but this use is discouraged and indicators should now use + <a class="message" href ="#SCI_INDICATO... [truncated message content] |
From: <cr...@us...> - 2010-07-16 13:35:38
|
Revision: 50 http://geesas.svn.sourceforge.net/geesas/?rev=50&view=rev Author: creek23 Date: 2010-07-16 13:35:28 +0000 (Fri, 16 Jul 2010) Log Message: ----------- Scintilla C++ sources Added Paths: ----------- QScintillAS/src/ QScintillAS/src/AutoComplete.cpp QScintillAS/src/AutoComplete.h QScintillAS/src/CallTip.cpp QScintillAS/src/CallTip.h QScintillAS/src/CellBuffer.cpp QScintillAS/src/CellBuffer.h QScintillAS/src/CharClassify.cpp QScintillAS/src/CharClassify.h QScintillAS/src/CharacterSet.h QScintillAS/src/ContractionState.cpp QScintillAS/src/ContractionState.h QScintillAS/src/Decoration.cpp QScintillAS/src/Decoration.h QScintillAS/src/Document.cpp QScintillAS/src/Document.h QScintillAS/src/DocumentAccessor.cpp QScintillAS/src/DocumentAccessor.h QScintillAS/src/Editor.cpp QScintillAS/src/Editor.h QScintillAS/src/ExternalLexer.cpp QScintillAS/src/ExternalLexer.h QScintillAS/src/Indicator.cpp QScintillAS/src/Indicator.h QScintillAS/src/KeyMap.cpp QScintillAS/src/KeyMap.h QScintillAS/src/KeyWords.cpp QScintillAS/src/LexActionScript.cpp QScintillAS/src/LexGen.py QScintillAS/src/License.txt QScintillAS/src/LineMarker.cpp QScintillAS/src/LineMarker.h QScintillAS/src/Partitioning.h QScintillAS/src/PositionCache.cpp QScintillAS/src/PositionCache.h QScintillAS/src/PropSet.cpp QScintillAS/src/RESearch.cpp QScintillAS/src/RESearch.h QScintillAS/src/RunStyles.cpp QScintillAS/src/RunStyles.h QScintillAS/src/SVector.h QScintillAS/src/SciTE.properties QScintillAS/src/ScintillaBase.cpp QScintillAS/src/ScintillaBase.h QScintillAS/src/SplitVector.h QScintillAS/src/Style.cpp QScintillAS/src/Style.h QScintillAS/src/StyleContext.cpp QScintillAS/src/StyleContext.h QScintillAS/src/UniConversion.cpp QScintillAS/src/UniConversion.h QScintillAS/src/ViewStyle.cpp QScintillAS/src/ViewStyle.h QScintillAS/src/WindowAccessor.cpp QScintillAS/src/XPM.cpp QScintillAS/src/XPM.h Added: QScintillAS/src/AutoComplete.cpp =================================================================== --- QScintillAS/src/AutoComplete.cpp (rev 0) +++ QScintillAS/src/AutoComplete.cpp 2010-07-16 13:35:28 UTC (rev 50) @@ -0,0 +1,178 @@ +// Scintilla source code edit control +/** @file AutoComplete.cxx + ** Defines the auto completion list box. + **/ +// Copyright 1998-2003 by Neil Hodgson <ne...@sc...> +// The License.txt file describes the conditions under which this software may be distributed. + +#include <stdlib.h> +#include <string.h> +#include <stdio.h> + +#include "Platform.h" + +#include "PropSet.h" +#include "AutoComplete.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +AutoComplete::AutoComplete() : + active(false), + separator(' '), + typesep('?'), + ignoreCase(false), + chooseSingle(false), + lb(0), + posStart(0), + startLen(0), + cancelAtStartPos(true), + autoHide(true), + dropRestOfWord(false) { + lb = ListBox::Allocate(); + stopChars[0] = '\0'; + fillUpChars[0] = '\0'; +} + +AutoComplete::~AutoComplete() { + if (lb) { + lb->Destroy(); + delete lb; + lb = 0; + } +} + +bool AutoComplete::Active() { + return active; +} + +void AutoComplete::Start(Window &parent, int ctrlID, + int position, Point location, int startLen_, + int lineHeight, bool unicodeMode) { + if (active) { + Cancel(); + } + lb->Create(parent, ctrlID, location, lineHeight, unicodeMode); + lb->Clear(); + active = true; + startLen = startLen_; + posStart = position; +} + +void AutoComplete::SetStopChars(const char *stopChars_) { + strncpy(stopChars, stopChars_, sizeof(stopChars)); + stopChars[sizeof(stopChars) - 1] = '\0'; +} + +bool AutoComplete::IsStopChar(char ch) { + return ch && strchr(stopChars, ch); +} + +void AutoComplete::SetFillUpChars(const char *fillUpChars_) { + strncpy(fillUpChars, fillUpChars_, sizeof(fillUpChars)); + fillUpChars[sizeof(fillUpChars) - 1] = '\0'; +} + +bool AutoComplete::IsFillUpChar(char ch) { + return ch && strchr(fillUpChars, ch); +} + +void AutoComplete::SetSeparator(char separator_) { + separator = separator_; +} + +char AutoComplete::GetSeparator() { + return separator; +} + +void AutoComplete::SetTypesep(char separator_) { + typesep = separator_; +} + +char AutoComplete::GetTypesep() { + return typesep; +} + +void AutoComplete::SetList(const char *list) { + lb->SetList(list, separator, typesep); +} + +void AutoComplete::Show(bool show) { + lb->Show(show); + if (show) + lb->Select(0); +} + +void AutoComplete::Cancel() { + if (lb->Created()) { + lb->Clear(); + lb->Destroy(); + active = false; + } +} + + +void AutoComplete::Move(int delta) { + int count = lb->Length(); + int current = lb->GetSelection(); + current += delta; + if (current >= count) + current = count - 1; + if (current < 0) + current = 0; + lb->Select(current); +} + +void AutoComplete::Select(const char *word) { + size_t lenWord = strlen(word); + int location = -1; + const int maxItemLen=1000; + char item[maxItemLen]; + int start = 0; // lower bound of the api array block to search + int end = lb->Length() - 1; // upper bound of the api array block to search + while ((start <= end) && (location == -1)) { // Binary searching loop + int pivot = (start + end) / 2; + lb->GetValue(pivot, item, maxItemLen); + int cond; + if (ignoreCase) + cond = CompareNCaseInsensitive(word, item, lenWord); + else + cond = strncmp(word, item, lenWord); + if (!cond) { + // Find first match + while (pivot > start) { + lb->GetValue(pivot-1, item, maxItemLen); + if (ignoreCase) + cond = CompareNCaseInsensitive(word, item, lenWord); + else + cond = strncmp(word, item, lenWord); + if (0 != cond) + break; + --pivot; + } + location = pivot; + if (ignoreCase) { + // Check for exact-case match + for (; pivot <= end; pivot++) { + lb->GetValue(pivot, item, maxItemLen); + if (!strncmp(word, item, lenWord)) { + location = pivot; + break; + } + if (CompareNCaseInsensitive(word, item, lenWord)) + break; + } + } + } else if (cond < 0) { + end = pivot - 1; + } else if (cond > 0) { + start = pivot + 1; + } + } + if (location == -1 && autoHide) + Cancel(); + else + lb->Select(location); +} + Added: QScintillAS/src/AutoComplete.h =================================================================== --- QScintillAS/src/AutoComplete.h (rev 0) +++ QScintillAS/src/AutoComplete.h 2010-07-16 13:35:28 UTC (rev 50) @@ -0,0 +1,78 @@ +// Scintilla source code edit control +/** @file AutoComplete.h + ** Defines the auto completion list box. + **/ +// Copyright 1998-2003 by Neil Hodgson <ne...@sc...> +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef AUTOCOMPLETE_H +#define AUTOCOMPLETE_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +/** + */ +class AutoComplete { + bool active; + char stopChars[256]; + char fillUpChars[256]; + char separator; + char typesep; // Type seperator + +public: + bool ignoreCase; + bool chooseSingle; + ListBox *lb; + int posStart; + int startLen; + /// Should autocompletion be canceled if editor's currentPos <= startPos? + bool cancelAtStartPos; + bool autoHide; + bool dropRestOfWord; + + AutoComplete(); + ~AutoComplete(); + + /// Is the auto completion list displayed? + bool Active(); + + /// Display the auto completion list positioned to be near a character position + void Start(Window &parent, int ctrlID, int position, Point location, + int startLen_, int lineHeight, bool unicodeMode); + + /// The stop chars are characters which, when typed, cause the auto completion list to disappear + void SetStopChars(const char *stopChars_); + bool IsStopChar(char ch); + + /// The fillup chars are characters which, when typed, fill up the selected word + void SetFillUpChars(const char *fillUpChars_); + bool IsFillUpChar(char ch); + + /// The separator character is used when interpreting the list in SetList + void SetSeparator(char separator_); + char GetSeparator(); + + /// The typesep character is used for seperating the word from the type + void SetTypesep(char separator_); + char GetTypesep(); + + /// The list string contains a sequence of words separated by the separator character + void SetList(const char *list); + + void Show(bool show); + void Cancel(); + + /// Move the current list element by delta, scrolling appropriately + void Move(int delta); + + /// Select a list element that starts with word as the current element + void Select(const char *word); +}; + +#ifdef SCI_NAMESPACE +} +#endif + +#endif Added: QScintillAS/src/CallTip.cpp =================================================================== --- QScintillAS/src/CallTip.cpp (rev 0) +++ QScintillAS/src/CallTip.cpp 2010-07-16 13:35:28 UTC (rev 50) @@ -0,0 +1,329 @@ +// Scintilla source code edit control +/** @file CallTip.cxx + ** Code for displaying call tips. + **/ +// Copyright 1998-2001 by Neil Hodgson <ne...@sc...> +// The License.txt file describes the conditions under which this software may be distributed. + +#include <stdlib.h> +#include <string.h> + +#include "Platform.h" + +#include "Scintilla.h" +#include "CallTip.h" +#include <stdio.h> + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +static const int insetX = 5; // text inset in x from calltip border +static const int widthArrow = 14; + +CallTip::CallTip() { + wCallTip = 0; + inCallTipMode = false; + posStartCallTip = 0; + val = 0; + rectUp = PRectangle(0,0,0,0); + rectDown = PRectangle(0,0,0,0); + lineHeight = 1; + startHighlight = 0; + endHighlight = 0; + tabSize = 0; + useStyleCallTip = false; // for backwards compatibility + +#ifdef __APPLE__ + // proper apple colours for the default + colourBG.desired = ColourDesired(0xff, 0xff, 0xc6); + colourUnSel.desired = ColourDesired(0, 0, 0); +#else + colourBG.desired = ColourDesired(0xff, 0xff, 0xff); + colourUnSel.desired = ColourDesired(0x80, 0x80, 0x80); +#endif + colourSel.desired = ColourDesired(0, 0, 0x80); + colourShade.desired = ColourDesired(0, 0, 0); + colourLight.desired = ColourDesired(0xc0, 0xc0, 0xc0); +} + +CallTip::~CallTip() { + font.Release(); + wCallTip.Destroy(); + delete []val; + val = 0; +} + +void CallTip::RefreshColourPalette(Palette &pal, bool want) { + pal.WantFind(colourBG, want); + pal.WantFind(colourUnSel, want); + pal.WantFind(colourSel, want); + pal.WantFind(colourShade, want); + pal.WantFind(colourLight, want); +} + +// Although this test includes 0, we should never see a \0 character. +static bool IsArrowCharacter(char ch) { + return (ch == 0) || (ch == '\001') || (ch == '\002'); +} + +// We ignore tabs unless a tab width has been set. +bool CallTip::IsTabCharacter(char ch) { + return (tabSize > 0) && (ch == '\t'); +} + +int CallTip::NextTabPos(int x) { + if (tabSize > 0) { // paranoia... not called unless this is true + x -= insetX; // position relative to text + x = (x + tabSize) / tabSize; // tab "number" + return tabSize*x + insetX; // position of next tab + } else { + return x + 1; // arbitrary + } +} + +// Draw a section of the call tip that does not include \n in one colour. +// The text may include up to numEnds tabs or arrow characters. +void CallTip::DrawChunk(Surface *surface, int &x, const char *s, + int posStart, int posEnd, int ytext, PRectangle rcClient, + bool highlight, bool draw) { + s += posStart; + int len = posEnd - posStart; + + // Divide the text into sections that are all text, or that are + // single arrows or single tab characters (if tabSize > 0). + int maxEnd = 0; + const int numEnds = 10; + int ends[numEnds + 2]; + for (int i=0;i<len;i++) { + if ((maxEnd < numEnds) && + (IsArrowCharacter(s[i]) || IsTabCharacter(s[i])) ) { + if (i > 0) + ends[maxEnd++] = i; + ends[maxEnd++] = i+1; + } + } + ends[maxEnd++] = len; + int startSeg = 0; + int xEnd; + for (int seg = 0; seg<maxEnd; seg++) { + int endSeg = ends[seg]; + if (endSeg > startSeg) { + if (IsArrowCharacter(s[startSeg])) { + bool upArrow = s[startSeg] == '\001'; + rcClient.left = x; + rcClient.right = rcClient.left + widthArrow; + if (draw) { + const int halfWidth = widthArrow / 2 - 3; + const int centreX = rcClient.left + widthArrow / 2 - 1; + const int centreY = (rcClient.top + rcClient.bottom) / 2; + surface->FillRectangle(rcClient, colourBG.allocated); + PRectangle rcClientInner(rcClient.left + 1, rcClient.top + 1, + rcClient.right - 2, rcClient.bottom - 1); + surface->FillRectangle(rcClientInner, colourUnSel.allocated); + + if (upArrow) { // Up arrow + Point pts[] = { + Point(centreX - halfWidth, centreY + halfWidth / 2), + Point(centreX + halfWidth, centreY + halfWidth / 2), + Point(centreX, centreY - halfWidth + halfWidth / 2), + }; + surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), + colourBG.allocated, colourBG.allocated); + } else { // Down arrow + Point pts[] = { + Point(centreX - halfWidth, centreY - halfWidth / 2), + Point(centreX + halfWidth, centreY - halfWidth / 2), + Point(centreX, centreY + halfWidth - halfWidth / 2), + }; + surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), + colourBG.allocated, colourBG.allocated); + } + } + xEnd = rcClient.right; + offsetMain = xEnd; + if (upArrow) { + rectUp = rcClient; + } else { + rectDown = rcClient; + } + } else if (IsTabCharacter(s[startSeg])) { + xEnd = NextTabPos(x); + } else { + xEnd = x + surface->WidthText(font, s + startSeg, endSeg - startSeg); + if (draw) { + rcClient.left = x; + rcClient.right = xEnd; + surface->DrawTextTransparent(rcClient, font, ytext, + s+startSeg, endSeg - startSeg, + highlight ? colourSel.allocated : colourUnSel.allocated); + } + } + x = xEnd; + startSeg = endSeg; + } + } +} + +int CallTip::PaintContents(Surface *surfaceWindow, bool draw) { + PRectangle rcClientPos = wCallTip.GetClientPosition(); + PRectangle rcClientSize(0, 0, rcClientPos.right - rcClientPos.left, + rcClientPos.bottom - rcClientPos.top); + PRectangle rcClient(1, 1, rcClientSize.right - 1, rcClientSize.bottom - 1); + + // To make a nice small call tip window, it is only sized to fit most normal characters without accents + int ascent = surfaceWindow->Ascent(font) - surfaceWindow->InternalLeading(font); + + // For each line... + // Draw the definition in three parts: before highlight, highlighted, after highlight + int ytext = rcClient.top + ascent + 1; + rcClient.bottom = ytext + surfaceWindow->Descent(font) + 1; + char *chunkVal = val; + bool moreChunks = true; + int maxWidth = 0; + + while (moreChunks) { + char *chunkEnd = strchr(chunkVal, '\n'); + if (chunkEnd == NULL) { + chunkEnd = chunkVal + strlen(chunkVal); + moreChunks = false; + } + int chunkOffset = chunkVal - val; + int chunkLength = chunkEnd - chunkVal; + int chunkEndOffset = chunkOffset + chunkLength; + int thisStartHighlight = Platform::Maximum(startHighlight, chunkOffset); + thisStartHighlight = Platform::Minimum(thisStartHighlight, chunkEndOffset); + thisStartHighlight -= chunkOffset; + int thisEndHighlight = Platform::Maximum(endHighlight, chunkOffset); + thisEndHighlight = Platform::Minimum(thisEndHighlight, chunkEndOffset); + thisEndHighlight -= chunkOffset; + rcClient.top = ytext - ascent - 1; + + int x = insetX; // start each line at this inset + + DrawChunk(surfaceWindow, x, chunkVal, 0, thisStartHighlight, + ytext, rcClient, false, draw); + DrawChunk(surfaceWindow, x, chunkVal, thisStartHighlight, thisEndHighlight, + ytext, rcClient, true, draw); + DrawChunk(surfaceWindow, x, chunkVal, thisEndHighlight, chunkLength, + ytext, rcClient, false, draw); + + chunkVal = chunkEnd + 1; + ytext += lineHeight; + rcClient.bottom += lineHeight; + maxWidth = Platform::Maximum(maxWidth, x); + } + return maxWidth; +} + +void CallTip::PaintCT(Surface *surfaceWindow) { + if (!val) + return; + PRectangle rcClientPos = wCallTip.GetClientPosition(); + PRectangle rcClientSize(0, 0, rcClientPos.right - rcClientPos.left, + rcClientPos.bottom - rcClientPos.top); + PRectangle rcClient(1, 1, rcClientSize.right - 1, rcClientSize.bottom - 1); + + surfaceWindow->FillRectangle(rcClient, colourBG.allocated); + + offsetMain = insetX; // initial alignment assuming no arrows + PaintContents(surfaceWindow, true); + +#ifndef __APPLE__ + // OSX doesn't put borders on "help tags" + // Draw a raised border around the edges of the window + surfaceWindow->MoveTo(0, rcClientSize.bottom - 1); + surfaceWindow->PenColour(colourShade.allocated); + surfaceWindow->LineTo(rcClientSize.right - 1, rcClientSize.bottom - 1); + surfaceWindow->LineTo(rcClientSize.right - 1, 0); + surfaceWindow->PenColour(colourLight.allocated); + surfaceWindow->LineTo(0, 0); + surfaceWindow->LineTo(0, rcClientSize.bottom - 1); +#endif +} + +void CallTip::MouseClick(Point pt) { + clickPlace = 0; + if (rectUp.Contains(pt)) + clickPlace = 1; + if (rectDown.Contains(pt)) + clickPlace = 2; +} + +PRectangle CallTip::CallTipStart(int pos, Point pt, const char *defn, + const char *faceName, int size, + int codePage_, int characterSet, Window &wParent) { + clickPlace = 0; + if (val) + delete []val; + val = new char[strlen(defn) + 1]; + if (!val) + return PRectangle(); + strcpy(val, defn); + codePage = codePage_; + Surface *surfaceMeasure = Surface::Allocate(); + if (!surfaceMeasure) + return PRectangle(); + surfaceMeasure->Init(wParent.GetID()); + surfaceMeasure->SetUnicodeMode(SC_CP_UTF8 == codePage); + surfaceMeasure->SetDBCSMode(codePage); + startHighlight = 0; + endHighlight = 0; + inCallTipMode = true; + posStartCallTip = pos; + int deviceHeight = surfaceMeasure->DeviceHeightFont(size); + font.Create(faceName, characterSet, deviceHeight, false, false); + // Look for multiple lines in the text + // Only support \n here - simply means container must avoid \r! + int numLines = 1; + const char *newline; + const char *look = val; + rectUp = PRectangle(0,0,0,0); + rectDown = PRectangle(0,0,0,0); + offsetMain = insetX; // changed to right edge of any arrows + int width = PaintContents(surfaceMeasure, false) + insetX; + while ((newline = strchr(look, '\n')) != NULL) { + look = newline + 1; + numLines++; + } + lineHeight = surfaceMeasure->Height(font); + + // Extra line for border and an empty line at top and bottom. The returned + // rectangle is aligned to the right edge of the last arrow encountered in + // the tip text, else to the tip text left edge. + int height = lineHeight * numLines - surfaceMeasure->InternalLeading(font) + 2 + 2; + delete surfaceMeasure; + return PRectangle(pt.x - offsetMain, pt.y + 1, pt.x + width - offsetMain, pt.y + 1 + height); +} + +void CallTip::CallTipCancel() { + inCallTipMode = false; + if (wCallTip.Created()) { + wCallTip.Destroy(); + } +} + +void CallTip::SetHighlight(int start, int end) { + // Avoid flashing by checking something has really changed + if ((start != startHighlight) || (end != endHighlight)) { + startHighlight = start; + endHighlight = end; + if (wCallTip.Created()) { + wCallTip.InvalidateAll(); + } + } +} + +// Set the tab size (sizes > 0 enable the use of tabs). This also enables the +// use of the STYLE_CALLTIP. +void CallTip::SetTabSize(int tabSz) { + tabSize = tabSz; + useStyleCallTip = true; +} + +// It might be better to have two access functions for this and to use +// them for all settings of colours. +void CallTip::SetForeBack(const ColourPair &fore, const ColourPair &back) { + colourBG = back; + colourUnSel = fore; +} Added: QScintillAS/src/CallTip.h =================================================================== --- QScintillAS/src/CallTip.h (rev 0) +++ QScintillAS/src/CallTip.h 2010-07-16 13:35:28 UTC (rev 50) @@ -0,0 +1,87 @@ +// Scintilla source code edit control +/** @file CallTip.h + ** Interface to the call tip control. + **/ +// Copyright 1998-2001 by Neil Hodgson <ne...@sc...> +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef CALLTIP_H +#define CALLTIP_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +/** + */ +class CallTip { + int startHighlight; // character offset to start and... + int endHighlight; // ...end of highlighted text + char *val; + Font font; + PRectangle rectUp; // rectangle of last up angle in the tip + PRectangle rectDown; // rectangle of last down arrow in the tip + int lineHeight; // vertical line spacing + int offsetMain; // The alignment point of the call tip + int tabSize; // Tab size in pixels, <=0 no TAB expand + bool useStyleCallTip; // if true, STYLE_CALLTIP should be used + + // Private so CallTip objects can not be copied + CallTip(const CallTip &) {} + CallTip &operator=(const CallTip &) { return *this; } + void DrawChunk(Surface *surface, int &x, const char *s, + int posStart, int posEnd, int ytext, PRectangle rcClient, + bool highlight, bool draw); + int PaintContents(Surface *surfaceWindow, bool draw); + bool IsTabCharacter(char c); + int NextTabPos(int x); + +public: + Window wCallTip; + Window wDraw; + bool inCallTipMode; + int posStartCallTip; + ColourPair colourBG; + ColourPair colourUnSel; + ColourPair colourSel; + ColourPair colourShade; + ColourPair colourLight; + int codePage; + int clickPlace; + + CallTip(); + ~CallTip(); + + /// Claim or accept palette entries for the colours required to paint a calltip. + void RefreshColourPalette(Palette &pal, bool want); + + void PaintCT(Surface *surfaceWindow); + + void MouseClick(Point pt); + + /// Setup the calltip and return a rectangle of the area required. + PRectangle CallTipStart(int pos, Point pt, const char *defn, + const char *faceName, int size, int codePage_, + int characterSet, Window &wParent); + + void CallTipCancel(); + + /// Set a range of characters to be displayed in a highlight style. + /// Commonly used to highlight the current parameter. + void SetHighlight(int start, int end); + + /// Set the tab size in pixels for the call tip. 0 or -ve means no tab expand. + void SetTabSize(int tabSz); + + /// Used to determine which STYLE_xxxx to use for call tip information + bool UseStyleCallTip() const { return useStyleCallTip;} + + // Modify foreground and background colours + void SetForeBack(const ColourPair &fore, const ColourPair &back); +}; + +#ifdef SCI_NAMESPACE +} +#endif + +#endif Added: QScintillAS/src/CellBuffer.cpp =================================================================== --- QScintillAS/src/CellBuffer.cpp (rev 0) +++ QScintillAS/src/CellBuffer.cpp 2010-07-16 13:35:28 UTC (rev 50) @@ -0,0 +1,939 @@ +// Scintilla source code edit control +/** @file CellBuffer.cxx + ** Manages a buffer of cells. + **/ +// Copyright 1998-2001 by Neil Hodgson <ne...@sc...> +// The License.txt file describes the conditions under which this software may be distributed. + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <stdarg.h> + +#include "Platform.h" + +#include "Scintilla.h" +#include "SplitVector.h" +#include "Partitioning.h" +#include "CellBuffer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +MarkerHandleSet::MarkerHandleSet() { + root = 0; +} + +MarkerHandleSet::~MarkerHandleSet() { + MarkerHandleNumber *mhn = root; + while (mhn) { + MarkerHandleNumber *mhnToFree = mhn; + mhn = mhn->next; + delete mhnToFree; + } + root = 0; +} + +int MarkerHandleSet::Length() const { + int c = 0; + MarkerHandleNumber *mhn = root; + while (mhn) { + c++; + mhn = mhn->next; + } + return c; +} + +int MarkerHandleSet::NumberFromHandle(int handle) const { + MarkerHandleNumber *mhn = root; + while (mhn) { + if (mhn->handle == handle) { + return mhn->number; + } + mhn = mhn->next; + } + return - 1; +} + +int MarkerHandleSet::MarkValue() const { + unsigned int m = 0; + MarkerHandleNumber *mhn = root; + while (mhn) { + m |= (1 << mhn->number); + mhn = mhn->next; + } + return m; +} + +bool MarkerHandleSet::Contains(int handle) const { + MarkerHandleNumber *mhn = root; + while (mhn) { + if (mhn->handle == handle) { + return true; + } + mhn = mhn->next; + } + return false; +} + +bool MarkerHandleSet::InsertHandle(int handle, int markerNum) { + MarkerHandleNumber *mhn = new MarkerHandleNumber; + if (!mhn) + return false; + mhn->handle = handle; + mhn->number = markerNum; + mhn->next = root; + root = mhn; + return true; +} + +void MarkerHandleSet::RemoveHandle(int handle) { + MarkerHandleNumber **pmhn = &root; + while (*pmhn) { + MarkerHandleNumber *mhn = *pmhn; + if (mhn->handle == handle) { + *pmhn = mhn->next; + delete mhn; + return; + } + pmhn = &((*pmhn)->next); + } +} + +bool MarkerHandleSet::RemoveNumber(int markerNum) { + bool performedDeletion = false; + MarkerHandleNumber **pmhn = &root; + while (*pmhn) { + MarkerHandleNumber *mhn = *pmhn; + if (mhn->number == markerNum) { + *pmhn = mhn->next; + delete mhn; + performedDeletion = true; + } else { + pmhn = &((*pmhn)->next); + } + } + return performedDeletion; +} + +void MarkerHandleSet::CombineWith(MarkerHandleSet *other) { + MarkerHandleNumber **pmhn = &root; + while (*pmhn) { + pmhn = &((*pmhn)->next); + } + *pmhn = other->root; + other->root = 0; +} + +LineVector::LineVector() : starts(256) { + handleCurrent = 1; + + Init(); +} + +LineVector::~LineVector() { + starts.DeleteAll(); + for (int line = 0; line < markers.Length(); line++) { + delete markers[line]; + markers[line] = 0; + } + markers.DeleteAll(); + levels.DeleteAll(); +} + +void LineVector::Init() { + starts.DeleteAll(); + for (int line = 0; line < markers.Length(); line++) { + delete markers[line]; + markers[line] = 0; + } + markers.DeleteAll(); + levels.DeleteAll(); +} + +void LineVector::ExpandLevels(int sizeNew) { + levels.InsertValue(levels.Length(), sizeNew - levels.Length(), SC_FOLDLEVELBASE); +} + +void LineVector::ClearLevels() { + levels.DeleteAll(); +} + +int LineVector::SetLevel(int line, int level) { + int prev = 0; + if ((line >= 0) && (line < Lines())) { + if (!levels.Length()) { + ExpandLevels(Lines() + 1); + } + prev = levels[line]; + if (prev != level) { + levels[line] = level; + } + } + return prev; +} + +int LineVector::GetLevel(int line) { + if (levels.Length() && (line >= 0) && (line < Lines())) { + return levels[line]; + } else { + return SC_FOLDLEVELBASE; + } +} + +void LineVector::InsertText(int line, int delta) { + starts.InsertText(line, delta); +} + +void LineVector::InsertLine(int line, int position) { + starts.InsertPartition(line, position); + if (markers.Length()) { + markers.Insert(line, 0); + } + if (levels.Length()) { + int level = SC_FOLDLEVELBASE; + if ((line > 0) && (line < Lines())) { + level = levels[line-1] & ~SC_FOLDLEVELWHITEFLAG; + } + levels.InsertValue(line, 1, level); + } +} + +void LineVector::SetLineStart(int line, int position) { + starts.SetPartitionStartPosition(line, position); +} + +void LineVector::RemoveLine(int line) { + starts.RemovePartition(line); + // Retain the markers from the deleted line by oring them into the previous line + if (markers.Length()) { + if (line > 0) { + MergeMarkers(line - 1); + } + markers.Delete(line); + } + if (levels.Length()) { + // Move up following lines but merge header flag from this line + // to line before to avoid a temporary disappearence causing expansion. + int firstHeader = levels[line] & SC_FOLDLEVELHEADERFLAG; + levels.Delete(line); + if (line > 0) + levels[line-1] |= firstHeader; + } +} + +int LineVector::LineFromPosition(int pos) { + return starts.PartitionFromPosition(pos); +} + +int LineVector::MarkValue(int line) { + if (markers.Length() && markers[line]) + return markers[line]->MarkValue(); + else + return 0; +} + +int LineVector::AddMark(int line, int markerNum) { + handleCurrent++; + if (!markers.Length()) { + // No existing markers so allocate one element per line + markers.InsertValue(0, Lines(), 0); + } + if (!markers[line]) { + // Need new structure to hold marker handle + markers[line] = new MarkerHandleSet(); + if (!markers[line]) + return - 1; + } + markers[line]->InsertHandle(handleCurrent, markerNum); + + return handleCurrent; +} + +void LineVector::MergeMarkers(int pos) { + if (markers[pos + 1] != NULL) { + if (markers[pos] == NULL) + markers[pos] = new MarkerHandleSet; + markers[pos]->CombineWith(markers[pos + 1]); + delete markers[pos + 1]; + markers[pos + 1] = NULL; + } +} + +void LineVector::DeleteMark(int line, int markerNum, bool all) { + if (markers.Length() && markers[line]) { + if (markerNum == -1) { + delete markers[line]; + markers[line] = NULL; + } else { + bool performedDeletion = markers[line]->RemoveNumber(markerNum); + while (all && performedDeletion) { + performedDeletion = markers[line]->RemoveNumber(markerNum); + } + if (markers[line]->Length() == 0) { + delete markers[line]; + markers[line] = NULL; + } + } + } +} + +void LineVector::DeleteMarkFromHandle(int markerHandle) { + int line = LineFromHandle(markerHandle); + if (line >= 0) { + markers[line]->RemoveHandle(markerHandle); + if (markers[line]->Length() == 0) { + delete markers[line]; + markers[line] = NULL; + } + } +} + +int LineVector::LineFromHandle(int markerHandle) { + if (markers.Length()) { + for (int line = 0; line < Lines(); line++) { + if (markers[line]) { + if (markers[line]->Contains(markerHandle)) { + return line; + } + } + } + } + return -1; +} + +Action::Action() { + at = startAction; + position = 0; + data = 0; + lenData = 0; +} + +Action::~Action() { + Destroy(); +} + +void Action::Create(actionType at_, int position_, char *data_, int lenData_, bool mayCoalesce_) { + delete []data; + position = position_; + at = at_; + data = data_; + lenData = lenData_; + mayCoalesce = mayCoalesce_; +} + +void Action::Destroy() { + delete []data; + data = 0; +} + +void Action::Grab(Action *source) { + delete []data; + + position = source->position; + at = source->at; + data = source->data; + lenData = source->lenData; + mayCoalesce = source->mayCoalesce; + + // Ownership of source data transferred to this + source->position = 0; + source->at = startAction; + source->data = 0; + source->lenData = 0; + source->mayCoalesce = true; +} + +// The undo history stores a sequence of user operations that represent the user's view of the +// commands executed on the text. +// Each user operation contains a sequence of text insertion and text deletion actions. +// All the user operations are stored in a list of individual actions with 'start' actions used +// as delimiters between user operations. +// Initially there is one start action in the history. +// As each action is performed, it is recorded in the history. The action may either become +// part of the current user operation or may start a new user operation. If it is to be part of the +// current operation, then it overwrites the current last action. If it is to be part of a new +// operation, it is appended after the current last action. +// After writing the new action, a new start action is appended at the end of the history. +// The decision of whether to start a new user operation is based upon two factors. If a +// compound operation has been explicitly started by calling BeginUndoAction and no matching +// EndUndoAction (these calls nest) has been called, then the action is coalesced into the current +// operation. If there is no outstanding BeginUndoAction call then a new operation is started +// unless it looks as if the new action is caused by the user typing or deleting a stream of text. +// Sequences that look like typing or deletion are coalesced into a single user operation. + +UndoHistory::UndoHistory() { + + lenActions = 100; + actions = new Action[lenActions]; + maxAction = 0; + currentAction = 0; + undoSequenceDepth = 0; + savePoint = 0; + + actions[currentAction].Create(startAction); +} + +UndoHistory::~UndoHistory() { + delete []actions; + actions = 0; +} + +void UndoHistory::EnsureUndoRoom() { + // Have to test that there is room for 2 more actions in the array + // as two actions may be created by the calling function + if (currentAction >= (lenActions - 2)) { + // Run out of undo nodes so extend the array + int lenActionsNew = lenActions * 2; + Action *actionsNew = new Action[lenActionsNew]; + if (!actionsNew) + return; + for (int act = 0; act <= currentAction; act++) + actionsNew[act].Grab(&actions[act]); + delete []actions; + lenActions = lenActionsNew; + actions = actionsNew; + } +} + +void UndoHistory::AppendAction(actionType at, int position, char *data, int lengthData, + bool &startSequence) { + EnsureUndoRoom(); + //Platform::DebugPrintf("%% %d action %d %d %d\n", at, position, lengthData, currentAction); + //Platform::DebugPrintf("^ %d action %d %d\n", actions[currentAction - 1].at, + // actions[currentAction - 1].position, actions[currentAction - 1].lenData); + if (currentAction < savePoint) { + savePoint = -1; + } + int oldCurrentAction = currentAction; + if (currentAction >= 1) { + if (0 == undoSequenceDepth) { + // Top level actions may not always be coalesced + Action &actPrevious = actions[currentAction - 1]; + // See if current action can be coalesced into previous action + // Will work if both are inserts or deletes and position is same + if (at != actPrevious.at) { + currentAction++; + } else if (currentAction == savePoint) { + currentAction++; + } else if ((at == insertAction) && + (position != (actPrevious.position + actPrevious.lenData))) { + // Insertions must be immediately after to coalesce + currentAction++; + } else if (!actions[currentAction].mayCoalesce) { + // Not allowed to coalesce if this set + currentAction++; + } else if (at == removeAction) { + if ((lengthData == 1) || (lengthData == 2)){ + if ((position + lengthData) == actPrevious.position) { + ; // Backspace -> OK + } else if (position == actPrevious.position) { + ; // Delete -> OK + } else { + // Removals must be at same position to coalesce + currentAction++; + } + } else { + // Removals must be of one character to coalesce + currentAction++; + } + } else { + // Action coalesced. + } + + } else { + // Actions not at top level are always coalesced unless this is after return to top level + if (!actions[currentAction].mayCoalesce) + currentAction++; + } + } else { + currentAction++; + } + startSequence = oldCurrentAction != currentAction; + actions[currentAction].Create(at, position, data, lengthData); + currentAction++; + actions[currentAction].Create(startAction); + maxAction = currentAction; +} + +void UndoHistory::BeginUndoAction() { + EnsureUndoRoom(); + if (undoSequenceDepth == 0) { + if (actions[currentAction].at != startAction) { + currentAction++; + actions[currentAction].Create(startAction); + maxAction = currentAction; + } + actions[currentAction].mayCoalesce = false; + } + undoSequenceDepth++; +} + +void UndoHistory::EndUndoAction() { + PLATFORM_ASSERT(undoSequenceDepth > 0); + EnsureUndoRoom(); + undoSequenceDepth--; + if (0 == undoSequenceDepth) { + if (actions[currentAction].at != startAction) { + currentAction++; + actions[currentAction].Create(startAction); + maxAction = currentAction; + } + actions[currentAction].mayCoalesce = false; + } +} + +void UndoHistory::DropUndoSequence() { + undoSequenceDepth = 0; +} + +void UndoHistory::DeleteUndoHistory() { + for (int i = 1; i < maxAction; i++) + actions[i].Destroy(); + maxAction = 0; + currentAction = 0; + actions[currentAction].Create(startAction); + savePoint = 0; +} + +void UndoHistory::SetSavePoint() { + savePoint = currentAction; +} + +bool UndoHistory::IsSavePoint() const { + return savePoint == currentAction; +} + +bool UndoHistory::CanUndo() const { + return (currentAction > 0) && (maxAction > 0); +} + +int UndoHistory::StartUndo() { + // Drop any trailing startAction + if (actions[currentAction].at == startAction && currentAction > 0) + currentAction--; + + // Count the steps in this action + int act = currentAction; + while (actions[act].at != startAction && act > 0) { + act--; + } + return currentAction - act; +} + +const Action &UndoHistory::GetUndoStep() const { + return actions[currentAction]; +} + +void UndoHistory::CompletedUndoStep() { + currentAction--; +} + +bool UndoHistory::CanRedo() const { + return maxAction > currentAction; +} + +int UndoHistory::StartRedo() { + // Drop any leading startAction + if (actions[currentAction].at == startAction && currentAction < maxAction) + currentAction++; + + // Count the steps in this action + int act = currentAction; + while (actions[act].at != startAction && act < maxAction) { + act++; + } + return act - currentAction; +} + +const Action &UndoHistory::GetRedoStep() const { + return actions[currentAction]; +} + +void UndoHistory::CompletedRedoStep() { + currentAction++; +} + +CellBuffer::CellBuffer() { + readOnly = false; + collectingUndo = true; +} + +CellBuffer::~CellBuffer() { +} + +char CellBuffer::CharAt(int position) const { + return substance.ValueAt(position); +} + +void CellBuffer::GetCharRange(char *buffer, int position, int lengthRetrieve) { + if (lengthRetrieve < 0) + return; + if (position < 0) + return; + if ((position + lengthRetrieve) > substance.Length()) { + Platform::DebugPrintf("Bad GetCharRange %d for %d of %d\n", position, + lengthRetrieve, substance.Length()); + return; + } + + for (int i=0; i<lengthRetrieve; i++) { + *buffer++ = substance.ValueAt(position + i); + } +} + +char CellBuffer::StyleAt(int position) { + return style.ValueAt(position); +} + +const char *CellBuffer::BufferPointer() { + return substance.BufferPointer(); +} + +// The char* returned is to an allocation owned by the undo history +const char *CellBuffer::InsertString(int position, const char *s, int insertLength, bool &startSequence) { + char *data = 0; + // InsertString and DeleteChars are the bottleneck though which all changes occur + if (!readOnly) { + if (collectingUndo) { + // Save into the undo/redo stack, but only the characters - not the formatting + // This takes up about half load time + data = new char[insertLength]; + for (int i = 0; i < insertLength; i++) { + data[i] = s[i]; + } + uh.AppendAction(insertAction, position, data, insertLength, startSequence); + } + + BasicInsertString(position, s, insertLength); + } + return data; +} + +bool CellBuffer::SetStyleAt(int position, char styleValue, char mask) { + styleValue &= mask; + char curVal = style.ValueAt(position); + if ((curVal & mask) != styleValue) { + style.SetValueAt(position, static_cast<char>((curVal & ~mask) | styleValue)); + return true; + } else { + return false; + } +} + +bool CellBuffer::SetStyleFor(int position, int lengthStyle, char styleValue, char mask) { + bool changed = false; + PLATFORM_ASSERT(lengthStyle == 0 || + (lengthStyle > 0 && lengthStyle + position <= style.Length())); + while (lengthStyle--) { + char curVal = style.ValueAt(position); + if ((curVal & mask) != styleValue) { + style.SetValueAt(position, static_cast<char>((curVal & ~mask) | styleValue)); + changed = true; + } + position++; + } + return changed; +} + +// The char* returned is to an allocation owned by the undo history +const char *CellBuffer::DeleteChars(int position, int deleteLength, bool &startSequence) { + // InsertString and DeleteChars are the bottleneck though which all changes occur + PLATFORM_ASSERT(deleteLength > 0); + char *data = 0; + if (!readOnly) { + if (collectingUndo) { + // Save into the undo/redo stack, but only the characters - not the formatting + data = new char[deleteLength]; + for (int i = 0; i < deleteLength; i++) { + data[i] = substance.ValueAt(position + i); + } + uh.AppendAction(removeAction, position, data, deleteLength, startSequence); + } + + BasicDeleteChars(position, deleteLength); + } + return data; +} + +int CellBuffer::Length() const { + return substance.Length(); +} + +void CellBuffer::Allocate(int newSize) { + substance.ReAllocate(newSize); + style.ReAllocate(newSize); +} + +int CellBuffer::Lines() const { + return lv.Lines(); +} + +int CellBuffer::LineStart(int line) const { + if (line < 0) + return 0; + else if (line >= Lines()) + return Length(); + else + return lv.LineStart(line); +} + +bool CellBuffer::IsReadOnly() { + return readOnly; +} + +void CellBuffer::SetReadOnly(bool set) { + readOnly = set; +} + +void CellBuffer::SetSavePoint() { + uh.SetSavePoint(); +} + +bool CellBuffer::IsSavePoint() { + return uh.IsSavePoint(); +} + +int CellBuffer::AddMark(int line, int markerNum) { + if ((line >= 0) && (line < Lines())) { + return lv.AddMark(line, markerNum); + } + return - 1; +} + +void CellBuffer::DeleteMark(int line, int markerNum) { + if ((line >= 0) && (line < Lines())) { + lv.DeleteMark(line, markerNum, false); + } +} + +void CellBuffer::DeleteMarkFromHandle(int markerHandle) { + lv.DeleteMarkFromHandle(markerHandle); +} + +int CellBuffer::GetMark(int line) { + if ((line >= 0) && (line < Lines())) + return lv.MarkValue(line); + return 0; +} + +void CellBuffer::DeleteAllMarks(int markerNum) { + for (int line = 0; line < Lines(); line++) { + lv.DeleteMark(line, markerNum, true); + } +} + +int CellBuffer::LineFromHandle(int markerHandle) { + return lv.LineFromHandle(markerHandle); +} + +// Without undo + +void CellBuffer::InsertLine(int line, int position) { + lv.InsertLine(line, position); + if (lineStates.Length()) { + lineStates.EnsureLength(line); + lineStates.Insert(line, 0); + } +} + +void CellBuffer::RemoveLine(int line) { + lv.RemoveLine(line); + if (lineStates.Length() > line) { + lineStates.Delete(line); + } +} + +void CellBuffer::BasicInsertString(int position, const char *s, int insertLength) { + if (insertLength == 0) + return; + PLATFORM_ASSERT(insertLength > 0); + + substance.InsertFromArray(position, s, 0, insertLength); + style.InsertValue(position, insertLength, 0); + + int lineInsert = lv.LineFromPosition(position) + 1; + // Point all the lines after the insertion point further along in the buffer + lv.InsertText(lineInsert-1, insertLength); + char chPrev = substance.ValueAt(position - 1); + char chAfter = substance.ValueAt(position + insertLength); + if (chPrev == '\r' && chAfter == '\n') { + // Splitting up a crlf pair at position + InsertLine(lineInsert, position); + lineInsert++; + } + char ch = ' '; + for (int i = 0; i < insertLength; i++) { + ch = s[i]; + if (ch == '\r') { + InsertLine(lineInsert, (position + i) + 1); + lineInsert++; + } else if (ch == '\n') { + if (chPrev == '\r') { + // Patch up what was end of line + lv.SetLineStart(lineInsert - 1, (position + i) + 1); + } else { + InsertLine(lineInsert, (position + i) + 1); + lineInsert++; + } + } + chPrev = ch; + } + // Joining two lines where last insertion is cr and following substance starts with lf + if (chAfter == '\n') { + if (ch == '\r') { + // End of line already in buffer so drop the newly created one + RemoveLine(lineInsert - 1); + } + } +} + +void CellBuffer::BasicDeleteChars(int position, int deleteLength) { + if (deleteLength == 0) + return; + + if ((position == 0) && (deleteLength == substance.Length())) { + // If whole buffer is being deleted, faster to reinitialise lines data + // than to delete each line. + lv.Init(); + } else { + // Have to fix up line positions before doing deletion as looking at text in buffer + // to work out which lines have been removed + + int lineRemove = lv.LineFromPosition(position) + 1; + lv.InsertText(lineRemove-1, - (deleteLength)); + char chPrev = substance.ValueAt(position - 1); + char chBefore = chPrev; + char chNext = substance.ValueAt(position); + bool ignoreNL = false; + if (chPrev == '\r' && chNext == '\n') { + // Move back one + lv.SetLineStart(lineRemove, position); + lineRemove++; + ignoreNL = true; // First \n is not real deletion + } + + char ch = chNext; + for (int i = 0; i < deleteLength; i++) { + chNext = substance.ValueAt(position + i + 1); + if (ch == '\r') { + if (chNext != '\n') { + RemoveLine(lineRemove); + } + } else if (ch == '\n') { + if (ignoreNL) { + ignoreNL = false; // Further \n are real deletions + } else { + RemoveLine(lineRemove); + } + } + + ch = chNext; + } + // May have to fix up end if last deletion causes cr to be next to lf + // or removes one of a crlf pair + char chAfter = substance.ValueAt(position + deleteLength); + if (chBefore == '\r' && chAfter == '\n') { + // Using lineRemove-1 as cr ended line before start of deletion + RemoveLine(lineRemove - 1); + lv.SetLineStart(lineRemove - 1, position + 1); + } + } + substance.DeleteRange(position, deleteLength); + style.DeleteRange(position, deleteLength); +} + +bool CellBuffer::SetUndoCollection(bool collectUndo) { + collectingUndo = collectUndo; + uh.DropUndoSequence(); + return collectingUndo; +} + +bool CellBuffer::IsCollectingUndo() { + return collectingUndo; +} + +void CellBuffer::BeginUndoAction() { + uh.BeginUndoAction(); +} + +void CellBuffer::EndUndoAction() { + uh.EndUndoAction(); +} + +void CellBuffer::DeleteUndoHistory() { + uh.DeleteUndoHistory(); +} + +bool CellBuffer::CanUndo() { + return uh.CanUndo(); +} + +int CellBuffer::StartUndo() { + return uh.StartUndo(); +} + +const Action &CellBuffer::GetUndoStep() const { + return uh.GetUndoStep(); +} + +void CellBuffer::PerformUndoStep() { + const Action &actionStep = uh.GetUndoStep(); + if (actionStep.at == insertAction) { + BasicDeleteChars(actionStep.position, actionStep.lenData); + } else if (actionStep.at == removeAction) { + BasicInsertString(actionStep.position, actionStep.data, actionStep.lenData); + } + uh.CompletedUndoStep(); +} + +bool CellBuffer::CanRedo() { + return uh.CanRedo(); +} + +int CellBuffer::StartRedo() { + return uh.StartRedo(); +} + +const Action &CellBuffer::GetRedoStep() const { + return uh.GetRedoStep(); +} + +void CellBuffer::PerformRedoStep() { + const Action &actionStep = uh.GetRedoStep(); + if (actionStep.at == insertAction) { + BasicInsertString(actionStep.position, actionStep.data, actionStep.lenData); + } else if (actionStep.at == removeAction) { + BasicDeleteChars(actionStep.position, actionStep.lenData); + } + uh.CompletedRedoStep(); +} + +int CellBuffer::SetLineState(int line, int state) { + lineStates.EnsureLength(line + 1); + int stateOld = lineStates[line]; + lineStates[line] = state; + return stateOld; +} + +int CellBuffer::GetLineState(int line) { + lineStates.EnsureLength(line + 1); + return lineStates[line]; +} + +int CellBuffer::GetMaxLineState() { + return lineStates.Length(); +} + +int CellBuffer::SetLevel(int line, int level) { + return lv.SetLevel(line, level); +} + +int CellBuffer::GetLevel(int line) { + return lv.GetLevel(line); +} + +void CellBuffer::ClearLevels() { + lv.ClearLevels(); +} Added: QScintillAS/src/CellBuffer.h =================================================================== --- QScintillAS/src/CellBuffer.h (rev 0) +++ QScintillAS/src/CellBuffer.h 2010-07-16 13:35:28 UTC (rev 50) @@ -0,0 +1,242 @@ +// Scintilla source code edit control +/** @file CellBuffer.h + ** Manages the text of the document. + **/ +// Copyright 1998-2004 by Neil Hodgson <ne...@sc...> +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef CELLBUFFER_H +#define CELLBUFFER_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +/** + * This holds the marker identifier and the marker type to display. + * MarkerHandleNumbers are members of lists. + */ +struct MarkerHandleNumber { + int handle; + int number; + MarkerHandleNumber *next; +}; + +/** + * A marker handle set contains any number of MarkerHandleNumbers. + */ +class MarkerHandleSet { + MarkerHandleNumber *root; + +public: + MarkerHandleSet(); + ~MarkerHandleSet(); + int Length() const; + int NumberFromHandle(int handle) const; + int MarkValue() const; ///< Bit set of marker numbers. + bool Contains(int handle) const; + bool InsertHandle(int handle, int markerNum); + void RemoveHandle(int handle); + bool RemoveNumber(int markerNum); + void CombineWith(MarkerHandleSet *other); +}; + +/** + * The line vector contains information about each of the lines in a cell buffer. + */ +class LineVector { + + Partitioning starts; + SplitVector<MarkerHandleSet *> markers; + SplitVector<int> levels; + /// Handles are allocated sequentially and should never have to be reused as 32 bit ints are very big. + int handleCurrent; + +public: + + LineVector(); + ~LineVector(); + void Init(); + + void ExpandLevels(int sizeNew=-1); + void ClearLevels(); + int SetLevel(int line, int level); + int GetLevel(int line); + + void InsertText(int line, int delta); + void InsertLine(int line, int position); + void SetLineStart(int line, int position); + void RemoveLine(int line); + int Lines() const { + return starts.Partitions(); + } + int LineFromPosition(int pos); + int LineStart(int line) const { + return starts.PositionFromPartition(line); + } + + int MarkValue(int line); + int AddMark(int line, int marker); + void MergeMarkers(int pos); + void DeleteMark(int line, int markerNum, bool all); + void DeleteMarkFromHandle(int markerHandle); + int LineFromHandle(int markerHandle); +}; + +enum actionType { insertAction, removeAction, startAction }; + +/** + * Actions are used to store all the information required to perform one undo/redo step. + */ +class Action { +public: + actionType at; + int position; + char *data; + int lenData; + bool mayCoalesce; + + Action(); + ~Action(); + void Create(actionType at_, int position_=0, char *data_=0, int lenData_=0, bool mayCoalesce_=true); + void Destroy(); + void Grab(Action *source); +}; + +/** + * + */ +class UndoHistory { + Action *actions; + int lenActions; + int maxAction; + int currentAction; + int undoSequenceDepth; + int savePoint; + + void EnsureUndoRoom(); + +public: + UndoHistory(); + ~UndoHistory(); + + void AppendAction(actionType at, int position, char *data, int length, bool &startSequence); + + void BeginUndoAction(); + void EndUndoAction(); + void DropUndoSequence(); + void DeleteUndoHistory(); + + /// The save point is a marker in the undo stack where the container has stated that + /// the buffer was saved. Undo and redo can move over the save point. + void SetSavePoint(); + bool IsSavePoint() const; + + /// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is + /// called that many times. Similarly for redo. + bool CanUndo() const; + int StartUndo(); + const Action &GetUndoStep() const; + void CompletedUndoStep(); + bool CanRedo() const; + int StartRedo(); + const Action &GetRedoStep() const; + void CompletedRedoStep(); +}; + +/** + * Holder for an expandable array of characters that supports undo and line markers. + * Based on article "Data Structures in a Bit-Mapped Text Editor" + * by Wilfred J. Hansen, Byte January 1987, page 183. + */ +class CellBuffer { +private: + SplitVector<char> substance; + SplitVector<char> style; + bool readOnly; + + bool collectingUndo; + UndoHistory uh; + + LineVector lv; + + SplitVector<int> lineStates; + +public: + + CellBuffer(); + ~CellBuffer(); + + /// Retrieving positions outside the range of the buffer works and returns 0 + char CharAt(int position) const; + void GetCharRange(char *buffer, int position, int lengthRetrieve); + char StyleAt(int position); + const char *BufferPointer(); + + int Length() const; + void Allocate(int newSize); + int Lines() const; + int LineStart(int line) const; + int LineFromPosition(int pos) { return lv.LineFromPosition(pos); } + void InsertLine(int line, int position); + void RemoveLine(int line); + const char *InsertString(int position, const char *s, int insertLength, bool &startSequence); + + /// Setting styles for positions outside the range of the buffer is safe and has no effect. + /// @return true if the style of a character is changed. + bool SetStyleAt(int position, char styleValue, char mask='\377'); + bool SetStyleFor(int position, int length, char styleValue, char mask); + + const char *DeleteChars(int position, int deleteLength, bool &startSequence); + + bool IsReadOnly(); + void SetReadOnly(bool set); + + /// The save point is a marker in the undo stack where the container has stated that + /// the buffer was saved. Undo and redo can move over the save point. + void SetSavePoint(); + bool IsSavePoint(); + + /// Line marker functions + int AddMark(int line, int markerNum); + void DeleteMark(int line, int markerNum); + void DeleteMarkFromHandle(int markerHandle); + int GetMark(int line); + void DeleteAllMarks(int markerNum); + int LineFromHandle(int markerHandle); + + /// Actions without undo + void BasicInsertString(int position, const char *s, int insertLength); + void BasicDeleteChars(int position, int deleteLength); + + bool SetUndoCollection(bool collectUndo); + bool IsCollectingUndo(); + void BeginUndoAction(); + void EndUndoAction(); + void DeleteUndoHistory(); + + /// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is + /// called that many times. Similarly for redo. + bool CanUndo(); + int StartUndo(); + const Action &GetUndoStep() const; + void PerformUndoStep(); + bool CanRedo(); + int StartRedo(); + const Action &GetRedoStep() const; + void PerformRedoStep(); + + int SetLineState(int line, int state); + int GetLineState(int line); + int GetMaxLineState(); + + int SetLevel(int line, int level); + int GetLevel(int line); + void ClearLevels(); +}; + +#ifdef SCI_NAMESPACE +} +#endif + +#endif Added: QScintillAS/src/CharClassify.cpp =================================================================== --- QScintillAS/src/CharClassify.cpp (rev 0) +++ QScintillAS/src/CharClassify.cpp 2010-07-16 13:35:28 UTC (rev 50) @@ -0,0 +1,43 @@ +// Scintilla source code edit control +/** @file CharClassify.cxx + ** Character classifications used by Document and RESearch. + **/ +// Copyright 2006 by Neil Hodgson <ne...@sc...> +// The License.txt file describes the conditions under which this software may be distributed. + +#include <ctype.h> + +#include "CharClassify.h" + +// Shut up annoying Visual C++ warnings: +#ifdef _MSC_VER +#pragma warning(disable: 4514) +#endif + +CharClassify::CharClassify() { + SetDefaultCharClasses(true); +} + +void CharClassify::SetDefaultCharClasses(bool includeWordClass) { + // Initialize all char classes to default values + for (int ch = 0; ch < 256; ch++) { + if (ch == '\r' || ch == '\n') + charClass[ch] = ccNewLine; + else if (ch < 0x20 || ch == ' ') + charClass[ch] = ccSpace; + else if (includeWordClass && (ch >= 0x80 || isalnum(ch) || ch == '_')) + charClass[ch] = ccWord; + else + charClass[ch] = ccPunctuation; + } +} + +void CharClassify::SetCharClasses(const unsigned char *chars, cc newCharClass) { + // Apply the newCharClass to the specifed chars + if (chars) { + while (*chars) { + charClass[*chars] = static_cast<unsigned char>(newCharClass); + chars++; + } + } +} Added: QScintillAS/src/CharClassify.h =================================================================== --- QScintillAS/src/CharClassify.h (rev 0) +++ QScintillAS/src/CharClassify.h 2010-07-16 13:35:28 UTC (rev 50) @@ -0,0 +1,25 @@ +// Scintilla source code edit control +/** @file CharClassify.h + ** Character classifications used by Document and RESearch. + **/ +// Copyright 2006 by Neil Hodgson <ne...@sc...> +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef CHARCLASSIFY_H +#define CHARCLASSIFY_H + +class CharClassify { +public: + CharClassify(); + + enum cc { ccSpace, ccNewLine, ccWord, ccPunctuation }; + void SetDefaultCharClasses(bool includeWordClass); + void SetCharClasses(const unsigned char *chars, cc newCharClass); + cc GetClass(unsigned char ch) const { return static_cast<cc>(charClass[ch]);} + bool IsWord(unsigned char ch) const { return static_cast<cc>(charClass[ch]) == ccWord;} + +private: + enum { maxChar=256 }; + unsigned char charClass[maxChar]; // not type cc to save space +}; +#endif Added: QScintillAS/src/CharacterSet.h =================================================================== --- QScintillAS/src/CharacterSet.h (rev 0) +++ QScintillAS/src/CharacterSet.h 2010-07-16 13:35:28 UTC (rev 50) @@ -0,0 +1,58 @@ +// Scintilla source code edit control +/** @file CharacterSet.h + ** Encapsulates a set of characters. Used to test if a character is within a set. + **/ +// Copyright 2007 by Neil Hodgson <ne...@sc...> +// The License.txt file describes the conditions under which this software may be distributed. + +class CharacterSet { + int size; + bool valueAfter; + bool *bset; +public: + enum setBase { + setNone=0, + setLower=1, + setUpper=2, + setDigits=4, + setAlpha=setLower|setUpper, + setAlphaNum=setAlpha|setDigits + }; + CharacterSet(setBase base=setNone, const char *initialSet="", int size_=0x80, bool valueAfter_=false) { + size = size_; + valueAfter = valueAfter_; + bset = new bool[size]; + for (int i=0; i < size; i++) { + bset[i] = false; + } + AddString(initialSet); + if (base & setLower) + AddString("abcdefghijklmnopqrstuvwxyz"); + if (base & setUpper) + AddString("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); + if (base & setDigits) + AddString("0123456789"); + } + ~CharacterSet() { + delete []bset; + bset = 0; + size = 0; + } + void Add(int val) { + PLATFORM_ASSERT(val >= 0); + PLATFORM_ASSERT(val < size); + bset[val] = true; + } + void AddString(const char *CharacterSet) { + for (const char *cp=CharacterSet; *cp; cp++) { + int val = static_cast<unsigned char>(*cp); + PLATFORM_ASSERT(val >= 0); + PLATFORM_ASSERT(val < size); + bset[val] = true; + } + } + bool Contains(int val) const { + PLATFORM_ASSERT(val >= 0); + return (val < size) ? bset[val] : valueAfter; + } +}; Added: QScintillAS/src/ContractionState.cpp =================================================================== --- QScintillAS/src/ContractionState.cpp (rev 0) +++ QScintillAS/src/ContractionState.cpp 2010-07-16 13:35:28 UTC (rev 50) @@ -0,0 +1,251 @@ +// Scintilla source code edit control +/** @file ContractionState.cxx + ** Manages visibility of lines for folding and wrapping. + **/ +// Copyright 1998-2007 by Neil Hodgson <ne...@sc...> +// The License.txt file describes the conditions under which this software may be distributed. + +#include <string.h> + +#include "Platform.h" + +#include "SplitVector.h" +#include "Partitioning.h" +#include "RunStyles.h" +#include "ContractionState.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +ContractionState::ContractionState() : visible(0), expanded(0), heights(0), displayLines(0), linesInDocument(1) { + //InsertLine(0); +} + +ContractionState::~ContractionState() { + Clear(); +} + +void ContractionState::EnsureData() { + if (OneToOne()) { + visible = new RunStyles(); + expanded = new RunStyles(); + heights = new RunStyles(); + displayLines = new Partitioning(4); + InsertLines(0, linesInDocument); + } +} + +void ContractionState::Clear() { + delete visible; + visible = 0; + delete expanded; + expanded = 0; + delete heights; + heights = 0; + delete displayLines; + displayLines = 0; + linesInDocument = 1; +} + +int ContractionState::LinesInDoc() const { + if (OneToOne()) { + return linesInDocument; + } else { + return displayLines->Partitions() - 1; + } +} + +int ContractionState::LinesDisplayed() const { + if (OneToOne()) { + return linesInDocument; + } else { + return displayLines->PositionFromPartition(LinesInDoc()); + } +} + +int ContractionState::DisplayFromDoc(int lineDoc) const { + if (OneToOne()) { + return lineDoc; + } else { + if (lineDoc > displayLines->Partitions()) + lineDoc = displayLines->Partitions(); + return displayLines->PositionFromPartition(lineDoc)... [truncated message content] |
From: <cr...@us...> - 2010-07-16 13:28:53
|
Revision: 49 http://geesas.svn.sourceforge.net/geesas/?rev=49&view=rev Author: creek23 Date: 2010-07-16 13:28:46 +0000 (Fri, 16 Jul 2010) Log Message: ----------- QScintillAS Qt Project file Added Paths: ----------- QScintillAS/Qt4/qscintillas.pro Added: QScintillAS/Qt4/qscintillas.pro =================================================================== --- QScintillAS/Qt4/qscintillas.pro (rev 0) +++ QScintillAS/Qt4/qscintillas.pro 2010-07-16 13:28:46 UTC (rev 49) @@ -0,0 +1,266 @@ +# The project file for the QScintillAS library. +# A streamed down QScintilla for ActionScript +# +# Copyright (c) 2008 Riverbank Computing Limited <in...@ri...> +# Copyright (c) 2009-2010 Mj Mendoza IV <mjm...@ko...> + +# This must be kept in sync with configure.py. +!win32:VERSION = 5.0.1 + +TEMPLATE = lib +TARGET = qscintillas +CONFIG += qt warn_off release dll thread +INCLUDEPATH = . ../include ../src +DEFINES = QSCINTILLA_MAKE_DLL QT SCI_LEXER + +# Handle both Qt v4 and v3. +target.path = $$[QT_INSTALL_LIBS] +isEmpty(target.path) { + target.path = $(QTDIR)/lib +} + +header.path = $$[QT_INSTALL_HEADERS] +header.files = Qsci +isEmpty(header.path) { + header.path = $(QTDIR)/include/Qsci + header.files = Qsci/qsci*.h +} + +trans.path = $$[QT_INSTALL_TRANSLATIONS] +trans.files = qscintilla_*.qm +isEmpty(trans.path) { + trans.path = $(QTDIR)/translations +} + +qsci.path = $$[QT_INSTALL_DATA] +qsci.files = ../qsci +isEmpty(qsci.path) { + qsci.path = $(QTDIR) +} + +INSTALLS += header trans qsci target + +HEADERS = \ + ./Qsci/qsciglobal.h \ + ./Qsci/qsciscintilla.h \ + ./Qsci/qsciscintillabase.h \ + ./Qsci/qsciabstractapis.h \ + ./Qsci/qsciapis.h \ + ./Qsci/qscicommand.h \ + ./Qsci/qscicommandset.h \ + ./Qsci/qscidocument.h \ + ./Qsci/qscilexer.h \ + ./Qsci/qscilexeractionscript.h \ +# ./Qsci/qscilexerbash.h \ +# ./Qsci/qscilexerbatch.h \ +# ./Qsci/qscilexercmake.h \ +# ./Qsci/qscilexercpp.h \ +# ./Qsci/qscilexercsharp.h \ +# ./Qsci/qscilexercss.h \ +# ./Qsci/qscilexerd.h \ +# ./Qsci/qscilexerdiff.h \ +# ./Qsci/qscilexerfortran.h \ +# ./Qsci/qscilexerfortran77.h \ +# ./Qsci/qscilexerhtml.h \ +# ./Qsci/qscilexeridl.h \ +# ./Qsci/qscilexerjava.h \ +# ./Qsci/qscilexerjavascript.h \ +# ./Qsci/qscilexerlua.h \ +# ./Qsci/qscilexermakefile.h \ +# ./Qsci/qscilexerpascal.h \ +# ./Qsci/qscilexerperl.h \ +# ./Qsci/qscilexerpostscript.h \ +# ./Qsci/qscilexerpov.h \ +# ./Qsci/qscilexerproperties.h \ +# ./Qsci/qscilexerpython.h \ +# ./Qsci/qscilexerruby.h \ +# ./Qsci/qscilexersql.h \ +# ./Qsci/qscilexertcl.h \ +# ./Qsci/qscilexertex.h \ +# ./Qsci/qscilexervhdl.h \ +# ./Qsci/qscilexerxml.h \ +# ./Qsci/qscilexeryaml.h \ + ./Qsci/qscimacro.h \ + ./Qsci/qsciprinter.h \ + ListBoxQt.h \ + SciClasses.h \ + ScintillaQt.h \ + ../include/Accessor.h \ + ../include/KeyWords.h \ + ../include/Platform.h \ + ../include/PropSet.h \ + ../include/SString.h \ + ../include/SciLexer.h \ + ../include/Scintilla.h \ + ../include/ScintillaWidget.h \ + ../src/AutoComplete.h \ + ../src/CallTip.h \ + ../src/CellBuffer.h \ + ../src/CharClassify.h \ + ../src/ContractionState.h \ + ../src/Decoration.h \ + ../src/Document.h \ + ../src/DocumentAccessor.h \ + ../src/Editor.h \ + ../src/ExternalLexer.h \ + ../src/Indicator.h \ + ../src/KeyMap.h \ + ../src/LineMarker.h \ + ../src/Partitioning.h \ + ../src/PositionCache.h \ + ../src/RESearch.h \ + ../src/RunStyles.h \ + ../src/SVector.h \ + ../src/ScintillaBase.h \ + ../src/SplitVector.h \ + ../src/Style.h \ + ../src/StyleContext.h \ + ../src/ViewStyle.h \ + ../src/XPM.h + +SOURCES = \ + qsciscintilla.cpp \ + qsciscintillabase.cpp \ + qsciabstractapis.cpp \ + qsciapis.cpp \ + qscicommand.cpp \ + qscicommandset.cpp \ + qscidocument.cpp \ + qscilexer.cpp \ + qscilexeractionscript.cpp \ +# qscilexerbash.cpp \ +# qscilexerbatch.cpp \ +# qscilexercmake.cpp \ +# qscilexercpp.cpp \ +# qscilexercsharp.cpp \ +# qscilexercss.cpp \ +# qscilexerd.cpp \ +# qscilexerdiff.cpp \ +# qscilexerfortran.cpp \ +# qscilexerfortran77.cpp \ +# qscilexerhtml.cpp \ +# qscilexeridl.cpp \ +# qscilexerjava.cpp \ +# qscilexerjavascript.cpp \ +# qscilexerlua.cpp \ +# qscilexermakefile.cpp \ +# qscilexerpascal.cpp \ +# qscilexerperl.cpp \ +# qscilexerpostscript.cpp \ +# qscilexerpov.cpp \ +# qscilexerproperties.cpp \ +# qscilexerpython.cpp \ +# qscilexerruby.cpp \ +# qscilexersql.cpp \ +# qscilexertcl.cpp \ +# qscilexertex.cpp \ +# qscilexervhdl.cpp \ +# qscilexerxml.cpp \ +# qscilexeryaml.cpp \ + qscimacro.cpp \ + qsciprinter.cpp \ + SciClasses.cpp \ + ListBoxQt.cpp \ + PlatQt.cpp \ + ScintillaQt.cpp \ + ../src/AutoComplete.cpp \ + ../src/CallTip.cpp \ + ../src/CellBuffer.cpp \ + ../src/CharClassify.cpp \ + ../src/ContractionState.cpp \ + ../src/Decoration.cpp \ + ../src/Document.cpp \ + ../src/DocumentAccessor.cpp \ + ../src/Editor.cpp \ + ../src/ExternalLexer.cpp \ + ../src/Indicator.cpp \ + ../src/KeyMap.cpp \ + ../src/KeyWords.cpp \ + ../src/LexActionScript.cpp \ +# ../src/LexAbaqus.cpp \ +# ../src/LexAPDL.cpp \ +# ../src/LexAU3.cpp \ +# ../src/LexAVE.cpp \ +# ../src/LexAda.cpp \ +# ../src/LexAsm.cpp \ +# ../src/LexAsn1.cpp \ +# ../src/LexASY.cpp \ +# ../src/LexBaan.cpp \ +# ../src/LexBash.cpp \ +# ../src/LexBasic.cpp \ +# ../src/LexBullant.cpp \ +# ../src/LexCLW.cpp \ +# ../src/LexCPP.cpp \ +# ../src/LexCSS.cpp \ +# ../src/LexCaml.cpp \ +# ../src/LexCmake.cpp \ +# ../src/LexConf.cpp \ +# ../src/LexCrontab.cpp \ +# ../src/LexCsound.cpp \ +# ../src/LexD.cpp \ +# ../src/LexEScript.cpp \ +# ../src/LexEiffel.cpp \ +# ../src/LexErlang.cpp \ +# ../src/LexFlagship.cpp \ +# ../src/LexForth.cpp \ +# ../src/LexFortran.cpp \ +# ../src/LexGAP.cpp \ +# ../src/LexGui4Cli.cpp \ +# ../src/LexHTML.cpp \ +# ../src/LexHaskell.cpp \ +# ../src/LexInno.cpp \ +# ../src/LexKix.cpp \ +# ../src/LexLisp.cpp \ +# ../src/LexLout.cpp \ +# ../src/LexLua.cpp \ +# ../src/LexMagik.cpp \ +# ../src/LexMMIXAL.cpp \ +# ../src/LexMPT.cpp \ +# ../src/LexMSSQL.cpp \ +# ../src/LexMatlab.cpp \ +# ../src/LexMetapost.cpp \ +# ../src/LexMySQL.cpp \ +# ../src/LexNsis.cpp \ +# ../src/LexOpal.cpp \ +# ../src/LexOthers.cpp \ +# ../src/LexPB.cpp \ +# ../src/LexPLM.cpp \ +# ../src/LexPOV.cpp \ +# ../src/LexPowerShell.cpp \ +# ../src/LexProgress.cpp \ +# ../src/LexPS.cpp \ +# ../src/LexPascal.cpp \ +# ../src/LexPerl.cpp \ +# ../src/LexPython.cpp \ + #../src/LexR.cpp \ +# ../src/LexRebol.cpp \ +# ../src/LexRuby.cpp \ +# ../src/LexSQL.cpp \ +# ../src/LexScriptol.cpp \ +# ../src/LexSmalltalk.cpp \ +# ../src/LexSpecman.cpp \ +# ../src/LexSpice.cpp \ +# ../src/LexTADS3.cpp \ +# ../src/LexTCL.cpp \ +# ../src/LexTeX.cpp \ +# ../src/LexVB.cpp \ +# ../src/LexVHDL.cpp \ +# ../src/LexVerilog.cpp \ +# ../src/LexYAML.cpp \ + ../src/LineMarker.cpp \ + ../src/PositionCache.cpp \ + ../src/PropSet.cpp \ + ../src/RESearch.cpp \ + ../src/RunStyles.cpp \ + ../src/ScintillaBase.cpp \ + ../src/Style.cpp \ + ../src/StyleContext.cpp \ + ../src/ViewStyle.cpp \ + ../src/XPM.cpp + +#TRANSLATIONS = \ +# qscintilla_cs.ts \ +# qscintilla_de.ts \ +# qscintilla_fr.ts \ +# qscintilla_pt_br.ts \ +# qscintilla_ru.ts This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cr...@us...> - 2010-07-16 13:27:11
|
Revision: 48 http://geesas.svn.sourceforge.net/geesas/?rev=48&view=rev Author: creek23 Date: 2010-07-16 13:27:05 +0000 (Fri, 16 Jul 2010) Log Message: ----------- QScintilla2 headers Added Paths: ----------- QScintillAS/Qt4/ListBoxQt.h QScintillAS/Qt4/SciClasses.h QScintillAS/Qt4/ScintillaQt.h Added: QScintillAS/Qt4/ListBoxQt.h =================================================================== --- QScintillAS/Qt4/ListBoxQt.h (rev 0) +++ QScintillAS/Qt4/ListBoxQt.h 2010-07-16 13:27:05 UTC (rev 48) @@ -0,0 +1,82 @@ +// This defines the specialisation of QListBox that handles the Scintilla +// double-click callback. +// +// Copyright (c) 2008 Riverbank Computing Limited <in...@ri...> +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public +// License versions 2.0 or 3.0 as published by the Free Software +// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3 +// included in the packaging of this file. Alternatively you may (at +// your option) use any later version of the GNU General Public +// License if such license has been publicly approved by Riverbank +// Computing Limited (or its successors, if any) and the KDE Free Qt +// Foundation. In addition, as a special exception, Riverbank gives you +// certain additional rights. These rights are described in the Riverbank +// GPL Exception version 1.1, which can be found in the file +// GPL_EXCEPTION.txt in this package. +// +// Please review the following information to ensure GNU General +// Public Licensing requirements will be met: +// http://trolltech.com/products/qt/licenses/licensing/opensource/. If +// you are unsure which license is appropriate for your use, please +// review the following information: +// http://trolltech.com/products/qt/licenses/licensing/licensingoverview +// or contact the sales department at sa...@ri.... +// +// This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE. Trolltech reserves all rights not expressly +// granted herein. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#include <qmap.h> +#include <qpixmap.h> +#include <qstring.h> + +#include "Platform.h" + + +class SciListBox; + + +class ListBoxQt : public ListBox +{ +public: + ListBoxQt(); + + CallBackAction cb_action; + void *cb_data; + + virtual void SetFont(Font &font); + virtual void Create(Window &parent, int, Point, int, bool unicodeMode); + virtual void SetAverageCharWidth(int); + virtual void SetVisibleRows(int); + virtual int GetVisibleRows() const; + virtual PRectangle GetDesiredRect(); + virtual int CaretFromEdge(); + virtual void Clear(); + virtual void Append(char *s, int type = -1); + virtual int Length(); + virtual void Select(int n); + virtual int GetSelection(); + virtual int Find(const char *prefix); + virtual void GetValue(int n, char *value, int len); + virtual void Sort(); + virtual void RegisterImage(int type, const char *xpm_data); + virtual void ClearRegisteredImages(); + virtual void SetDoubleClickAction(CallBackAction action, void *data); + virtual void SetList(const char *list, char separator, char typesep); + +private: + SciListBox *slb; + int visible_rows; + bool utf8; + + typedef QMap<int, QPixmap> xpmMap; + xpmMap xset; +}; Added: QScintillAS/Qt4/SciClasses.h =================================================================== --- QScintillAS/Qt4/SciClasses.h (rev 0) +++ QScintillAS/Qt4/SciClasses.h 2010-07-16 13:27:05 UTC (rev 48) @@ -0,0 +1,124 @@ +// The definition of various Qt version independent classes used by the rest of +// the port. +// +// Copyright (c) 2008 Riverbank Computing Limited <in...@ri...> +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public +// License versions 2.0 or 3.0 as published by the Free Software +// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3 +// included in the packaging of this file. Alternatively you may (at +// your option) use any later version of the GNU General Public +// License if such license has been publicly approved by Riverbank +// Computing Limited (or its successors, if any) and the KDE Free Qt +// Foundation. In addition, as a special exception, Riverbank gives you +// certain additional rights. These rights are described in the Riverbank +// GPL Exception version 1.1, which can be found in the file +// GPL_EXCEPTION.txt in this package. +// +// Please review the following information to ensure GNU General +// Public Licensing requirements will be met: +// http://trolltech.com/products/qt/licenses/licensing/opensource/. If +// you are unsure which license is appropriate for your use, please +// review the following information: +// http://trolltech.com/products/qt/licenses/licensing/licensingoverview +// or contact the sales department at sa...@ri.... +// +// This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE. Trolltech reserves all rights not expressly +// granted herein. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef _SCICLASSES_H +#define _SCICLASSES_H + +#include <qglobal.h> +#include <qwidget.h> + + +class QMouseEvent; +class QPaintEvent; +class ScintillaQt; + + +// A simple QWidget sub-class to implement a call tip. +class SciCallTip : public QWidget +{ + Q_OBJECT + +public: + SciCallTip(QWidget *parent, ScintillaQt *sci_); + ~SciCallTip(); + +protected: + void paintEvent(QPaintEvent *e); + void mousePressEvent(QMouseEvent *e); + +private: + ScintillaQt *sci; +}; + + +// A popup menu where options correspond to a numeric command. + +#include <QMenu> +#include <QSignalMapper> + +class SciPopup : public QMenu +{ + Q_OBJECT + +public: + SciPopup(); + + void addItem(const QString &label, int cmd, bool enabled, + ScintillaQt *sci_); + +private slots: + void on_triggered(int cmd); + +private: + ScintillaQt *sci; + QSignalMapper mapper; +}; + + + +// This sub-class of QListBox is needed to provide slots from which we can call +// ListBox's double-click callback. (And you thought this was a C++ program.) + +class ListBoxQt; + + +#include <QListWidget> + +class SciListBox : public QListWidget +{ + Q_OBJECT + +public: + SciListBox(QWidget *parent, ListBoxQt *lbx_); + virtual ~SciListBox(); + + void addItemPixmap(const QPixmap &pm, const QString &txt); + + int find(const QString &prefix); + QString text(int n); + +protected: + void keyPressEvent(QKeyEvent *e); + +private slots: + void handleSelection(); + +private: + ListBoxQt *lbx; +}; + + +#endif Added: QScintillAS/Qt4/ScintillaQt.h =================================================================== --- QScintillAS/Qt4/ScintillaQt.h (rev 0) +++ QScintillAS/Qt4/ScintillaQt.h 2010-07-16 13:27:05 UTC (rev 48) @@ -0,0 +1,130 @@ +// The definition of the Qt specific subclass of ScintillaBase. +// +// Copyright (c) 2008 Riverbank Computing Limited <in...@ri...> +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public +// License versions 2.0 or 3.0 as published by the Free Software +// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3 +// included in the packaging of this file. Alternatively you may (at +// your option) use any later version of the GNU General Public +// License if such license has been publicly approved by Riverbank +// Computing Limited (or its successors, if any) and the KDE Free Qt +// Foundation. In addition, as a special exception, Riverbank gives you +// certain additional rights. These rights are described in the Riverbank +// GPL Exception version 1.1, which can be found in the file +// GPL_EXCEPTION.txt in this package. +// +// Please review the following information to ensure GNU General +// Public Licensing requirements will be met: +// http://trolltech.com/products/qt/licenses/licensing/opensource/. If +// you are unsure which license is appropriate for your use, please +// review the following information: +// http://trolltech.com/products/qt/licenses/licensing/licensingoverview +// or contact the sales department at sa...@ri.... +// +// This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE. Trolltech reserves all rights not expressly +// granted herein. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef SCINTILLAQT_H +#define SCINTILLAQT_H + + +#include <qtimer.h> +#include <qclipboard.h> + +// These are needed because scintilla class header files don't seem to manage +// their own dependencies properly. +#include <ctype.h> +#include <stdlib.h> +#include "Platform.h" +#include "Scintilla.h" +#include "SVector.h" +#include "SplitVector.h" +#include "Partitioning.h" +#include "CellBuffer.h" +#include "CharClassify.h" +#include "RunStyles.h" +#include "Decoration.h" +#include "Document.h" +#include "Style.h" +#include "XPM.h" +#include "LineMarker.h" +#include "Indicator.h" +#include "ViewStyle.h" +#include "KeyMap.h" +#include "ContractionState.h" +#include "PositionCache.h" +#include "Editor.h" +#include "AutoComplete.h" +#include "CallTip.h" +#include "SString.h" +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" + +#include "ScintillaBase.h" + + +class QPaintEvent; +class QDropEvent; + +class QsciScintillaBase; +class SciCallTip; +class SciPopup; + + +class ScintillaQt : public ScintillaBase +{ + friend class QsciScintillaBase; + friend class SciCallTip; + friend class SciPopup; + +public: + ScintillaQt(QsciScintillaBase *qsb_); + virtual ~ScintillaQt(); + + virtual sptr_t WndProc(unsigned int iMessage, uptr_t wParam, + sptr_t lParam); + +private: + void Initialise(); + void Finalise(); + void StartDrag(); + sptr_t DefWndProc(unsigned int, uptr_t, sptr_t); + void SetTicking(bool); + void SetMouseCapture(bool on); + bool HaveMouseCapture(); + void SetVerticalScrollPos(); + void SetHorizontalScrollPos(); + bool ModifyScrollBars(int nMax, int nPage); + void ReconfigureScrollBars(); + void NotifyChange(); + void NotifyParent(SCNotification scn); + void CopyToClipboard(const SelectionText &selectedText); + void Copy(); + void Paste(); + void CreateCallTipWindow(PRectangle rc); + void AddToPopUp(const char *label, int cmd = 0, bool enabled = true); + void ClaimSelection(); + void UnclaimSelection(); + static sptr_t DirectFunction(ScintillaQt *sci, unsigned int iMessage, + uptr_t wParam,sptr_t lParam); + + QString textRange(const SelectionText *text); + void paintEvent(QPaintEvent *e); + void pasteFromClipboard(QClipboard::Mode mode); + + bool capturedMouse; + QsciScintillaBase *qsb; + QTimer qtimer; +}; + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cr...@us...> - 2010-07-16 09:21:32
|
Revision: 46 http://geesas.svn.sourceforge.net/geesas/?rev=46&view=rev Author: creek23 Date: 2010-07-16 09:21:22 +0000 (Fri, 16 Jul 2010) Log Message: ----------- Fixed unupdated area. With speed-optimization offset is changed to 500 instead of 10. Modified Paths: -------------- pencilanimation/src/interface/scribblearea.cpp Modified: pencilanimation/src/interface/scribblearea.cpp =================================================================== --- pencilanimation/src/interface/scribblearea.cpp 2010-07-16 09:11:39 UTC (rev 45) +++ pencilanimation/src/interface/scribblearea.cpp 2010-07-16 09:21:22 UTC (rev 46) @@ -1,7 +1,8 @@ /* -Pencil - Traditional Animation Software +Clash - Freedom in a Flash Copyright (C) 2005-2007 Patrick Corrieri & Pascal Naidon +Copyright (C) 2010 Mj Mendoza IV This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -1724,7 +1725,7 @@ QPen pen2(pen.colour, pen.width, Qt::SolidLine, Qt::RoundCap,Qt::RoundJoin); QPainterPath tempPath = BezierCurve(mousePoints).getSimplePath(); tempPath.lineTo(currentPoint); - QRect updateRect = myTempView.mapRect(tempPath.boundingRect().toRect()).adjusted(-10,-10,10,10); + QRect updateRect = myTempView.mapRect(tempPath.boundingRect().toRect()).adjusted(-500, -500, 500, 500);//try clearing buffer if(editor->getCurrentLayer()->type == Layer::VECTOR) { tempPath = myTempView.map( tempPath ); if(makeInvisible) { pen2.setWidth(0); pen2.setStyle(Qt::DotLine);} else pen2.setWidth(pen.width*myTempView.m11()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cr...@us...> - 2010-07-16 09:11:45
|
Revision: 45 http://geesas.svn.sourceforge.net/geesas/?rev=45&view=rev Author: creek23 Date: 2010-07-16 09:11:39 +0000 (Fri, 16 Jul 2010) Log Message: ----------- QScintillAS README Added Paths: ----------- QScintillAS/Qt4/README Added: QScintillAS/Qt4/README =================================================================== --- QScintillAS/Qt4/README (rev 0) +++ QScintillAS/Qt4/README 2010-07-16 09:11:39 UTC (rev 45) @@ -0,0 +1,17 @@ + +Originally, this is the v2.3.2 of QScintilla +released last 17th November 2008. + +This QScintilla has been modified by Mj Mendoza IV +to accept no other language than ActionScript. + +The modified files are: + ./qscintilla.pro + ../include/SciLexer.h + +Created the files: + ./qscilexeractionscript.h + ./Qsci/qscilexeractionscript.h + ../src/LexerActionScript.cpp + +NOTE: list may be incomplete This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cr...@us...> - 2010-07-16 08:34:47
|
Revision: 44 http://geesas.svn.sourceforge.net/geesas/?rev=44&view=rev Author: creek23 Date: 2010-07-16 08:34:41 +0000 (Fri, 16 Jul 2010) Log Message: ----------- Required headers for compiling QScintillAS. Added Paths: ----------- QScintillAS/Qt4/Qsci/qscicommand.h QScintillAS/Qt4/Qsci/qscicommandset.h QScintillAS/Qt4/Qsci/qscimacro.h QScintillAS/Qt4/Qsci/qsciprinter.h Added: QScintillAS/Qt4/Qsci/qscicommand.h =================================================================== --- QScintillAS/Qt4/Qsci/qscicommand.h (rev 0) +++ QScintillAS/Qt4/Qsci/qscicommand.h 2010-07-16 08:34:41 UTC (rev 44) @@ -0,0 +1,119 @@ +// This defines the interface to the QsciCommand class. +// +// Copyright (c) 2008 Riverbank Computing Limited <in...@ri...> +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public +// License versions 2.0 or 3.0 as published by the Free Software +// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3 +// included in the packaging of this file. Alternatively you may (at +// your option) use any later version of the GNU General Public +// License if such license has been publicly approved by Riverbank +// Computing Limited (or its successors, if any) and the KDE Free Qt +// Foundation. In addition, as a special exception, Riverbank gives you +// certain additional rights. These rights are described in the Riverbank +// GPL Exception version 1.1, which can be found in the file +// GPL_EXCEPTION.txt in this package. +// +// Please review the following information to ensure GNU General +// Public Licensing requirements will be met: +// http://trolltech.com/products/qt/licenses/licensing/opensource/. If +// you are unsure which license is appropriate for your use, please +// review the following information: +// http://trolltech.com/products/qt/licenses/licensing/licensingoverview +// or contact the sales department at sa...@ri.... +// +// This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE. Trolltech reserves all rights not expressly +// granted herein. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCICOMMAND_H +#define QSCICOMMAND_H + +#ifdef __APPLE__ +extern "C++" { +#endif + +#include <qstring.h> + +#include <qlist.h> + +#include <Qsci/qsciglobal.h> + + +class QsciScintilla; + + +//! \brief The QsciCommand class represents an internal editor command that may +//! have one or two keys bound to it. +//! +//! Methods are provided to change the keys bound to the command and to remove +//! a key binding. Each command has a user friendly description of the command +//! for use in key mapping dialogs. +class QSCINTILLA_EXPORT QsciCommand +{ +public: + //! Binds the key \a key to the command. If \a key is 0 then the key + //! binding is removed. If \a key is invalid then the key binding is + //! unchanged. Valid keys are any visible or control character or any + //! of \c Key_Down, \c Key_Up, \c Key_Left, \c Key_Right, \c Key_Home, + //! \c Key_End, \c Key_PageUp, \c Key_PageDown, \c Key_Delete, + //! \c Key_Insert, \c Key_Escape, \c Key_Backspace, \c Key_Tab and + //! \c Key_Return. Keys may be modified with any combination of \c SHIFT, + //! \c CTRL and \c ALT. + //! + //! \sa key(), setAlternateKey(), validKey() + void setKey(int key); + + //! Binds the alternate key \a altkey to the command. If \a key is 0 + //! then the alternate key binding is removed. + //! + //! \sa alternateKey(), setKey(), validKey() + void setAlternateKey(int altkey); + + //! The key that is currently bound to the command is returned. + //! + //! \sa setKey(), alternateKey() + int key() const {return qkey;} + + //! The alternate key that is currently bound to the command is + //! returned. + //! + //! \sa setAlternateKey(), key() + int alternateKey() const {return qaltkey;} + + //! If the key \a key is valid then true is returned. + static bool validKey(int key); + + //! The user friendly description of the command is returned. + QString description() const; + +private: + friend class QsciCommandSet; + + QsciCommand(QsciScintilla *qs, int msg, int key, int altkey, + const char *desc); + + int msgId() const {return msgCmd;} + void bindKey(int key,int &qk,int &scik); + + QsciScintilla *qsCmd; + int msgCmd; + int qkey, scikey, qaltkey, scialtkey; + const char *descCmd; + + QsciCommand(const QsciCommand &); + QsciCommand &operator=(const QsciCommand &); +}; + +#ifdef __APPLE__ +} +#endif + +#endif Added: QScintillAS/Qt4/Qsci/qscicommandset.h =================================================================== --- QScintillAS/Qt4/Qsci/qscicommandset.h (rev 0) +++ QScintillAS/Qt4/Qsci/qscicommandset.h 2010-07-16 08:34:41 UTC (rev 44) @@ -0,0 +1,103 @@ +// This defines the interface to the QsciCommandSet class. +// +// Copyright (c) 2008 Riverbank Computing Limited <in...@ri...> +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public +// License versions 2.0 or 3.0 as published by the Free Software +// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3 +// included in the packaging of this file. Alternatively you may (at +// your option) use any later version of the GNU General Public +// License if such license has been publicly approved by Riverbank +// Computing Limited (or its successors, if any) and the KDE Free Qt +// Foundation. In addition, as a special exception, Riverbank gives you +// certain additional rights. These rights are described in the Riverbank +// GPL Exception version 1.1, which can be found in the file +// GPL_EXCEPTION.txt in this package. +// +// Please review the following information to ensure GNU General +// Public Licensing requirements will be met: +// http://trolltech.com/products/qt/licenses/licensing/opensource/. If +// you are unsure which license is appropriate for your use, please +// review the following information: +// http://trolltech.com/products/qt/licenses/licensing/licensingoverview +// or contact the sales department at sa...@ri.... +// +// This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE. Trolltech reserves all rights not expressly +// granted herein. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCICOMMANDSET_H +#define QSCICOMMANDSET_H + +#ifdef __APPLE__ +extern "C++" { +#endif + +#include <qglobal.h> + +#include <QList> + +#include <Qsci/qsciglobal.h> +#include <Qsci/qscicommand.h> + + +class QSettings; +class QsciScintilla; + + +//! \brief The QsciCommandSet class represents the set of all internal editor +//! commands that may have keys bound. +//! +//! Methods are provided to access the individual commands and to read and +//! write the current bindings from and to settings files. +class QSCINTILLA_EXPORT QsciCommandSet +{ +public: + //! The key bindings for each command in the set are read from the + //! settings \a qs. \a prefix is prepended to the key of each entry. + //! true is returned if there was no error. + //! + //! \sa writeSettings() + bool readSettings(QSettings &qs, const char *prefix = "/Scintilla"); + + //! The key bindings for each command in the set are written to the + //! settings \a qs. \a prefix is prepended to the key of each entry. + //! true is returned if there was no error. + //! + //! \sa readSettings() + bool writeSettings(QSettings &qs, const char *prefix = "/Scintilla"); + + //! The commands in the set are returned as a list. + QList<QsciCommand *> &commands() {return cmds;} + + //! The primary keys bindings for all commands are removed. + void clearKeys(); + + //! The alternate keys bindings for all commands are removed. + void clearAlternateKeys(); + +private: + friend class QsciScintilla; + + QsciCommandSet(QsciScintilla *qs); + ~QsciCommandSet(); + + QsciScintilla *qsci; + QList<QsciCommand *> cmds; + + QsciCommandSet(const QsciCommandSet &); + QsciCommandSet &operator=(const QsciCommandSet &); +}; + +#ifdef __APPLE__ +} +#endif + +#endif Added: QScintillAS/Qt4/Qsci/qscimacro.h =================================================================== --- QScintillAS/Qt4/Qsci/qscimacro.h (rev 0) +++ QScintillAS/Qt4/Qsci/qscimacro.h 2010-07-16 08:34:41 UTC (rev 44) @@ -0,0 +1,122 @@ +// This defines the interface to the QsciMacro class. +// +// Copyright (c) 2008 Riverbank Computing Limited <in...@ri...> +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public +// License versions 2.0 or 3.0 as published by the Free Software +// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3 +// included in the packaging of this file. Alternatively you may (at +// your option) use any later version of the GNU General Public +// License if such license has been publicly approved by Riverbank +// Computing Limited (or its successors, if any) and the KDE Free Qt +// Foundation. In addition, as a special exception, Riverbank gives you +// certain additional rights. These rights are described in the Riverbank +// GPL Exception version 1.1, which can be found in the file +// GPL_EXCEPTION.txt in this package. +// +// Please review the following information to ensure GNU General +// Public Licensing requirements will be met: +// http://trolltech.com/products/qt/licenses/licensing/opensource/. If +// you are unsure which license is appropriate for your use, please +// review the following information: +// http://trolltech.com/products/qt/licenses/licensing/licensingoverview +// or contact the sales department at sa...@ri.... +// +// This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE. Trolltech reserves all rights not expressly +// granted herein. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCIMACRO_H +#define QSCIMACRO_H + +#ifdef __APPLE__ +extern "C++" { +#endif + +#include <qobject.h> +#include <qstring.h> + +#include <qlist.h> + +#include <Qsci/qsciglobal.h> + + +class QsciScintilla; + + +//! \brief The QsciMacro class represents a sequence of recordable +//! editor commands. +//! +//! Methods are provided to convert convert a macro to and from a textual +//! representation so that they can be easily written to and read from +//! permanent storage. +class QSCINTILLA_EXPORT QsciMacro : public QObject +{ + Q_OBJECT + +public: + //! Construct a QsciMacro with parent \a parent. + QsciMacro(QsciScintilla *parent); + + //! Construct a QsciMacro from the printable ASCII representation \a asc, + //! with parent \a parent. + QsciMacro(const QString &asc, QsciScintilla *parent); + + //! Destroy the QsciMacro instance. + virtual ~QsciMacro(); + + //! Clear the contents of the macro. + void clear(); + + //! Load the macro from the printable ASCII representation \a asc. Returns + //! true if there was no error. + //! + //! \sa save() + bool load(const QString &asc); + + //! Return a printable ASCII representation of the macro. It is guaranteed + //! that only printable ASCII characters are used and that double quote + //! characters will not be used. + //! + //! \sa load() + QString save() const; + +public slots: + //! Play the macro. + virtual void play(); + + //! Start recording user commands and add them to the macro. + virtual void startRecording(); + + //! Stop recording user commands. + virtual void endRecording(); + +private slots: + void record(unsigned int msg, unsigned long wParam, void *lParam); + +private: + struct Macro { + unsigned int msg; + unsigned long wParam; + QByteArray text; + }; + + QsciScintilla *qsci; + QList<Macro> macro; + + QsciMacro(const QsciMacro &); + QsciMacro &operator=(const QsciMacro &); +}; + +#ifdef __APPLE__ +} +#endif + +#endif Added: QScintillAS/Qt4/Qsci/qsciprinter.h =================================================================== --- QScintillAS/Qt4/Qsci/qsciprinter.h (rev 0) +++ QScintillAS/Qt4/Qsci/qsciprinter.h 2010-07-16 08:34:41 UTC (rev 44) @@ -0,0 +1,123 @@ +// This module defines interface to the QsciPrinter class. +// +// Copyright (c) 2008 Riverbank Computing Limited <in...@ri...> +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public +// License versions 2.0 or 3.0 as published by the Free Software +// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3 +// included in the packaging of this file. Alternatively you may (at +// your option) use any later version of the GNU General Public +// License if such license has been publicly approved by Riverbank +// Computing Limited (or its successors, if any) and the KDE Free Qt +// Foundation. In addition, as a special exception, Riverbank gives you +// certain additional rights. These rights are described in the Riverbank +// GPL Exception version 1.1, which can be found in the file +// GPL_EXCEPTION.txt in this package. +// +// Please review the following information to ensure GNU General +// Public Licensing requirements will be met: +// http://trolltech.com/products/qt/licenses/licensing/opensource/. If +// you are unsure which license is appropriate for your use, please +// review the following information: +// http://trolltech.com/products/qt/licenses/licensing/licensingoverview +// or contact the sales department at sa...@ri.... +// +// This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE. Trolltech reserves all rights not expressly +// granted herein. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCIPRINTER_H +#define QSCIPRINTER_H + +#ifdef __APPLE__ +extern "C++" { +#endif + +#include <qprinter.h> + +#include <Qsci/qsciglobal.h> +#include <Qsci/qsciscintilla.h> + + +class QRect; +class QPainter; +class QsciScintillaBase; + + +//! \brief The QsciPrinter class is a sub-class of the Qt QPrinter class that +//! is able to print the text of a Scintilla document. +//! +//! The class can be further sub-classed to alter to layout of the text, adding +//! headers and footers for example. +class QSCINTILLA_EXPORT QsciPrinter : public QPrinter +{ +public: + //! Constructs a printer paint device with mode \a mode. + QsciPrinter(PrinterMode mode = ScreenResolution); + + //! Destroys the QsciPrinter instance. + virtual ~QsciPrinter(); + + //! Format a page, by adding headers and footers for example, before the + //! document text is drawn on it. \a painter is the painter to be used to + //! add customised text and graphics. \a drawing is true if the page is + //! actually being drawn rather than being sized. \a painter drawing + //! methods must only be called when \a drawing is true. \a area is the + //! area of the page that will be used to draw the text. This should be + //! modified if it is necessary to reserve space for any customised text or + //! graphics. By default the area is relative to the printable area of the + //! page. Use QPrinter::setFullPage() because calling printRange() if you + //! want to try and print over the whole page. \a pagenr is the number of + //! the page. The first page is numbered 1. + virtual void formatPage(QPainter &painter, bool drawing, QRect &area, + int pagenr); + + //! Return the number of points to add to each font when printing. + //! + //! \sa setMagnification() + int magnification() const {return mag;} + + //! Sets the number of points to add to each font when printing to \a + //! magnification. + //! + //! \sa magnification() + virtual void setMagnification(int magnification); + + //! Print a range of lines from the Scintilla instance \a qsb. \a from is + //! the first line to print and a negative value signifies the first line + //! of text. \a to is the last line to print and a negative value + //! signifies the last line of text. true is returned if there was no + //! error. + virtual int printRange(QsciScintillaBase *qsb, int from = -1, int to = -1); + + //! Return the line wrap mode used when printing. The default is + //! QsciScintilla::WrapWord. + //! + //! \sa setWrapMode() + QsciScintilla::WrapMode wrapMode() const {return wrap;} + + //! Sets the line wrap mode used when printing to \a wmode. + //! + //! \sa wrapMode() + virtual void setWrapMode(QsciScintilla::WrapMode wmode); + +private: + int mag; + QsciScintilla::WrapMode wrap; + + QsciPrinter(const QsciPrinter &); + QsciPrinter &operator=(const QsciPrinter &); +}; + +#ifdef __APPLE__ +} +#endif + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cr...@us...> - 2010-07-16 08:33:22
|
Revision: 43 http://geesas.svn.sourceforge.net/geesas/?rev=43&view=rev Author: creek23 Date: 2010-07-16 08:33:15 +0000 (Fri, 16 Jul 2010) Log Message: ----------- Required headers for using QScintillAS. Added Paths: ----------- QScintillAS/Qt4/Qsci/qsciabstractapis.h QScintillAS/Qt4/Qsci/qsciapis.h QScintillAS/Qt4/Qsci/qscidocument.h QScintillAS/Qt4/Qsci/qsciglobal.h QScintillAS/Qt4/Qsci/qscilexer.h QScintillAS/Qt4/Qsci/qscilexeractionscript.h QScintillAS/Qt4/Qsci/qsciscintilla.h QScintillAS/Qt4/Qsci/qsciscintillabase.h Added: QScintillAS/Qt4/Qsci/qsciabstractapis.h =================================================================== --- QScintillAS/Qt4/Qsci/qsciabstractapis.h (rev 0) +++ QScintillAS/Qt4/Qsci/qsciabstractapis.h 2010-07-16 08:33:15 UTC (rev 43) @@ -0,0 +1,115 @@ +// This module defines interface to the QsciAbstractAPIs class. +// +// Copyright (c) 2008 Riverbank Computing Limited <in...@ri...> +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public +// License versions 2.0 or 3.0 as published by the Free Software +// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3 +// included in the packaging of this file. Alternatively you may (at +// your option) use any later version of the GNU General Public +// License if such license has been publicly approved by Riverbank +// Computing Limited (or its successors, if any) and the KDE Free Qt +// Foundation. In addition, as a special exception, Riverbank gives you +// certain additional rights. These rights are described in the Riverbank +// GPL Exception version 1.1, which can be found in the file +// GPL_EXCEPTION.txt in this package. +// +// Please review the following information to ensure GNU General +// Public Licensing requirements will be met: +// http://trolltech.com/products/qt/licenses/licensing/opensource/. If +// you are unsure which license is appropriate for your use, please +// review the following information: +// http://trolltech.com/products/qt/licenses/licensing/licensingoverview +// or contact the sales department at sa...@ri.... +// +// This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE. Trolltech reserves all rights not expressly +// granted herein. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCIABSTRACTAPIS_H +#define QSCIABSTRACTAPIS_H + +#ifdef __APPLE__ +extern "C++" { +#endif + +#include <qobject.h> +#include <qstringlist.h> + +#include <QList> + +#include <Qsci/qsciglobal.h> +#include <Qsci/qsciscintilla.h> + + +class QsciLexer; + + +//! \brief The QsciAbstractAPIs class represents the interface to the textual +//! API information used in call tips and for auto-completion. A sub-class +//! will provide the actual implementation of the interface. +//! +//! API information is specific to a particular language lexer but can be +//! shared by multiple instances of the lexer. +class QSCINTILLA_EXPORT QsciAbstractAPIs : public QObject +{ + Q_OBJECT + +public: + //! Constructs a QsciAbstractAPIs instance attached to lexer \a lexer. \a + //! lexer becomes the instance's parent object although the instance can + //! also be subsequently attached to other lexers. + QsciAbstractAPIs(QsciLexer *lexer); + + //! Destroy the QsciAbstractAPIs instance. + virtual ~QsciAbstractAPIs(); + + //! Return the lexer that the instance is attached to. + QsciLexer *lexer() const; + + //! Update the list \a list with API entries derived from \a context. \a + //! context is the list of words in the text preceding the cursor position. + //! The characters that make up a word and the characters that separate + //! words are defined by the lexer. The last word is a partial word and + //! may be empty if the user has just entered a word separator. + virtual void updateAutoCompletionList(const QStringList &context, + QStringList &list) = 0; + + //! This is called when the user selects the entry \a selection from the + //! auto-completion list. A sub-class can use this as a hint to provide + //! more specific API entries in future calls to + //! updateAutoCompletionList(). The default implementation does nothing. + virtual void autoCompletionSelected(const QString &selection); + + //! Return the call tips valid for the context \a context. (Note that the + //! last word of the context will always be empty.) \a commas is the number + //! of commas the user has typed after the context and before the cursor + //! position. The exact position of the list of call tips can be adjusted + //! by specifying a corresponding left character shift in \a shifts. This + //! is normally done to correct for any displayed context according to \a + //! style. + //! + //! \sa updateAutoCompletionList() + virtual QStringList callTips(const QStringList &context, int commas, + QsciScintilla::CallTipsStyle style, + QList<int> &shifts) = 0; + +private: + QsciLexer *lex; + + QsciAbstractAPIs(const QsciAbstractAPIs &); + QsciAbstractAPIs &operator=(const QsciAbstractAPIs &); +}; + +#ifdef __APPLE__ +} +#endif + +#endif Added: QScintillAS/Qt4/Qsci/qsciapis.h =================================================================== --- QScintillAS/Qt4/Qsci/qsciapis.h (rev 0) +++ QScintillAS/Qt4/Qsci/qsciapis.h 2010-07-16 08:33:15 UTC (rev 43) @@ -0,0 +1,237 @@ +// This module defines interface to the QsciAPIs class. +// +// Copyright (c) 2008 Riverbank Computing Limited <in...@ri...> +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public +// License versions 2.0 or 3.0 as published by the Free Software +// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3 +// included in the packaging of this file. Alternatively you may (at +// your option) use any later version of the GNU General Public +// License if such license has been publicly approved by Riverbank +// Computing Limited (or its successors, if any) and the KDE Free Qt +// Foundation. In addition, as a special exception, Riverbank gives you +// certain additional rights. These rights are described in the Riverbank +// GPL Exception version 1.1, which can be found in the file +// GPL_EXCEPTION.txt in this package. +// +// Please review the following information to ensure GNU General +// Public Licensing requirements will be met: +// http://trolltech.com/products/qt/licenses/licensing/opensource/. If +// you are unsure which license is appropriate for your use, please +// review the following information: +// http://trolltech.com/products/qt/licenses/licensing/licensingoverview +// or contact the sales department at sa...@ri.... +// +// This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE. Trolltech reserves all rights not expressly +// granted herein. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCIAPIS_H +#define QSCIAPIS_H + +#ifdef __APPLE__ +extern "C++" { +#endif + +#include <qobject.h> +#include <qpair.h> +#include <qstringlist.h> + +#include <QList> + +#include <Qsci/qsciabstractapis.h> +#include <Qsci/qsciglobal.h> +#include <Qsci/qsciscintilla.h> + + +class QsciAPIsPrepared; +class QsciAPIsWorker; +class QsciLexer; + + +//! \brief The QsciAPIs class provies an implementation of the textual API +//! information used in call tips and for auto-completion. +//! +//! Raw API information is read from one or more files. Each API function is +//! described by a single line of text comprising the function's name, followed +//! by the function's optional comma separated parameters enclosed in +//! parenthesis, and finally followed by optional explanatory text. +//! +//! A function name may be followed by a `?' and a number. The number is used +//! by auto-completion to display a registered QPixmap with the function name. +//! +//! All function names are used by auto-completion, but only those that include +//! function parameters are used in call tips. +//! +//! QScintilla only deals with prepared API information and not the raw +//! information described above. This is done so that large APIs can be +//! handled while still being responsive to user input. The conversion of raw +//! information to prepared information is time consuming (think tens of +//! seconds) and implemented in a separate thread. Prepared information can +//! be quickly saved to and loaded from files. Such files are portable between +//! different architectures. +//! +//! QScintilla based applications that want to support large APIs would +//! normally provide the user with the ability to specify a set of, possibly +//! project specific, raw API files and convert them to prepared files that are +//! loaded quickly when the application is invoked. +class QSCINTILLA_EXPORT QsciAPIs : public QsciAbstractAPIs +{ + Q_OBJECT + +public: + //! Constructs a QsciAPIs instance attached to lexer \a lexer. \a lexer + //! becomes the instance's parent object although the instance can also be + //! subsequently attached to other lexers. + QsciAPIs(QsciLexer *lexer); + + //! Destroy the QsciAPIs instance. + virtual ~QsciAPIs(); + + //! Add the single raw API entry \a entry to the current set. + //! + //! \sa clear(), load(), remove() + void add(const QString &entry); + + //! Deletes all raw API information. + //! + //! \sa add(), load(), remove() + void clear(); + + //! Load the API information from the file named \a fname, adding it to the + //! current set. Returns true if successful, otherwise false. + bool load(const QString &fname); + + //! Remove the single raw API entry \a entry from the current set. + //! + //! \sa add(), clear(), load() + void remove(const QString &entry); + + //! Convert the current raw API information to prepared API information. + //! This is implemented by a separate thread. + //! + //! \sa cancelPreparation() + void prepare(); + + //! Cancel the conversion of the current raw API information to prepared + //! API information. + //! + //! \sa prepare() + void cancelPreparation(); + + //! Return the default name of the prepared API information file. It is + //! based on the name of the associated lexer and in the directory defined + //! by the QSCIDIR environment variable. If the environment variable isn't + //! set then $HOME/.qsci is used. + QString defaultPreparedName() const; + + //! Check to see is a prepared API information file named \a fname exists. + //! If \a fname is empty then the value returned by defaultPreparedName() + //! is used. Returns true if successful, otherwise false. + //! + //! \sa defaultPreparedName() + bool isPrepared(const QString &fname = QString()) const; + + //! Load the prepared API information from the file named \a fname. If + //! \a fname is empty then a name is constructed based on the name of the + //! associated lexer and saved in the directory defined by the QSCIDIR + //! environment variable. If the environment variable isn't set then + //! $HOME/.qsci is used. Returns true if successful, otherwise false. + bool loadPrepared(const QString &fname = QString()); + + //! Save the prepared API information to the file named \a fname. If + //! \a fname is empty then a name is constructed based on the name of the + //! associated lexer and saved in the directory defined by the QSCIDIR + //! environment variable. If the environment variable isn't set then + //! $HOME/.qsci is used. Returns true if successful, otherwise false. + bool savePrepared(const QString &fname = QString()) const; + + //! \reimp + virtual void updateAutoCompletionList(const QStringList &context, + QStringList &list); + + //! \reimp + virtual void autoCompletionSelected(const QString &sel); + + //! \reimp + virtual QStringList callTips(const QStringList &context, int commas, + QsciScintilla::CallTipsStyle style, + QList<int> &shifts); + + //! \internal Reimplemented to receive termination events from the worker + //! thread. + virtual bool event(QEvent *e); + + //! Return a list of the installed raw API file names for the associated + //! lexer. + QStringList installedAPIFiles() const; + +signals: + //! This signal is emitted when the conversion of raw API information to + //! prepared API information has been cancelled. + //! + //! \sa apiPreparationFinished(), apiPreparationStarted() + void apiPreparationCancelled(); + + //! This signal is emitted when the conversion of raw API information to + //! prepared API information starts and can be used to give some visual + //! feedback to the user. + //! + //! \sa apiPreparationCancelled(), apiPreparationFinished() + void apiPreparationStarted(); + + //! This signal is emitted when the conversion of raw API information to + //! prepared API information has finished. + //! + //! \sa apiPreparationCancelled(), apiPreparationStarted() + void apiPreparationFinished(); + +private: + friend class QsciAPIsPrepared; + friend class QsciAPIsWorker; + + // This indexes a word in a set of raw APIs. The first part indexes the + // entry in the set, the second part indexes the word within the entry. + typedef QPair<quint32, quint32> WordIndex; + + // This is a list of word indexes. + typedef QList<WordIndex> WordIndexList; + + QsciAPIsWorker *worker; + QStringList old_context; + QStringList::const_iterator origin; + int origin_len; + QString unambiguous_context; + QStringList apis; + QsciAPIsPrepared *prep; + + static bool enoughCommas(const QString &s, int commas); + + QStringList positionOrigin(const QStringList &context, QString &path); + bool originStartsWith(const QString &path, const QString &wsep); + const WordIndexList *wordIndexOf(const QString &word) const; + void lastCompleteWord(const QString &word, QStringList &with_context, + bool &unambig); + void lastPartialWord(const QString &word, QStringList &with_context, + bool &unambig); + void addAPIEntries(const WordIndexList &wl, bool complete, + QStringList &with_context, bool &unambig); + QString prepName(const QString &fname, bool mkpath = false) const; + void deleteWorker(); + + QsciAPIs(const QsciAPIs &); + QsciAPIs &operator=(const QsciAPIs &); +}; + +#ifdef __APPLE__ +} +#endif + +#endif Added: QScintillAS/Qt4/Qsci/qscidocument.h =================================================================== --- QScintillAS/Qt4/Qsci/qscidocument.h (rev 0) +++ QScintillAS/Qt4/Qsci/qscidocument.h 2010-07-16 08:33:15 UTC (rev 43) @@ -0,0 +1,84 @@ +// This defines the interface to the QsciDocument class. +// +// Copyright (c) 2008 Riverbank Computing Limited <in...@ri...> +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public +// License versions 2.0 or 3.0 as published by the Free Software +// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3 +// included in the packaging of this file. Alternatively you may (at +// your option) use any later version of the GNU General Public +// License if such license has been publicly approved by Riverbank +// Computing Limited (or its successors, if any) and the KDE Free Qt +// Foundation. In addition, as a special exception, Riverbank gives you +// certain additional rights. These rights are described in the Riverbank +// GPL Exception version 1.1, which can be found in the file +// GPL_EXCEPTION.txt in this package. +// +// Please review the following information to ensure GNU General +// Public Licensing requirements will be met: +// http://trolltech.com/products/qt/licenses/licensing/opensource/. If +// you are unsure which license is appropriate for your use, please +// review the following information: +// http://trolltech.com/products/qt/licenses/licensing/licensingoverview +// or contact the sales department at sa...@ri.... +// +// This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE. Trolltech reserves all rights not expressly +// granted herein. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCIDOCUMENT_H +#define QSCIDOCUMENT_H + +#ifdef __APPLE__ +extern "C++" { +#endif + +#include <Qsci/qsciglobal.h> + + +class QsciScintillaBase; +class QsciDocumentP; + + +//! \brief The QsciDocument class represents a document to be edited. +//! +//! It is an opaque class that can be attached to multiple instances of +//! QsciScintilla to create different simultaneous views of the same document. +//! QsciDocument uses implicit sharing so that copying class instances is a +//! cheap operation. +class QSCINTILLA_EXPORT QsciDocument +{ +public: + //! Create a new unattached document. + QsciDocument(); + virtual ~QsciDocument(); + + QsciDocument(const QsciDocument &); + QsciDocument &operator=(const QsciDocument &); + +private: + friend class QsciScintilla; + + void attach(const QsciDocument &that); + void detach(); + void display(QsciScintillaBase *qsb, const QsciDocument *from); + void undisplay(QsciScintillaBase *qsb); + + bool isModified() const; + void setModified(bool m); + + QsciDocumentP *pdoc; +}; + +#ifdef __APPLE__ +} +#endif + +#endif Added: QScintillAS/Qt4/Qsci/qsciglobal.h =================================================================== --- QScintillAS/Qt4/Qsci/qsciglobal.h (rev 0) +++ QScintillAS/Qt4/Qsci/qsciglobal.h 2010-07-16 08:33:15 UTC (rev 43) @@ -0,0 +1,71 @@ +// This module defines various things common to all of the Scintilla Qt port. +// +// Copyright (c) 2008 Riverbank Computing Limited <in...@ri...> +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public +// License versions 2.0 or 3.0 as published by the Free Software +// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3 +// included in the packaging of this file. Alternatively you may (at +// your option) use any later version of the GNU General Public +// License if such license has been publicly approved by Riverbank +// Computing Limited (or its successors, if any) and the KDE Free Qt +// Foundation. In addition, as a special exception, Riverbank gives you +// certain additional rights. These rights are described in the Riverbank +// GPL Exception version 1.1, which can be found in the file +// GPL_EXCEPTION.txt in this package. +// +// Please review the following information to ensure GNU General +// Public Licensing requirements will be met: +// http://trolltech.com/products/qt/licenses/licensing/opensource/. If +// you are unsure which license is appropriate for your use, please +// review the following information: +// http://trolltech.com/products/qt/licenses/licensing/licensingoverview +// or contact the sales department at sa...@ri.... +// +// This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE. Trolltech reserves all rights not expressly +// granted herein. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCIGLOBAL_H +#define QSCIGLOBAL_H + +#ifdef __APPLE__ +extern "C++" { +#endif + +#include <qglobal.h> + + +#define QSCINTILLA_VERSION 0x020302 +#define QSCINTILLA_VERSION_STR "2.3.2" + + +// Under Windows, define QSCINTILLA_MAKE_DLL to create a Scintilla DLL, or +// define QSCINTILLA_DLL to link against a Scintilla DLL, or define neither +// to either build or link against a static Scintilla library. +#if defined(Q_WS_WIN) + +#if defined(QSCINTILLA_DLL) +#define QSCINTILLA_EXPORT __declspec(dllimport) +#elif defined(QSCINTILLA_MAKE_DLL) +#define QSCINTILLA_EXPORT __declspec(dllexport) +#endif + +#endif + +#if !defined(QSCINTILLA_EXPORT) +#define QSCINTILLA_EXPORT +#endif + +#ifdef __APPLE__ +} +#endif + +#endif Added: QScintillAS/Qt4/Qsci/qscilexer.h =================================================================== --- QScintillAS/Qt4/Qsci/qscilexer.h (rev 0) +++ QScintillAS/Qt4/Qsci/qscilexer.h 2010-07-16 08:33:15 UTC (rev 43) @@ -0,0 +1,346 @@ +// This defines the interface to the QsciLexer class. +// +// Copyright (c) 2008 Riverbank Computing Limited <in...@ri...> +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public +// License versions 2.0 or 3.0 as published by the Free Software +// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3 +// included in the packaging of this file. Alternatively you may (at +// your option) use any later version of the GNU General Public +// License if such license has been publicly approved by Riverbank +// Computing Limited (or its successors, if any) and the KDE Free Qt +// Foundation. In addition, as a special exception, Riverbank gives you +// certain additional rights. These rights are described in the Riverbank +// GPL Exception version 1.1, which can be found in the file +// GPL_EXCEPTION.txt in this package. +// +// Please review the following information to ensure GNU General +// Public Licensing requirements will be met: +// http://trolltech.com/products/qt/licenses/licensing/opensource/. If +// you are unsure which license is appropriate for your use, please +// review the following information: +// http://trolltech.com/products/qt/licenses/licensing/licensingoverview +// or contact the sales department at sa...@ri.... +// +// This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE. Trolltech reserves all rights not expressly +// granted herein. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCILEXER_H +#define QSCILEXER_H + +#ifdef __APPLE__ +extern "C++" { +#endif + +#include <qcolor.h> +#include <qfont.h> +#include <qmap.h> +#include <qobject.h> +#include <qstring.h> + +#include <Qsci/qsciglobal.h> + + +class QSettings; + +class QsciAbstractAPIs; + + +//! \brief The QsciLexer class is an abstract class used as a base for specific +//! existing Scintilla language lexers. +//! +//! A Scintilla lexer scans the text breaking it up into separate language +//! objects, e.g. keywords, strings, operators. The lexer then uses a +//! different style to draw each object. A style is identified by a style +//! number and has a number of attributes, including colour and font. A +//! specific language lexer will implement appropriate default styles which can +//! be overriden by an application by further sub-classing the specific +//! language lexer. +//! +//! A specific language lexer may provide one or more sets of words to be +//! recognised as keywords. Most lexers only provide one set, but some may +//! support languages embedded in other languages and provide several sets. +//! +//! QsciLexer provides convenience methods for saving and restoring user +//! preferences for fonts and colours. Note that QSciLexer is not a means to +//! writing new lexers - you must do that by adding a new lexer to the +//! underlying Scintilla code. +class QSCINTILLA_EXPORT QsciLexer : public QObject +{ + Q_OBJECT + +public: + //! Construct a QsciLexer with parent \a parent. \a parent is typically + //! the QsciScintilla instance. + QsciLexer(QObject *parent = 0); + + //! Destroy the QSciLexer. + virtual ~QsciLexer(); + + //! Returns the name of the language. It must be re-implemented by a + //! sub-class. + virtual const char *language() const = 0; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. It must be re-implemented by a sub-class. + virtual const char *lexer() const = 0; + + //! Returns the current API set or 0 if there isn't one. + //! + //! \sa setAPIs() + QsciAbstractAPIs *apis() const; + + //! \internal Returns the characters that can fill up auto-completion. + virtual const char *autoCompletionFillups() const; + + //! \internal Returns the list of character sequences that can separate + //! auto-completion words. The first in the list is assumed to be the + //! sequence used to separate words in the lexer's API files. + virtual QStringList autoCompletionWordSeparators() const; + + //! Returns the auto-indentation style. The default is 0 if the + //! language is block structured, or QsciScintilla::AiMaintain if not. + //! + //! \sa setAutoIndentStyle(), QsciScintilla::AiMaintain, + //! QsciScintilla::AiOpening, QsciScintilla::AiClosing + int autoIndentStyle(); + + //! \internal Returns a space separated list of words or characters in + //! a particular style that define the end of a block for + //! auto-indentation. The style is returned via \a style. + virtual const char *blockEnd(int *style = 0) const; + + //! \internal Returns the number of lines prior to the current one when + //! determining the scope of a block when auto-indenting. + virtual int blockLookback() const; + + //! \internal Returns a space separated list of words or characters in + //! a particular style that define the start of a block for + //! auto-indentation. The style is returned via \a style. + virtual const char *blockStart(int *style = 0) const; + + //! \internal Returns a space separated list of keywords in a + //! particular style that define the start of a block for + //! auto-indentation. The style is returned via \a style. + virtual const char *blockStartKeyword(int *style = 0) const; + + //! \internal Returns the style used for braces for brace matching. + virtual int braceStyle() const; + + //! \internal Returns true if the language is case sensitive. The default + //! is true. + virtual bool caseSensitive() const; + + //! Returns the foreground colour of the text for style number \a style. + //! The default colour is that returned by defaultColor(). + //! + //! \sa defaultColor(), paper() + virtual QColor color(int style) const; + + //! Returns the end-of-line for style number \a style. The default is + //! false. + virtual bool eolFill(int style) const; + + //! Returns the font for style number \a style. The default font is + //! that returned by defaultFont(). + //! + //! \sa defaultFont() + virtual QFont font(int style) const; + + //! \internal Returns the view used for indentation guides. + virtual int indentationGuideView() const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. 0 is returned if there + //! is no such set. + virtual const char *keywords(int set) const; + + //! \internal Returns the number of the style used for whitespace. The + //! default implementation returns 0 which is the convention adopted by + //! most lexers. + virtual int defaultStyle() const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + virtual QString description(int style) const = 0; + + //! Returns the background colour of the text for style number + //! \a style. + //! + //! \sa defaultPaper(), color() + virtual QColor paper(int style) const; + + //! Returns the default text colour. + //! + //! \sa setDefaultColor() + QColor defaultColor() const; + + //! Returns the default text colour for style number \a style. + virtual QColor defaultColor(int style) const; + + //! Returns the default end-of-line for style number \a style. The default + //! is false. + virtual bool defaultEolFill(int style) const; + + //! Returns the default font. + //! + //! \sa setDefaultFont() + QFont defaultFont() const; + + //! Returns the default font for style number \a style. + virtual QFont defaultFont(int style) const; + + //! Returns the default paper colour. + //! + //! \sa setDefaultPaper() + QColor defaultPaper() const; + + //! Returns the default paper colour for style number \a style. + virtual QColor defaultPaper(int style) const; + + //! The current set of APIs is set to \a apis. If \a apis is 0 then any + //! existing APIs for this lexer are removed. + //! + //! \sa apis() + void setAPIs(QsciAbstractAPIs *apis); + + //! The default text colour is set to \a c. + //! + //! \sa defaultColor(), color() + void setDefaultColor(const QColor &c); + + //! The default font is set to \a f. + //! + //! \sa defaultFont(), font() + void setDefaultFont(const QFont &f); + + //! The default paper colour is set to \a c. + //! + //! \sa defaultPaper(), paper() + void setDefaultPaper(const QColor &c); + + //! The colour, paper, font and end-of-line for each style number, and + //! all lexer specific properties are read from the settings \a qs. + //! \a prefix is prepended to the key of each entry. true is returned + //! if there was no error. + //! + //! \sa writeSettings(), QsciScintilla::setLexer() + bool readSettings(QSettings &qs,const char *prefix = "/Scintilla"); + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + virtual void refreshProperties(); + + //! \internal Returns the string of characters that comprise a word. + //! The default is 0 which implies the upper and lower case alphabetic + //! characters and underscore. + virtual const char *wordCharacters() const; + + //! The colour, paper, font and end-of-line for each style number, and + //! all lexer specific properties are written to the settings \a qs. + //! \a prefix is prepended to the key of each entry. true is returned + //! if there was no error. + //! + //! \sa readSettings() + bool writeSettings(QSettings &qs, + const char *prefix = "/Scintilla") const; + +public slots: + //! The auto-indentation style is set to \a autoindentstyle. + //! + //! \sa autoIndentStyle(), QsciScintilla::AiMaintain, + //! QsciScintilla::AiOpening, QsciScintilla::AiClosing + virtual void setAutoIndentStyle(int autoindentstyle); + + //! The foreground colour for style number \a style is set to \a c. If + //! \a style is -1 then the colour is set for all styles. + virtual void setColor(const QColor &c,int style = -1); + + //! The end-of-line fill for style number \a style is set to + //! \a eoffill. If \a style is -1 then the fill is set for all styles. + virtual void setEolFill(bool eoffill,int style = -1); + + //! The font for style number \a style is set to \a f. If \a style is + //! -1 then the font is set for all styles. + virtual void setFont(const QFont &f,int style = -1); + + //! The background colour for style number \a style is set to \a c. If + //! \a style is -1 then the colour is set for all styles. + virtual void setPaper(const QColor &c,int style = -1); + +signals: + //! This signal is emitted when the foreground colour of style number + //! \a style has changed. The new colour is \a c. + void colorChanged(const QColor &c,int style); + + //! This signal is emitted when the end-of-file fill of style number + //! \a style has changed. The new fill is \a eolfilled. + void eolFillChanged(bool eolfilled,int style); + + //! This signal is emitted when the font of style number \a style has + //! changed. The new font is \a f. + void fontChanged(const QFont &f,int style); + + //! This signal is emitted when the background colour of style number + //! \a style has changed. The new colour is \a c. + void paperChanged(const QColor &c,int style); + + //! This signal is emitted when the value of the lexer property \a prop + //! needs to be changed. The new value is \a val. + void propertyChanged(const char *prop, const char *val); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + virtual bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + virtual bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + struct StyleData { + QFont font; + QColor color; + QColor paper; + bool eol_fill; + }; + + struct StyleDataMap { + bool style_data_set; + QMap<int, StyleData> style_data; + }; + + StyleDataMap *style_map; + + int autoIndStyle; + QFont defFont; + QColor defColor; + QColor defPaper; + QsciAbstractAPIs *apiSet; + + void setStyleDefaults() const; + StyleData &styleData(int style) const; + + QsciLexer(const QsciLexer &); + QsciLexer &operator=(const QsciLexer &); +}; + +#ifdef __APPLE__ +} +#endif + +#endif Added: QScintillAS/Qt4/Qsci/qscilexeractionscript.h =================================================================== --- QScintillAS/Qt4/Qsci/qscilexeractionscript.h (rev 0) +++ QScintillAS/Qt4/Qsci/qscilexeractionscript.h 2010-07-16 08:33:15 UTC (rev 43) @@ -0,0 +1,257 @@ +// This module implements the QsciLexerActionScript class. +// +// Copyright (c) 2009 Mj Mendoza IV <mjm...@ym...> + +#ifndef QSCILEXERACTIONSCRIPT_H +#define QSCILEXERACTIONSCRIPT_H + +#ifdef __APPLE__ +extern "C++" { +#endif + +#include <qobject.h> + +#include <Qsci/qsciglobal.h> +#include <Qsci/qscilexer.h> + + +//! \brief The QsciLexerActionScript class encapsulates the Scintilla C++ +//! lexer. +class QSCINTILLA_EXPORT QsciLexerActionScript : public QsciLexer +{ + Q_OBJECT + +public: + //! This enum defines the meanings of the different styles used by the + //! C++ lexer. + enum { + //! The default. + Default = 0, + + //! A C comment. + Comment = 1, + + //! A C++ comment line. + CommentLine = 2, + + //! A JavaDoc/Doxygen style C comment. + CommentDoc = 3, + + //! A number. + Number = 4, + + //! A keyword. + Keyword = 5, + + //! A double-quoted string. + DoubleQuotedString = 6, + + //! A single-quoted string. + SingleQuotedString = 7, + + //! An IDL UUID. + UUID = 8, + + //! A pre-processor block. + PreProcessor = 9, + + //! An operator. + Operator = 10, + + //! An identifier + Identifier = 11, + + //! The end of a line where a string is not closed. + UnclosedString = 12, + + //! A C# verbatim string. + VerbatimString = 13, + + //! A JavaScript regular expression. + Regex = 14, + + //! A JavaDoc/Doxygen style C++ comment line. + CommentLineDoc = 15, + + //! A keyword defined in keyword set number 2. The class must + //! be sub-classed and re-implement keywords() to make use of + //! this style. + KeywordSet2 = 16, + + //! A JavaDoc/Doxygen keyword. + CommentDocKeyword = 17, + + //! A JavaDoc/Doxygen keyword error. + CommentDocKeywordError = 18, + + //! A global class or typedef defined in keyword set number 4. + //! The class must be sub-classed and re-implement keywords() + //! to make use of this style. + GlobalClass = 19 + }; + + //! Construct a QsciLexerActionScript with parent \a parent. \a parent is typically + //! the QsciScintilla instance. \a caseInsensitiveKeywords is true if the + //! lexer ignores the case of keywords. + QsciLexerActionScript(QObject *parent = 0, bool caseInsensitiveKeywords = false); + + //! Destroys the QsciLexerActionScript instance. + virtual ~QsciLexerActionScript(); + + //! Returns the name of the language. + const char *language() const; + + //! Returns the name of the lexer. Some lexers support a number of + //! languages. + const char *lexer() const; + + //! \internal Returns the character sequences that can separate + //! auto-completion words. + QStringList autoCompletionWordSeparators() const; + + //! \internal Returns a space separated list of words or characters in + //! a particular style that define the end of a block for + //! auto-indentation. The styles is returned via \a style. + const char *blockEnd(int *style = 0) const; + + //! \internal Returns a space separated list of words or characters in + //! a particular style that define the start of a block for + //! auto-indentation. The styles is returned via \a style. + const char *blockStart(int *style = 0) const; + + //! \internal Returns a space separated list of keywords in a + //! particular style that define the start of a block for + //! auto-indentation. The styles is returned via \a style. + const char *blockStartKeyword(int *style = 0) const; + + //! \internal Returns the style used for braces for brace matching. + int braceStyle() const; + + //! \internal Returns the string of characters that comprise a word. + const char *wordCharacters() const; + + //! Returns the foreground colour of the text for style number \a style. + //! + //! \sa defaultPaper() + QColor defaultColor(int style) const; + + //! Returns the end-of-line fill for style number \a style. + bool defaultEolFill(int style) const; + + //! Returns the font for style number \a style. + QFont defaultFont(int style) const; + + //! Returns the background colour of the text for style number \a style. + //! + //! \sa defaultColor() + QColor defaultPaper(int style) const; + + //! Returns the set of keywords for the keyword set \a set recognised + //! by the lexer as a space separated string. + const char *keywords(int set) const; + + //! Returns the descriptive name for style number \a style. If the + //! style is invalid for this language then an empty QString is returned. + //! This is intended to be used in user preference dialogs. + QString description(int style) const; + + //! Causes all properties to be refreshed by emitting the + //! propertyChanged() signal as required. + void refreshProperties(); + + //! Returns true if "} else {" lines can be folded. + //! + //! \sa setFoldAtElse() + bool foldAtElse() const; + + //! Returns true if multi-line comment blocks can be folded. + //! + //! \sa setFoldComments() + bool foldComments() const; + + //! Returns true if trailing blank lines are included in a fold block. + //! + //! \sa setFoldCompact() + bool foldCompact() const; + + //! Returns true if preprocessor blocks can be folded. + //! + //! \sa setFoldPreprocessor() + bool foldPreprocessor() const; + + //! Returns true if preprocessor lines (after the preprocessor + //! directive) are styled. + //! + //! \sa setStylePreprocessor() + bool stylePreprocessor() const; + +public slots: + //! If \a fold is true then "} else {" lines can be folded. The + //! default is false. + //! + //! \sa foldAtElse() + virtual void setFoldAtElse(bool fold); + + //! If \a fold is true then multi-line comment blocks can be folded. + //! The default is false. + //! + //! \sa foldComments() + virtual void setFoldComments(bool fold); + + //! If \a fold is true then trailing blank lines are included in a fold + //! block. The default is true. + //! + //! \sa foldCompact() + virtual void setFoldCompact(bool fold); + + //! If \a fold is true then preprocessor blocks can be folded. The + //! default is true. + //! + //! \sa foldPreprocessor() + virtual void setFoldPreprocessor(bool fold); + + //! If \a style is true then preprocessor lines (after the preprocessor + //! directive) are styled. The default is false. + //! + //! \sa stylePreprocessor() + virtual void setStylePreprocessor(bool style); + +protected: + //! The lexer's properties are read from the settings \a qs. \a prefix + //! (which has a trailing '/') should be used as a prefix to the key of + //! each setting. true is returned if there is no error. + //! + //! \sa writeProperties() + bool readProperties(QSettings &qs,const QString &prefix); + + //! The lexer's properties are written to the settings \a qs. + //! \a prefix (which has a trailing '/') should be used as a prefix to + //! the key of each setting. true is returned if there is no error. + //! + //! \sa readProperties() + bool writeProperties(QSettings &qs,const QString &prefix) const; + +private: + void setAtElseProp(); + void setCommentProp(); + void setCompactProp(); + void setPreprocProp(); + void setStylePreprocProp(); + + bool fold_atelse; + bool fold_comments; + bool fold_compact; + bool fold_preproc; + bool style_preproc; + + bool nocase; + + QsciLexerActionScript(const QsciLexerActionScript &); + QsciLexerActionScript &operator=(const QsciLexerActionScript &); +}; + +#ifdef __APPLE__ +} +#endif + +#endif Added: QScintillAS/Qt4/Qsci/qsciscintilla.h =================================================================== --- QScintillAS/Qt4/Qsci/qsciscintilla.h (rev 0) +++ QScintillAS/Qt4/Qsci/qsciscintilla.h 2010-07-16 08:33:15 UTC (rev 43) @@ -0,0 +1,1572 @@ +// This module defines the "official" high-level API of the Qt port of +// Scintilla. +// +// Copyright (c) 2008 Riverbank Computing Limited <in...@ri...> +// +// This file is part of QScintilla. +// +// This file may be used under the terms of the GNU General Public +// License versions 2.0 or 3.0 as published by the Free Software +// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3 +// included in the packaging of this file. Alternatively you may (at +// your option) use any later version of the GNU General Public +// License if such license has been publicly approved by Riverbank +// Computing Limited (or its successors, if any) and the KDE Free Qt +// Foundation. In addition, as a special exception, Riverbank gives you +// certain additional rights. These rights are described in the Riverbank +// GPL Exception version 1.1, which can be found in the file +// GPL_EXCEPTION.txt in this package. +// +// Please review the following information to ensure GNU General +// Public Licensing requirements will be met: +// http://trolltech.com/products/qt/licenses/licensing/opensource/. If +// you are unsure which license is appropriate for your use, please +// review the following information: +// http://trolltech.com/products/qt/licenses/licensing/licensingoverview +// or contact the sales department at sa...@ri.... +// +// This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE. Trolltech reserves all rights not expressly +// granted herein. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +#ifndef QSCISCINTILLA_H +#define QSCISCINTILLA_H + +#ifdef __APPLE__ +extern "C++" { +#endif + +#include <qobject.h> +#include <qstringlist.h> + +#include <QByteArray> +#include <QList> +#include <QPointer> + +#include <Qsci/qsciglobal.h> +#include <Qsci/qscidocument.h> +#include <Qsci/qsciscintillabase.h> + + +class QIODevice; +class QPoint; + +class QsciLexer; +class QsciCommandSet; +class ListBoxQt; + + +//! \brief The QsciScintilla class implements a higher level, more Qt-like, +//! API to the Scintilla editor widget. +//! +//! QsciScintilla implements methods, signals and slots similar to those found +//! in other Qt editor classes. It also provides a higher level interface to +//! features specific to Scintilla such as syntax styling, call tips, +//! auto-indenting and auto-completion than that provided by QsciScintillaBase. +class QSCINTILLA_EXPORT QsciScintilla : public QsciScintillaBase +{ + Q_OBJECT + +public: + //! This enum defines the different auto-indentation styles. + enum { + //! A line is automatically indented to match the previous line. + AiMaintain = 0x01, + + //! If the language supported by the current lexer has a specific start + //! of block character (e.g. { in C++), then a line that begins with + //! that character is indented as well as the lines that make up the + //! block. It may be logically ored with AiClosing. + AiOpening = 0x02, + + //! If the language supported by the current lexer has a specific end + //! of block character (e.g. } in C++), then a line that begins with + //! that character is indented as well as the lines that make up the + //! block. It may be logically ored with AiOpening. + AiClosing = 0x04 + }; + + //! This enum defines the different sources for auto-completion lists. + enum AutoCompletionSource { + //! No sources are used, ie. automatic auto-completion is disabled. + AcsNone, + + //! The source is all available sources. + AcsAll, + + //! The source is the current document. + AcsDocument, + + //! The source is any installed APIs. + AcsAPIs + }; + + //! This enum defines the different brace matching modes. The character + //! pairs {}, [] and () are treated as braces. The Python lexer will also + //! match a : with the end of the corresponding indented block. + enum BraceMatch { + //! Brace matching is disabled. + NoBraceMatch, + + //! Brace matching is enabled for a brace immediately before the + //! current position. + StrictBraceMatch, + + //! Brace matching is enabled for a brace immediately before or after + //! the current position. + SloppyBraceMatch + }; + + //! This enum defines the different call tip styles. + enum CallTipsStyle { + //! Call tips are disabled. + CallTipsNone, + + //! Call tips are displayed without a context. A context is any scope + //! (e.g. a C++ namespace or a Python module) prior to the function + //! name. + CallTipsNoContext, + + //! Call tips are displayed with a context only if the user hasn't + //! already implicitly identified the context using autocompletion. + //! Note that this style may not always be able to align the call tip + //! with the text being entered. + CallTipsNoAutoCompletionContext, + + //! Call tips are displayed with a context. Note that this style + //! may not always be able to align the call tip with the text being + //! entered. + CallTipsContext + }; + + //! This enum defines the different edge modes for long lines. + enum EdgeMode { + //! Long lines are not marked. + EdgeNone = EDGE_NONE, + + //! A vertical line is drawn at the column set by setEdgeColumn(). + //! This is recommended for monospace fonts. + EdgeLine = EDGE_LINE, + + //! The background color of characters after the column limit is + //! changed to the color set by setEdgeColor(). This is recommended + //! for proportional fonts. + EdgeBackground = EDGE_BACKGROUND + }; + + //! This enum defines the different end-of-line modes. + enum EolMode { + //! A carriage return/line feed as used on Windows systems. + EolWindows = SC_EOL_CRLF, + + //! A line feed as used on Unix systems. + EolUnix = SC_EOL_LF, + + //! A carriage return as used on Mac systems. + EolMac = SC_EOL_CR + }; + + //! This enum defines the different styles for the folding margin. + enum FoldStyle { + //! Folding is disabled. + NoFoldStyle, + + //! Plain folding style using plus and minus symbols. + PlainFoldStyle, + + //! Circled folding style using circled plus and minus symbols. + CircledFoldStyle, + + //! Boxed folding style using boxed plus and minus symbols. + BoxedFoldStyle, + + //! Circled tree style using a flattened tree with circled plus and + //! minus symbols and rounded corners. + CircledTreeFoldStyle, + + //! Boxed tree style using a flattened tree with boxed plus and minus + //! symbols and right-angled corners. + BoxedTreeFoldStyle + }; + + //! This enum defines the different pre-defined marker symbols. + enum MarkerSymbol { + //! A circle. + Circle = SC_MARK_CIRCLE, + + //! A rectangle. + Rectangle = SC_MARK_ROUNDRECT, + + //! A triangle pointing to the right. + RightTriangle = SC_MARK_ARROW, + + //! A smaller rectangle. + SmallRectangle = SC_MARK_SMALLRECT, + + //! An arrow pointing to the right. + RightArrow = SC_MARK_SHORTARROW, + + //! An invisible marker that allows code to track the movement + //! of lines. + Invisible = SC_MARK_EMPTY, + + //! A triangle pointing down. + DownTriangle = SC_MARK_ARROWDOWN, + + //! A drawn minus sign. + Minus = SC_MARK_MINUS, + + //! A drawn plus sign. + Plus = SC_MARK_PLUS, + + //! A vertical line drawn in the background colour. + VerticalLine = SC_MARK_VLINE, + + //! A bottom left corner drawn in the background colour. + BottomLeftCorner = SC_MARK_LCORNER, + + //! A vertical line with a centre right horizontal line drawn + //! in the background colour. + LeftSideSplitter = SC_MARK_TCORNER, + + //! A drawn plus sign in a box. + BoxedPlus = SC_MARK_BOXPLUS, + + //! A drawn plus sign in a connected box. + BoxedPlusConnected = SC_MARK_BOXPLUSCONNECTED, + + //! A drawn minus sign in a box. + BoxedMinus = SC_MARK_BOXMINUS, + + //! A drawn minus sign in a connected box. + BoxedMinusConnected = SC_MARK_BOXMINUSCONNECTED, + + //! A rounded bottom left corner drawn in the background + //! colour. + RoundedBottomLeftCorner = SC_MARK_LCORNERCURVE, + + //! A vertical line with a centre right curved line drawn in the + //! background colour. + LeftSideRoundedSplitter = SC_MARK_TCORNERCURVE, + + //! A drawn plus sign in a circle. + CircledPlus = SC_MARK_CIRCLEPLUS, + + //! A drawn plus sign in a connected box. + CircledPlusConnected = SC_MARK_CIRCLEPLUSCONNECTED, + + //! A drawn minus sign in a circle. + CircledMinus = SC_MARK_CIRCLEMINUS, + + //! A drawn minus sign in a connected circle. + CircledMinusConnected = SC_MARK_CIRCLEMINUSCONNECTED, + + //! No symbol is drawn but the line of text is drawn with the same + //! background colour. + Background = SC_MARK_BACKGROUND, + + //! Three drawn dots. + ThreeDots = SC_MARK_DOTDOTDOT, + + //! Three drawn arrows pointing right. + ThreeRightArrows = SC_MARK_ARROWS + }; + + //! This enum defines the different whitespace visibility modes. When + //! whitespace is visible spaces are displayed as small centred dots and + //! tabs are displayed as light arrows pointing to the right. + enum WhitespaceVisibility { + //! Whitespace is invisible. + WsInvisible = SCWS_INVISIBLE, + + //! Whitespace is always visible. + WsVisible = SCWS_VISIBLEALWAYS, + + //! Whitespace is visible after the whitespace used for indentation. + WsVisibleAfterIndent = SCWS_VISIBLEAFTERINDENT + }; + + //! This enum defines the different line wrap modes. + enum WrapMode { + //! Lines are not wrapped. + WrapNone = SC_WRAP_NONE, + + //! Lines are wrapped at word boundaries. + WrapWord = SC_WRAP_WORD, + + //! Lines are wrapped at character boundaries. + WrapCharacter = SC_WRAP_CHAR + }; + + //! This enum defines the different line wrap visual flags. + enum WrapVisualFlag { + //! No wrap flag is displayed. + WrapFlagNone, + + //! A wrap flag is displayed by the text. + WrapFlagByText, + + //! A wrap flag is displayed by the border. + WrapFlagByBorder + }; + + //! Construct an empty QsciScintilla with parent \a parent. + QsciScintilla(QWidget *parent = 0); + + //! Destroys the QsciScintilla instance. + virtual ~QsciScintilla(); + + //! Returns the API context, which is a list of words, before the position + //! \a pos in the document. The context can be used by auto-completion and + //! call tips to help to identify which API call the user is referring to. + //! In the default implementation the current lexer determines what + //! characters make up a word, and what characters determine the boundaries + //! of words (ie. the start characters). If there is no current lexer then + //! the context will consist of a single word. On return \a context_start + //! will contain the position in the document of the start of the context + //! and \a last_word_start will contain the position in the document of the + //! start of the last word of the context. + virtual QStringList apiContext(int pos, int &context_start, + int &last_word_start); + + //! Returns true if auto-completion lists are case sensitive. + //! + //! \sa setAutoCompletionCaseSensitivity() + bool autoCompletionCaseSensitivity() const; + + //! Returns true if auto-completion fill-up characters are enabled. + //! + //! \sa setAutoCompletionFillups(), setAutoCompletionFillupsEnabled() + bool autoCompletionFillupsEnabled() const; + + //! Returns true if the rest of the word to the right of the current cursor + //! is removed when an item from an auto-completion list is selected. + //! + //! \sa setAutoCompletionReplaceWord() + bool autoCompletionReplaceWord() const; + + //! Returns true if the only item in an auto-completion list with a single + //! entry is automatically used and the list not displayed. + //! + //! \sa setAutoCompletionShowSingle() + bool autoCompletionShowSingle() const; + + //! Returns the current source for the auto-completion list when it is + //! being displayed automatically as the user types. + //! + //! \sa setAutoCompletionSource() + AutoCompletionSource autoCompletionSource() const {return acSource;} + + //! Returns the current threshold for the automatic display of the + //! auto-completion list as the user types. + //! + //! \sa setAutoCompletionThreshold() + int autoCompletionThreshold() const {return acThresh;} + + //! Returns true if auto-indentation is enabled. + //! + //! \sa setAutoIndent() + bool autoIndent() const {return autoInd;} + + //! Returns true if the backspace key unindents a line instead of deleting + //! a character. The default is false. + //! + //! \sa setBackspaceUnindents(), tabIndents(), setTabIndents() + bool backspaceUnindents() const; + + //! Mark the beginning of a sequence of actions that can be undone by a + //! single call to undo(). + //! + //! \sa endUndoAction(), undo() + void beginUndoAction(); + + //! Returns the brace matching mode. + //! + //! \sa setBraceMatching() + BraceMatch braceMatching() const {return braceMode;} + + //! Returns the current call tip style. + //! + //! \sa setCallTipsStyle() + CallTipsStyle callTipsStyle() const {return call_tips_style;} + + //! Returns the maximum number of call tips that are displayed. + //! + //! \sa setCallTipsVisible() + int callTipsVisible() const {return maxCallTips;} + + //! Cancel any current auto-completion or user defined list. + void cancelList(); + + //! Returns true if the current language lexer is case sensitive. If there + //! is no current lexer then true is returned. + bool caseSensitive() const; + + //! Clear all registered images. + //! + //! \sa registerImage() + void clearRegisteredImages(); + + //! Returns the widget's text (ie. foreground) colour. + //! + //! \sa setColor() + QColor color() const; + + //! All the lines of the text have their end-of-lines converted to mode + //! \a mode. + //! + //! \sa eolMode(), setEolMode() + void convertEols(EolMode mode); + + //! Returns the attached document. + //! + //! \sa setDocument() + QsciDocument document() const {return doc;} + + //! Mark the end of a sequence of actions that can be undone by a single + //! call to undo(). + //! + //! \sa beginUndoAction(), undo() + void endUndoAction(); + + //! Returns the color of the marker used to show that a line has exceeded + //! the length set by setEdgeColumn(). + //! + //! \sa setEdgeColor(), \sa setEdgeColumn + QColor edgeColor() const; + + //! Returns the number of the column after which lines are considered to be + //! long. + //! + //! \sa setEdgeColumn() + int edgeColumn() const; + + //! Returns the edge mode which determines how long lines are marked. + //! + //! \sa setEdgeMode() + EdgeMode edgeMode() const; + + //! Set the default font. This has no effect if a language lexer has been + //! set. + void setFont(const QFont &f); + + //! Returns the end-of-line mode. + //! + //! \sa setEolMode() + EolMode eolMode() const; + + //! Returns the visibility of end-of-lines. + //! + //! \sa setEolVisibility() + bool eolVisibility() const; + + //! Find the next occurrence of the string \a expr and return true if + //! \a expr was found, otherwise returns false. If \a expr is found it + //! becomes the current selection. + //! + //! If \a re is true then \a expr is interpreted as a regular expression + //! rather than a simple string. + //! + //! If \a cs is true then the search is case sensitive. + //! + //! If \a wo is true then the search looks for whole word matches only, + //! otherwise it searches for any matching text. + //! + //! If \a wrap is true then the search wraps around the end of the text. + //! + //! If \a forward is true (the default) then the search is forward from the + //! starting position to the end of the text, otherwise it is backwards to + //! the beginning of the text. + //! + //! If either \a line or \a index are negative (the default) then the + //! search begins from the current cursor position. Otherwise the search + //! begins at position \a index of line \a line. + //! + //! If \a show is true (the default) then any text found is made visible + //! (ie. it is unfolded). + //! + //! \sa findNext(), replace() + virtual bool findFirst(const QString &expr... [truncated message content] |