#include <qextscintillabase.h>
Inherited by QextScintilla.
Scintilla (http://www.scintilla.org) is a powerful C++ editor class that supports many features including syntax styling, error indicators, code completion and call tips. It is particularly useful as a programmer's editor.
QextScintillaBase is a port to Qt of Scintilla. It implements the standard Scintilla API which consists of a number of messages each taking up to two arguments.
See QextScintilla for the implementation of a higher level API that is more consistent with the rest of the Qt toolkit.
anonymous enum |
The low-level Scintilla API is implemented as a set of messages each of which takes up to two parameters (wParam and lParam) and optionally return a value. This enum defines all the possible messages.
SCI_ADDTEXT | This message appends some text to the end of the document. wParam is the length of the text. lParam is the text to be appended. |
SCI_GETCURRENTPOS |
This message returns the current position.
|
SCI_GETANCHOR |
This message returns the anchor.
|
SCI_SETSAVEPOINT |
This message marks the current state of the text as the the save point. This is usually done when the text is saved or loaded.
|
SCI_MARKERLINEFROMHANDLE |
This message returns the line that contains a particular instance of a marker. wParam is the handle of the marker.
|
SCI_MARKERDELETEHANDLE |
This message removes a particular instance of a marker. wParam is the handle of the marker.
|
SCI_GOTOPOS |
This message clears the current selection and sets the current position. wParam is the new current position.
|
SCI_SETANCHOR |
This message sets the anchor. wParam is the new anchor.
|
SCI_GETENDSTYLED |
This message returns the character position of the start of the text that needs to be syntax styled.
|
SCI_MARKERDEFINE |
This message sets the symbol used to draw one of 32 markers. Some markers have pre-defined uses, see the SC_MARKNUM_* values. wParam is the number of the marker. lParam is the marker symbol and is one of the SC_MARK_* values.
|
SCI_MARKERSETFORE |
This message sets the foreground colour used to draw a marker. A colour is represented as a 24 bit value. The 8 least significant bits correspond to red, the middle 8 bits correspond to green, and the 8 most significant bits correspond to blue. The default value is 0x000000. wParam is the number of the marker. lParam is the colour.
|
SCI_MARKERSETBACK |
This message sets the background colour used to draw a marker. A colour is represented as a 24 bit value. The 8 least significant bits correspond to red, the middle 8 bits correspond to green, and the 8 most significant bits correspond to blue. The default value is 0xffffff. wParam is the number of the marker. lParam is the colour.
|
SCI_MARKERADD |
This message adds a marker to a line. A handle for the marker is returned which can be used to track the marker's position. wParam is the line number. lParam is the number of the marker.
|
SCI_MARKERDELETE |
This message deletes a marker from a line. wParam is the line number. lParam is the number of the marker.
|
SCI_MARKERDELETEALL |
This message deletes all occurences of a marker. wParam is the number of the marker. If wParam is -1 then all markers are removed.
|
SCI_MARKERGET | This message returns the 32 bit mask of markers at a line. wParam is the line number. |
SCI_MARKERNEXT |
This message looks for the next line to contain at least one marker contained in a 32 bit mask of markers and returns the line number. wParam is the line number to start the search from. lParam is the mask of markers to search for.
|
SCI_MARKERPREVIOUS |
This message looks for the previous line to contain at least one marker contained in a 32 bit mask of markers and returns the line number. wParam is the line number to start the search from. lParam is the mask of markers to search for.
|
SCI_MARKERDEFINEPIXMAP |
This message sets the symbol used to draw one of the 32 markers to a pixmap. Pixmaps use the SC_MARK_PIXMAP marker symbol. wParam is the number of the marker. lParam is a pointer to a QPixmap instance. Note that in other ports of Scintilla this is a pointer to either raw or textual XPM image data.
|
SCI_SETMARGINTYPEN |
This message sets what can be displayed in a margin. wParam is the number of the margin: 0, 1 or 2. lParam is the logical or of the SC_MARGIN_* values.
|
SCI_GETMARGINTYPEN |
This message returns what can be displayed in a margin. wParam is the number of the margin: 0, 1 or 2.
|
SCI_SETMARGINWIDTHN |
This message sets the width of a margin in pixels. wParam is the number of the margin: 0, 1 or 2. lParam is the new margin width.
|
SCI_GETMARGINWIDTHN |
This message returns the width of a margin in pixels. wParam is the number of the margin: 0, 1 or 2.
|
SCI_SETMARGINMASKN |
This message sets the mask of a margin. The mask is a 32 value with one bit for each possible marker. If a bit is set then the corresponding marker is displayed. By default, all markers are displayed. wParam is the number of the margin: 0, 1 or 2. lParam is the new margin mask.
|
SCI_GETMARGINMASKN |
This message returns the mask of a margin. wParam is the number of the margin: 0, 1 or 2.
|
SCI_SETMARGINSENSITIVEN |
This message sets the sensitivity of a margin to mouse clicks. wParam is the number of the margin: 0, 1 or 2. lParam is non-zero to make the margin sensitive to mouse clicks. When the mouse is clicked the SCN_MARGINCLICK() signal is emitted.
|
SCI_GETMARGINSENSITIVEN |
This message returns the sensitivity of a margin to mouse clicks. wParam is the number of the margin: 0, 1 or 2.
|
SCI_GETREADONLY |
This message returns a non-zero value if the document is read-only.
|
SCI_SETCURRENTPOS |
This message sets the current position. wParam is the new current position.
|
SCI_GETMODIFY | This message returns a non-zero value if the document has been modified. |
SCI_SETREADONLY |
This message sets the read-only state of the document. wParam is the new read-only state of the document.
|
SCI_EMPTYUNDOBUFFER | This message empties the undo buffer. |
SCI_SETTEXT |
This message sets the text of the document. wParam is unused. lParam is the new text of the document.
|
SCI_GETTEXT |
This message gets the text of the document. wParam is size of the buffer that the text is copied to. lParam is the address of the buffer that the text is copied to.
|
SCI_GETTEXTLENGTH | This message returns the length of the document. |
SCI_TEXTWIDTH | This message returns the width of some text when rendered in a particular style. wParam is the style number and is one of the STYLE_* values or one of the styles defined by a lexer. lParam is a pointer to the text. |
SCI_REGISTERIMAGE |
This message takes a copy of an image and registers it so that it can be refered to by a unique integer identifier. wParam is the image's identifier. lParam is a pointer to a QPixmap instance. Note that in other ports of Scintilla this is a pointer to either raw or textual XPM image data.
|
SCI_CLEARREGISTEREDIMAGES |
This message de-registers all currently registered images.
|
SCI_SETLEXER | This message sets the number of the lexer to use for syntax styling. wParam is the number of the lexer and is one of the SCLEX_* values. |
SCI_GETLEXER | This message returns the number of the lexer being used for syntax styling. |
SCI_SETLEXERLANGUAGE | This message sets the name of the lexer to use for syntax styling. wParam is unused. lParam is the name of the lexer. |
anonymous enum |
This enum defines the different selection modes.
anonymous enum |
This enum defines the different marker symbols.
anonymous enum |
This enum defines what can be displayed in a margin.
anonymous enum |
anonymous enum |
This enum defines the different language lexers.
QextScintillaBase::QextScintillaBase | ( | QWidget * | parent = 0 , |
|
const char * | name = 0 , |
|||
WFlags | f = 0 | |||
) |
Construct an empty QextScintillaBase with parent parent, name name, and widget flags f.
virtual QextScintillaBase::~QextScintillaBase | ( | ) | [virtual] |
Destroys the QextScintillaBase instance.
static QextScintillaBase* QextScintillaBase::pool | ( | ) | [static] |
Returns a pointer to a QextScintillaBase instance, or 0 if there isn't one. This can be used by the higher level API to send messages that aren't associated with a particular instance.
long QextScintillaBase::SendScintilla | ( | unsigned int | msg, | |
unsigned long | wParam = 0 , |
|||
long | lParam = 0 | |||
) |
Send the Scintilla message msg with the optional parameters wParam and lParam.
virtual QSize QextScintillaBase::sizeHint | ( | ) | const [virtual] |
Returns the recommended size of the widget.
QWidget* QextScintillaBase::viewport | ( | ) | const |
Returns the viewport widget. This is the widget that actually contains the text.
void QextScintillaBase::QSCN_SELCHANGED | ( | bool | yes | ) | [signal] |
This signal is emitted when text is selected or de-selected. yes is TRUE if text has been selected and FALSE if text has been deselected.
void QextScintillaBase::SCN_AUTOCSELECTION | ( | const char * | selection, | |
int | position | |||
) | [signal] |
This signal is emitted when the user selects an item in an auto-completion list. It is emitted before the selection is inserted. The insertion can be cancelled by sending an SCI_AUTOCANCEL message from a connected slot. position is the start position of the word being completed. selection is the text of the selection.
void QextScintillaBase::SCEN_CHANGE | ( | ) | [signal] |
This signal is emitted when the document has changed for any reason.
void QextScintillaBase::SCN_CALLTIPCLICK | ( | int | direction | ) | [signal] |
This signal ir emitted when the user clicks on a calltip. position is 1 if the user clicked on the up arrow, 2 if the user clicked on the down arrow, and 0 if the user clicked elsewhere.
void QextScintillaBase::SCN_CHARADDED | ( | int | charadded | ) | [signal] |
This signal is emitted whenever the user enters an ordinary character into the text. charadded is the character. It can be used to decide to display a call tip or an auto-completion list.
void QextScintillaBase::SCN_HOTSPOTCLICK | ( | int | position, | |
int | modifiers | |||
) | [signal] |
This signal is emitted when the user clicks on text in a style with the hotspot attribute set. position is the position in the text where the click occured. modifiers is the logical or of the modifier keys that were pressed when the user clicked.
void QextScintillaBase::SCN_HOTSPOTDOUBLECLICK | ( | int | position, | |
int | modifiers | |||
) | [signal] |
This signal is emitted when the user double clicks on text in a style with the hotspot attribute set. position is the position in the text where the double click occured. modifiers is the logical or of the modifier keys that were pressed when the user double clicked.
void QextScintillaBase::SCN_MACRORECORD | ( | unsigned | int, | |
unsigned | long, | |||
long | ||||
) | [signal] |
This signal is emitted when a recordable editor command has been executed.
void QextScintillaBase::SCN_MARGINCLICK | ( | int | position, | |
int | modifiers, | |||
int | margin | |||
) | [signal] |
This signal is emitted when the user clicks on a sensitive margin. position is the position of the start of the line against which the user clicked. modifiers is the logical or of the modifier keys that were pressed when the user clicked. margin is the number of the margin the user clicked in: 0, 1 or 2.
void QextScintillaBase::SCN_MODIFYATTEMPTRO | ( | ) | [signal] |
This signal is emitted when the user attempts to modify read-only text.
void QextScintillaBase::SCN_PAINTED | ( | ) | [signal] |
This signal is emitted when painting has been completed. It is useful to trigger some other change but to have the paint be done first to appear more reponsive to the user.
void QextScintillaBase::SCN_SAVEPOINTLEFT | ( | ) | [signal] |
This signal is emitted when the current state of the text no longer corresponds to the state of the text at the save point.
void QextScintillaBase::SCN_SAVEPOINTREACHED | ( | ) | [signal] |
This signal is emitted when the current state of the text corresponds to the state of the text at the save point. This allows feedback to be given to the user as to whether the text has been modified since it was last saved.
void QextScintillaBase::SCN_STYLENEEDED | ( | int | position | ) | [signal] |
This signal is emitted when a range of text needs to be syntax styled. The range is from the value returned by the SCI_GETENDSTYLED message and position. It is only emitted if the currently selected lexer is SCNLEX_CONTAINER.
bool QextScintillaBase::eventFilter | ( | QObject * | o, | |
QEvent * | e | |||
) | [protected] |
Re-implemented to filter certain events.
virtual void QextScintillaBase::keyPressEvent | ( | QKeyEvent * | ke | ) | [protected, virtual] |
Re-implemented to handle the key presses for the widget.
virtual void QextScintillaBase::focusInEvent | ( | QFocusEvent * | ) | [protected, virtual] |
Re-implemented to tell Scintilla it has the focus.
virtual void QextScintillaBase::focusOutEvent | ( | QFocusEvent * | ) | [protected, virtual] |
Re-implemented to tell Scintilla it has lost the focus.
virtual bool QextScintillaBase::focusNextPrevChild | ( | bool | ) | [protected, virtual] |
Re-implemented to allow tabs to be entered as text.
virtual void QextScintillaBase::startDrag | ( | ) | [protected, virtual] |
Start a drag operation.