diff options
Diffstat (limited to 'qt/qextscintilla.h')
-rw-r--r-- | qt/qextscintilla.h | 147 |
1 files changed, 74 insertions, 73 deletions
diff --git a/qt/qextscintilla.h b/qt/qextscintilla.h index ec64f4f..471032f 100644 --- a/qt/qextscintilla.h +++ b/qt/qextscintilla.h @@ -1,36 +1,36 @@ -// This module defines the "official" high-level API of the Qt port of +// This module defines the "official" high-level API of the TQt port of // Scintilla. // // Copyright (c) 2006 // Riverbank Computing Limited <info@riverbankcomputing.co.uk> // -// This file is part of QScintilla. +// This file is part of TQScintilla. // -// This copy of QScintilla is free software; you can redistribute it and/or +// This copy of TQScintilla is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2, or (at your option) any // later version. // -// QScintilla is supplied in the hope that it will be useful, but WITHOUT ANY +// TQScintilla is supplied in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more // details. // // You should have received a copy of the GNU General Public License along with -// QScintilla; see the file LICENSE. If not, write to the Free Software +// TQScintilla; see the file LICENSE. If not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#ifndef QEXTSCINTILLA_H -#define QEXTSCINTILLA_H +#ifndef TQEXTSCINTILLA_H +#define TQEXTSCINTILLA_H -#include <qobject.h> -#include <qguardedptr.h> +#include <tqobject.h> +#include <tqguardedptr.h> -#include <qextscintillaglobal.h> -#include <qextscintillabase.h> -#include <qextscintilladocument.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillabase.h> +#include <tqextscintilladocument.h> class QextScintillaLexer; @@ -38,19 +38,20 @@ class QextScintillaAPIs; class QextScintillaCommandSet; -//! \brief The QextScintilla class implements a higher level, more Qt-like, +//! \brief The QextScintilla class implements a higher level, more TQt-like, //! API to the Scintilla editor widget. //! //! QextScintilla implements methods, signals and slots similar to those found -//! in other Qt editor classes. It also provides a higher level interface to +//! in other TQt 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 QextScintillaBase. //! -//! The API is modelled on QTextEdit - a method of the same name should behave +//! The API is modelled on TQTextEdit - a method of the same name should behave //! in the same way. -class QEXTSCINTILLA_EXPORT QextScintilla : public QextScintillaBase +class TQEXTSCINTILLA_EXPORT QextScintilla : public QextScintillaBase { Q_OBJECT + TQ_OBJECT public: //! This enum defines the different auto-indentation styles. @@ -277,7 +278,7 @@ public: //! Construct an empty QextScintilla with parent \a parent, name \a //! name, and widget flags \a f. - QextScintilla(QWidget *parent = 0,const char *name = 0,WFlags f = 0); + QextScintilla(TQWidget *parent = 0,const char *name = 0,WFlags f = 0); //! Destroys the QextScintilla instance. virtual ~QextScintilla(); @@ -361,7 +362,7 @@ public: //! Returns the widget's text (ie. foreground) colour. //! //! \sa setColor() - QColor color() const; + TQColor color() const; //! Returns the attached document. //! @@ -378,7 +379,7 @@ public: //! exceeded the length set by setEdgeColumn(). //! //! \sa setEdgeColor(), \sa setEdgeColumn - QColor edgeColor(); + TQColor edgeColor(); //! Returns the number of the column after which lines are considered //! to be long. @@ -428,7 +429,7 @@ public: //! visible (ie. it is unfolded). //! //! \sa findNext(), replace() - virtual bool findFirst(const QString &expr,bool re,bool cs,bool wo, + virtual bool findFirst(const TQString &expr,bool re,bool cs,bool wo, bool wrap,bool forward = TRUE,int line = -1, int index = -1,bool show = TRUE); @@ -525,7 +526,7 @@ public: //! Returns the line which is at position \a pos or -1 if there is no //! line at that position. - int lineAt(const QPoint &pos); + int lineAt(const TQPoint &pos); //! Returns the length of line \a line or -1 if there is no such line. int lineLength(int line); @@ -597,7 +598,7 @@ public: //! automatically allocated. The marker number is returned or -1 if //! the marker number was already allocated or too many markers have //! been defined. - int markerDefine(const QPixmap *pm,int mnr = -1); + int markerDefine(const TQPixmap *pm,int mnr = -1); //! Add a marker number \a mnr to line number \a linenr. A handle for //! the marker is returned which can be used to track the marker's @@ -652,7 +653,7 @@ public: //! Returns the widget's paper (ie. background) colour. //! //! \sa setPaper() - QColor paper() const; + TQColor paper() const; //! Recolours the document between the \a start and \a end positions. //! \a start defaults to the start of the document and \a end defaults @@ -663,13 +664,13 @@ public: //! displayed in auto-completion lists. //! //! \sa clearRegisteredImages(), QextScintillaAPIs - void registerImage(int id,const QPixmap *pm); + void registerImage(int id,const TQPixmap *pm); //! Replace the current selection, set by a previous call to //! findFirst() or findNext(), with \a replaceStr. //! //! \sa findFirst(), findNext() - virtual void replace(const QString &replaceStr); + virtual void replace(const TQString &replaceStr); //! Reset the fold margin colours to their defaults. //! @@ -680,7 +681,7 @@ public: //! pattern of two colours, \a fore and \a back. //! //! \sa resetFoldMarginColors() - void setFoldMarginColors(const QColor &fore,const QColor &back); + void setFoldMarginColors(const TQColor &fore,const TQColor &back); //! Sets the APIs used for auto-completion to \a apis. If \a apis is 0 //! then any existing APIs are removed. @@ -721,15 +722,15 @@ public: //! Set the background colour of call tips to \a col. The default is //! white. - void setCallTipsBackgroundColor(const QColor &col); + void setCallTipsBackgroundColor(const TQColor &col); //! Set the foreground colour of call tips to \a col. The default is //! mid-gray. - void setCallTipsForegroundColor(const QColor &col); + void setCallTipsForegroundColor(const TQColor &col); //! Set the highlighted colour of call tip text to \a col. The default //! is dark blue. - void setCallTipsHighlightColor(const QColor &col); + void setCallTipsHighlightColor(const TQColor &col); //! Set the maximum number of call tips that are displayed to \a nr. //! If the maximum number is 0 then all applicable call tips are @@ -750,7 +751,7 @@ public: //! the length set by setEdgeColumn(). //! //! \sa edgeColor(), \sa setEdgeColumn - void setEdgeColor(const QColor &col); + void setEdgeColor(const TQColor &col); //! Set the number of the column after which lines are considered to be //! long. @@ -765,44 +766,44 @@ public: //! Set the default font. This has no effect if a language lexer has been //! set. - virtual void setFont(const QFont &f); + virtual void setFont(const TQFont &f); //! Set the background colour, including the alpha component, of marker //! \a mnr to \a col. If \a mnr is -1 then the colour of all markers //! is set. The default is white. //! //! \sa setMarkerForegroundColor() - void setMarkerBackgroundColor(const QColor &col,int mnr = -1); + void setMarkerBackgroundColor(const TQColor &col,int mnr = -1); //! Set the foreground colour of marker \a mnr to \a col. If \a mnr is //! -1 then the colour of all markers is set. The default is black. //! //! \sa setMarkerBackgroundColor() - void setMarkerForegroundColor(const QColor &col,int mnr = -1); + void setMarkerForegroundColor(const TQColor &col,int mnr = -1); //! Set the background colour used to display matched braces to \a col. //! The default is white. //! //! \sa setMatchedBraceForegroundColor() - void setMatchedBraceBackgroundColor(const QColor &col); + void setMatchedBraceBackgroundColor(const TQColor &col); //! Set the foreground colour used to display matched braces to \a col. //! The default is red. //! //! \sa setMatchedBraceBackgroundColor() - void setMatchedBraceForegroundColor(const QColor &col); + void setMatchedBraceForegroundColor(const TQColor &col); //! Set the background colour used to display unmatched braces to //! \a col. The default is white. //! //! \sa setUnmatchedBraceForegroundColor() - void setUnmatchedBraceBackgroundColor(const QColor &col); + void setUnmatchedBraceBackgroundColor(const TQColor &col); //! Set the foreground colour used to display unmatched braces to //! \a col. The default is blue. //! //! \sa setUnmatchedBraceBackgroundColor() - void setUnmatchedBraceForegroundColor(const QColor &col); + void setUnmatchedBraceForegroundColor(const TQColor &col); //! Set the visual flags displayed when a line is wrapped. \a eflag //! determines if and where the flag at the end of a line is displayed. @@ -816,7 +817,7 @@ public: //! currently selected text. //! //! \sa hasSelectedText() - QString selectedText(); + TQString selectedText(); //! Displays a user defined list which can be interacted with like an //! auto-completion list. \a id is an identifier for the list which @@ -825,7 +826,7 @@ public: //! populated. //! //! \sa cancelList(), isListActive(), userListActivated() - void showUserList(int id, const QStringList &list); + void showUserList(int id, const TQStringList &list); //! The standard command set is returned. QextScintillaCommandSet *standardCommands() const {return stdCmds;} @@ -844,14 +845,14 @@ public: //! Returns the text edit's text. //! //! \sa setText() - QString text(); + TQString text(); //! \overload //! //! Returns the text of line \a line. //! //! \sa setText() - QString text(int line); + TQString text(int line); //! Returns the height in pixels of the text in line number \a linenr. int textHeight(int linenr); @@ -869,7 +870,7 @@ public: public slots: //! Appends the text \a text to the end of the text edit. Note that //! the undo/redo history is cleared by this function. - virtual void append(const QString &text); + virtual void append(const TQString &text); //! Display an auto-completion list based on any installed APIs, the //! current contents of the document and the characters immediately to @@ -919,10 +920,10 @@ public slots: //! If any lines are currently folded then they are all unfolded. //! Otherwise all lines are folded. This has the same effect as //! clicking in the fold margin with the shift and control keys - //! pressed. If \a children is not set (the default) then only the top + //! pressed. If \a tqchildren is not set (the default) then only the top //! level fold points are affected, otherwise the state of all fold //! points are changed. - virtual void foldAll(bool children = FALSE); + virtual void foldAll(bool tqchildren = FALSE); //! If the line \a line is folded then it is unfolded. Otherwise it is //! folded. This has the same effect as clicking in the fold margin. @@ -934,11 +935,11 @@ public slots: virtual void indent(int line); //! Insert the text \a text at the current position. - virtual void insert(const QString &text); + virtual void insert(const TQString &text); //! Insert the text \a text in the line \a line at the position //! \a index. - virtual void insertAt(const QString &text,int line,int index); + virtual void insertAt(const TQString &text,int line,int index); //! If the cursor is either side of a brace character then move it to //! the position of the corresponding brace. @@ -1036,13 +1037,13 @@ public slots: virtual void setBackspaceUnindents(bool unindent); //! Sets the foreground colour of the caret to \a col. - virtual void setCaretForegroundColor(const QColor &col); + virtual void setCaretForegroundColor(const TQColor &col); //! Sets the background colour, including the alpha component, of the //! line containing the caret to \a col. //! //! \sa setCaretLineVisible() - virtual void setCaretLineBackgroundColor(const QColor &col); + virtual void setCaretLineBackgroundColor(const TQColor &col); //! Enables or disables, according to \a enable, the background color //! of the line containing the caret. @@ -1058,7 +1059,7 @@ public slots: //! effect if a language lexer has been set. //! //! \sa color() - virtual void setColor(const QColor &c); + virtual void setColor(const TQColor &c); //! Sets the cursor to the line \a line at the position \a index. //! @@ -1097,12 +1098,12 @@ public slots: //! Set the background colour of indentation guides to \a col. //! //! \sa setIndentationGuidesForegroundColor() - virtual void setIndentationGuidesBackgroundColor(const QColor &col); + virtual void setIndentationGuidesBackgroundColor(const TQColor &col); //! Set the foreground colour of indentation guides to \a col. //! //! \sa setIndentationGuidesBackgroundColor() - virtual void setIndentationGuidesForegroundColor(const QColor &col); + virtual void setIndentationGuidesForegroundColor(const TQColor &col); //! If \a tabs is TRUE then indentations are created using tabs and //! spaces, rather than just spaces. @@ -1126,16 +1127,16 @@ public slots: //! a gray. //! //! \sa setMarginsForegroundColor() - virtual void setMarginsBackgroundColor(const QColor &col); + virtual void setMarginsBackgroundColor(const TQColor &col); //! Set the font used in all margins to \a f. - virtual void setMarginsFont(const QFont &f); + virtual void setMarginsFont(const TQFont &f); //! Set the foreground colour of all margins to \a col. The default is //! black. //! //! \sa setMarginsBackgroundColor() - virtual void setMarginsForegroundColor(const QColor &col); + virtual void setMarginsForegroundColor(const TQColor &col); //! Enables or disables, according to \a lnrs, the display of line //! numbers in margin \a margin. @@ -1168,7 +1169,7 @@ public slots: //! display \a s in the current margin font. //! //! \sa marginWidth(), QextScintillaBase::SCI_SETMARGINWIDTHN - virtual void setMarginWidth(int margin,const QString &s); + virtual void setMarginWidth(int margin,const TQString &s); //! Sets the modified state of the text edit to \a m. Note that it is //! only possible to clear the modified state (where \a m is FALSE). @@ -1182,7 +1183,7 @@ public slots: //! effect if a language lexer has been set. //! //! \sa paper() - virtual void setPaper(const QColor &c); + virtual void setPaper(const TQColor &c); //! Sets the read-only state of the text edit to \a ro. //! @@ -1201,12 +1202,12 @@ public slots: //! selected text to \a col. //! //! \sa resetSelectionBackgroundColor(), setSelectionForegroundColor() - virtual void setSelectionBackgroundColor(const QColor &col); + virtual void setSelectionBackgroundColor(const TQColor &col); //! Sets the foreground colour of selected text to \a col. //! //! \sa resetSelectionForegroundColor(), setSelectionBackgroundColor() - virtual void setSelectionForegroundColor(const QColor &col); + virtual void setSelectionForegroundColor(const TQColor &col); //! If \a indent is TRUE then the tab key will indent a line rather //! then insert a tab character. @@ -1223,7 +1224,7 @@ public slots: //! undo/redo history is cleared by this function. //! //! \sa text() - virtual void setText(const QString &text); + virtual void setText(const TQString &text); //! Sets the current text encoding. If \a cp is TRUE then UTF8 is //! used, otherwise Latin1 is used. @@ -1314,7 +1315,7 @@ signals: //! clicked. //! //! \sa marginSensitivity(), setMarginSensitivity() - void marginClicked(int margin,int line,Qt::ButtonState state); + void marginClicked(int margin,int line,TQt::ButtonState state); //! This signal is emitted whenever the user attempts to modify //! read-only text. @@ -1341,7 +1342,7 @@ signals: //! the text of the item. //! //! \sa showUserList() - void userListActivated(int id, const QString &string); + void userListActivated(int id, const TQString &string); private slots: void handleCallTipClick(int dir); @@ -1355,10 +1356,10 @@ private slots: void handleSelectionChanged(bool yes); void handleUserListSelection(const char *text, int id); - void handleStyleColorChange(const QColor &c,int style); + void handleStyleColorChange(const TQColor &c,int style); void handleStyleEolFillChange(bool eolfill,int style); - void handleStyleFontChange(const QFont &f,int style); - void handleStylePaperChange(const QColor &c,int style); + void handleStyleFontChange(const TQFont &f,int style); + void handleStylePaperChange(const TQColor &c,int style); void handleUpdateUI(); @@ -1390,8 +1391,8 @@ private: void foldExpand(int &line,bool doExpand,bool force = FALSE, int visLevels = 0,int level = -1); void setFoldMarker(int marknr,int mark = SC_MARK_EMPTY); - QString convertText(const char *s); - void setStylesFont(const QFont &f,int style); + TQString convertText(const char *s); + void setStylesFont(const TQFont &f,int style); void braceMatch(); bool findMatchingBrace(long &brace,long &other,BraceMatch mode); @@ -1412,7 +1413,7 @@ private: FindState() : inProgress(0) {} bool inProgress; - QString expr; + TQString expr; bool wrap; bool forward; int flags; @@ -1437,18 +1438,18 @@ private: int maxCallTips; bool showSingle; long ctpos; - QGuardedPtr<QextScintillaLexer> lex; + TQGuardedPtr<QextScintillaLexer> lex; QextScintillaCommandSet *stdCmds; QextScintillaDocument doc; bool modified; - QColor nl_text_colour; - QColor nl_paper_colour; - QFont nl_font; + TQColor nl_text_colour; + TQColor nl_paper_colour; + TQFont nl_font; bool explicit_fillups; bool fillups_enabled; - QCString saved_fillups; + TQCString saved_fillups; -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintilla(const QextScintilla &); QextScintilla &operator=(const QextScintilla &); #endif |