[Geesas-Devs] SF.net SVN: geesas:[43] QScintillAS/Qt4/Qsci
Status: Abandoned
Brought to you by:
creek23
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] |