Updated to Scintilla from 1.45 to 1.47
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -44,7 +44,7 @@
|
|||||||
#define wxSTC_OPTIONAL_START 3000
|
#define wxSTC_OPTIONAL_START 3000
|
||||||
#define wxSTC_LEXER_START 4000
|
#define wxSTC_LEXER_START 4000
|
||||||
|
|
||||||
// Redoes the next action on the undo history
|
// Redoes the next action on the undo history.
|
||||||
#define wxSTC_CMD_REDO 2011
|
#define wxSTC_CMD_REDO 2011
|
||||||
|
|
||||||
// Select all the text in the document.
|
// Select all the text in the document.
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
#define wxSTC_MARK_MINUS 7
|
#define wxSTC_MARK_MINUS 7
|
||||||
#define wxSTC_MARK_PLUS 8
|
#define wxSTC_MARK_PLUS 8
|
||||||
|
|
||||||
// Shapes used for outlining column
|
// Shapes used for outlining column.
|
||||||
#define wxSTC_MARK_VLINE 9
|
#define wxSTC_MARK_VLINE 9
|
||||||
#define wxSTC_MARK_LCORNER 10
|
#define wxSTC_MARK_LCORNER 10
|
||||||
#define wxSTC_MARK_TCORNER 11
|
#define wxSTC_MARK_TCORNER 11
|
||||||
@@ -85,11 +85,11 @@
|
|||||||
#define wxSTC_MARK_CIRCLEMINUS 20
|
#define wxSTC_MARK_CIRCLEMINUS 20
|
||||||
#define wxSTC_MARK_CIRCLEMINUSCONNECTED 21
|
#define wxSTC_MARK_CIRCLEMINUSCONNECTED 21
|
||||||
|
|
||||||
// Invisible mark that only sets the line background color
|
// Invisible mark that only sets the line background color.
|
||||||
#define wxSTC_MARK_BACKGROUND 22
|
#define wxSTC_MARK_BACKGROUND 22
|
||||||
#define wxSTC_MARK_CHARACTER 10000
|
#define wxSTC_MARK_CHARACTER 10000
|
||||||
|
|
||||||
// Markers used for outlining column
|
// Markers used for outlining column.
|
||||||
#define wxSTC_MARKNUM_FOLDEREND 25
|
#define wxSTC_MARKNUM_FOLDEREND 25
|
||||||
#define wxSTC_MARKNUM_FOLDEROPENMID 26
|
#define wxSTC_MARKNUM_FOLDEROPENMID 26
|
||||||
#define wxSTC_MARKNUM_FOLDERMIDTAIL 27
|
#define wxSTC_MARKNUM_FOLDERMIDTAIL 27
|
||||||
@@ -270,8 +270,7 @@
|
|||||||
// Delete the selection or if no selection, the character before the caret.
|
// Delete the selection or if no selection, the character before the caret.
|
||||||
#define wxSTC_CMD_DELETEBACK 2326
|
#define wxSTC_CMD_DELETEBACK 2326
|
||||||
|
|
||||||
// If selection is empty or all on one line replace the selection with a tab
|
// If selection is empty or all on one line replace the selection with a tab character.
|
||||||
// character.
|
|
||||||
// If more than one line selected, indent the lines.
|
// If more than one line selected, indent the lines.
|
||||||
#define wxSTC_CMD_TAB 2327
|
#define wxSTC_CMD_TAB 2327
|
||||||
|
|
||||||
@@ -325,40 +324,46 @@
|
|||||||
#define wxSTC_CMD_LINESCROLLUP 2343
|
#define wxSTC_CMD_LINESCROLLUP 2343
|
||||||
|
|
||||||
// Delete the selection or if no selection, the character before the caret.
|
// Delete the selection or if no selection, the character before the caret.
|
||||||
// Will not delete the chraacter before at the start of a line.
|
// Will not delete the character before at the start of a line.
|
||||||
#define wxSTC_CMD_DELETEBACKNOTLINE 2344
|
#define wxSTC_CMD_DELETEBACKNOTLINE 2344
|
||||||
#define wxSTC_EDGE_NONE 0
|
#define wxSTC_EDGE_NONE 0
|
||||||
#define wxSTC_EDGE_LINE 1
|
#define wxSTC_EDGE_LINE 1
|
||||||
#define wxSTC_EDGE_BACKGROUND 2
|
#define wxSTC_EDGE_BACKGROUND 2
|
||||||
|
|
||||||
// Show caret within N lines of edge when it's scrolled to view
|
|
||||||
// If CARET_SLOP not set then centre caret on screen when it's
|
|
||||||
// scrolled to view
|
|
||||||
#define wxSTC_CARET_SLOP 0x01
|
|
||||||
|
|
||||||
// Value not used
|
|
||||||
#define wxSTC_CARET_CENTER 0x02
|
|
||||||
|
|
||||||
// If CARET_SLOP also set then reposition whenever outside slop border
|
|
||||||
// If CARET_SLOP not set then recentre even when visible
|
|
||||||
#define wxSTC_CARET_STRICT 0x04
|
|
||||||
|
|
||||||
// If CARET_XEVEN set then both left and right margins are given equal weight
|
|
||||||
// rather than favouring left following behaviour.
|
|
||||||
#define wxSTC_CARET_XEVEN 0x08
|
|
||||||
|
|
||||||
// If CARET_XJUMPS set then when caret reaches the margin the display jumps
|
|
||||||
// enough to leave the caret solidly within the display.
|
|
||||||
#define wxSTC_CARET_XJUMPS 0x10
|
|
||||||
#define wxSTC_CURSORNORMAL -1
|
#define wxSTC_CURSORNORMAL -1
|
||||||
#define wxSTC_CURSORWAIT 3
|
#define wxSTC_CURSORWAIT 3
|
||||||
|
|
||||||
// Constants for use with SetVisiblePolicy, similar to SetCaretPolicy
|
// Constants for use with SetVisiblePolicy, similar to SetCaretPolicy.
|
||||||
#define wxSTC_VISIBLE_SLOP 0x01
|
#define wxSTC_VISIBLE_SLOP 0x01
|
||||||
#define wxSTC_VISIBLE_STRICT 0x04
|
#define wxSTC_VISIBLE_STRICT 0x04
|
||||||
|
|
||||||
|
// Caret policy, used by SetXCaretPolicy and SetYCaretPolicy.
|
||||||
|
// If CARET_SLOP is set, we can define a slop value: caretSlop.
|
||||||
|
// This value defines an unwanted zone (UZ) where the caret is... unwanted.
|
||||||
|
// This zone is defined as a number of pixels near the vertical margins,
|
||||||
|
// and as a number of lines near the horizontal margins.
|
||||||
|
// By keeping the caret away from the edges, it is seen within its context,
|
||||||
|
// so it is likely that the identifier that the caret is on can be completely seen,
|
||||||
|
// and that the current line is seen with some of the lines following it which are
|
||||||
|
// often dependent on that line.
|
||||||
|
#define wxSTC_CARET_SLOP 0x01
|
||||||
|
|
||||||
|
// If CARET_STRICT is set, the policy is enforced... strictly.
|
||||||
|
// The caret is centred on the display if slop is not set,
|
||||||
|
// and cannot go in the UZ if slop is set.
|
||||||
|
#define wxSTC_CARET_STRICT 0x04
|
||||||
|
|
||||||
|
// If CARET_JUMPS is set, the display is moved more energetically
|
||||||
|
// so the caret can move in the same direction longer before the policy is applied again.
|
||||||
|
#define wxSTC_CARET_JUMPS 0x10
|
||||||
|
|
||||||
|
// If CARET_EVEN is not set, instead of having symmetrical UZs,
|
||||||
|
// the left and bottom UZs are extended up to right and top UZs respectively.
|
||||||
|
// This way, we favour the displaying of useful information: the begining of lines,
|
||||||
|
// where most code reside, and the lines after the caret, eg. the body of a function.
|
||||||
|
#define wxSTC_CARET_EVEN 0x08
|
||||||
|
|
||||||
// Notifications
|
// Notifications
|
||||||
// Type of modification and the action which caused the modification
|
// Type of modification and the action which caused the modification.
|
||||||
// These are defined as a bit mask to make it easy to specify which notifications are wanted.
|
// These are defined as a bit mask to make it easy to specify which notifications are wanted.
|
||||||
// One bit is set from each of SC_MOD_* and SC_PERFORMED_*.
|
// One bit is set from each of SC_MOD_* and SC_PERFORMED_*.
|
||||||
#define wxSTC_MOD_INSERTTEXT 0x1
|
#define wxSTC_MOD_INSERTTEXT 0x1
|
||||||
@@ -374,9 +379,9 @@
|
|||||||
#define wxSTC_MOD_BEFOREDELETE 0x800
|
#define wxSTC_MOD_BEFOREDELETE 0x800
|
||||||
#define wxSTC_MODEVENTMASKALL 0xF77
|
#define wxSTC_MODEVENTMASKALL 0xF77
|
||||||
|
|
||||||
// Symbolic key codes and modifier flags
|
// Symbolic key codes and modifier flags.
|
||||||
// ASCII and other printable characters below 256
|
// ASCII and other printable characters below 256.
|
||||||
// Extended keys above 300
|
// Extended keys above 300.
|
||||||
#define wxSTC_KEY_DOWN 300
|
#define wxSTC_KEY_DOWN 300
|
||||||
#define wxSTC_KEY_UP 301
|
#define wxSTC_KEY_UP 301
|
||||||
#define wxSTC_KEY_LEFT 302
|
#define wxSTC_KEY_LEFT 302
|
||||||
@@ -432,6 +437,7 @@
|
|||||||
#define wxSTC_LEX_PHP 30
|
#define wxSTC_LEX_PHP 30
|
||||||
#define wxSTC_LEX_BAAN 31
|
#define wxSTC_LEX_BAAN 31
|
||||||
#define wxSTC_LEX_MATLAB 32
|
#define wxSTC_LEX_MATLAB 32
|
||||||
|
#define wxSTC_LEX_SCRIPTOL 33
|
||||||
|
|
||||||
// When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
|
// When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
|
||||||
// value assigned in sequence from SCLEX_AUTOMATIC+1.
|
// value assigned in sequence from SCLEX_AUTOMATIC+1.
|
||||||
@@ -474,17 +480,6 @@
|
|||||||
#define wxSTC_C_COMMENTDOCKEYWORD 17
|
#define wxSTC_C_COMMENTDOCKEYWORD 17
|
||||||
#define wxSTC_C_COMMENTDOCKEYWORDERROR 18
|
#define wxSTC_C_COMMENTDOCKEYWORDERROR 18
|
||||||
|
|
||||||
// Lexical states for SCLEX_VB, SCLEX_VBSCRIPT
|
|
||||||
#define wxSTC_B_DEFAULT 0
|
|
||||||
#define wxSTC_B_COMMENT 1
|
|
||||||
#define wxSTC_B_NUMBER 2
|
|
||||||
#define wxSTC_B_KEYWORD 3
|
|
||||||
#define wxSTC_B_STRING 4
|
|
||||||
#define wxSTC_B_PREPROCESSOR 5
|
|
||||||
#define wxSTC_B_OPERATOR 6
|
|
||||||
#define wxSTC_B_IDENTIFIER 7
|
|
||||||
#define wxSTC_B_DATE 8
|
|
||||||
|
|
||||||
// Lexical states for SCLEX_HTML, SCLEX_XML
|
// Lexical states for SCLEX_HTML, SCLEX_XML
|
||||||
#define wxSTC_H_DEFAULT 0
|
#define wxSTC_H_DEFAULT 0
|
||||||
#define wxSTC_H_TAG 1
|
#define wxSTC_H_TAG 1
|
||||||
@@ -651,6 +646,24 @@
|
|||||||
#define wxSTC_PL_STRING_QR 29
|
#define wxSTC_PL_STRING_QR 29
|
||||||
#define wxSTC_PL_STRING_QW 30
|
#define wxSTC_PL_STRING_QW 30
|
||||||
|
|
||||||
|
// Lexical states for SCLEX_VB, SCLEX_VBSCRIPT
|
||||||
|
#define wxSTC_B_DEFAULT 0
|
||||||
|
#define wxSTC_B_COMMENT 1
|
||||||
|
#define wxSTC_B_NUMBER 2
|
||||||
|
#define wxSTC_B_KEYWORD 3
|
||||||
|
#define wxSTC_B_STRING 4
|
||||||
|
#define wxSTC_B_PREPROCESSOR 5
|
||||||
|
#define wxSTC_B_OPERATOR 6
|
||||||
|
#define wxSTC_B_IDENTIFIER 7
|
||||||
|
#define wxSTC_B_DATE 8
|
||||||
|
|
||||||
|
// Lexical states for SCLEX_PROPERTIES
|
||||||
|
#define wxSTC_PROPS_DEFAULT 0
|
||||||
|
#define wxSTC_PROPS_COMMENT 1
|
||||||
|
#define wxSTC_PROPS_SECTION 2
|
||||||
|
#define wxSTC_PROPS_ASSIGNMENT 3
|
||||||
|
#define wxSTC_PROPS_DEFVAL 4
|
||||||
|
|
||||||
// Lexical states for SCLEX_LATEX
|
// Lexical states for SCLEX_LATEX
|
||||||
#define wxSTC_L_DEFAULT 0
|
#define wxSTC_L_DEFAULT 0
|
||||||
#define wxSTC_L_COMMAND 1
|
#define wxSTC_L_COMMAND 1
|
||||||
@@ -688,6 +701,7 @@
|
|||||||
#define wxSTC_ERR_PERL 6
|
#define wxSTC_ERR_PERL 6
|
||||||
#define wxSTC_ERR_NET 7
|
#define wxSTC_ERR_NET 7
|
||||||
#define wxSTC_ERR_LUA 8
|
#define wxSTC_ERR_LUA 8
|
||||||
|
#define wxSTC_ERR_CTAG 9
|
||||||
#define wxSTC_ERR_DIFF_CHANGED 10
|
#define wxSTC_ERR_DIFF_CHANGED 10
|
||||||
#define wxSTC_ERR_DIFF_ADDITION 11
|
#define wxSTC_ERR_DIFF_ADDITION 11
|
||||||
#define wxSTC_ERR_DIFF_DELETION 12
|
#define wxSTC_ERR_DIFF_DELETION 12
|
||||||
@@ -712,7 +726,16 @@
|
|||||||
#define wxSTC_MAKE_TARGET 5
|
#define wxSTC_MAKE_TARGET 5
|
||||||
#define wxSTC_MAKE_IDEOL 9
|
#define wxSTC_MAKE_IDEOL 9
|
||||||
|
|
||||||
// Lexical states for the SCLEX_CONF (Apache Configuration Files Lexer)
|
// Lexical states for SCLEX_DIFF
|
||||||
|
#define wxSTC_DIFF_DEFAULT 0
|
||||||
|
#define wxSTC_DIFF_COMMENT 1
|
||||||
|
#define wxSTC_DIFF_COMMAND 2
|
||||||
|
#define wxSTC_DIFF_HEADER 3
|
||||||
|
#define wxSTC_DIFF_POSITION 4
|
||||||
|
#define wxSTC_DIFF_DELETED 5
|
||||||
|
#define wxSTC_DIFF_ADDED 6
|
||||||
|
|
||||||
|
// Lexical states for SCLEX_CONF (Apache Configuration Files Lexer)
|
||||||
#define wxSTC_CONF_DEFAULT 0
|
#define wxSTC_CONF_DEFAULT 0
|
||||||
#define wxSTC_CONF_COMMENT 1
|
#define wxSTC_CONF_COMMENT 1
|
||||||
#define wxSTC_CONF_NUMBER 2
|
#define wxSTC_CONF_NUMBER 2
|
||||||
@@ -724,7 +747,7 @@
|
|||||||
#define wxSTC_CONF_IP 8
|
#define wxSTC_CONF_IP 8
|
||||||
#define wxSTC_CONF_DIRECTIVE 9
|
#define wxSTC_CONF_DIRECTIVE 9
|
||||||
|
|
||||||
// Avenue
|
// Lexical states for SCLEX_AVE, Avenue
|
||||||
#define wxSTC_AVE_DEFAULT 0
|
#define wxSTC_AVE_DEFAULT 0
|
||||||
#define wxSTC_AVE_COMMENT 1
|
#define wxSTC_AVE_COMMENT 1
|
||||||
#define wxSTC_AVE_NUMBER 2
|
#define wxSTC_AVE_NUMBER 2
|
||||||
@@ -782,7 +805,7 @@
|
|||||||
#define wxSTC_EIFFEL_IDENTIFIER 7
|
#define wxSTC_EIFFEL_IDENTIFIER 7
|
||||||
#define wxSTC_EIFFEL_STRINGEOL 8
|
#define wxSTC_EIFFEL_STRINGEOL 8
|
||||||
|
|
||||||
// Lexical states for the SCLEX_NNCRONTAB (nnCron crontab Lexer)
|
// Lexical states for SCLEX_NNCRONTAB (nnCron crontab Lexer)
|
||||||
#define wxSTC_NNCRONTAB_DEFAULT 0
|
#define wxSTC_NNCRONTAB_DEFAULT 0
|
||||||
#define wxSTC_NNCRONTAB_COMMENT 1
|
#define wxSTC_NNCRONTAB_COMMENT 1
|
||||||
#define wxSTC_NNCRONTAB_TASK 2
|
#define wxSTC_NNCRONTAB_TASK 2
|
||||||
@@ -805,6 +828,28 @@
|
|||||||
#define wxSTC_MATLAB_OPERATOR 6
|
#define wxSTC_MATLAB_OPERATOR 6
|
||||||
#define wxSTC_MATLAB_IDENTIFIER 7
|
#define wxSTC_MATLAB_IDENTIFIER 7
|
||||||
|
|
||||||
|
// Lexical states for SCLEX_SCRIPTOL
|
||||||
|
#define wxSTC_SCRIPTOL_DEFAULT 0
|
||||||
|
#define wxSTC_SCRIPTOL_COMMENT 1
|
||||||
|
#define wxSTC_SCRIPTOL_COMMENTLINE 2
|
||||||
|
#define wxSTC_SCRIPTOL_COMMENTDOC 3
|
||||||
|
#define wxSTC_SCRIPTOL_NUMBER 4
|
||||||
|
#define wxSTC_SCRIPTOL_WORD 5
|
||||||
|
#define wxSTC_SCRIPTOL_STRING 6
|
||||||
|
#define wxSTC_SCRIPTOL_CHARACTER 7
|
||||||
|
#define wxSTC_SCRIPTOL_UUID 8
|
||||||
|
#define wxSTC_SCRIPTOL_PREPROCESSOR 9
|
||||||
|
#define wxSTC_SCRIPTOL_OPERATOR 10
|
||||||
|
#define wxSTC_SCRIPTOL_IDENTIFIER 11
|
||||||
|
#define wxSTC_SCRIPTOL_STRINGEOL 12
|
||||||
|
#define wxSTC_SCRIPTOL_VERBATIM 13
|
||||||
|
#define wxSTC_SCRIPTOL_REGEX 14
|
||||||
|
#define wxSTC_SCRIPTOL_COMMENTLINEDOC 15
|
||||||
|
#define wxSTC_SCRIPTOL_WORD2 16
|
||||||
|
#define wxSTC_SCRIPTOL_COMMENTDOCKEYWORD 17
|
||||||
|
#define wxSTC_SCRIPTOL_COMMENTDOCKEYWORDERROR 18
|
||||||
|
#define wxSTC_SCRIPTOL_COMMENTBASIC 19
|
||||||
|
|
||||||
// END of generated section
|
// END of generated section
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -845,37 +890,37 @@ public:
|
|||||||
// and regenerate
|
// and regenerate
|
||||||
|
|
||||||
|
|
||||||
// Add text to the document
|
// Add text to the document.
|
||||||
void AddText(const wxString& text);
|
void AddText(const wxString& text);
|
||||||
|
|
||||||
// Add array of cells to document
|
// Add array of cells to document.
|
||||||
void AddStyledText(const wxMemoryBuffer& data);
|
void AddStyledText(const wxMemoryBuffer& data);
|
||||||
|
|
||||||
// Insert string at a position
|
// Insert string at a position.
|
||||||
void InsertText(int pos, const wxString& text);
|
void InsertText(int pos, const wxString& text);
|
||||||
|
|
||||||
// Delete all text in the document
|
// Delete all text in the document.
|
||||||
void ClearAll();
|
void ClearAll();
|
||||||
|
|
||||||
// Set all style bytes to 0, remove all folding information
|
// Set all style bytes to 0, remove all folding information.
|
||||||
void ClearDocumentStyle();
|
void ClearDocumentStyle();
|
||||||
|
|
||||||
// The number of characters in the document
|
// The number of characters in the document.
|
||||||
int GetLength();
|
int GetLength();
|
||||||
|
|
||||||
// Returns the character byte at the position
|
// Returns the character byte at the position.
|
||||||
int GetCharAt(int pos);
|
int GetCharAt(int pos);
|
||||||
|
|
||||||
// Returns the position of the caret
|
// Returns the position of the caret.
|
||||||
int GetCurrentPos();
|
int GetCurrentPos();
|
||||||
|
|
||||||
// Returns the position of the opposite end of the selection to the caret
|
// Returns the position of the opposite end of the selection to the caret.
|
||||||
int GetAnchor();
|
int GetAnchor();
|
||||||
|
|
||||||
// Returns the style byte at the position
|
// Returns the style byte at the position.
|
||||||
int GetStyleAt(int pos);
|
int GetStyleAt(int pos);
|
||||||
|
|
||||||
// Redoes the next action on the undo history
|
// Redoes the next action on the undo history.
|
||||||
void Redo();
|
void Redo();
|
||||||
|
|
||||||
// Choose between collecting actions into the undo
|
// Choose between collecting actions into the undo
|
||||||
@@ -892,10 +937,10 @@ public:
|
|||||||
// Retrieve a buffer of cells.
|
// Retrieve a buffer of cells.
|
||||||
wxMemoryBuffer GetStyledText(int startPos, int endPos);
|
wxMemoryBuffer GetStyledText(int startPos, int endPos);
|
||||||
|
|
||||||
// Are there any redoable actions in the undo history.
|
// Are there any redoable actions in the undo history?
|
||||||
bool CanRedo();
|
bool CanRedo();
|
||||||
|
|
||||||
// Retrieve the line number at which a particular marker is located
|
// Retrieve the line number at which a particular marker is located.
|
||||||
int MarkerLineFromHandle(int handle);
|
int MarkerLineFromHandle(int handle);
|
||||||
|
|
||||||
// Delete a marker.
|
// Delete a marker.
|
||||||
@@ -949,23 +994,21 @@ public:
|
|||||||
void SetEOLMode(int eolMode);
|
void SetEOLMode(int eolMode);
|
||||||
|
|
||||||
// Set the current styling position to pos and the styling mask to mask.
|
// Set the current styling position to pos and the styling mask to mask.
|
||||||
// The styling mask can be used to protect some bits in each styling byte from
|
// The styling mask can be used to protect some bits in each styling byte from modification.
|
||||||
// modification.
|
|
||||||
void StartStyling(int pos, int mask);
|
void StartStyling(int pos, int mask);
|
||||||
|
|
||||||
// Change style from current styling position for length characters to a style
|
// Change style from current styling position for length characters to a style
|
||||||
// and move the current styling position to after this newly styled segment.
|
// and move the current styling position to after this newly styled segment.
|
||||||
void SetStyling(int length, int style);
|
void SetStyling(int length, int style);
|
||||||
|
|
||||||
// Is drawing done first into a buffer or direct to the screen.
|
// Is drawing done first into a buffer or direct to the screen?
|
||||||
bool GetBufferedDraw();
|
bool GetBufferedDraw();
|
||||||
|
|
||||||
// If drawing is buffered then each line of text is drawn into a bitmap buffer
|
// If drawing is buffered then each line of text is drawn into a bitmap buffer
|
||||||
// before drawing it to the screen to avoid flicker.
|
// before drawing it to the screen to avoid flicker.
|
||||||
void SetBufferedDraw(bool buffered);
|
void SetBufferedDraw(bool buffered);
|
||||||
|
|
||||||
// Change the visible size of a tab to be a multiple of the width of a space
|
// Change the visible size of a tab to be a multiple of the width of a space character.
|
||||||
// character.
|
|
||||||
void SetTabWidth(int tabWidth);
|
void SetTabWidth(int tabWidth);
|
||||||
|
|
||||||
// Retrieve the visible size of a tab.
|
// Retrieve the visible size of a tab.
|
||||||
@@ -989,10 +1032,10 @@ public:
|
|||||||
// Add a marker to a line, returning an ID which can be used to find or delete the marker.
|
// Add a marker to a line, returning an ID which can be used to find or delete the marker.
|
||||||
int MarkerAdd(int line, int markerNumber);
|
int MarkerAdd(int line, int markerNumber);
|
||||||
|
|
||||||
// Delete a marker from a line
|
// Delete a marker from a line.
|
||||||
void MarkerDelete(int line, int markerNumber);
|
void MarkerDelete(int line, int markerNumber);
|
||||||
|
|
||||||
// Delete all markers with a particular number from all lines
|
// Delete all markers with a particular number from all lines.
|
||||||
void MarkerDeleteAll(int markerNumber);
|
void MarkerDeleteAll(int markerNumber);
|
||||||
|
|
||||||
// Get a bit mask of all the markers set on a line.
|
// Get a bit mask of all the markers set on a line.
|
||||||
@@ -1094,8 +1137,7 @@ public:
|
|||||||
// Get the time in milliseconds that the caret is on and off. 0 = steady on.
|
// Get the time in milliseconds that the caret is on and off. 0 = steady on.
|
||||||
void SetCaretPeriod(int periodMilliseconds);
|
void SetCaretPeriod(int periodMilliseconds);
|
||||||
|
|
||||||
// Set the set of characters making up words for when moving or selecting
|
// Set the set of characters making up words for when moving or selecting by word.
|
||||||
// by word.
|
|
||||||
void SetWordChars(const wxString& characters);
|
void SetWordChars(const wxString& characters);
|
||||||
|
|
||||||
// Start a sequence of actions that is undone and redone as a unit.
|
// Start a sequence of actions that is undone and redone as a unit.
|
||||||
@@ -1117,8 +1159,8 @@ public:
|
|||||||
// Retrieve the foreground colour of an indicator.
|
// Retrieve the foreground colour of an indicator.
|
||||||
wxColour IndicatorGetForeground(int indic);
|
wxColour IndicatorGetForeground(int indic);
|
||||||
|
|
||||||
// Divide each styling byte into lexical class bits (default:5) and indicator
|
// Divide each styling byte into lexical class bits (default: 5) and indicator
|
||||||
// bits (default:3). If a lexer requires more than 32 lexical states, then this
|
// bits (default: 3). If a lexer requires more than 32 lexical states, then this
|
||||||
// is used to expand the possible states.
|
// is used to expand the possible states.
|
||||||
void SetStyleBits(int bits);
|
void SetStyleBits(int bits);
|
||||||
|
|
||||||
@@ -1137,7 +1179,7 @@ public:
|
|||||||
// Is the background of the line containing the caret in a different colour?
|
// Is the background of the line containing the caret in a different colour?
|
||||||
bool GetCaretLineVisible();
|
bool GetCaretLineVisible();
|
||||||
|
|
||||||
// Dsplay the background of the line containing the caret in a different colour.
|
// Display the background of the line containing the caret in a different colour.
|
||||||
void SetCaretLineVisible(bool show);
|
void SetCaretLineVisible(bool show);
|
||||||
|
|
||||||
// Get the colour of the background of the line containing the caret.
|
// Get the colour of the background of the line containing the caret.
|
||||||
@@ -1161,8 +1203,7 @@ public:
|
|||||||
// Is there an auto-completion list visible?
|
// Is there an auto-completion list visible?
|
||||||
bool AutoCompActive();
|
bool AutoCompActive();
|
||||||
|
|
||||||
// Retrieve the position of the caret when the auto-completion list was
|
// Retrieve the position of the caret when the auto-completion list was displayed.
|
||||||
// displayed.
|
|
||||||
int AutoCompPosStart();
|
int AutoCompPosStart();
|
||||||
|
|
||||||
// User has selected an item so remove the list and insert the selection.
|
// User has selected an item so remove the list and insert the selection.
|
||||||
@@ -1171,8 +1212,8 @@ public:
|
|||||||
// Define a set of character that when typed cancel the auto-completion list.
|
// Define a set of character that when typed cancel the auto-completion list.
|
||||||
void AutoCompStops(const wxString& characterSet);
|
void AutoCompStops(const wxString& characterSet);
|
||||||
|
|
||||||
// Change the separator character in the string setting up an auto-completion
|
// Change the separator character in the string setting up an auto-completion list.
|
||||||
// list. Default is space but can be changed if items contain space.
|
// Default is space but can be changed if items contain space.
|
||||||
void AutoCompSetSeparator(int separatorCharacter);
|
void AutoCompSetSeparator(int separatorCharacter);
|
||||||
|
|
||||||
// Retrieve the auto-completion list separator character.
|
// Retrieve the auto-completion list separator character.
|
||||||
@@ -1207,16 +1248,18 @@ public:
|
|||||||
// Display a list of strings and send notification when user chooses one.
|
// Display a list of strings and send notification when user chooses one.
|
||||||
void UserListShow(int listType, const wxString& itemList);
|
void UserListShow(int listType, const wxString& itemList);
|
||||||
|
|
||||||
// Set whether or not autocompletion is hidden automatically when nothing matches
|
// Set whether or not autocompletion is hidden automatically when nothing matches.
|
||||||
void AutoCompSetAutoHide(bool autoHide);
|
void AutoCompSetAutoHide(bool autoHide);
|
||||||
|
|
||||||
// Retrieve whether or not autocompletion is hidden automatically when nothing matches
|
// Retrieve whether or not autocompletion is hidden automatically when nothing matches.
|
||||||
bool AutoCompGetAutoHide();
|
bool AutoCompGetAutoHide();
|
||||||
|
|
||||||
// Set whether or not autocompletion deletes any word characters after the inserted text upon completion
|
// Set whether or not autocompletion deletes any word characters
|
||||||
|
// after the inserted text upon completion.
|
||||||
void AutoCompSetDropRestOfWord(bool dropRestOfWord);
|
void AutoCompSetDropRestOfWord(bool dropRestOfWord);
|
||||||
|
|
||||||
// Retrieve whether or not autocompletion deletes any word characters after the inserted text upon completion
|
// Retrieve whether or not autocompletion deletes any word characters
|
||||||
|
// after the inserted text upon completion.
|
||||||
bool AutoCompGetDropRestOfWord();
|
bool AutoCompGetDropRestOfWord();
|
||||||
|
|
||||||
// Set the number of spaces used for one level of indentation.
|
// Set the number of spaces used for one level of indentation.
|
||||||
@@ -1305,7 +1348,7 @@ public:
|
|||||||
// Find some text in the document.
|
// Find some text in the document.
|
||||||
int FindText(int minPos, int maxPos, const wxString& text, int flags=0);
|
int FindText(int minPos, int maxPos, const wxString& text, int flags=0);
|
||||||
|
|
||||||
// On Windows will draw the document into a display context such as a printer.
|
// On Windows, will draw the document into a display context such as a printer.
|
||||||
int FormatRange(bool doDraw,
|
int FormatRange(bool doDraw,
|
||||||
int startPos,
|
int startPos,
|
||||||
int endPos,
|
int endPos,
|
||||||
@@ -1371,7 +1414,7 @@ public:
|
|||||||
// Will a paste succeed?
|
// Will a paste succeed?
|
||||||
bool CanPaste();
|
bool CanPaste();
|
||||||
|
|
||||||
// Are there any undoable actions in the undo history.
|
// Are there any undoable actions in the undo history?
|
||||||
bool CanUndo();
|
bool CanUndo();
|
||||||
|
|
||||||
// Delete the undo history.
|
// Delete the undo history.
|
||||||
@@ -1401,16 +1444,16 @@ public:
|
|||||||
// Retrieve the number of characters in the document.
|
// Retrieve the number of characters in the document.
|
||||||
int GetTextLength();
|
int GetTextLength();
|
||||||
|
|
||||||
// Set to overtype (true) or insert mode
|
// Set to overtype (true) or insert mode.
|
||||||
void SetOvertype(bool overtype);
|
void SetOvertype(bool overtype);
|
||||||
|
|
||||||
// Returns true if overtype mode is active otherwise false is returned.
|
// Returns true if overtype mode is active otherwise false is returned.
|
||||||
bool GetOvertype();
|
bool GetOvertype();
|
||||||
|
|
||||||
// Set the width of the insert mode caret
|
// Set the width of the insert mode caret.
|
||||||
void SetCaretWidth(int pixelWidth);
|
void SetCaretWidth(int pixelWidth);
|
||||||
|
|
||||||
// Returns the width of the insert mode caret
|
// Returns the width of the insert mode caret.
|
||||||
int GetCaretWidth();
|
int GetCaretWidth();
|
||||||
|
|
||||||
// Sets the position that starts the target which is used for updating the
|
// Sets the position that starts the target which is used for updating the
|
||||||
@@ -1445,10 +1488,10 @@ public:
|
|||||||
// Returns length of range or -1 for failure in which case target is not moved.
|
// Returns length of range or -1 for failure in which case target is not moved.
|
||||||
int SearchInTarget(const wxString& text);
|
int SearchInTarget(const wxString& text);
|
||||||
|
|
||||||
// Set the search flags used by SearchInTarget
|
// Set the search flags used by SearchInTarget.
|
||||||
void SetSearchFlags(int flags);
|
void SetSearchFlags(int flags);
|
||||||
|
|
||||||
// Get the search flags used by SearchInTarget
|
// Get the search flags used by SearchInTarget.
|
||||||
int GetSearchFlags();
|
int GetSearchFlags();
|
||||||
|
|
||||||
// Show a call tip containing a definition near position pos.
|
// Show a call tip containing a definition near position pos.
|
||||||
@@ -1510,53 +1553,76 @@ public:
|
|||||||
// Ensure a particular line is visible by expanding any header line hiding it.
|
// Ensure a particular line is visible by expanding any header line hiding it.
|
||||||
void EnsureVisible(int line);
|
void EnsureVisible(int line);
|
||||||
|
|
||||||
// Set some debugging options for folding
|
// Set some debugging options for folding.
|
||||||
void SetFoldFlags(int flags);
|
void SetFoldFlags(int flags);
|
||||||
|
|
||||||
// Ensure a particular line is visible by expanding any header line hiding it.
|
// Ensure a particular line is visible by expanding any header line hiding it.
|
||||||
// Use the currently set visibility policy to determine which range to display.
|
// Use the currently set visibility policy to determine which range to display.
|
||||||
void EnsureVisibleEnforcePolicy(int line);
|
void EnsureVisibleEnforcePolicy(int line);
|
||||||
|
|
||||||
// Sets whether a tab pressed when caret is within indentation indents
|
// Sets whether a tab pressed when caret is within indentation indents.
|
||||||
void SetTabIndents(bool tabIndents);
|
void SetTabIndents(bool tabIndents);
|
||||||
|
|
||||||
// Does a tab pressed when caret is within indentation indent?
|
// Does a tab pressed when caret is within indentation indent?
|
||||||
bool GetTabIndents();
|
bool GetTabIndents();
|
||||||
|
|
||||||
// Sets whether a backspace pressed when caret is within indentation unindents
|
// Sets whether a backspace pressed when caret is within indentation unindents.
|
||||||
void SetBackSpaceUnIndents(bool bsUnIndents);
|
void SetBackSpaceUnIndents(bool bsUnIndents);
|
||||||
|
|
||||||
// Does a backspace pressed when caret is within indentation unindent?
|
// Does a backspace pressed when caret is within indentation unindent?
|
||||||
bool GetBackSpaceUnIndents();
|
bool GetBackSpaceUnIndents();
|
||||||
|
|
||||||
// Sets the time the mouse must sit still to generate a mouse dwell event
|
// Sets the time the mouse must sit still to generate a mouse dwell event.
|
||||||
void SetMouseDwellTime(int periodMilliseconds);
|
void SetMouseDwellTime(int periodMilliseconds);
|
||||||
|
|
||||||
// Retrieve the time the mouse must sit still to generate a mouse dwell event
|
// Retrieve the time the mouse must sit still to generate a mouse dwell event.
|
||||||
int GetMouseDwellTime();
|
int GetMouseDwellTime();
|
||||||
|
|
||||||
// Get position of start of word
|
// Get position of start of word.
|
||||||
int WordStartPosition(int pos, bool onlyWordCharacters);
|
int WordStartPosition(int pos, bool onlyWordCharacters);
|
||||||
|
|
||||||
// Get position of end of word
|
// Get position of end of word.
|
||||||
int WordEndPosition(int pos, bool onlyWordCharacters);
|
int WordEndPosition(int pos, bool onlyWordCharacters);
|
||||||
|
|
||||||
// Sets whether text is word wrapped
|
// Sets whether text is word wrapped.
|
||||||
void SetWrapMode(int mode);
|
void SetWrapMode(int mode);
|
||||||
|
|
||||||
// Retrieve whether text is word wrapped
|
// Retrieve whether text is word wrapped.
|
||||||
int GetWrapMode();
|
int GetWrapMode();
|
||||||
|
|
||||||
// Sets the degree of caching of layout information
|
// Sets the degree of caching of layout information.
|
||||||
void SetLayoutCache(int mode);
|
void SetLayoutCache(int mode);
|
||||||
|
|
||||||
// Retrieve the degree of caching of layout information
|
// Retrieve the degree of caching of layout information.
|
||||||
int GetLayoutCache();
|
int GetLayoutCache();
|
||||||
|
|
||||||
// Move the caret inside current view if it's not there already
|
// Sets the document width assumed for scrolling.
|
||||||
|
void SetScrollWidth(int pixelWidth);
|
||||||
|
|
||||||
|
// Retrieve the document width assumed for scrolling.
|
||||||
|
int GetScrollWidth();
|
||||||
|
|
||||||
|
// Measure the pixel width of some text in a particular style.
|
||||||
|
// Nul terminated text argument.
|
||||||
|
// Does not handle tab or control characters.
|
||||||
|
int TextWidth(int style, const wxString& text);
|
||||||
|
|
||||||
|
// Sets the scroll range so that maximum scroll position has
|
||||||
|
// the last line at the bottom of the view (default).
|
||||||
|
// Setting this to false allows scrolling one page below the last line.
|
||||||
|
void SetEndAtLastLine(bool endAtLastLine);
|
||||||
|
|
||||||
|
// Retrieve whether the maximum scroll position has the last
|
||||||
|
// line at the bottom of the view.
|
||||||
|
int GetEndAtLastLine();
|
||||||
|
|
||||||
|
// Retrieve the height of a particular line of text in pixels.
|
||||||
|
int TextHeight(int line);
|
||||||
|
|
||||||
|
// Move the caret inside current view if it's not there already.
|
||||||
void MoveCaretInsideView();
|
void MoveCaretInsideView();
|
||||||
|
|
||||||
// How many characters are on a line, not including end of line characters.
|
// How many characters are on a line, not including end of line characters?
|
||||||
int LineLength(int line);
|
int LineLength(int line);
|
||||||
|
|
||||||
// Highlight the characters at two positions.
|
// Highlight the characters at two positions.
|
||||||
@@ -1568,10 +1634,10 @@ public:
|
|||||||
// Find the position of a matching brace or INVALID_POSITION if no match.
|
// Find the position of a matching brace or INVALID_POSITION if no match.
|
||||||
int BraceMatch(int pos);
|
int BraceMatch(int pos);
|
||||||
|
|
||||||
// Are the end of line characters visible.
|
// Are the end of line characters visible?
|
||||||
bool GetViewEOL();
|
bool GetViewEOL();
|
||||||
|
|
||||||
// Make the end of line characters visible or invisible
|
// Make the end of line characters visible or invisible.
|
||||||
void SetViewEOL(bool visible);
|
void SetViewEOL(bool visible);
|
||||||
|
|
||||||
// Retrieve a pointer to the document object.
|
// Retrieve a pointer to the document object.
|
||||||
@@ -1614,9 +1680,6 @@ public:
|
|||||||
// Does not ensure the selection is visible.
|
// Does not ensure the selection is visible.
|
||||||
int SearchPrev(int flags, const wxString& text);
|
int SearchPrev(int flags, const wxString& text);
|
||||||
|
|
||||||
// Set the way the line the caret is on is kept visible.
|
|
||||||
void SetCaretPolicy(int caretPolicy, int caretSlop);
|
|
||||||
|
|
||||||
// Retrieves the number of lines completely visible.
|
// Retrieves the number of lines completely visible.
|
||||||
int LinesOnScreen();
|
int LinesOnScreen();
|
||||||
|
|
||||||
@@ -1624,7 +1687,7 @@ public:
|
|||||||
// the wrong mouse button.
|
// the wrong mouse button.
|
||||||
void UsePopUp(bool allowPopUp);
|
void UsePopUp(bool allowPopUp);
|
||||||
|
|
||||||
// Is the selection a rectangular. The alternative is the more common stream selection.
|
// Is the selection rectangular? The alternative is the more common stream selection.
|
||||||
bool SelectionIsRectangle();
|
bool SelectionIsRectangle();
|
||||||
|
|
||||||
// Set the zoom level. This number of points is added to the size of all fonts.
|
// Set the zoom level. This number of points is added to the size of all fonts.
|
||||||
@@ -1647,62 +1710,73 @@ public:
|
|||||||
// Get which document modification events are sent to the container.
|
// Get which document modification events are sent to the container.
|
||||||
int GetModEventMask();
|
int GetModEventMask();
|
||||||
|
|
||||||
// Change internal focus flag
|
// Change internal focus flag.
|
||||||
void SetSTCFocus(bool focus);
|
void SetSTCFocus(bool focus);
|
||||||
|
|
||||||
// Get internal focus flag
|
// Get internal focus flag.
|
||||||
bool GetSTCFocus();
|
bool GetSTCFocus();
|
||||||
|
|
||||||
// Change error status - 0 = OK
|
// Change error status - 0 = OK.
|
||||||
void SetStatus(int statusCode);
|
void SetStatus(int statusCode);
|
||||||
|
|
||||||
// Get error status
|
// Get error status.
|
||||||
int GetStatus();
|
int GetStatus();
|
||||||
|
|
||||||
// Set whether the mouse is captured when its button is pressed
|
// Set whether the mouse is captured when its button is pressed.
|
||||||
void SetMouseDownCaptures(bool captures);
|
void SetMouseDownCaptures(bool captures);
|
||||||
|
|
||||||
// Get whether mouse gets captured
|
// Get whether mouse gets captured.
|
||||||
bool GetMouseDownCaptures();
|
bool GetMouseDownCaptures();
|
||||||
|
|
||||||
// Sets the cursor to one of the SC_CURSOR* values
|
// Sets the cursor to one of the SC_CURSOR* values.
|
||||||
void SetCursor(int cursorType);
|
void SetCursor(int cursorType);
|
||||||
|
|
||||||
// Get cursor type
|
// Get cursor type.
|
||||||
int GetCursor();
|
int GetCursor();
|
||||||
|
|
||||||
// Change the way control characters are displayed:
|
// Change the way control characters are displayed:
|
||||||
// If symbol is < 32, keep the drawn way, else, use the given character
|
// If symbol is < 32, keep the drawn way, else, use the given character.
|
||||||
void SetControlCharSymbol(int symbol);
|
void SetControlCharSymbol(int symbol);
|
||||||
|
|
||||||
// Get the way control characters are displayed
|
// Get the way control characters are displayed.
|
||||||
int GetControlCharSymbol();
|
int GetControlCharSymbol();
|
||||||
|
|
||||||
// Move to the previous change in capitalistion
|
// Move to the previous change in capitalisation.
|
||||||
void WordPartLeft();
|
void WordPartLeft();
|
||||||
|
|
||||||
// Move to the previous change in capitalistion extending selection to new caret position.
|
// Move to the previous change in capitalisation extending selection
|
||||||
|
// to new caret position.
|
||||||
void WordPartLeftExtend();
|
void WordPartLeftExtend();
|
||||||
|
|
||||||
// Move to the change next in capitalistion
|
// Move to the change next in capitalisation.
|
||||||
void WordPartRight();
|
void WordPartRight();
|
||||||
|
|
||||||
// Move to the next change in capitalistion extending selection to new caret position.
|
// Move to the next change in capitalisation extending selection
|
||||||
|
// to new caret position.
|
||||||
void WordPartRightExtend();
|
void WordPartRightExtend();
|
||||||
|
|
||||||
// Set the way the display area is determined when a particular line is to be moved to.
|
// Set the way the display area is determined when a particular line
|
||||||
|
// is to be moved to by Find, FindNext, GotoLine, etc.
|
||||||
void SetVisiblePolicy(int visiblePolicy, int visibleSlop);
|
void SetVisiblePolicy(int visiblePolicy, int visibleSlop);
|
||||||
|
|
||||||
// Delete back from the current position to the start of the line
|
// Delete back from the current position to the start of the line.
|
||||||
void DelLineLeft();
|
void DelLineLeft();
|
||||||
|
|
||||||
// Delete forwards from the current position to the end of the line
|
// Delete forwards from the current position to the end of the line.
|
||||||
void DelLineRight();
|
void DelLineRight();
|
||||||
|
|
||||||
// Get and Set the xOffset (ie, horizonal scroll position)
|
// Get and Set the xOffset (ie, horizonal scroll position).
|
||||||
void SetXOffset(int newOffset);
|
void SetXOffset(int newOffset);
|
||||||
int GetXOffset();
|
int GetXOffset();
|
||||||
|
|
||||||
|
// Set the way the caret is kept visible when going sideway.
|
||||||
|
// The exclusion zone is given in pixels.
|
||||||
|
void SetXCaretPolicy(int caretPolicy, int caretSlop);
|
||||||
|
|
||||||
|
// Set the way the line the caret is on is kept visible.
|
||||||
|
// The exclusion zone is given in lines.
|
||||||
|
void SetYCaretPolicy(int caretPolicy, int caretSlop);
|
||||||
|
|
||||||
// Start notifying the container of all key presses and commands.
|
// Start notifying the container of all key presses and commands.
|
||||||
void StartRecord();
|
void StartRecord();
|
||||||
|
|
||||||
@@ -1986,6 +2060,7 @@ BEGIN_DECLARE_EVENT_TYPES()
|
|||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_START_DRAG, 1669)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_START_DRAG, 1669)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DRAG_OVER, 1670)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DRAG_OVER, 1670)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DO_DROP, 1671)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DO_DROP, 1671)
|
||||||
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_ZOOM, 1672)
|
||||||
END_DECLARE_EVENT_TYPES()
|
END_DECLARE_EVENT_TYPES()
|
||||||
#else
|
#else
|
||||||
enum {
|
enum {
|
||||||
@@ -2011,6 +2086,7 @@ END_DECLARE_EVENT_TYPES()
|
|||||||
wxEVT_STC_START_DRAG,
|
wxEVT_STC_START_DRAG,
|
||||||
wxEVT_STC_DRAG_OVER,
|
wxEVT_STC_DRAG_OVER,
|
||||||
wxEVT_STC_DO_DROP,
|
wxEVT_STC_DO_DROP,
|
||||||
|
wxEVT_STC_ZOOM,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -2041,6 +2117,7 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
|
|||||||
#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
|
#define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@@ -906,6 +906,15 @@ long Platform::SendScintilla(WindowID w,
|
|||||||
return stc->SendMsg(msg, wParam, lParam);
|
return stc->SendMsg(msg, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long Platform::SendScintillaPointer(WindowID w,
|
||||||
|
unsigned int msg,
|
||||||
|
unsigned long wParam,
|
||||||
|
void *lParam) {
|
||||||
|
|
||||||
|
wxStyledTextCtrl* stc = (wxStyledTextCtrl*)w;
|
||||||
|
return stc->SendMsg(msg, wParam, (long)lParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// These are utility functions not really tied to a platform
|
// These are utility functions not really tied to a platform
|
||||||
|
|
||||||
|
@@ -19,13 +19,6 @@
|
|||||||
#include "wx/stc/stc.h"
|
#include "wx/stc/stc.h"
|
||||||
#include "PlatWX.h"
|
#include "PlatWX.h"
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
|
|
||||||
const int H_SCROLL_MAX = 4000;
|
|
||||||
const int H_SCROLL_STEP = 20;
|
|
||||||
const int H_SCROLL_PAGE = 200;
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// Helper classes
|
// Helper classes
|
||||||
|
|
||||||
@@ -265,10 +258,12 @@ void ScintillaWX::SetHorizontalScrollPos() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const int H_SCROLL_STEP = 20;
|
||||||
|
|
||||||
bool ScintillaWX::ModifyScrollBars(int nMax, int nPage) {
|
bool ScintillaWX::ModifyScrollBars(int nMax, int nPage) {
|
||||||
bool modified = false;
|
bool modified = false;
|
||||||
|
|
||||||
|
// Check the vertical scrollbar
|
||||||
if (stc->m_vScrollBar == NULL) { // Use built-in scrollbar
|
if (stc->m_vScrollBar == NULL) { // Use built-in scrollbar
|
||||||
int sbMax = stc->GetScrollRange(wxVERTICAL);
|
int sbMax = stc->GetScrollRange(wxVERTICAL);
|
||||||
int sbThumb = stc->GetScrollThumb(wxVERTICAL);
|
int sbThumb = stc->GetScrollThumb(wxVERTICAL);
|
||||||
@@ -289,24 +284,40 @@ bool ScintillaWX::ModifyScrollBars(int nMax, int nPage) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (horizontalScrollBarVisible) {
|
// Check the horizontal scrollbar
|
||||||
|
PRectangle rcText = GetTextRectangle();
|
||||||
|
int horizEnd = scrollWidth;
|
||||||
|
if (horizEnd < 0)
|
||||||
|
horizEnd = 0;
|
||||||
|
if (!horizontalScrollBarVisible || (wrapState != eWrapNone))
|
||||||
|
horizEnd = 0;
|
||||||
|
int pageWidth = rcText.Width();
|
||||||
|
|
||||||
if (stc->m_hScrollBar == NULL) { // Use built-in scrollbar
|
if (stc->m_hScrollBar == NULL) { // Use built-in scrollbar
|
||||||
int sbMax = stc->GetScrollRange(wxHORIZONTAL);
|
int sbMax = stc->GetScrollRange(wxHORIZONTAL);
|
||||||
int sbThumb = stc->GetScrollThumb(wxHORIZONTAL);
|
int sbThumb = stc->GetScrollThumb(wxHORIZONTAL);
|
||||||
if ((sbMax != H_SCROLL_MAX) || (sbThumb != H_SCROLL_STEP)) {
|
int sbPos = stc->GetScrollPos(wxHORIZONTAL);
|
||||||
stc->SetScrollbar(wxHORIZONTAL, 0, H_SCROLL_STEP, H_SCROLL_MAX);
|
if ((sbMax != horizEnd) || (sbThumb != pageWidth) || (sbPos != 0)) {
|
||||||
|
stc->SetScrollbar(wxHORIZONTAL, 0, pageWidth, horizEnd);
|
||||||
modified = true;
|
modified = true;
|
||||||
|
if (scrollWidth < pageWidth) {
|
||||||
|
HorizontalScrollTo(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // otherwise use the one that's been given to us
|
else { // otherwise use the one that's been given to us
|
||||||
int sbMax = stc->m_hScrollBar->GetRange();
|
int sbMax = stc->m_hScrollBar->GetRange();
|
||||||
int sbPage = stc->m_hScrollBar->GetPageSize();
|
int sbThumb = stc->m_hScrollBar->GetPageSize();
|
||||||
if ((sbMax != H_SCROLL_MAX) || (sbPage != H_SCROLL_STEP)) {
|
int sbPos = stc->m_hScrollBar->GetThumbPosition();
|
||||||
stc->m_hScrollBar->SetScrollbar(0, H_SCROLL_STEP, H_SCROLL_MAX, H_SCROLL_STEP);
|
if ((sbMax != horizEnd) || (sbThumb != pageWidth) || (sbPos != 0)) {
|
||||||
|
stc->m_hScrollBar->SetScrollbar(0, pageWidth, horizEnd, pageWidth);
|
||||||
modified = true;
|
modified = true;
|
||||||
|
if (scrollWidth < pageWidth) {
|
||||||
|
HorizontalScrollTo(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return modified;
|
return modified;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -443,18 +454,24 @@ void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) {
|
|||||||
|
|
||||||
void ScintillaWX::DoHScroll(int type, int pos) {
|
void ScintillaWX::DoHScroll(int type, int pos) {
|
||||||
int xPos = xOffset;
|
int xPos = xOffset;
|
||||||
|
PRectangle rcText = GetTextRectangle();
|
||||||
|
int pageWidth = rcText.Width() * 2 / 3;
|
||||||
if (type == wxEVT_SCROLLWIN_LINEUP || type == wxEVT_SCROLL_LINEUP)
|
if (type == wxEVT_SCROLLWIN_LINEUP || type == wxEVT_SCROLL_LINEUP)
|
||||||
xPos -= H_SCROLL_STEP;
|
xPos -= H_SCROLL_STEP;
|
||||||
else if (type == wxEVT_SCROLLWIN_LINEDOWN || type == wxEVT_SCROLL_LINEDOWN)
|
else if (type == wxEVT_SCROLLWIN_LINEDOWN || type == wxEVT_SCROLL_LINEDOWN)
|
||||||
xPos += H_SCROLL_STEP;
|
xPos += H_SCROLL_STEP;
|
||||||
else if (type == wxEVT_SCROLLWIN_PAGEUP || type == wxEVT_SCROLL_PAGEUP)
|
else if (type == wxEVT_SCROLLWIN_PAGEUP || type == wxEVT_SCROLL_PAGEUP)
|
||||||
xPos -= H_SCROLL_PAGE;
|
xPos -= pageWidth;
|
||||||
else if (type == wxEVT_SCROLLWIN_PAGEDOWN || type == wxEVT_SCROLL_PAGEDOWN)
|
else if (type == wxEVT_SCROLLWIN_PAGEDOWN || type == wxEVT_SCROLL_PAGEDOWN) {
|
||||||
xPos += H_SCROLL_PAGE;
|
xPos += pageWidth;
|
||||||
|
if (xPos > scrollWidth - rcText.Width()) {
|
||||||
|
xPos = scrollWidth - rcText.Width();
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (type == wxEVT_SCROLLWIN_TOP || type == wxEVT_SCROLL_TOP)
|
else if (type == wxEVT_SCROLLWIN_TOP || type == wxEVT_SCROLL_TOP)
|
||||||
xPos = 0;
|
xPos = 0;
|
||||||
else if (type == wxEVT_SCROLLWIN_BOTTOM || type == wxEVT_SCROLL_BOTTOM)
|
else if (type == wxEVT_SCROLLWIN_BOTTOM || type == wxEVT_SCROLL_BOTTOM)
|
||||||
xPos = H_SCROLL_MAX;
|
xPos = scrollWidth;
|
||||||
else if (type == wxEVT_SCROLLWIN_THUMBTRACK || type == wxEVT_SCROLL_THUMBTRACK)
|
else if (type == wxEVT_SCROLLWIN_THUMBTRACK || type == wxEVT_SCROLL_THUMBTRACK)
|
||||||
xPos = pos;
|
xPos = pos;
|
||||||
|
|
||||||
|
@@ -553,6 +553,12 @@ def processIface(iface, h_tmplt, cpp_tmplt, h_dest, cpp_dest):
|
|||||||
elif op == 'evt ':
|
elif op == 'evt ':
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
elif op == 'enu ':
|
||||||
|
pass
|
||||||
|
|
||||||
|
elif op == 'lex ':
|
||||||
|
pass
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print '***** Unknown line type: ', line
|
print '***** Unknown line type: ', line
|
||||||
|
|
||||||
|
@@ -3,5 +3,5 @@ scintilla/include directories from the Scintilla/SCiTE source
|
|||||||
distribution. All other code needed to implement Scintilla on top of
|
distribution. All other code needed to implement Scintilla on top of
|
||||||
wxWindows is located in the directory above this one.
|
wxWindows is located in the directory above this one.
|
||||||
|
|
||||||
The current version of the Scintilla code is 1.45
|
The current version of the Scintilla code is 1.47
|
||||||
|
|
||||||
|
@@ -55,6 +55,7 @@ public:
|
|||||||
}
|
}
|
||||||
void SetCodePage(int codePage_) { codePage = codePage_; }
|
void SetCodePage(int codePage_) { codePage = codePage_; }
|
||||||
|
|
||||||
|
virtual bool Match(int pos, const char *s)=0;
|
||||||
virtual char StyleAt(int position)=0;
|
virtual char StyleAt(int position)=0;
|
||||||
virtual int GetLine(int position)=0;
|
virtual int GetLine(int position)=0;
|
||||||
virtual int LineStart(int line)=0;
|
virtual int LineStart(int line)=0;
|
||||||
|
@@ -19,6 +19,7 @@ protected:
|
|||||||
int language;
|
int language;
|
||||||
LexerFunction fnLexer;
|
LexerFunction fnLexer;
|
||||||
LexerFunction fnFolder;
|
LexerFunction fnFolder;
|
||||||
|
const char * const * wordListDescriptions;
|
||||||
|
|
||||||
static const LexerModule *base;
|
static const LexerModule *base;
|
||||||
static int nextLanguage;
|
static int nextLanguage;
|
||||||
@@ -26,8 +27,14 @@ protected:
|
|||||||
public:
|
public:
|
||||||
const char *languageName;
|
const char *languageName;
|
||||||
LexerModule(int language_, LexerFunction fnLexer_,
|
LexerModule(int language_, LexerFunction fnLexer_,
|
||||||
const char *languageName_=0, LexerFunction fnFolder_=0);
|
const char *languageName_=0, LexerFunction fnFolder_=0,
|
||||||
|
const char * const wordListDescriptions_[] = NULL);
|
||||||
int GetLanguage() const { return language; }
|
int GetLanguage() const { return language; }
|
||||||
|
|
||||||
|
// -1 is returned if no WordList information is available
|
||||||
|
int GetNumWordLists() const;
|
||||||
|
const char *GetWordListDescription(int index) const;
|
||||||
|
|
||||||
virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle,
|
virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle,
|
||||||
WordList *keywordlists[], Accessor &styler) const;
|
WordList *keywordlists[], Accessor &styler) const;
|
||||||
virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle,
|
virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle,
|
||||||
|
@@ -106,8 +106,8 @@ public:
|
|||||||
(rc.top >= top) && (rc.bottom <= bottom);
|
(rc.top >= top) && (rc.bottom <= bottom);
|
||||||
}
|
}
|
||||||
bool Intersects(PRectangle other) {
|
bool Intersects(PRectangle other) {
|
||||||
return (right >= other.left) && (left <= other.right) &&
|
return (right > other.left) && (left < other.right) &&
|
||||||
(bottom >= other.top) && (top <= other.bottom);
|
(bottom > other.top) && (top < other.bottom);
|
||||||
}
|
}
|
||||||
int Width() { return right - left; }
|
int Width() { return right - left; }
|
||||||
int Height() { return bottom - top; }
|
int Height() { return bottom - top; }
|
||||||
@@ -430,6 +430,8 @@ public:
|
|||||||
static bool IsKeyDown(int key);
|
static bool IsKeyDown(int key);
|
||||||
static long SendScintilla(
|
static long SendScintilla(
|
||||||
WindowID w, unsigned int msg, unsigned long wParam=0, long lParam=0);
|
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 bool IsDBCSLeadByte(int codePage, char ch);
|
||||||
|
|
||||||
// These are utility functions not really tied to a platform
|
// These are utility functions not really tied to a platform
|
||||||
|
@@ -76,10 +76,6 @@ public:
|
|||||||
bool ignoreCase=false, char otherSeparator='\0');
|
bool ignoreCase=false, char otherSeparator='\0');
|
||||||
};
|
};
|
||||||
|
|
||||||
inline bool nonFuncChar(char ch) {
|
|
||||||
return strchr("\t\n\r !\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~", ch) != NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool IsAlphabetic(unsigned int ch) {
|
inline bool IsAlphabetic(unsigned int ch) {
|
||||||
return ((ch >= 'A') && (ch <= 'Z')) || ((ch >= 'a') && (ch <= 'z'));
|
return ((ch >= 'A') && (ch <= 'Z')) || ((ch >= 'a') && (ch <= 'z'));
|
||||||
}
|
}
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
// These functions are implemented because each platform calls them something different.
|
// These functions are implemented because each platform calls them something different.
|
||||||
int CompareCaseInsensitive(const char *a, const char *b);
|
int CompareCaseInsensitive(const char *a, const char *b);
|
||||||
int CompareNCaseInsensitive(const char *a, const char *b, int len);
|
int CompareNCaseInsensitive(const char *a, const char *b, size_t len);
|
||||||
bool EqualCaseInsensitive(const char *a, const char *b);
|
bool EqualCaseInsensitive(const char *a, const char *b);
|
||||||
|
|
||||||
// Define another string class.
|
// Define another string class.
|
||||||
@@ -22,13 +22,13 @@ bool EqualCaseInsensitive(const char *a, const char *b);
|
|||||||
*
|
*
|
||||||
* Hold the length of the string for quick operations,
|
* 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.
|
* 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 rely too heavily on C string
|
* 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.
|
* functions to allow reliable manipulations of these strings, other than simple appends, etc.
|
||||||
**/
|
**/
|
||||||
class SString {
|
class SString {
|
||||||
public:
|
public:
|
||||||
/** Type of string lengths (sizes) and positions (indexes). */
|
/** Type of string lengths (sizes) and positions (indexes). */
|
||||||
typedef unsigned int lenpos_t;
|
typedef size_t lenpos_t;
|
||||||
/** Out of bounds value indicating that the string argument should be measured. */
|
/** Out of bounds value indicating that the string argument should be measured. */
|
||||||
enum { measure_length=0xffffffffU};
|
enum { measure_length=0xffffffffU};
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ private:
|
|||||||
}
|
}
|
||||||
if (sSize > 0 && sSize_ <= sSize) { // Does not allocate new buffer if the current is big enough
|
if (sSize > 0 && sSize_ <= sSize) { // Does not allocate new buffer if the current is big enough
|
||||||
if (s && sSize_) {
|
if (s && sSize_) {
|
||||||
strncpy(s, sOther, sSize_);
|
memcpy(s, sOther, sSize_);
|
||||||
}
|
}
|
||||||
s[sSize_] = '\0';
|
s[sSize_] = '\0';
|
||||||
sLen = sSize_;
|
sLen = sSize_;
|
||||||
@@ -92,6 +92,7 @@ public:
|
|||||||
sSize = sLen = (s) ? strlen(s) : 0;
|
sSize = sLen = (s) ? strlen(s) : 0;
|
||||||
}
|
}
|
||||||
SString(const char *s_, lenpos_t first, lenpos_t last) : sizeGrowth(sizeGrowthDefault) {
|
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);
|
s = StringAllocate(s_ + first, last - first);
|
||||||
sSize = sLen = (s) ? strlen(s) : 0;
|
sSize = sLen = (s) ? strlen(s) : 0;
|
||||||
}
|
}
|
||||||
@@ -188,6 +189,27 @@ public:
|
|||||||
else
|
else
|
||||||
return '\0';
|
return '\0';
|
||||||
}
|
}
|
||||||
|
SString substr(lenpos_t subPos, lenpos_t subLen=measure_length) const {
|
||||||
|
if (subPos >= sLen) {
|
||||||
|
return SString(); // return a null string if start index is out of bounds
|
||||||
|
}
|
||||||
|
if ((subLen == measure_length) || (subPos + subLen > sLen)) {
|
||||||
|
subLen = sLen - subPos; // can't substr past end of source string
|
||||||
|
}
|
||||||
|
return SString(s, subPos, subPos + subLen);
|
||||||
|
}
|
||||||
|
SString &lowercase(lenpos_t subPos = 0, lenpos_t subLen=measure_length) {
|
||||||
|
if ((subLen == measure_length) || (subPos + subLen > sLen)) {
|
||||||
|
subLen = sLen - subPos; // don't apply past end of string
|
||||||
|
}
|
||||||
|
for (lenpos_t i = subPos; i < subPos + subLen; i++) {
|
||||||
|
if (s[i] < 'A' || s[i] > 'Z')
|
||||||
|
continue;
|
||||||
|
else
|
||||||
|
s[i] = static_cast<char>(s[i] - 'A' + 'a');
|
||||||
|
}
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
SString &append(const char *sOther, lenpos_t sLenOther=measure_length, char sep = '\0') {
|
SString &append(const char *sOther, lenpos_t sLenOther=measure_length, char sep = '\0') {
|
||||||
if (!sOther) {
|
if (!sOther) {
|
||||||
return *this;
|
return *this;
|
||||||
@@ -206,7 +228,7 @@ public:
|
|||||||
s[sLen] = sep;
|
s[sLen] = sep;
|
||||||
sLen++;
|
sLen++;
|
||||||
}
|
}
|
||||||
strncpy(&s[sLen], sOther, sLenOther);
|
memcpy(&s[sLen], sOther, sLenOther);
|
||||||
sLen += sLenOther;
|
sLen += sLenOther;
|
||||||
s[sLen] = '\0';
|
s[sLen] = '\0';
|
||||||
}
|
}
|
||||||
@@ -259,6 +281,13 @@ public:
|
|||||||
sLen -= len;
|
sLen -= len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
SString &change(lenpos_t pos, char ch) {
|
||||||
|
if (pos >= sLen) { // character changed must be in string bounds
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
*(s + pos) = ch;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
/** Read an integral numeric value from the string. */
|
/** Read an integral numeric value from the string. */
|
||||||
int value() const {
|
int value() const {
|
||||||
if (s)
|
if (s)
|
||||||
@@ -266,7 +295,7 @@ public:
|
|||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int search(const char *sFind, lenpos_t start=0) {
|
int search(const char *sFind, lenpos_t start=0) const {
|
||||||
if (start < sLen) {
|
if (start < sLen) {
|
||||||
const char *sFound = strstr(s + start, sFind);
|
const char *sFound = strstr(s + start, sFind);
|
||||||
if (sFound) {
|
if (sFound) {
|
||||||
@@ -325,7 +354,7 @@ public:
|
|||||||
}
|
}
|
||||||
char *sNew = new char[len + 1];
|
char *sNew = new char[len + 1];
|
||||||
if (sNew) {
|
if (sNew) {
|
||||||
strncpy(sNew, s, len);
|
memcpy(sNew, s, len);
|
||||||
sNew[len] = '\0';
|
sNew[len] = '\0';
|
||||||
}
|
}
|
||||||
return sNew;
|
return sNew;
|
||||||
|
@@ -47,6 +47,7 @@
|
|||||||
#define SCLEX_PHP 30
|
#define SCLEX_PHP 30
|
||||||
#define SCLEX_BAAN 31
|
#define SCLEX_BAAN 31
|
||||||
#define SCLEX_MATLAB 32
|
#define SCLEX_MATLAB 32
|
||||||
|
#define SCLEX_SCRIPTOL 33
|
||||||
#define SCLEX_AUTOMATIC 1000
|
#define SCLEX_AUTOMATIC 1000
|
||||||
#define SCE_P_DEFAULT 0
|
#define SCE_P_DEFAULT 0
|
||||||
#define SCE_P_COMMENTLINE 1
|
#define SCE_P_COMMENTLINE 1
|
||||||
@@ -81,15 +82,6 @@
|
|||||||
#define SCE_C_WORD2 16
|
#define SCE_C_WORD2 16
|
||||||
#define SCE_C_COMMENTDOCKEYWORD 17
|
#define SCE_C_COMMENTDOCKEYWORD 17
|
||||||
#define SCE_C_COMMENTDOCKEYWORDERROR 18
|
#define SCE_C_COMMENTDOCKEYWORDERROR 18
|
||||||
#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_H_DEFAULT 0
|
#define SCE_H_DEFAULT 0
|
||||||
#define SCE_H_TAG 1
|
#define SCE_H_TAG 1
|
||||||
#define SCE_H_TAGUNKNOWN 2
|
#define SCE_H_TAGUNKNOWN 2
|
||||||
@@ -230,6 +222,20 @@
|
|||||||
#define SCE_PL_STRING_QX 28
|
#define SCE_PL_STRING_QX 28
|
||||||
#define SCE_PL_STRING_QR 29
|
#define SCE_PL_STRING_QR 29
|
||||||
#define SCE_PL_STRING_QW 30
|
#define SCE_PL_STRING_QW 30
|
||||||
|
#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_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_L_DEFAULT 0
|
#define SCE_L_DEFAULT 0
|
||||||
#define SCE_L_COMMAND 1
|
#define SCE_L_COMMAND 1
|
||||||
#define SCE_L_TAG 2
|
#define SCE_L_TAG 2
|
||||||
@@ -262,6 +268,7 @@
|
|||||||
#define SCE_ERR_PERL 6
|
#define SCE_ERR_PERL 6
|
||||||
#define SCE_ERR_NET 7
|
#define SCE_ERR_NET 7
|
||||||
#define SCE_ERR_LUA 8
|
#define SCE_ERR_LUA 8
|
||||||
|
#define SCE_ERR_CTAG 9
|
||||||
#define SCE_ERR_DIFF_CHANGED 10
|
#define SCE_ERR_DIFF_CHANGED 10
|
||||||
#define SCE_ERR_DIFF_ADDITION 11
|
#define SCE_ERR_DIFF_ADDITION 11
|
||||||
#define SCE_ERR_DIFF_DELETION 12
|
#define SCE_ERR_DIFF_DELETION 12
|
||||||
@@ -281,6 +288,13 @@
|
|||||||
#define SCE_MAKE_OPERATOR 4
|
#define SCE_MAKE_OPERATOR 4
|
||||||
#define SCE_MAKE_TARGET 5
|
#define SCE_MAKE_TARGET 5
|
||||||
#define SCE_MAKE_IDEOL 9
|
#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_CONF_DEFAULT 0
|
#define SCE_CONF_DEFAULT 0
|
||||||
#define SCE_CONF_COMMENT 1
|
#define SCE_CONF_COMMENT 1
|
||||||
#define SCE_CONF_NUMBER 2
|
#define SCE_CONF_NUMBER 2
|
||||||
@@ -358,6 +372,26 @@
|
|||||||
#define SCE_MATLAB_STRING 5
|
#define SCE_MATLAB_STRING 5
|
||||||
#define SCE_MATLAB_OPERATOR 6
|
#define SCE_MATLAB_OPERATOR 6
|
||||||
#define SCE_MATLAB_IDENTIFIER 7
|
#define SCE_MATLAB_IDENTIFIER 7
|
||||||
|
#define SCE_SCRIPTOL_DEFAULT 0
|
||||||
|
#define SCE_SCRIPTOL_COMMENT 1
|
||||||
|
#define SCE_SCRIPTOL_COMMENTLINE 2
|
||||||
|
#define SCE_SCRIPTOL_COMMENTDOC 3
|
||||||
|
#define SCE_SCRIPTOL_NUMBER 4
|
||||||
|
#define SCE_SCRIPTOL_WORD 5
|
||||||
|
#define SCE_SCRIPTOL_STRING 6
|
||||||
|
#define SCE_SCRIPTOL_CHARACTER 7
|
||||||
|
#define SCE_SCRIPTOL_UUID 8
|
||||||
|
#define SCE_SCRIPTOL_PREPROCESSOR 9
|
||||||
|
#define SCE_SCRIPTOL_OPERATOR 10
|
||||||
|
#define SCE_SCRIPTOL_IDENTIFIER 11
|
||||||
|
#define SCE_SCRIPTOL_STRINGEOL 12
|
||||||
|
#define SCE_SCRIPTOL_VERBATIM 13
|
||||||
|
#define SCE_SCRIPTOL_REGEX 14
|
||||||
|
#define SCE_SCRIPTOL_COMMENTLINEDOC 15
|
||||||
|
#define SCE_SCRIPTOL_WORD2 16
|
||||||
|
#define SCE_SCRIPTOL_COMMENTDOCKEYWORD 17
|
||||||
|
#define SCE_SCRIPTOL_COMMENTDOCKEYWORDERROR 18
|
||||||
|
#define SCE_SCRIPTOL_COMMENTBASIC 19
|
||||||
//--Autogenerated -- end of section automatically generated from Scintilla.iface
|
//--Autogenerated -- end of section automatically generated from Scintilla.iface
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -21,8 +21,16 @@ int Scintilla_LinkLexers();
|
|||||||
// Here should be placed typedefs for uptr_t, an unsigned integer type large enough to
|
// Here should be placed typedefs for uptr_t, an unsigned integer type large enough to
|
||||||
// hold a pointer and sptr_t, a signed integer large enough to hold a pointer.
|
// hold a pointer and sptr_t, a signed integer large enough to hold a pointer.
|
||||||
// May need to be changed for 64 bit platforms.
|
// May need to be changed for 64 bit platforms.
|
||||||
|
#if _MSC_VER >= 1300
|
||||||
|
#include <BaseTsd.h>
|
||||||
|
#endif
|
||||||
|
#ifdef MAXULONG_PTR
|
||||||
|
typedef ULONG_PTR uptr_t;
|
||||||
|
typedef LONG_PTR sptr_t;
|
||||||
|
#else
|
||||||
typedef unsigned long uptr_t;
|
typedef unsigned long uptr_t;
|
||||||
typedef long sptr_t;
|
typedef long sptr_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam);
|
typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam);
|
||||||
|
|
||||||
@@ -359,6 +367,12 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
|||||||
#define SC_CACHE_DOCUMENT 3
|
#define SC_CACHE_DOCUMENT 3
|
||||||
#define SCI_SETLAYOUTCACHE 2272
|
#define SCI_SETLAYOUTCACHE 2272
|
||||||
#define SCI_GETLAYOUTCACHE 2273
|
#define SCI_GETLAYOUTCACHE 2273
|
||||||
|
#define SCI_SETSCROLLWIDTH 2274
|
||||||
|
#define SCI_GETSCROLLWIDTH 2275
|
||||||
|
#define SCI_TEXTWIDTH 2276
|
||||||
|
#define SCI_SETENDATLASTLINE 2277
|
||||||
|
#define SCI_GETENDATLASTLINE 2278
|
||||||
|
#define SCI_TEXTHEIGHT 2279
|
||||||
#define SCI_LINEDOWN 2300
|
#define SCI_LINEDOWN 2300
|
||||||
#define SCI_LINEDOWNEXTEND 2301
|
#define SCI_LINEDOWNEXTEND 2301
|
||||||
#define SCI_LINEUP 2302
|
#define SCI_LINEUP 2302
|
||||||
@@ -426,12 +440,6 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
|||||||
#define SCI_SEARCHANCHOR 2366
|
#define SCI_SEARCHANCHOR 2366
|
||||||
#define SCI_SEARCHNEXT 2367
|
#define SCI_SEARCHNEXT 2367
|
||||||
#define SCI_SEARCHPREV 2368
|
#define SCI_SEARCHPREV 2368
|
||||||
#define CARET_SLOP 0x01
|
|
||||||
#define CARET_CENTER 0x02
|
|
||||||
#define CARET_STRICT 0x04
|
|
||||||
#define CARET_XEVEN 0x08
|
|
||||||
#define CARET_XJUMPS 0x10
|
|
||||||
#define SCI_SETCARETPOLICY 2369
|
|
||||||
#define SCI_LINESONSCREEN 2370
|
#define SCI_LINESONSCREEN 2370
|
||||||
#define SCI_USEPOPUP 2371
|
#define SCI_USEPOPUP 2371
|
||||||
#define SCI_SELECTIONISRECTANGLE 2372
|
#define SCI_SELECTIONISRECTANGLE 2372
|
||||||
@@ -465,6 +473,12 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
|||||||
#define SCI_SETXOFFSET 2397
|
#define SCI_SETXOFFSET 2397
|
||||||
#define SCI_GETXOFFSET 2398
|
#define SCI_GETXOFFSET 2398
|
||||||
#define SCI_GRABFOCUS 2400
|
#define SCI_GRABFOCUS 2400
|
||||||
|
#define CARET_SLOP 0x01
|
||||||
|
#define CARET_STRICT 0x04
|
||||||
|
#define CARET_JUMPS 0x10
|
||||||
|
#define CARET_EVEN 0x08
|
||||||
|
#define SCI_SETXCARETPOLICY 2402
|
||||||
|
#define SCI_SETYCARETPOLICY 2403
|
||||||
#define SCI_STARTRECORD 3001
|
#define SCI_STARTRECORD 3001
|
||||||
#define SCI_STOPRECORD 3002
|
#define SCI_STOPRECORD 3002
|
||||||
#define SCI_SETLEXER 4001
|
#define SCI_SETLEXER 4001
|
||||||
@@ -525,6 +539,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
|||||||
#define SCN_URIDROPPED 2015
|
#define SCN_URIDROPPED 2015
|
||||||
#define SCN_DWELLSTART 2016
|
#define SCN_DWELLSTART 2016
|
||||||
#define SCN_DWELLEND 2017
|
#define SCN_DWELLEND 2017
|
||||||
|
#define SCN_ZOOM 2018
|
||||||
//--Autogenerated -- end of section automatically generated from Scintilla.iface
|
//--Autogenerated -- end of section automatically generated from Scintilla.iface
|
||||||
|
|
||||||
// These structures are defined to be exactly the same shape as the Win32
|
// These structures are defined to be exactly the same shape as the Win32
|
||||||
@@ -598,6 +613,11 @@ struct SCNotification {
|
|||||||
|
|
||||||
#ifdef INCLUDE_DEPRECATED_FEATURES
|
#ifdef INCLUDE_DEPRECATED_FEATURES
|
||||||
|
|
||||||
|
#define SCI_SETCARETPOLICY 2369
|
||||||
|
#define CARET_CENTER 0x02
|
||||||
|
#define CARET_XEVEN 0x08
|
||||||
|
#define CARET_XJUMPS 0x10
|
||||||
|
|
||||||
#define SCN_POSCHANGED 2012
|
#define SCN_POSCHANGED 2012
|
||||||
#define SCN_CHECKBRACE 2007
|
#define SCN_CHECKBRACE 2007
|
||||||
|
|
||||||
|
@@ -17,6 +17,9 @@
|
|||||||
## set -> a property set function
|
## set -> a property set function
|
||||||
## val -> definition of a constant
|
## val -> definition of a constant
|
||||||
## evt -> an event
|
## evt -> an event
|
||||||
|
## enu -> associate an enumeration with a set of vals with a prefix
|
||||||
|
## lex -> associate a lexer with the lexical classes it produces
|
||||||
|
##
|
||||||
## All other feature names should be ignored. They may be defined in the future.
|
## All other feature names should be ignored. They may be defined in the future.
|
||||||
## A property may have a set function, a get function or both. Each will have
|
## A property may have a set function, a get function or both. Each will have
|
||||||
## "Get" or "Set" in their names and the corresponding name will have the obvious switch.
|
## "Get" or "Set" in their names and the corresponding name will have the obvious switch.
|
||||||
@@ -31,6 +34,16 @@
|
|||||||
## The feature numbers are stable so features will not be renumbered.
|
## The feature numbers are stable so features will not be renumbered.
|
||||||
## Features may be removed but they will go through a period of deprecation
|
## Features may be removed but they will go through a period of deprecation
|
||||||
## before removal which is signalled by moving them into the Deprecated category.
|
## before removal which is signalled by moving them into the Deprecated category.
|
||||||
|
##
|
||||||
|
## enu has the syntax enu<ws><enumeration>=<prefix>[<ws><prefix>]* where all the val
|
||||||
|
## features in this file starting with a given <prefix> are considered part of the
|
||||||
|
## enumeration.
|
||||||
|
##
|
||||||
|
## lex has the syntax lex<ws><name>=<lexerVal><ws><prefix>[<ws><prefix>]*
|
||||||
|
## where name is a reasonably capitalised (Python, XML) identifier or UI name,
|
||||||
|
## lexerVal is the val used to specify the lexer, and the list of prefixes is similar
|
||||||
|
## to enu. The name may not be the same as that used within the lexer so the lexerVal
|
||||||
|
## should be used to tie these entities together.
|
||||||
|
|
||||||
## Types:
|
## Types:
|
||||||
## void
|
## void
|
||||||
@@ -73,37 +86,37 @@ val SCI_START=2000
|
|||||||
val SCI_OPTIONAL_START=3000
|
val SCI_OPTIONAL_START=3000
|
||||||
val SCI_LEXER_START=4000
|
val SCI_LEXER_START=4000
|
||||||
|
|
||||||
# Add text to the document
|
# Add text to the document.
|
||||||
fun void AddText=2001(int length, string text)
|
fun void AddText=2001(int length, string text)
|
||||||
|
|
||||||
# Add array of cells to document
|
# Add array of cells to document.
|
||||||
fun void AddStyledText=2002(int length, cells c)
|
fun void AddStyledText=2002(int length, cells c)
|
||||||
|
|
||||||
# Insert string at a position
|
# Insert string at a position.
|
||||||
fun void InsertText=2003(position pos, string text)
|
fun void InsertText=2003(position pos, string text)
|
||||||
|
|
||||||
# Delete all text in the document
|
# Delete all text in the document.
|
||||||
fun void ClearAll=2004(,)
|
fun void ClearAll=2004(,)
|
||||||
|
|
||||||
# Set all style bytes to 0, remove all folding information
|
# Set all style bytes to 0, remove all folding information.
|
||||||
fun void ClearDocumentStyle=2005(,)
|
fun void ClearDocumentStyle=2005(,)
|
||||||
|
|
||||||
# The number of characters in the document
|
# The number of characters in the document.
|
||||||
get int GetLength=2006(,)
|
get int GetLength=2006(,)
|
||||||
|
|
||||||
# Returns the character byte at the position
|
# Returns the character byte at the position.
|
||||||
get int GetCharAt=2007(position pos,)
|
get int GetCharAt=2007(position pos,)
|
||||||
|
|
||||||
# Returns the position of the caret
|
# Returns the position of the caret.
|
||||||
get position GetCurrentPos=2008(,)
|
get position GetCurrentPos=2008(,)
|
||||||
|
|
||||||
# Returns the position of the opposite end of the selection to the caret
|
# Returns the position of the opposite end of the selection to the caret.
|
||||||
get position GetAnchor=2009(,)
|
get position GetAnchor=2009(,)
|
||||||
|
|
||||||
# Returns the style byte at the position
|
# Returns the style byte at the position.
|
||||||
get int GetStyleAt=2010(position pos,)
|
get int GetStyleAt=2010(position pos,)
|
||||||
|
|
||||||
# Redoes the next action on the undo history
|
# Redoes the next action on the undo history.
|
||||||
fun void Redo=2011(,)
|
fun void Redo=2011(,)
|
||||||
|
|
||||||
# Choose between collecting actions into the undo
|
# Choose between collecting actions into the undo
|
||||||
@@ -121,10 +134,10 @@ fun void SetSavePoint=2014(,)
|
|||||||
# Returns the number of bytes in the buffer not including terminating nulls.
|
# Returns the number of bytes in the buffer not including terminating nulls.
|
||||||
fun int GetStyledText=2015(, textrange tr)
|
fun int GetStyledText=2015(, textrange tr)
|
||||||
|
|
||||||
# Are there any redoable actions in the undo history.
|
# Are there any redoable actions in the undo history?
|
||||||
fun bool CanRedo=2016(,)
|
fun bool CanRedo=2016(,)
|
||||||
|
|
||||||
# Retrieve the line number at which a particular marker is located
|
# Retrieve the line number at which a particular marker is located.
|
||||||
fun int MarkerLineFromHandle=2017(int handle,)
|
fun int MarkerLineFromHandle=2017(int handle,)
|
||||||
|
|
||||||
# Delete a marker.
|
# Delete a marker.
|
||||||
@@ -133,6 +146,7 @@ fun void MarkerDeleteHandle=2018(int handle,)
|
|||||||
# Is undo history being collected?
|
# Is undo history being collected?
|
||||||
get bool GetUndoCollection=2019(,)
|
get bool GetUndoCollection=2019(,)
|
||||||
|
|
||||||
|
enu WhiteSpace=SCWS_
|
||||||
val SCWS_INVISIBLE=0
|
val SCWS_INVISIBLE=0
|
||||||
val SCWS_VISIBLEALWAYS=1
|
val SCWS_VISIBLEALWAYS=1
|
||||||
val SCWS_VISIBLEAFTERINDENT=2
|
val SCWS_VISIBLEAFTERINDENT=2
|
||||||
@@ -168,6 +182,7 @@ fun int GetCurLine=2027(int length, stringresult text)
|
|||||||
# Retrieve the position of the last correctly styled character.
|
# Retrieve the position of the last correctly styled character.
|
||||||
get position GetEndStyled=2028(,)
|
get position GetEndStyled=2028(,)
|
||||||
|
|
||||||
|
enu EndOfLine=SC_EOL_
|
||||||
val SC_EOL_CRLF=0
|
val SC_EOL_CRLF=0
|
||||||
val SC_EOL_CR=1
|
val SC_EOL_CR=1
|
||||||
val SC_EOL_LF=2
|
val SC_EOL_LF=2
|
||||||
@@ -182,23 +197,21 @@ get int GetEOLMode=2030(,)
|
|||||||
set void SetEOLMode=2031(int eolMode,)
|
set void SetEOLMode=2031(int eolMode,)
|
||||||
|
|
||||||
# Set the current styling position to pos and the styling mask to mask.
|
# Set the current styling position to pos and the styling mask to mask.
|
||||||
# The styling mask can be used to protect some bits in each styling byte from
|
# The styling mask can be used to protect some bits in each styling byte from modification.
|
||||||
# modification.
|
|
||||||
fun void StartStyling=2032(position pos, int mask)
|
fun void StartStyling=2032(position pos, int mask)
|
||||||
|
|
||||||
# Change style from current styling position for length characters to a style
|
# Change style from current styling position for length characters to a style
|
||||||
# and move the current styling position to after this newly styled segment.
|
# and move the current styling position to after this newly styled segment.
|
||||||
fun void SetStyling=2033(int length, int style)
|
fun void SetStyling=2033(int length, int style)
|
||||||
|
|
||||||
# Is drawing done first into a buffer or direct to the screen.
|
# Is drawing done first into a buffer or direct to the screen?
|
||||||
get bool GetBufferedDraw=2034(,)
|
get bool GetBufferedDraw=2034(,)
|
||||||
|
|
||||||
# If drawing is buffered then each line of text is drawn into a bitmap buffer
|
# If drawing is buffered then each line of text is drawn into a bitmap buffer
|
||||||
# before drawing it to the screen to avoid flicker.
|
# before drawing it to the screen to avoid flicker.
|
||||||
set void SetBufferedDraw=2035(bool buffered,)
|
set void SetBufferedDraw=2035(bool buffered,)
|
||||||
|
|
||||||
# Change the visible size of a tab to be a multiple of the width of a space
|
# Change the visible size of a tab to be a multiple of the width of a space character.
|
||||||
# character.
|
|
||||||
set void SetTabWidth=2036(int tabWidth,)
|
set void SetTabWidth=2036(int tabWidth,)
|
||||||
|
|
||||||
# Retrieve the visible size of a tab.
|
# Retrieve the visible size of a tab.
|
||||||
@@ -212,10 +225,11 @@ val SC_CP_UTF8=65001
|
|||||||
# The SC_CP_UTF8 value can be used to enter Unicode mode.
|
# The SC_CP_UTF8 value can be used to enter Unicode mode.
|
||||||
set void SetCodePage=2037(int codePage,)
|
set void SetCodePage=2037(int codePage,)
|
||||||
|
|
||||||
# In palette mode, Scintilla uses the environments palette calls to display
|
# In palette mode, Scintilla uses the environment's palette calls to display
|
||||||
# more colours. This may lead to ugly displays.
|
# more colours. This may lead to ugly displays.
|
||||||
set void SetUsePalette=2039(bool usePalette,)
|
set void SetUsePalette=2039(bool usePalette,)
|
||||||
|
|
||||||
|
enu MarkerSymbol=SC_MARK_
|
||||||
val MARKER_MAX=31
|
val MARKER_MAX=31
|
||||||
val SC_MARK_CIRCLE=0
|
val SC_MARK_CIRCLE=0
|
||||||
val SC_MARK_ROUNDRECT=1
|
val SC_MARK_ROUNDRECT=1
|
||||||
@@ -227,7 +241,7 @@ val SC_MARK_ARROWDOWN=6
|
|||||||
val SC_MARK_MINUS=7
|
val SC_MARK_MINUS=7
|
||||||
val SC_MARK_PLUS=8
|
val SC_MARK_PLUS=8
|
||||||
|
|
||||||
# Shapes used for outlining column
|
# Shapes used for outlining column.
|
||||||
val SC_MARK_VLINE=9
|
val SC_MARK_VLINE=9
|
||||||
val SC_MARK_LCORNER=10
|
val SC_MARK_LCORNER=10
|
||||||
val SC_MARK_TCORNER=11
|
val SC_MARK_TCORNER=11
|
||||||
@@ -242,12 +256,13 @@ val SC_MARK_CIRCLEPLUSCONNECTED=19
|
|||||||
val SC_MARK_CIRCLEMINUS=20
|
val SC_MARK_CIRCLEMINUS=20
|
||||||
val SC_MARK_CIRCLEMINUSCONNECTED=21
|
val SC_MARK_CIRCLEMINUSCONNECTED=21
|
||||||
|
|
||||||
# Invisible mark that only sets the line background color
|
# Invisible mark that only sets the line background color.
|
||||||
val SC_MARK_BACKGROUND=22
|
val SC_MARK_BACKGROUND=22
|
||||||
|
|
||||||
val SC_MARK_CHARACTER=10000
|
val SC_MARK_CHARACTER=10000
|
||||||
|
|
||||||
# Markers used for outlining column
|
enu MarkerOutline=SC_MARKNUM_
|
||||||
|
# Markers used for outlining column.
|
||||||
val SC_MARKNUM_FOLDEREND=25
|
val SC_MARKNUM_FOLDEREND=25
|
||||||
val SC_MARKNUM_FOLDEROPENMID=26
|
val SC_MARKNUM_FOLDEROPENMID=26
|
||||||
val SC_MARKNUM_FOLDERMIDTAIL=27
|
val SC_MARKNUM_FOLDERMIDTAIL=27
|
||||||
@@ -270,10 +285,10 @@ fun void MarkerSetBack=2042(int markerNumber, colour back)
|
|||||||
# Add a marker to a line, returning an ID which can be used to find or delete the marker.
|
# Add a marker to a line, returning an ID which can be used to find or delete the marker.
|
||||||
fun int MarkerAdd=2043(int line, int markerNumber)
|
fun int MarkerAdd=2043(int line, int markerNumber)
|
||||||
|
|
||||||
# Delete a marker from a line
|
# Delete a marker from a line.
|
||||||
fun void MarkerDelete=2044(int line, int markerNumber)
|
fun void MarkerDelete=2044(int line, int markerNumber)
|
||||||
|
|
||||||
# Delete all markers with a particular number from all lines
|
# Delete all markers with a particular number from all lines.
|
||||||
fun void MarkerDeleteAll=2045(int markerNumber,)
|
fun void MarkerDeleteAll=2045(int markerNumber,)
|
||||||
|
|
||||||
# Get a bit mask of all the markers set on a line.
|
# Get a bit mask of all the markers set on a line.
|
||||||
@@ -285,6 +300,7 @@ fun int MarkerNext=2047(int lineStart, int markerMask)
|
|||||||
# Find the previous line before lineStart that includes a marker in mask.
|
# Find the previous line before lineStart that includes a marker in mask.
|
||||||
fun int MarkerPrevious=2048(int lineStart, int markerMask)
|
fun int MarkerPrevious=2048(int lineStart, int markerMask)
|
||||||
|
|
||||||
|
enu MarginType=SC_MARGIN_
|
||||||
val SC_MARGIN_SYMBOL=0
|
val SC_MARGIN_SYMBOL=0
|
||||||
val SC_MARGIN_NUMBER=1
|
val SC_MARGIN_NUMBER=1
|
||||||
|
|
||||||
@@ -314,6 +330,7 @@ get bool GetMarginSensitiveN=2247(int margin,)
|
|||||||
|
|
||||||
# Styles in range 32..37 are predefined for parts of the UI and are not used as normal styles.
|
# Styles in range 32..37 are predefined for parts of the UI and are not used as normal styles.
|
||||||
# Styles 38 and 39 are for future use.
|
# Styles 38 and 39 are for future use.
|
||||||
|
enu StylesCommon=STYLE_
|
||||||
val STYLE_DEFAULT=32
|
val STYLE_DEFAULT=32
|
||||||
val STYLE_LINENUMBER=33
|
val STYLE_LINENUMBER=33
|
||||||
val STYLE_BRACELIGHT=34
|
val STYLE_BRACELIGHT=34
|
||||||
@@ -325,6 +342,7 @@ val STYLE_MAX=127
|
|||||||
|
|
||||||
# Character set identifiers are used in StyleSetCharacterSet.
|
# Character set identifiers are used in StyleSetCharacterSet.
|
||||||
# The values are the same as the Windows *_CHARSET values.
|
# The values are the same as the Windows *_CHARSET values.
|
||||||
|
enu CharacterSet=SC_CHARSET_
|
||||||
val SC_CHARSET_ANSI=0
|
val SC_CHARSET_ANSI=0
|
||||||
val SC_CHARSET_DEFAULT=1
|
val SC_CHARSET_DEFAULT=1
|
||||||
val SC_CHARSET_BALTIC=186
|
val SC_CHARSET_BALTIC=186
|
||||||
@@ -375,6 +393,7 @@ fun void StyleResetDefault=2058(,)
|
|||||||
# Set a style to be underlined or not.
|
# Set a style to be underlined or not.
|
||||||
set void StyleSetUnderline=2059(int style, bool underline)
|
set void StyleSetUnderline=2059(int style, bool underline)
|
||||||
|
|
||||||
|
enu CaseVisible=SC_CASE_
|
||||||
val SC_CASE_MIXED=0
|
val SC_CASE_MIXED=0
|
||||||
val SC_CASE_UPPER=1
|
val SC_CASE_UPPER=1
|
||||||
val SC_CASE_LOWER=2
|
val SC_CASE_LOWER=2
|
||||||
@@ -414,8 +433,7 @@ get int GetCaretPeriod=2075(,)
|
|||||||
# Get the time in milliseconds that the caret is on and off. 0 = steady on.
|
# Get the time in milliseconds that the caret is on and off. 0 = steady on.
|
||||||
set void SetCaretPeriod=2076(int periodMilliseconds,)
|
set void SetCaretPeriod=2076(int periodMilliseconds,)
|
||||||
|
|
||||||
# Set the set of characters making up words for when moving or selecting
|
# Set the set of characters making up words for when moving or selecting by word.
|
||||||
# by word.
|
|
||||||
set void SetWordChars=2077(, string characters)
|
set void SetWordChars=2077(, string characters)
|
||||||
|
|
||||||
# Start a sequence of actions that is undone and redone as a unit.
|
# Start a sequence of actions that is undone and redone as a unit.
|
||||||
@@ -425,6 +443,7 @@ fun void BeginUndoAction=2078(,)
|
|||||||
# End a sequence of actions that is undone and redone as a unit.
|
# End a sequence of actions that is undone and redone as a unit.
|
||||||
fun void EndUndoAction=2079(,)
|
fun void EndUndoAction=2079(,)
|
||||||
|
|
||||||
|
enu IndicatorStyle=INDIC_
|
||||||
val INDIC_MAX=7
|
val INDIC_MAX=7
|
||||||
val INDIC_PLAIN=0
|
val INDIC_PLAIN=0
|
||||||
val INDIC_SQUIGGLE=1
|
val INDIC_SQUIGGLE=1
|
||||||
@@ -448,8 +467,8 @@ set void IndicSetFore=2082(int indic, colour fore)
|
|||||||
# Retrieve the foreground colour of an indicator.
|
# Retrieve the foreground colour of an indicator.
|
||||||
get colour IndicGetFore=2083(int indic,)
|
get colour IndicGetFore=2083(int indic,)
|
||||||
|
|
||||||
# Divide each styling byte into lexical class bits (default:5) and indicator
|
# Divide each styling byte into lexical class bits (default: 5) and indicator
|
||||||
# bits (default:3). If a lexer requires more than 32 lexical states, then this
|
# bits (default: 3). If a lexer requires more than 32 lexical states, then this
|
||||||
# is used to expand the possible states.
|
# is used to expand the possible states.
|
||||||
set void SetStyleBits=2090(int bits,)
|
set void SetStyleBits=2090(int bits,)
|
||||||
|
|
||||||
@@ -468,7 +487,7 @@ get int GetMaxLineState=2094(,)
|
|||||||
# Is the background of the line containing the caret in a different colour?
|
# Is the background of the line containing the caret in a different colour?
|
||||||
get bool GetCaretLineVisible=2095(,)
|
get bool GetCaretLineVisible=2095(,)
|
||||||
|
|
||||||
# Dsplay the background of the line containing the caret in a different colour.
|
# Display the background of the line containing the caret in a different colour.
|
||||||
set void SetCaretLineVisible=2096(bool show,)
|
set void SetCaretLineVisible=2096(bool show,)
|
||||||
|
|
||||||
# Get the colour of the background of the line containing the caret.
|
# Get the colour of the background of the line containing the caret.
|
||||||
@@ -492,8 +511,7 @@ fun void AutoCCancel=2101(,)
|
|||||||
# Is there an auto-completion list visible?
|
# Is there an auto-completion list visible?
|
||||||
fun bool AutoCActive=2102(,)
|
fun bool AutoCActive=2102(,)
|
||||||
|
|
||||||
# Retrieve the position of the caret when the auto-completion list was
|
# Retrieve the position of the caret when the auto-completion list was displayed.
|
||||||
# displayed.
|
|
||||||
fun position AutoCPosStart=2103(,)
|
fun position AutoCPosStart=2103(,)
|
||||||
|
|
||||||
# User has selected an item so remove the list and insert the selection.
|
# User has selected an item so remove the list and insert the selection.
|
||||||
@@ -502,8 +520,8 @@ fun void AutoCComplete=2104(,)
|
|||||||
# Define a set of character that when typed cancel the auto-completion list.
|
# Define a set of character that when typed cancel the auto-completion list.
|
||||||
fun void AutoCStops=2105(, string characterSet)
|
fun void AutoCStops=2105(, string characterSet)
|
||||||
|
|
||||||
# Change the separator character in the string setting up an auto-completion
|
# Change the separator character in the string setting up an auto-completion list.
|
||||||
# list. Default is space but can be changed if items contain space.
|
# Default is space but can be changed if items contain space.
|
||||||
set void AutoCSetSeparator=2106(int separatorCharacter,)
|
set void AutoCSetSeparator=2106(int separatorCharacter,)
|
||||||
|
|
||||||
# Retrieve the auto-completion list separator character.
|
# Retrieve the auto-completion list separator character.
|
||||||
@@ -538,16 +556,18 @@ get bool AutoCGetIgnoreCase=2116(,)
|
|||||||
# Display a list of strings and send notification when user chooses one.
|
# Display a list of strings and send notification when user chooses one.
|
||||||
fun void UserListShow=2117(int listType, string itemList)
|
fun void UserListShow=2117(int listType, string itemList)
|
||||||
|
|
||||||
# Set whether or not autocompletion is hidden automatically when nothing matches
|
# Set whether or not autocompletion is hidden automatically when nothing matches.
|
||||||
set void AutoCSetAutoHide=2118(bool autoHide,)
|
set void AutoCSetAutoHide=2118(bool autoHide,)
|
||||||
|
|
||||||
# Retrieve whether or not autocompletion is hidden automatically when nothing matches
|
# Retrieve whether or not autocompletion is hidden automatically when nothing matches.
|
||||||
get bool AutoCGetAutoHide=2119(,)
|
get bool AutoCGetAutoHide=2119(,)
|
||||||
|
|
||||||
# Set whether or not autocompletion deletes any word characters after the inserted text upon completion
|
# Set whether or not autocompletion deletes any word characters
|
||||||
|
# after the inserted text upon completion.
|
||||||
set void AutoCSetDropRestOfWord=2270(bool dropRestOfWord,)
|
set void AutoCSetDropRestOfWord=2270(bool dropRestOfWord,)
|
||||||
|
|
||||||
# Retrieve whether or not autocompletion deletes any word characters after the inserted text upon completion
|
# Retrieve whether or not autocompletion deletes any word characters
|
||||||
|
# after the inserted text upon completion.
|
||||||
get bool AutoCGetDropRestOfWord=2271(,)
|
get bool AutoCGetDropRestOfWord=2271(,)
|
||||||
|
|
||||||
# Set the number of spaces used for one level of indentation.
|
# Set the number of spaces used for one level of indentation.
|
||||||
@@ -630,6 +650,7 @@ set void SetPrintMagnification=2146(int magnification,)
|
|||||||
# Returns the print magnification.
|
# Returns the print magnification.
|
||||||
get int GetPrintMagnification=2147(,)
|
get int GetPrintMagnification=2147(,)
|
||||||
|
|
||||||
|
enu PrintOption=SC_PRINT_
|
||||||
# PrintColourMode - use same colours as screen.
|
# PrintColourMode - use same colours as screen.
|
||||||
val SC_PRINT_NORMAL=0
|
val SC_PRINT_NORMAL=0
|
||||||
# PrintColourMode - invert the light value of each style for printing.
|
# PrintColourMode - invert the light value of each style for printing.
|
||||||
@@ -647,6 +668,7 @@ set void SetPrintColourMode=2148(int mode,)
|
|||||||
# Returns the print colour mode.
|
# Returns the print colour mode.
|
||||||
get int GetPrintColourMode=2149(,)
|
get int GetPrintColourMode=2149(,)
|
||||||
|
|
||||||
|
enu FindOption=SCFIND_
|
||||||
val SCFIND_WHOLEWORD=2
|
val SCFIND_WHOLEWORD=2
|
||||||
val SCFIND_MATCHCASE=4
|
val SCFIND_MATCHCASE=4
|
||||||
val SCFIND_WORDSTART=0x00100000
|
val SCFIND_WORDSTART=0x00100000
|
||||||
@@ -655,7 +677,7 @@ val SCFIND_REGEXP=0x00200000
|
|||||||
# Find some text in the document.
|
# Find some text in the document.
|
||||||
fun position FindText=2150(int flags, findtext ft)
|
fun position FindText=2150(int flags, findtext ft)
|
||||||
|
|
||||||
# On Windows will draw the document into a display context such as a printer.
|
# On Windows, will draw the document into a display context such as a printer.
|
||||||
fun void FormatRange=2151(bool draw, formatrange fr)
|
fun void FormatRange=2151(bool draw, formatrange fr)
|
||||||
|
|
||||||
# Retrieve the line at the top of the display.
|
# Retrieve the line at the top of the display.
|
||||||
@@ -727,7 +749,7 @@ fun void Null=2172(,)
|
|||||||
# Will a paste succeed?
|
# Will a paste succeed?
|
||||||
fun bool CanPaste=2173(,)
|
fun bool CanPaste=2173(,)
|
||||||
|
|
||||||
# Are there any undoable actions in the undo history.
|
# Are there any undoable actions in the undo history?
|
||||||
fun bool CanUndo=2174(,)
|
fun bool CanUndo=2174(,)
|
||||||
|
|
||||||
# Delete the undo history.
|
# Delete the undo history.
|
||||||
@@ -765,16 +787,16 @@ get int GetDirectFunction=2184(,)
|
|||||||
# the function returned by GetDirectFunction.
|
# the function returned by GetDirectFunction.
|
||||||
get int GetDirectPointer=2185(,)
|
get int GetDirectPointer=2185(,)
|
||||||
|
|
||||||
# Set to overtype (true) or insert mode
|
# Set to overtype (true) or insert mode.
|
||||||
set void SetOvertype=2186(bool overtype,)
|
set void SetOvertype=2186(bool overtype,)
|
||||||
|
|
||||||
# Returns true if overtype mode is active otherwise false is returned.
|
# Returns true if overtype mode is active otherwise false is returned.
|
||||||
get bool GetOvertype=2187(,)
|
get bool GetOvertype=2187(,)
|
||||||
|
|
||||||
# Set the width of the insert mode caret
|
# Set the width of the insert mode caret.
|
||||||
set void SetCaretWidth=2188(int pixelWidth,)
|
set void SetCaretWidth=2188(int pixelWidth,)
|
||||||
|
|
||||||
# Returns the width of the insert mode caret
|
# Returns the width of the insert mode caret.
|
||||||
get int GetCaretWidth=2189(,)
|
get int GetCaretWidth=2189(,)
|
||||||
|
|
||||||
# Sets the position that starts the target which is used for updating the
|
# Sets the position that starts the target which is used for updating the
|
||||||
@@ -809,10 +831,10 @@ fun int ReplaceTargetRE=2195(int length, string text)
|
|||||||
# Returns length of range or -1 for failure in which case target is not moved.
|
# Returns length of range or -1 for failure in which case target is not moved.
|
||||||
fun int SearchInTarget=2197(int length, string text)
|
fun int SearchInTarget=2197(int length, string text)
|
||||||
|
|
||||||
# Set the search flags used by SearchInTarget
|
# Set the search flags used by SearchInTarget.
|
||||||
set void SetSearchFlags=2198(int flags,)
|
set void SetSearchFlags=2198(int flags,)
|
||||||
|
|
||||||
# Get the search flags used by SearchInTarget
|
# Get the search flags used by SearchInTarget.
|
||||||
get int GetSearchFlags=2199(,)
|
get int GetSearchFlags=2199(,)
|
||||||
|
|
||||||
# Show a call tip containing a definition near position pos.
|
# Show a call tip containing a definition near position pos.
|
||||||
@@ -839,6 +861,7 @@ fun int VisibleFromDocLine=2220(int line,)
|
|||||||
# Find the document line of a display line taking hidden lines into account.
|
# Find the document line of a display line taking hidden lines into account.
|
||||||
fun int DocLineFromVisible=2221(int lineDisplay,)
|
fun int DocLineFromVisible=2221(int lineDisplay,)
|
||||||
|
|
||||||
|
enu FoldLevel=SC_FOLDLEVEL
|
||||||
val SC_FOLDLEVELBASE=0x400
|
val SC_FOLDLEVELBASE=0x400
|
||||||
val SC_FOLDLEVELWHITEFLAG=0x1000
|
val SC_FOLDLEVELWHITEFLAG=0x1000
|
||||||
val SC_FOLDLEVELHEADERFLAG=0x2000
|
val SC_FOLDLEVELHEADERFLAG=0x2000
|
||||||
@@ -879,20 +902,20 @@ fun void ToggleFold=2231(int line,)
|
|||||||
# Ensure a particular line is visible by expanding any header line hiding it.
|
# Ensure a particular line is visible by expanding any header line hiding it.
|
||||||
fun void EnsureVisible=2232(int line,)
|
fun void EnsureVisible=2232(int line,)
|
||||||
|
|
||||||
# Set some debugging options for folding
|
# Set some debugging options for folding.
|
||||||
fun void SetFoldFlags=2233(int flags,)
|
fun void SetFoldFlags=2233(int flags,)
|
||||||
|
|
||||||
# Ensure a particular line is visible by expanding any header line hiding it.
|
# Ensure a particular line is visible by expanding any header line hiding it.
|
||||||
# Use the currently set visibility policy to determine which range to display.
|
# Use the currently set visibility policy to determine which range to display.
|
||||||
fun void EnsureVisibleEnforcePolicy=2234(int line,)
|
fun void EnsureVisibleEnforcePolicy=2234(int line,)
|
||||||
|
|
||||||
# Sets whether a tab pressed when caret is within indentation indents
|
# Sets whether a tab pressed when caret is within indentation indents.
|
||||||
set void SetTabIndents=2260(bool tabIndents,)
|
set void SetTabIndents=2260(bool tabIndents,)
|
||||||
|
|
||||||
# Does a tab pressed when caret is within indentation indent?
|
# Does a tab pressed when caret is within indentation indent?
|
||||||
get bool GetTabIndents=2261(,)
|
get bool GetTabIndents=2261(,)
|
||||||
|
|
||||||
# Sets whether a backspace pressed when caret is within indentation unindents
|
# Sets whether a backspace pressed when caret is within indentation unindents.
|
||||||
set void SetBackSpaceUnIndents=2262(bool bsUnIndents,)
|
set void SetBackSpaceUnIndents=2262(bool bsUnIndents,)
|
||||||
|
|
||||||
# Does a backspace pressed when caret is within indentation unindent?
|
# Does a backspace pressed when caret is within indentation unindent?
|
||||||
@@ -900,38 +923,63 @@ get bool GetBackSpaceUnIndents=2263(,)
|
|||||||
|
|
||||||
val SC_TIME_FOREVER=10000000
|
val SC_TIME_FOREVER=10000000
|
||||||
|
|
||||||
# Sets the time the mouse must sit still to generate a mouse dwell event
|
# Sets the time the mouse must sit still to generate a mouse dwell event.
|
||||||
set void SetMouseDwellTime=2264(int periodMilliseconds,)
|
set void SetMouseDwellTime=2264(int periodMilliseconds,)
|
||||||
|
|
||||||
# Retrieve the time the mouse must sit still to generate a mouse dwell event
|
# Retrieve the time the mouse must sit still to generate a mouse dwell event.
|
||||||
get int GetMouseDwellTime=2265(,)
|
get int GetMouseDwellTime=2265(,)
|
||||||
|
|
||||||
# Get position of start of word
|
# Get position of start of word.
|
||||||
fun int WordStartPosition=2266(position pos, bool onlyWordCharacters)
|
fun int WordStartPosition=2266(position pos, bool onlyWordCharacters)
|
||||||
|
|
||||||
# Get position of end of word
|
# Get position of end of word.
|
||||||
fun int WordEndPosition=2267(position pos, bool onlyWordCharacters)
|
fun int WordEndPosition=2267(position pos, bool onlyWordCharacters)
|
||||||
|
|
||||||
|
enu Wrap=SC_WRAP_
|
||||||
val SC_WRAP_NONE=0
|
val SC_WRAP_NONE=0
|
||||||
val SC_WRAP_WORD=1
|
val SC_WRAP_WORD=1
|
||||||
|
|
||||||
# Sets whether text is word wrapped
|
# Sets whether text is word wrapped.
|
||||||
set void SetWrapMode=2268(int mode,)
|
set void SetWrapMode=2268(int mode,)
|
||||||
|
|
||||||
# Retrieve whether text is word wrapped
|
# Retrieve whether text is word wrapped.
|
||||||
get int GetWrapMode=2269(,)
|
get int GetWrapMode=2269(,)
|
||||||
|
|
||||||
|
enu LineCache=SC_CACHE_
|
||||||
val SC_CACHE_NONE=0
|
val SC_CACHE_NONE=0
|
||||||
val SC_CACHE_CARET=1
|
val SC_CACHE_CARET=1
|
||||||
val SC_CACHE_PAGE=2
|
val SC_CACHE_PAGE=2
|
||||||
val SC_CACHE_DOCUMENT=3
|
val SC_CACHE_DOCUMENT=3
|
||||||
|
|
||||||
# Sets the degree of caching of layout information
|
# Sets the degree of caching of layout information.
|
||||||
set void SetLayoutCache=2272(int mode,)
|
set void SetLayoutCache=2272(int mode,)
|
||||||
|
|
||||||
# Retrieve the degree of caching of layout information
|
# Retrieve the degree of caching of layout information.
|
||||||
get int GetLayoutCache=2273(,)
|
get int GetLayoutCache=2273(,)
|
||||||
|
|
||||||
|
# Sets the document width assumed for scrolling.
|
||||||
|
set void SetScrollWidth=2274(int pixelWidth,)
|
||||||
|
|
||||||
|
# Retrieve the document width assumed for scrolling.
|
||||||
|
get int GetScrollWidth=2275(,)
|
||||||
|
|
||||||
|
# Measure the pixel width of some text in a particular style.
|
||||||
|
# Nul terminated text argument.
|
||||||
|
# Does not handle tab or control characters.
|
||||||
|
fun int TextWidth=2276(int style, string text)
|
||||||
|
|
||||||
|
# Sets the scroll range so that maximum scroll position has
|
||||||
|
# the last line at the bottom of the view (default).
|
||||||
|
# Setting this to false allows scrolling one page below the last line.
|
||||||
|
set void SetEndAtLastLine=2277(bool endAtLastLine,)
|
||||||
|
|
||||||
|
# Retrieve whether the maximum scroll position has the last
|
||||||
|
# line at the bottom of the view.
|
||||||
|
get int GetEndAtLastLine=2278(,)
|
||||||
|
|
||||||
|
# Retrieve the height of a particular line of text in pixels.
|
||||||
|
fun int TextHeight=2279(int line,)
|
||||||
|
|
||||||
## Start of key messages
|
## Start of key messages
|
||||||
# Move caret down one line.
|
# Move caret down one line.
|
||||||
fun void LineDown=2300(,)
|
fun void LineDown=2300(,)
|
||||||
@@ -1014,8 +1062,7 @@ fun void Cancel=2325(,)
|
|||||||
# Delete the selection or if no selection, the character before the caret.
|
# Delete the selection or if no selection, the character before the caret.
|
||||||
fun void DeleteBack=2326(,)
|
fun void DeleteBack=2326(,)
|
||||||
|
|
||||||
# If selection is empty or all on one line replace the selection with a tab
|
# If selection is empty or all on one line replace the selection with a tab character.
|
||||||
# character.
|
|
||||||
# If more than one line selected, indent the lines.
|
# If more than one line selected, indent the lines.
|
||||||
fun void Tab=2327(,)
|
fun void Tab=2327(,)
|
||||||
|
|
||||||
@@ -1069,17 +1116,17 @@ fun void LineScrollDown=2342(,)
|
|||||||
fun void LineScrollUp=2343(,)
|
fun void LineScrollUp=2343(,)
|
||||||
|
|
||||||
# Delete the selection or if no selection, the character before the caret.
|
# Delete the selection or if no selection, the character before the caret.
|
||||||
# Will not delete the chraacter before at the start of a line.
|
# Will not delete the character before at the start of a line.
|
||||||
fun void DeleteBackNotLine=2344(,)
|
fun void DeleteBackNotLine=2344(,)
|
||||||
|
|
||||||
# Move the caret inside current view if it's not there already
|
# Move the caret inside current view if it's not there already.
|
||||||
fun void MoveCaretInsideView=2401(,)
|
fun void MoveCaretInsideView=2401(,)
|
||||||
|
|
||||||
# How many characters are on a line, not including end of line characters.
|
# How many characters are on a line, not including end of line characters?
|
||||||
fun int LineLength=2350(int line,)
|
fun int LineLength=2350(int line,)
|
||||||
|
|
||||||
# Highlight the characters at two positions.
|
# Highlight the characters at two positions.
|
||||||
fun void BraceHighlight=2351(position pos1,position pos2)
|
fun void BraceHighlight=2351(position pos1, position pos2)
|
||||||
|
|
||||||
# Highlight the character at a position indicating there is no matching brace.
|
# Highlight the character at a position indicating there is no matching brace.
|
||||||
fun void BraceBadLight=2352(position pos,)
|
fun void BraceBadLight=2352(position pos,)
|
||||||
@@ -1087,10 +1134,10 @@ fun void BraceBadLight=2352(position pos,)
|
|||||||
# Find the position of a matching brace or INVALID_POSITION if no match.
|
# Find the position of a matching brace or INVALID_POSITION if no match.
|
||||||
fun position BraceMatch=2353(position pos,)
|
fun position BraceMatch=2353(position pos,)
|
||||||
|
|
||||||
# Are the end of line characters visible.
|
# Are the end of line characters visible?
|
||||||
get bool GetViewEOL=2355(,)
|
get bool GetViewEOL=2355(,)
|
||||||
|
|
||||||
# Make the end of line characters visible or invisible
|
# Make the end of line characters visible or invisible.
|
||||||
set void SetViewEOL=2356(bool visible,)
|
set void SetViewEOL=2356(bool visible,)
|
||||||
|
|
||||||
# Retrieve a pointer to the document object.
|
# Retrieve a pointer to the document object.
|
||||||
@@ -1102,6 +1149,7 @@ set void SetDocPointer=2358(,int pointer)
|
|||||||
# Set which document modification events are sent to the container.
|
# Set which document modification events are sent to the container.
|
||||||
set void SetModEventMask=2359(int mask,)
|
set void SetModEventMask=2359(int mask,)
|
||||||
|
|
||||||
|
enu EdgeVisualStyle=EDGE_
|
||||||
val EDGE_NONE=0
|
val EDGE_NONE=0
|
||||||
val EDGE_LINE=1
|
val EDGE_LINE=1
|
||||||
val EDGE_BACKGROUND=2
|
val EDGE_BACKGROUND=2
|
||||||
@@ -1137,24 +1185,6 @@ fun int SearchNext=2367(int flags, string text)
|
|||||||
# Does not ensure the selection is visible.
|
# Does not ensure the selection is visible.
|
||||||
fun int SearchPrev=2368(int flags, string text)
|
fun int SearchPrev=2368(int flags, string text)
|
||||||
|
|
||||||
# Show caret within N lines of edge when it's scrolled to view
|
|
||||||
# If CARET_SLOP not set then centre caret on screen when it's
|
|
||||||
# scrolled to view
|
|
||||||
val CARET_SLOP=0x01
|
|
||||||
# Value not used
|
|
||||||
val CARET_CENTER=0x02
|
|
||||||
# If CARET_SLOP also set then reposition whenever outside slop border
|
|
||||||
# If CARET_SLOP not set then recentre even when visible
|
|
||||||
val CARET_STRICT=0x04
|
|
||||||
# If CARET_XEVEN set then both left and right margins are given equal weight
|
|
||||||
# rather than favouring left following behaviour.
|
|
||||||
val CARET_XEVEN=0x08
|
|
||||||
# If CARET_XJUMPS set then when caret reaches the margin the display jumps
|
|
||||||
# enough to leave the caret solidly within the display.
|
|
||||||
val CARET_XJUMPS=0x10
|
|
||||||
# Set the way the line the caret is on is kept visible.
|
|
||||||
fun void SetCaretPolicy=2369(int caretPolicy, int caretSlop)
|
|
||||||
|
|
||||||
# Retrieves the number of lines completely visible.
|
# Retrieves the number of lines completely visible.
|
||||||
get int LinesOnScreen=2370(,)
|
get int LinesOnScreen=2370(,)
|
||||||
|
|
||||||
@@ -1162,7 +1192,7 @@ get int LinesOnScreen=2370(,)
|
|||||||
# the wrong mouse button.
|
# the wrong mouse button.
|
||||||
fun void UsePopUp=2371(bool allowPopUp,)
|
fun void UsePopUp=2371(bool allowPopUp,)
|
||||||
|
|
||||||
# Is the selection a rectangular. The alternative is the more common stream selection.
|
# Is the selection rectangular? The alternative is the more common stream selection.
|
||||||
get bool SelectionIsRectangle=2372(,)
|
get bool SelectionIsRectangle=2372(,)
|
||||||
|
|
||||||
# Set the zoom level. This number of points is added to the size of all fonts.
|
# Set the zoom level. This number of points is added to the size of all fonts.
|
||||||
@@ -1182,63 +1212,99 @@ fun void ReleaseDocument=2377(, int doc)
|
|||||||
# Get which document modification events are sent to the container.
|
# Get which document modification events are sent to the container.
|
||||||
get int GetModEventMask=2378(,)
|
get int GetModEventMask=2378(,)
|
||||||
|
|
||||||
# Change internal focus flag
|
# Change internal focus flag.
|
||||||
set void SetFocus=2380(bool focus,)
|
set void SetFocus=2380(bool focus,)
|
||||||
# Get internal focus flag
|
# Get internal focus flag.
|
||||||
get bool GetFocus=2381(,)
|
get bool GetFocus=2381(,)
|
||||||
|
|
||||||
# Change error status - 0 = OK
|
# Change error status - 0 = OK.
|
||||||
set void SetStatus=2382(int statusCode,)
|
set void SetStatus=2382(int statusCode,)
|
||||||
# Get error status
|
# Get error status.
|
||||||
get int GetStatus=2383(,)
|
get int GetStatus=2383(,)
|
||||||
|
|
||||||
# Set whether the mouse is captured when its button is pressed
|
# Set whether the mouse is captured when its button is pressed.
|
||||||
set void SetMouseDownCaptures=2384(bool captures,)
|
set void SetMouseDownCaptures=2384(bool captures,)
|
||||||
# Get whether mouse gets captured
|
# Get whether mouse gets captured.
|
||||||
get bool GetMouseDownCaptures=2385(,)
|
get bool GetMouseDownCaptures=2385(,)
|
||||||
|
|
||||||
|
enu CursorShape=SC_CURSOR
|
||||||
val SC_CURSORNORMAL=-1
|
val SC_CURSORNORMAL=-1
|
||||||
val SC_CURSORWAIT=3
|
val SC_CURSORWAIT=3
|
||||||
# Sets the cursor to one of the SC_CURSOR* values
|
# Sets the cursor to one of the SC_CURSOR* values.
|
||||||
set void SetCursor=2386(int cursorType,)
|
set void SetCursor=2386(int cursorType,)
|
||||||
# Get cursor type
|
# Get cursor type.
|
||||||
get int GetCursor=2387(,)
|
get int GetCursor=2387(,)
|
||||||
|
|
||||||
# Change the way control characters are displayed:
|
# Change the way control characters are displayed:
|
||||||
# If symbol is < 32, keep the drawn way, else, use the given character
|
# If symbol is < 32, keep the drawn way, else, use the given character.
|
||||||
set void SetControlCharSymbol=2388(int symbol,)
|
set void SetControlCharSymbol=2388(int symbol,)
|
||||||
# Get the way control characters are displayed
|
# Get the way control characters are displayed.
|
||||||
get int GetControlCharSymbol=2389(,)
|
get int GetControlCharSymbol=2389(,)
|
||||||
|
|
||||||
# Move to the previous change in capitalistion
|
# Move to the previous change in capitalisation.
|
||||||
fun void WordPartLeft=2390(,)
|
fun void WordPartLeft=2390(,)
|
||||||
# Move to the previous change in capitalistion extending selection to new caret position.
|
# Move to the previous change in capitalisation extending selection
|
||||||
|
# to new caret position.
|
||||||
fun void WordPartLeftExtend=2391(,)
|
fun void WordPartLeftExtend=2391(,)
|
||||||
# Move to the change next in capitalistion
|
# Move to the change next in capitalisation.
|
||||||
fun void WordPartRight=2392(,)
|
fun void WordPartRight=2392(,)
|
||||||
# Move to the next change in capitalistion extending selection to new caret position.
|
# Move to the next change in capitalisation extending selection
|
||||||
|
# to new caret position.
|
||||||
fun void WordPartRightExtend=2393(,)
|
fun void WordPartRightExtend=2393(,)
|
||||||
|
|
||||||
# Constants for use with SetVisiblePolicy, similar to SetCaretPolicy
|
# Constants for use with SetVisiblePolicy, similar to SetCaretPolicy.
|
||||||
val VISIBLE_SLOP=0x01
|
val VISIBLE_SLOP=0x01
|
||||||
val VISIBLE_STRICT=0x04
|
val VISIBLE_STRICT=0x04
|
||||||
# Set the way the display area is determined when a particular line is to be moved to.
|
# Set the way the display area is determined when a particular line
|
||||||
|
# is to be moved to by Find, FindNext, GotoLine, etc.
|
||||||
fun void SetVisiblePolicy=2394(int visiblePolicy, int visibleSlop)
|
fun void SetVisiblePolicy=2394(int visiblePolicy, int visibleSlop)
|
||||||
|
|
||||||
# Delete back from the current position to the start of the line
|
# Delete back from the current position to the start of the line.
|
||||||
fun void DelLineLeft=2395(,)
|
fun void DelLineLeft=2395(,)
|
||||||
|
|
||||||
# Delete forwards from the current position to the end of the line
|
# Delete forwards from the current position to the end of the line.
|
||||||
fun void DelLineRight=2396(,)
|
fun void DelLineRight=2396(,)
|
||||||
|
|
||||||
# Get and Set the xOffset (ie, horizonal scroll position)
|
# Get and Set the xOffset (ie, horizonal scroll position).
|
||||||
set void SetXOffset=2397(int newOffset,)
|
set void SetXOffset=2397(int newOffset,)
|
||||||
get int GetXOffset=2398(,)
|
get int GetXOffset=2398(,)
|
||||||
|
|
||||||
# Set the focus to this Scintilla widget.
|
# Set the focus to this Scintilla widget.
|
||||||
# GTK+ Specific
|
# GTK+ Specific.
|
||||||
fun void GrabFocus=2400(,)
|
fun void GrabFocus=2400(,)
|
||||||
|
|
||||||
|
enu CaretPolicy = CARET_
|
||||||
|
# Caret policy, used by SetXCaretPolicy and SetYCaretPolicy.
|
||||||
|
# If CARET_SLOP is set, we can define a slop value: caretSlop.
|
||||||
|
# This value defines an unwanted zone (UZ) where the caret is... unwanted.
|
||||||
|
# This zone is defined as a number of pixels near the vertical margins,
|
||||||
|
# and as a number of lines near the horizontal margins.
|
||||||
|
# By keeping the caret away from the edges, it is seen within its context,
|
||||||
|
# so it is likely that the identifier that the caret is on can be completely seen,
|
||||||
|
# and that the current line is seen with some of the lines following it which are
|
||||||
|
# often dependent on that line.
|
||||||
|
val CARET_SLOP=0x01
|
||||||
|
# If CARET_STRICT is set, the policy is enforced... strictly.
|
||||||
|
# The caret is centred on the display if slop is not set,
|
||||||
|
# and cannot go in the UZ if slop is set.
|
||||||
|
val CARET_STRICT=0x04
|
||||||
|
# If CARET_JUMPS is set, the display is moved more energetically
|
||||||
|
# so the caret can move in the same direction longer before the policy is applied again.
|
||||||
|
val CARET_JUMPS=0x10
|
||||||
|
# If CARET_EVEN is not set, instead of having symmetrical UZs,
|
||||||
|
# the left and bottom UZs are extended up to right and top UZs respectively.
|
||||||
|
# This way, we favour the displaying of useful information: the begining of lines,
|
||||||
|
# where most code reside, and the lines after the caret, eg. the body of a function.
|
||||||
|
val CARET_EVEN=0x08
|
||||||
|
|
||||||
|
# Set the way the caret is kept visible when going sideway.
|
||||||
|
# The exclusion zone is given in pixels.
|
||||||
|
fun void SetXCaretPolicy=2402(int caretPolicy, int caretSlop)
|
||||||
|
|
||||||
|
# Set the way the line the caret is on is kept visible.
|
||||||
|
# The exclusion zone is given in lines.
|
||||||
|
fun void SetYCaretPolicy=2403(int caretPolicy, int caretSlop)
|
||||||
|
|
||||||
# Start notifying the container of all key presses and commands.
|
# Start notifying the container of all key presses and commands.
|
||||||
fun void StartRecord=3001(,)
|
fun void StartRecord=3001(,)
|
||||||
|
|
||||||
@@ -1264,9 +1330,10 @@ set void SetKeyWords=4005(int keywordSet, string keyWords)
|
|||||||
set void SetLexerLanguage=4006(, string language)
|
set void SetLexerLanguage=4006(, string language)
|
||||||
|
|
||||||
# Notifications
|
# Notifications
|
||||||
# Type of modification and the action which caused the modification
|
# Type of modification and the action which caused the modification.
|
||||||
# These are defined as a bit mask to make it easy to specify which notifications are wanted.
|
# These are defined as a bit mask to make it easy to specify which notifications are wanted.
|
||||||
# One bit is set from each of SC_MOD_* and SC_PERFORMED_*.
|
# One bit is set from each of SC_MOD_* and SC_PERFORMED_*.
|
||||||
|
enu ModificationFlags=SC_MOD_ SC_PERFORMED_ SC_LAST
|
||||||
val SC_MOD_INSERTTEXT=0x1
|
val SC_MOD_INSERTTEXT=0x1
|
||||||
val SC_MOD_DELETETEXT=0x2
|
val SC_MOD_DELETETEXT=0x2
|
||||||
val SC_MOD_CHANGESTYLE=0x4
|
val SC_MOD_CHANGESTYLE=0x4
|
||||||
@@ -1281,15 +1348,18 @@ val SC_MOD_BEFOREDELETE=0x800
|
|||||||
val SC_MODEVENTMASKALL=0xF77
|
val SC_MODEVENTMASKALL=0xF77
|
||||||
|
|
||||||
# For compatibility, these go through the COMMAND notification rather than NOTIFY
|
# For compatibility, these go through the COMMAND notification rather than NOTIFY
|
||||||
# and have exactly the same values as the EN_* constants.
|
# and should have had exactly the same values as the EN_* constants.
|
||||||
|
# Unfortunately the SETFOCUS and KILLFOCUS are flipped over from EN_*
|
||||||
|
# As clients depend on these constants, this will not be changed.
|
||||||
val SCEN_CHANGE=768
|
val SCEN_CHANGE=768
|
||||||
val SCEN_SETFOCUS=512
|
val SCEN_SETFOCUS=512
|
||||||
val SCEN_KILLFOCUS=256
|
val SCEN_KILLFOCUS=256
|
||||||
|
|
||||||
# Symbolic key codes and modifier flags
|
# Symbolic key codes and modifier flags.
|
||||||
# ASCII and other printable characters below 256
|
# ASCII and other printable characters below 256.
|
||||||
# Extended keys above 300
|
# Extended keys above 300.
|
||||||
|
|
||||||
|
enu Keys=SCK_
|
||||||
val SCK_DOWN=300
|
val SCK_DOWN=300
|
||||||
val SCK_UP=301
|
val SCK_UP=301
|
||||||
val SCK_LEFT=302
|
val SCK_LEFT=302
|
||||||
@@ -1308,12 +1378,14 @@ val SCK_ADD=310
|
|||||||
val SCK_SUBTRACT=311
|
val SCK_SUBTRACT=311
|
||||||
val SCK_DIVIDE=312
|
val SCK_DIVIDE=312
|
||||||
|
|
||||||
|
enu KeyMod=SCMOD_
|
||||||
val SCMOD_SHIFT=1
|
val SCMOD_SHIFT=1
|
||||||
val SCMOD_CTRL=2
|
val SCMOD_CTRL=2
|
||||||
val SCMOD_ALT=4
|
val SCMOD_ALT=4
|
||||||
|
|
||||||
################################################
|
################################################
|
||||||
# For SciLexer.h
|
# For SciLexer.h
|
||||||
|
enu Lexer=SCLEX_
|
||||||
val SCLEX_CONTAINER=0
|
val SCLEX_CONTAINER=0
|
||||||
val SCLEX_NULL=1
|
val SCLEX_NULL=1
|
||||||
val SCLEX_PYTHON=2
|
val SCLEX_PYTHON=2
|
||||||
@@ -1347,11 +1419,14 @@ val SCLEX_ASP=29
|
|||||||
val SCLEX_PHP=30
|
val SCLEX_PHP=30
|
||||||
val SCLEX_BAAN=31
|
val SCLEX_BAAN=31
|
||||||
val SCLEX_MATLAB=32
|
val SCLEX_MATLAB=32
|
||||||
|
val SCLEX_SCRIPTOL=33
|
||||||
|
|
||||||
# When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
|
# When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
|
||||||
# value assigned in sequence from SCLEX_AUTOMATIC+1.
|
# value assigned in sequence from SCLEX_AUTOMATIC+1.
|
||||||
val SCLEX_AUTOMATIC=1000
|
val SCLEX_AUTOMATIC=1000
|
||||||
# Lexical states for SCLEX_PYTHON
|
# Lexical states for SCLEX_PYTHON
|
||||||
|
lex Python=SCLEX_PYTHON SCE_P_
|
||||||
|
lex Ruby=SCLEX_RUBY SCE_P_
|
||||||
val SCE_P_DEFAULT=0
|
val SCE_P_DEFAULT=0
|
||||||
val SCE_P_COMMENTLINE=1
|
val SCE_P_COMMENTLINE=1
|
||||||
val SCE_P_NUMBER=2
|
val SCE_P_NUMBER=2
|
||||||
@@ -1367,6 +1442,11 @@ val SCE_P_IDENTIFIER=11
|
|||||||
val SCE_P_COMMENTBLOCK=12
|
val SCE_P_COMMENTBLOCK=12
|
||||||
val SCE_P_STRINGEOL=13
|
val SCE_P_STRINGEOL=13
|
||||||
# Lexical states for SCLEX_CPP
|
# Lexical states for SCLEX_CPP
|
||||||
|
lex Cpp=SCLEX_CPP SCE_C_
|
||||||
|
lex SQL=SCLEX_SQL SCE_C_
|
||||||
|
lex Pascal=SCLEX_PASCAL SCE_C_
|
||||||
|
lex TCL=SCLEX_TCL SCE_C_
|
||||||
|
lex BullAnt=SCLEX_BULLANT SCE_C_
|
||||||
val SCE_C_DEFAULT=0
|
val SCE_C_DEFAULT=0
|
||||||
val SCE_C_COMMENT=1
|
val SCE_C_COMMENT=1
|
||||||
val SCE_C_COMMENTLINE=2
|
val SCE_C_COMMENTLINE=2
|
||||||
@@ -1386,17 +1466,11 @@ val SCE_C_COMMENTLINEDOC=15
|
|||||||
val SCE_C_WORD2=16
|
val SCE_C_WORD2=16
|
||||||
val SCE_C_COMMENTDOCKEYWORD=17
|
val SCE_C_COMMENTDOCKEYWORD=17
|
||||||
val SCE_C_COMMENTDOCKEYWORDERROR=18
|
val SCE_C_COMMENTDOCKEYWORDERROR=18
|
||||||
# Lexical states for SCLEX_VB, SCLEX_VBSCRIPT
|
|
||||||
val SCE_B_DEFAULT=0
|
|
||||||
val SCE_B_COMMENT=1
|
|
||||||
val SCE_B_NUMBER=2
|
|
||||||
val SCE_B_KEYWORD=3
|
|
||||||
val SCE_B_STRING=4
|
|
||||||
val SCE_B_PREPROCESSOR=5
|
|
||||||
val SCE_B_OPERATOR=6
|
|
||||||
val SCE_B_IDENTIFIER=7
|
|
||||||
val SCE_B_DATE=8
|
|
||||||
# Lexical states for SCLEX_HTML, SCLEX_XML
|
# Lexical states for SCLEX_HTML, SCLEX_XML
|
||||||
|
lex HTML=SCLEX_HTML SCE_H
|
||||||
|
lex XML=SCLEX_XML SCE_H
|
||||||
|
lex ASP=SCLEX_ASP SCE_H
|
||||||
|
lex PHP=SCLEX_PHP SCE_H
|
||||||
val SCE_H_DEFAULT=0
|
val SCE_H_DEFAULT=0
|
||||||
val SCE_H_TAG=1
|
val SCE_H_TAG=1
|
||||||
val SCE_H_TAGUNKNOWN=2
|
val SCE_H_TAGUNKNOWN=2
|
||||||
@@ -1519,6 +1593,7 @@ val SCE_HPHP_COMMENTLINE=125
|
|||||||
val SCE_HPHP_HSTRING_VARIABLE=126
|
val SCE_HPHP_HSTRING_VARIABLE=126
|
||||||
val SCE_HPHP_OPERATOR=127
|
val SCE_HPHP_OPERATOR=127
|
||||||
# Lexical states for SCLEX_PERL
|
# Lexical states for SCLEX_PERL
|
||||||
|
lex Perl=SCLEX_PERL SCE_PL_
|
||||||
val SCE_PL_DEFAULT=0
|
val SCE_PL_DEFAULT=0
|
||||||
val SCE_PL_ERROR=1
|
val SCE_PL_ERROR=1
|
||||||
val SCE_PL_COMMENTLINE=2
|
val SCE_PL_COMMENTLINE=2
|
||||||
@@ -1549,13 +1624,34 @@ val SCE_PL_STRING_QQ=27
|
|||||||
val SCE_PL_STRING_QX=28
|
val SCE_PL_STRING_QX=28
|
||||||
val SCE_PL_STRING_QR=29
|
val SCE_PL_STRING_QR=29
|
||||||
val SCE_PL_STRING_QW=30
|
val SCE_PL_STRING_QW=30
|
||||||
|
# Lexical states for SCLEX_VB, SCLEX_VBSCRIPT
|
||||||
|
lex VB=SCLEX_VB SCE_B_
|
||||||
|
lex VBScript=SCLEX_VBSCRIPT SCE_B_
|
||||||
|
val SCE_B_DEFAULT=0
|
||||||
|
val SCE_B_COMMENT=1
|
||||||
|
val SCE_B_NUMBER=2
|
||||||
|
val SCE_B_KEYWORD=3
|
||||||
|
val SCE_B_STRING=4
|
||||||
|
val SCE_B_PREPROCESSOR=5
|
||||||
|
val SCE_B_OPERATOR=6
|
||||||
|
val SCE_B_IDENTIFIER=7
|
||||||
|
val SCE_B_DATE=8
|
||||||
|
# Lexical states for SCLEX_PROPERTIES
|
||||||
|
lex Properties=SCLEX_PROPERTIES SCE_PROPS_
|
||||||
|
val SCE_PROPS_DEFAULT=0
|
||||||
|
val SCE_PROPS_COMMENT=1
|
||||||
|
val SCE_PROPS_SECTION=2
|
||||||
|
val SCE_PROPS_ASSIGNMENT=3
|
||||||
|
val SCE_PROPS_DEFVAL=4
|
||||||
# Lexical states for SCLEX_LATEX
|
# Lexical states for SCLEX_LATEX
|
||||||
|
lex LaTeX=SCLEX_LATEX SCE_L_
|
||||||
val SCE_L_DEFAULT=0
|
val SCE_L_DEFAULT=0
|
||||||
val SCE_L_COMMAND=1
|
val SCE_L_COMMAND=1
|
||||||
val SCE_L_TAG=2
|
val SCE_L_TAG=2
|
||||||
val SCE_L_MATH=3
|
val SCE_L_MATH=3
|
||||||
val SCE_L_COMMENT=4
|
val SCE_L_COMMENT=4
|
||||||
# Lexical states for SCLEX_LUA
|
# Lexical states for SCLEX_LUA
|
||||||
|
lex Lua=SCLEX_LUA SCE_LUA_
|
||||||
val SCE_LUA_DEFAULT=0
|
val SCE_LUA_DEFAULT=0
|
||||||
val SCE_LUA_COMMENT=1
|
val SCE_LUA_COMMENT=1
|
||||||
val SCE_LUA_COMMENTLINE=2
|
val SCE_LUA_COMMENTLINE=2
|
||||||
@@ -1575,6 +1671,7 @@ val SCE_LUA_WORD4=15
|
|||||||
val SCE_LUA_WORD5=16
|
val SCE_LUA_WORD5=16
|
||||||
val SCE_LUA_WORD6=17
|
val SCE_LUA_WORD6=17
|
||||||
# Lexical states for SCLEX_ERRORLIST
|
# Lexical states for SCLEX_ERRORLIST
|
||||||
|
lex ErrorList=SCLEX_ERRORLIST SCE_ERR_
|
||||||
val SCE_ERR_DEFAULT=0
|
val SCE_ERR_DEFAULT=0
|
||||||
val SCE_ERR_PYTHON=1
|
val SCE_ERR_PYTHON=1
|
||||||
val SCE_ERR_GCC=2
|
val SCE_ERR_GCC=2
|
||||||
@@ -1584,11 +1681,13 @@ val SCE_ERR_BORLAND=5
|
|||||||
val SCE_ERR_PERL=6
|
val SCE_ERR_PERL=6
|
||||||
val SCE_ERR_NET=7
|
val SCE_ERR_NET=7
|
||||||
val SCE_ERR_LUA=8
|
val SCE_ERR_LUA=8
|
||||||
|
val SCE_ERR_CTAG=9
|
||||||
val SCE_ERR_DIFF_CHANGED=10
|
val SCE_ERR_DIFF_CHANGED=10
|
||||||
val SCE_ERR_DIFF_ADDITION=11
|
val SCE_ERR_DIFF_ADDITION=11
|
||||||
val SCE_ERR_DIFF_DELETION=12
|
val SCE_ERR_DIFF_DELETION=12
|
||||||
val SCE_ERR_DIFF_MESSAGE=13
|
val SCE_ERR_DIFF_MESSAGE=13
|
||||||
# Lexical states for SCLEX_BATCH
|
# Lexical states for SCLEX_BATCH
|
||||||
|
lex Batch=SCLEX_BATCH SCE_BAT_
|
||||||
val SCE_BAT_DEFAULT=0
|
val SCE_BAT_DEFAULT=0
|
||||||
val SCE_BAT_COMMENT=1
|
val SCE_BAT_COMMENT=1
|
||||||
val SCE_BAT_WORD=2
|
val SCE_BAT_WORD=2
|
||||||
@@ -1598,6 +1697,7 @@ val SCE_BAT_COMMAND=5
|
|||||||
val SCE_BAT_IDENTIFIER=6
|
val SCE_BAT_IDENTIFIER=6
|
||||||
val SCE_BAT_OPERATOR=7
|
val SCE_BAT_OPERATOR=7
|
||||||
# Lexical states for SCLEX_MAKEFILE
|
# Lexical states for SCLEX_MAKEFILE
|
||||||
|
lex MakeFile=SCLEX_MAKEFILE SCE_MAKE_
|
||||||
val SCE_MAKE_DEFAULT=0
|
val SCE_MAKE_DEFAULT=0
|
||||||
val SCE_MAKE_COMMENT=1
|
val SCE_MAKE_COMMENT=1
|
||||||
val SCE_MAKE_PREPROCESSOR=2
|
val SCE_MAKE_PREPROCESSOR=2
|
||||||
@@ -1605,7 +1705,17 @@ val SCE_MAKE_IDENTIFIER=3
|
|||||||
val SCE_MAKE_OPERATOR=4
|
val SCE_MAKE_OPERATOR=4
|
||||||
val SCE_MAKE_TARGET=5
|
val SCE_MAKE_TARGET=5
|
||||||
val SCE_MAKE_IDEOL=9
|
val SCE_MAKE_IDEOL=9
|
||||||
# Lexical states for the SCLEX_CONF (Apache Configuration Files Lexer)
|
# Lexical states for SCLEX_DIFF
|
||||||
|
lex Diff=SCLEX_DIFF SCE_DIFF_
|
||||||
|
val SCE_DIFF_DEFAULT=0
|
||||||
|
val SCE_DIFF_COMMENT=1
|
||||||
|
val SCE_DIFF_COMMAND=2
|
||||||
|
val SCE_DIFF_HEADER=3
|
||||||
|
val SCE_DIFF_POSITION=4
|
||||||
|
val SCE_DIFF_DELETED=5
|
||||||
|
val SCE_DIFF_ADDED=6
|
||||||
|
# Lexical states for SCLEX_CONF (Apache Configuration Files Lexer)
|
||||||
|
lex Conf=SCLEX_CONF SCE_CONF_
|
||||||
val SCE_CONF_DEFAULT=0
|
val SCE_CONF_DEFAULT=0
|
||||||
val SCE_CONF_COMMENT=1
|
val SCE_CONF_COMMENT=1
|
||||||
val SCE_CONF_NUMBER=2
|
val SCE_CONF_NUMBER=2
|
||||||
@@ -1616,7 +1726,8 @@ val SCE_CONF_STRING=6
|
|||||||
val SCE_CONF_OPERATOR=7
|
val SCE_CONF_OPERATOR=7
|
||||||
val SCE_CONF_IP=8
|
val SCE_CONF_IP=8
|
||||||
val SCE_CONF_DIRECTIVE=9
|
val SCE_CONF_DIRECTIVE=9
|
||||||
# Avenue
|
# Lexical states for SCLEX_AVE, Avenue
|
||||||
|
lex Avenue=SCLEX_AVE SCE_AVE_
|
||||||
val SCE_AVE_DEFAULT=0
|
val SCE_AVE_DEFAULT=0
|
||||||
val SCE_AVE_COMMENT=1
|
val SCE_AVE_COMMENT=1
|
||||||
val SCE_AVE_NUMBER=2
|
val SCE_AVE_NUMBER=2
|
||||||
@@ -1629,6 +1740,7 @@ val SCE_AVE_STRINGEOL=8
|
|||||||
val SCE_AVE_IDENTIFIER=9
|
val SCE_AVE_IDENTIFIER=9
|
||||||
val SCE_AVE_OPERATOR=10
|
val SCE_AVE_OPERATOR=10
|
||||||
# Lexical states for SCLEX_ADA
|
# Lexical states for SCLEX_ADA
|
||||||
|
lex Ada=SCLEX_ADA SCE_ADA_
|
||||||
val SCE_ADA_DEFAULT=0
|
val SCE_ADA_DEFAULT=0
|
||||||
val SCE_ADA_COMMENT=1
|
val SCE_ADA_COMMENT=1
|
||||||
val SCE_ADA_NUMBER=2
|
val SCE_ADA_NUMBER=2
|
||||||
@@ -1639,6 +1751,7 @@ val SCE_ADA_OPERATOR=6
|
|||||||
val SCE_ADA_IDENTIFIER=7
|
val SCE_ADA_IDENTIFIER=7
|
||||||
val SCE_ADA_STRINGEOL=8
|
val SCE_ADA_STRINGEOL=8
|
||||||
# Lexical states for SCLEX_BAAN
|
# Lexical states for SCLEX_BAAN
|
||||||
|
lex Baan=SCLEX_BAAN SCE_BAAN_
|
||||||
val SCE_BAAN_DEFAULT=0
|
val SCE_BAAN_DEFAULT=0
|
||||||
val SCE_BAAN_COMMENT=1
|
val SCE_BAAN_COMMENT=1
|
||||||
val SCE_BAAN_COMMENTDOC=2
|
val SCE_BAAN_COMMENTDOC=2
|
||||||
@@ -1651,6 +1764,7 @@ val SCE_BAAN_IDENTIFIER=8
|
|||||||
val SCE_BAAN_STRINGEOL=9
|
val SCE_BAAN_STRINGEOL=9
|
||||||
val SCE_BAAN_WORD2=10
|
val SCE_BAAN_WORD2=10
|
||||||
# Lexical states for SCLEX_LISP
|
# Lexical states for SCLEX_LISP
|
||||||
|
lex Lisp=SCLEX_LISP SCE_LISP_
|
||||||
val SCE_LISP_DEFAULT=0
|
val SCE_LISP_DEFAULT=0
|
||||||
val SCE_LISP_COMMENT=1
|
val SCE_LISP_COMMENT=1
|
||||||
val SCE_LISP_NUMBER=2
|
val SCE_LISP_NUMBER=2
|
||||||
@@ -1660,6 +1774,8 @@ val SCE_LISP_STRINGEOL=8
|
|||||||
val SCE_LISP_IDENTIFIER=9
|
val SCE_LISP_IDENTIFIER=9
|
||||||
val SCE_LISP_OPERATOR=10
|
val SCE_LISP_OPERATOR=10
|
||||||
# Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW
|
# Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW
|
||||||
|
lex Eiffel=SCLEX_EIFFEL SCE_EIFFEL_
|
||||||
|
lex EiffelKW=SCLEX_EIFFELKW SCE_EIFFEL_
|
||||||
val SCE_EIFFEL_DEFAULT=0
|
val SCE_EIFFEL_DEFAULT=0
|
||||||
val SCE_EIFFEL_COMMENTLINE=1
|
val SCE_EIFFEL_COMMENTLINE=1
|
||||||
val SCE_EIFFEL_NUMBER=2
|
val SCE_EIFFEL_NUMBER=2
|
||||||
@@ -1669,7 +1785,8 @@ val SCE_EIFFEL_CHARACTER=5
|
|||||||
val SCE_EIFFEL_OPERATOR=6
|
val SCE_EIFFEL_OPERATOR=6
|
||||||
val SCE_EIFFEL_IDENTIFIER=7
|
val SCE_EIFFEL_IDENTIFIER=7
|
||||||
val SCE_EIFFEL_STRINGEOL=8
|
val SCE_EIFFEL_STRINGEOL=8
|
||||||
# Lexical states for the SCLEX_NNCRONTAB (nnCron crontab Lexer)
|
# Lexical states for SCLEX_NNCRONTAB (nnCron crontab Lexer)
|
||||||
|
lex NNCronTab=SCLEX_NNCRONTAB SCE_NNCRONTAB_
|
||||||
val SCE_NNCRONTAB_DEFAULT=0
|
val SCE_NNCRONTAB_DEFAULT=0
|
||||||
val SCE_NNCRONTAB_COMMENT=1
|
val SCE_NNCRONTAB_COMMENT=1
|
||||||
val SCE_NNCRONTAB_TASK=2
|
val SCE_NNCRONTAB_TASK=2
|
||||||
@@ -1682,6 +1799,7 @@ val SCE_NNCRONTAB_STRING=8
|
|||||||
val SCE_NNCRONTAB_ENVIRONMENT=9
|
val SCE_NNCRONTAB_ENVIRONMENT=9
|
||||||
val SCE_NNCRONTAB_IDENTIFIER=10
|
val SCE_NNCRONTAB_IDENTIFIER=10
|
||||||
# Lexical states for SCLEX_MATLAB
|
# Lexical states for SCLEX_MATLAB
|
||||||
|
lex MatLab=SCLEX_MATLAB SCE_MATLAB_
|
||||||
val SCE_MATLAB_DEFAULT=0
|
val SCE_MATLAB_DEFAULT=0
|
||||||
val SCE_MATLAB_COMMENT=1
|
val SCE_MATLAB_COMMENT=1
|
||||||
val SCE_MATLAB_COMMAND=2
|
val SCE_MATLAB_COMMAND=2
|
||||||
@@ -1690,6 +1808,28 @@ val SCE_MATLAB_KEYWORD=4
|
|||||||
val SCE_MATLAB_STRING=5
|
val SCE_MATLAB_STRING=5
|
||||||
val SCE_MATLAB_OPERATOR=6
|
val SCE_MATLAB_OPERATOR=6
|
||||||
val SCE_MATLAB_IDENTIFIER=7
|
val SCE_MATLAB_IDENTIFIER=7
|
||||||
|
# Lexical states for SCLEX_SCRIPTOL
|
||||||
|
lex Sol=SCLEX_SCRIPTOL SCE_SCRIPTOL_
|
||||||
|
val SCE_SCRIPTOL_DEFAULT=0
|
||||||
|
val SCE_SCRIPTOL_COMMENT=1
|
||||||
|
val SCE_SCRIPTOL_COMMENTLINE=2
|
||||||
|
val SCE_SCRIPTOL_COMMENTDOC=3
|
||||||
|
val SCE_SCRIPTOL_NUMBER=4
|
||||||
|
val SCE_SCRIPTOL_WORD=5
|
||||||
|
val SCE_SCRIPTOL_STRING=6
|
||||||
|
val SCE_SCRIPTOL_CHARACTER=7
|
||||||
|
val SCE_SCRIPTOL_UUID=8
|
||||||
|
val SCE_SCRIPTOL_PREPROCESSOR=9
|
||||||
|
val SCE_SCRIPTOL_OPERATOR=10
|
||||||
|
val SCE_SCRIPTOL_IDENTIFIER=11
|
||||||
|
val SCE_SCRIPTOL_STRINGEOL=12
|
||||||
|
val SCE_SCRIPTOL_VERBATIM=13
|
||||||
|
val SCE_SCRIPTOL_REGEX=14
|
||||||
|
val SCE_SCRIPTOL_COMMENTLINEDOC=15
|
||||||
|
val SCE_SCRIPTOL_WORD2=16
|
||||||
|
val SCE_SCRIPTOL_COMMENTDOCKEYWORD=17
|
||||||
|
val SCE_SCRIPTOL_COMMENTDOCKEYWORDERROR=18
|
||||||
|
val SCE_SCRIPTOL_COMMENTBASIC=19
|
||||||
|
|
||||||
# Events
|
# Events
|
||||||
|
|
||||||
@@ -1711,9 +1851,17 @@ evt void UserListSelection=2014(int listType, string text)
|
|||||||
evt void URIDropped=2015(string text)
|
evt void URIDropped=2015(string text)
|
||||||
evt void DwellStart=2016(int position)
|
evt void DwellStart=2016(int position)
|
||||||
evt void DwellEnd=2017(int position)
|
evt void DwellEnd=2017(int position)
|
||||||
|
evt void Zoom=2018(void)
|
||||||
|
|
||||||
cat Deprecated
|
cat Deprecated
|
||||||
|
|
||||||
|
# CARET_POLICY changed in 1.47
|
||||||
|
fun void SetCaretPolicy=2369(int caretPolicy, int caretSlop)
|
||||||
|
val CARET_CENTER=0x02
|
||||||
|
val CARET_XEVEN=0x08
|
||||||
|
val CARET_XJUMPS=0x10
|
||||||
|
|
||||||
# The old name for SCN_UPDATEUI
|
# The old name for SCN_UPDATEUI
|
||||||
val SCN_CHECKBRACE=2007
|
val SCN_CHECKBRACE=2007
|
||||||
evt void PosChanged=2012(int position)
|
evt void PosChanged=2012(int position)
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@ struct _ScintillaObject {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct _ScintillaClass {
|
struct _ScintillaClass {
|
||||||
GtkFixedClass parent_class;
|
GtkContainerClass parent_class;
|
||||||
|
|
||||||
void (* command) (ScintillaObject *ttt);
|
void (* command) (ScintillaObject *ttt);
|
||||||
void (* notify) (ScintillaObject *ttt);
|
void (* notify) (ScintillaObject *ttt);
|
||||||
@@ -39,6 +39,12 @@ GtkWidget* scintilla_new (void);
|
|||||||
void scintilla_set_id (ScintillaObject *sci,int id);
|
void scintilla_set_id (ScintillaObject *sci,int id);
|
||||||
sptr_t scintilla_send_message (ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam);
|
sptr_t scintilla_send_message (ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam);
|
||||||
|
|
||||||
|
#if GTK_MAJOR_VERSION < 2
|
||||||
|
#define SCINTILLA_NOTIFY "notify"
|
||||||
|
#else
|
||||||
|
#define SCINTILLA_NOTIFY "sci-notify"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -31,6 +31,7 @@ public:
|
|||||||
lenDoc(-1), validLen(0), chFlags(0), chWhile(0) {
|
lenDoc(-1), validLen(0), chFlags(0), chWhile(0) {
|
||||||
}
|
}
|
||||||
~WindowAccessor();
|
~WindowAccessor();
|
||||||
|
bool Match(int pos, const char *s);
|
||||||
char StyleAt(int position);
|
char StyleAt(int position);
|
||||||
int GetLine(int position);
|
int GetLine(int position);
|
||||||
int LineStart(int line);
|
int LineStart(int line);
|
||||||
|
@@ -118,7 +118,7 @@ void AutoComplete::Move(int delta) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AutoComplete::Select(const char *word) {
|
void AutoComplete::Select(const char *word) {
|
||||||
int lenWord = strlen(word);
|
size_t lenWord = strlen(word);
|
||||||
int location = -1;
|
int location = -1;
|
||||||
const int maxItemLen=1000;
|
const int maxItemLen=1000;
|
||||||
char item[maxItemLen];
|
char item[maxItemLen];
|
||||||
|
@@ -148,7 +148,7 @@ PRectangle CallTip::CallTipStart(int pos, Point pt, const char *defn,
|
|||||||
look = newline + 1;
|
look = newline + 1;
|
||||||
numLines++;
|
numLines++;
|
||||||
}
|
}
|
||||||
int lastWidth = surfaceMeasure->WidthText(font, look, strlen(look));
|
int lastWidth = surfaceMeasure->WidthText(font, look, static_cast<int>(strlen(look)));
|
||||||
width = Platform::Maximum(width, lastWidth) + 10;
|
width = Platform::Maximum(width, lastWidth) + 10;
|
||||||
int lineHeight = surfaceMeasure->Height(font);
|
int lineHeight = surfaceMeasure->Height(font);
|
||||||
// Extra line for border and an empty line at top and bottom
|
// Extra line for border and an empty line at top and bottom
|
||||||
|
@@ -958,10 +958,13 @@ void CellBuffer::BasicDeleteChars(int position, int deleteLength) {
|
|||||||
//Platform::DebugPrintf("Removing cr end of line\n");
|
//Platform::DebugPrintf("Removing cr end of line\n");
|
||||||
lv.Remove(lineRemove);
|
lv.Remove(lineRemove);
|
||||||
}
|
}
|
||||||
} else if ((ch == '\n') && !ignoreNL) {
|
} else if (ch == '\n') {
|
||||||
|
if (ignoreNL) {
|
||||||
|
ignoreNL = false; // Further \n are real deletions
|
||||||
|
} else {
|
||||||
//Platform::DebugPrintf("Removing lf end of line\n");
|
//Platform::DebugPrintf("Removing lf end of line\n");
|
||||||
lv.Remove(lineRemove);
|
lv.Remove(lineRemove);
|
||||||
ignoreNL = false; // Further \n are not real deletions
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ch = chNext;
|
ch = chNext;
|
||||||
|
@@ -344,17 +344,19 @@ void Document::ModifiedAt(int pos) {
|
|||||||
// SetStyleAt does not change the persistent state of a document
|
// SetStyleAt does not change the persistent state of a document
|
||||||
|
|
||||||
// Unlike Undo, Redo, and InsertStyledString, the pos argument is a cell number not a char number
|
// Unlike Undo, Redo, and InsertStyledString, the pos argument is a cell number not a char number
|
||||||
void Document::DeleteChars(int pos, int len) {
|
bool Document::DeleteChars(int pos, int len) {
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
return;
|
return false;
|
||||||
if ((pos + len) > Length())
|
if ((pos + len) > Length())
|
||||||
return;
|
return false;
|
||||||
if (cb.IsReadOnly() && enteredReadOnlyCount == 0) {
|
if (cb.IsReadOnly() && enteredReadOnlyCount == 0) {
|
||||||
enteredReadOnlyCount++;
|
enteredReadOnlyCount++;
|
||||||
NotifyModifyAttempt();
|
NotifyModifyAttempt();
|
||||||
enteredReadOnlyCount--;
|
enteredReadOnlyCount--;
|
||||||
}
|
}
|
||||||
if (enteredCount == 0) {
|
if (enteredCount != 0) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
enteredCount++;
|
enteredCount++;
|
||||||
if (!cb.IsReadOnly()) {
|
if (!cb.IsReadOnly()) {
|
||||||
NotifyModified(
|
NotifyModified(
|
||||||
@@ -379,15 +381,18 @@ void Document::DeleteChars(int pos, int len) {
|
|||||||
}
|
}
|
||||||
enteredCount--;
|
enteredCount--;
|
||||||
}
|
}
|
||||||
|
return !cb.IsReadOnly();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Document::InsertStyledString(int position, char *s, int insertLength) {
|
bool Document::InsertStyledString(int position, char *s, int insertLength) {
|
||||||
if (cb.IsReadOnly() && enteredReadOnlyCount == 0) {
|
if (cb.IsReadOnly() && enteredReadOnlyCount == 0) {
|
||||||
enteredReadOnlyCount++;
|
enteredReadOnlyCount++;
|
||||||
NotifyModifyAttempt();
|
NotifyModifyAttempt();
|
||||||
enteredReadOnlyCount--;
|
enteredReadOnlyCount--;
|
||||||
}
|
}
|
||||||
if (enteredCount == 0) {
|
if (enteredCount != 0) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
enteredCount++;
|
enteredCount++;
|
||||||
if (!cb.IsReadOnly()) {
|
if (!cb.IsReadOnly()) {
|
||||||
NotifyModified(
|
NotifyModified(
|
||||||
@@ -409,6 +414,7 @@ void Document::InsertStyledString(int position, char *s, int insertLength) {
|
|||||||
}
|
}
|
||||||
enteredCount--;
|
enteredCount--;
|
||||||
}
|
}
|
||||||
|
return !cb.IsReadOnly();
|
||||||
}
|
}
|
||||||
|
|
||||||
int Document::Undo() {
|
int Document::Undo() {
|
||||||
@@ -497,29 +503,32 @@ int Document::Redo() {
|
|||||||
return newPos;
|
return newPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Document::InsertChar(int pos, char ch) {
|
bool Document::InsertChar(int pos, char ch) {
|
||||||
char chs[2];
|
char chs[2];
|
||||||
chs[0] = ch;
|
chs[0] = ch;
|
||||||
chs[1] = 0;
|
chs[1] = 0;
|
||||||
InsertStyledString(pos*2, chs, 2);
|
return InsertStyledString(pos*2, chs, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert a null terminated string
|
// Insert a null terminated string
|
||||||
void Document::InsertString(int position, const char *s) {
|
bool Document::InsertString(int position, const char *s) {
|
||||||
InsertString(position, s, strlen(s));
|
return InsertString(position, s, strlen(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert a string with a length
|
// Insert a string with a length
|
||||||
void Document::InsertString(int position, const char *s, int insertLength) {
|
bool Document::InsertString(int position, const char *s, size_t insertLength) {
|
||||||
|
bool changed = false;
|
||||||
char *sWithStyle = new char[insertLength * 2];
|
char *sWithStyle = new char[insertLength * 2];
|
||||||
if (sWithStyle) {
|
if (sWithStyle) {
|
||||||
for (int i = 0; i < insertLength; i++) {
|
for (size_t i = 0; i < insertLength; i++) {
|
||||||
sWithStyle[i*2] = s[i];
|
sWithStyle[i*2] = s[i];
|
||||||
sWithStyle[i*2 + 1] = 0;
|
sWithStyle[i*2 + 1] = 0;
|
||||||
}
|
}
|
||||||
InsertStyledString(position*2, sWithStyle, insertLength*2);
|
changed = InsertStyledString(position*2, sWithStyle,
|
||||||
|
static_cast<int>(insertLength*2));
|
||||||
delete []sWithStyle;
|
delete []sWithStyle;
|
||||||
}
|
}
|
||||||
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Document::ChangeChar(int pos, char ch) {
|
void Document::ChangeChar(int pos, char ch) {
|
||||||
@@ -531,22 +540,18 @@ void Document::DelChar(int pos) {
|
|||||||
DeleteChars(pos, LenChar(pos));
|
DeleteChars(pos, LenChar(pos));
|
||||||
}
|
}
|
||||||
|
|
||||||
int Document::DelCharBack(int pos) {
|
void Document::DelCharBack(int pos) {
|
||||||
if (pos <= 0) {
|
if (pos <= 0) {
|
||||||
return pos;
|
return;
|
||||||
} else if (IsCrLf(pos - 2)) {
|
} else if (IsCrLf(pos - 2)) {
|
||||||
DeleteChars(pos - 2, 2);
|
DeleteChars(pos - 2, 2);
|
||||||
return pos - 2;
|
|
||||||
} else if (SC_CP_UTF8 == dbcsCodePage) {
|
} else if (SC_CP_UTF8 == dbcsCodePage) {
|
||||||
int startChar = MovePositionOutsideChar(pos - 1, -1, false);
|
int startChar = MovePositionOutsideChar(pos - 1, -1, false);
|
||||||
DeleteChars(startChar, pos - startChar);
|
DeleteChars(startChar, pos - startChar);
|
||||||
return startChar;
|
|
||||||
} else if (IsDBCS(pos - 1)) {
|
} else if (IsDBCS(pos - 1)) {
|
||||||
DeleteChars(pos - 2, 2);
|
DeleteChars(pos - 2, 2);
|
||||||
return pos - 2;
|
|
||||||
} else {
|
} else {
|
||||||
DeleteChars(pos - 1, 1);
|
DeleteChars(pos - 1, 1);
|
||||||
return pos - 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -822,8 +827,9 @@ class DocumentIndexer : public CharacterIndexer {
|
|||||||
Document *pdoc;
|
Document *pdoc;
|
||||||
int end;
|
int end;
|
||||||
public:
|
public:
|
||||||
DocumentIndexer(Document *pdoc_, int end_) :
|
DocumentIndexer(Document *pdoc_, int end_) :
|
||||||
pdoc(pdoc_), end(end_) {}
|
pdoc(pdoc_), end(end_) {
|
||||||
|
}
|
||||||
|
|
||||||
virtual char CharAt(int index) {
|
virtual char CharAt(int index) {
|
||||||
if (index < 0 || index >= end)
|
if (index < 0 || index >= end)
|
||||||
@@ -928,7 +934,7 @@ long Document::FindText(int minPos, int maxPos, const char *s,
|
|||||||
// Compute actual search ranges needed
|
// Compute actual search ranges needed
|
||||||
int lengthFind = *length;
|
int lengthFind = *length;
|
||||||
if (lengthFind == -1)
|
if (lengthFind == -1)
|
||||||
lengthFind = strlen(s);
|
lengthFind = static_cast<int>(strlen(s));
|
||||||
int endSearch = endPos;
|
int endSearch = endPos;
|
||||||
if (startPos <= endPos) {
|
if (startPos <= endPos) {
|
||||||
endSearch = endPos - lengthFind + 1;
|
endSearch = endPos - lengthFind + 1;
|
||||||
@@ -1081,8 +1087,10 @@ void Document::StartStyling(int position, char mask) {
|
|||||||
endStyled = position;
|
endStyled = position;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Document::SetStyleFor(int length, char style) {
|
bool Document::SetStyleFor(int length, char style) {
|
||||||
if (enteredCount == 0) {
|
if (enteredCount != 0) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
enteredCount++;
|
enteredCount++;
|
||||||
int prevEndStyled = endStyled;
|
int prevEndStyled = endStyled;
|
||||||
if (cb.SetStyleFor(endStyled, length, style, stylingMask)) {
|
if (cb.SetStyleFor(endStyled, length, style, stylingMask)) {
|
||||||
@@ -1092,26 +1100,32 @@ void Document::SetStyleFor(int length, char style) {
|
|||||||
}
|
}
|
||||||
endStyled += length;
|
endStyled += length;
|
||||||
enteredCount--;
|
enteredCount--;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Document::SetStyles(int length, char *styles) {
|
bool Document::SetStyles(int length, char *styles) {
|
||||||
if (enteredCount == 0) {
|
if (enteredCount != 0) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
enteredCount++;
|
enteredCount++;
|
||||||
int prevEndStyled = endStyled;
|
int prevEndStyled = endStyled;
|
||||||
bool didChange = false;
|
bool didChange = false;
|
||||||
|
int lastChange = 0;
|
||||||
for (int iPos = 0; iPos < length; iPos++, endStyled++) {
|
for (int iPos = 0; iPos < length; iPos++, endStyled++) {
|
||||||
PLATFORM_ASSERT(endStyled < Length());
|
PLATFORM_ASSERT(endStyled < Length());
|
||||||
if (cb.SetStyleAt(endStyled, styles[iPos], stylingMask)) {
|
if (cb.SetStyleAt(endStyled, styles[iPos], stylingMask)) {
|
||||||
didChange = true;
|
didChange = true;
|
||||||
|
lastChange = iPos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (didChange) {
|
if (didChange) {
|
||||||
DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER,
|
DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER,
|
||||||
prevEndStyled, endStyled - prevEndStyled);
|
prevEndStyled, lastChange);
|
||||||
NotifyModified(mh);
|
NotifyModified(mh);
|
||||||
}
|
}
|
||||||
enteredCount--;
|
enteredCount--;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1121,10 +1135,11 @@ bool Document::EnsureStyledTo(int pos) {
|
|||||||
if (styleClock > 0x100000) {
|
if (styleClock > 0x100000) {
|
||||||
styleClock = 0;
|
styleClock = 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Ask the watchers to style, and stop as soon as one responds.
|
// Ask the watchers to style, and stop as soon as one responds.
|
||||||
for (int i = 0; pos > GetEndStyled() && i < lenWatchers; i++)
|
for (int i = 0; pos > GetEndStyled() && i < lenWatchers; i++) {
|
||||||
watchers[i].watcher->NotifyStyleNeeded(this, watchers[i].userData, pos);
|
watchers[i].watcher->NotifyStyleNeeded(this, watchers[i].userData, pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
return pos <= GetEndStyled();
|
return pos <= GetEndStyled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -132,8 +132,8 @@ public:
|
|||||||
int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true);
|
int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true);
|
||||||
|
|
||||||
// Gateways to modifying document
|
// Gateways to modifying document
|
||||||
void DeleteChars(int pos, int len);
|
bool DeleteChars(int pos, int len);
|
||||||
void InsertStyledString(int position, char *s, int insertLength);
|
bool InsertStyledString(int position, char *s, int insertLength);
|
||||||
int Undo();
|
int Undo();
|
||||||
int Redo();
|
int Redo();
|
||||||
bool CanUndo() { return cb.CanUndo(); }
|
bool CanUndo() { return cb.CanUndo(); }
|
||||||
@@ -158,12 +158,12 @@ public:
|
|||||||
void SetReadOnly(bool set) { cb.SetReadOnly(set); }
|
void SetReadOnly(bool set) { cb.SetReadOnly(set); }
|
||||||
bool IsReadOnly() { return cb.IsReadOnly(); }
|
bool IsReadOnly() { return cb.IsReadOnly(); }
|
||||||
|
|
||||||
void InsertChar(int pos, char ch);
|
bool InsertChar(int pos, char ch);
|
||||||
void InsertString(int position, const char *s);
|
bool InsertString(int position, const char *s);
|
||||||
void InsertString(int position, const char *s, int insertLength);
|
bool InsertString(int position, const char *s, size_t insertLength);
|
||||||
void ChangeChar(int pos, char ch);
|
void ChangeChar(int pos, char ch);
|
||||||
void DelChar(int pos);
|
void DelChar(int pos);
|
||||||
int DelCharBack(int pos);
|
void DelCharBack(int pos);
|
||||||
|
|
||||||
char CharAt(int position) { return cb.CharAt(position); }
|
char CharAt(int position) { return cb.CharAt(position); }
|
||||||
void GetCharRange(char *buffer, int position, int lengthRetrieve) {
|
void GetCharRange(char *buffer, int position, int lengthRetrieve) {
|
||||||
@@ -202,8 +202,8 @@ public:
|
|||||||
void SetWordChars(unsigned char *chars);
|
void SetWordChars(unsigned char *chars);
|
||||||
void SetStylingBits(int bits);
|
void SetStylingBits(int bits);
|
||||||
void StartStyling(int position, char mask);
|
void StartStyling(int position, char mask);
|
||||||
void SetStyleFor(int length, char style);
|
bool SetStyleFor(int length, char style);
|
||||||
void SetStyles(int length, char *styles);
|
bool SetStyles(int length, char *styles);
|
||||||
int GetEndStyled() { return endStyled; }
|
int GetEndStyled() { return endStyled; }
|
||||||
bool EnsureStyledTo(int pos);
|
bool EnsureStyledTo(int pos);
|
||||||
int GetStyleClock() { return styleClock; }
|
int GetStyleClock() { return styleClock; }
|
||||||
|
@@ -48,6 +48,15 @@ void DocumentAccessor::Fill(int position) {
|
|||||||
buf[endPos-startPos] = '\0';
|
buf[endPos-startPos] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool DocumentAccessor::Match(int pos, const char *s) {
|
||||||
|
for (int i=0; *s; i++) {
|
||||||
|
if (*s != SafeGetCharAt(pos+i))
|
||||||
|
return false;
|
||||||
|
s++;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
char DocumentAccessor::StyleAt(int position) {
|
char DocumentAccessor::StyleAt(int position) {
|
||||||
return pdoc->StyleAt(position);
|
return pdoc->StyleAt(position);
|
||||||
}
|
}
|
||||||
|
@@ -38,6 +38,7 @@ public:
|
|||||||
startSeg(0), startPosStyling(0) {
|
startSeg(0), startPosStyling(0) {
|
||||||
}
|
}
|
||||||
~DocumentAccessor();
|
~DocumentAccessor();
|
||||||
|
bool Match(int pos, const char *s);
|
||||||
char StyleAt(int position);
|
char StyleAt(int position);
|
||||||
int GetLine(int position);
|
int GetLine(int position);
|
||||||
int LineStart(int line);
|
int LineStart(int line);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -45,7 +45,7 @@ public:
|
|||||||
enum { wrapWidthInfinite = 0x7ffffff };
|
enum { wrapWidthInfinite = 0x7ffffff };
|
||||||
int maxLineLength;
|
int maxLineLength;
|
||||||
int numCharsInLine;
|
int numCharsInLine;
|
||||||
enum validLevel { llInvalid, llPositions, llLines } validity;
|
enum validLevel { llInvalid, llCheckTextAndStyle, llPositions, llLines } validity;
|
||||||
int xHighlightGuide;
|
int xHighlightGuide;
|
||||||
bool highlightColumn;
|
bool highlightColumn;
|
||||||
int selStart;
|
int selStart;
|
||||||
@@ -200,6 +200,8 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
int xOffset; ///< Horizontal scrolled amount in pixels
|
int xOffset; ///< Horizontal scrolled amount in pixels
|
||||||
int xCaretMargin; ///< Ensure this many pixels visible on both sides of caret
|
int xCaretMargin; ///< Ensure this many pixels visible on both sides of caret
|
||||||
bool horizontalScrollBarVisible;
|
bool horizontalScrollBarVisible;
|
||||||
|
int scrollWidth;
|
||||||
|
bool endAtLastLine;
|
||||||
|
|
||||||
Surface *pixmapLine;
|
Surface *pixmapLine;
|
||||||
Surface *pixmapSelMargin;
|
Surface *pixmapSelMargin;
|
||||||
@@ -257,8 +259,11 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
int xEndSelect;
|
int xEndSelect;
|
||||||
bool primarySelection;
|
bool primarySelection;
|
||||||
|
|
||||||
int caretPolicy;
|
int caretXPolicy;
|
||||||
int caretSlop;
|
int caretXSlop; ///< Ensure this many pixels visible on both sides of caret
|
||||||
|
|
||||||
|
int caretYPolicy;
|
||||||
|
int caretYSlop; ///< Ensure this many lines visible on both sides of caret
|
||||||
|
|
||||||
int visiblePolicy;
|
int visiblePolicy;
|
||||||
int visibleSlop;
|
int visibleSlop;
|
||||||
@@ -302,6 +307,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
int LineFromLocation(Point pt);
|
int LineFromLocation(Point pt);
|
||||||
void SetTopLine(int topLineNew);
|
void SetTopLine(int topLineNew);
|
||||||
|
|
||||||
|
bool AbandonPaint();
|
||||||
void RedrawRect(PRectangle rc);
|
void RedrawRect(PRectangle rc);
|
||||||
void Redraw();
|
void Redraw();
|
||||||
void RedrawSelMargin();
|
void RedrawSelMargin();
|
||||||
@@ -342,6 +348,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
PRectangle rcLine, LineLayout *ll, int subLine=0);
|
PRectangle rcLine, LineLayout *ll, int subLine=0);
|
||||||
void Paint(Surface *surfaceWindow, PRectangle rcArea);
|
void Paint(Surface *surfaceWindow, PRectangle rcArea);
|
||||||
long FormatRange(bool draw, RangeToFormat *pfr);
|
long FormatRange(bool draw, RangeToFormat *pfr);
|
||||||
|
int TextWidth(int style, const char *text);
|
||||||
|
|
||||||
virtual void SetVerticalScrollPos() = 0;
|
virtual void SetVerticalScrollPos() = 0;
|
||||||
virtual void SetHorizontalScrollPos() = 0;
|
virtual void SetHorizontalScrollPos() = 0;
|
||||||
@@ -383,6 +390,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
bool NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt);
|
bool NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt);
|
||||||
void NotifyNeedShown(int pos, int len);
|
void NotifyNeedShown(int pos, int len);
|
||||||
void NotifyDwelling(Point pt, bool state);
|
void NotifyDwelling(Point pt, bool state);
|
||||||
|
void NotifyZoom();
|
||||||
|
|
||||||
void NotifyModifyAttempt(Document *document, void *userData);
|
void NotifyModifyAttempt(Document *document, void *userData);
|
||||||
void NotifySavePoint(Document *document, void *userData, bool atSavePoint);
|
void NotifySavePoint(Document *document, void *userData, bool atSavePoint);
|
||||||
@@ -390,12 +398,14 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
void NotifyModified(Document *document, DocModification mh, void *userData);
|
void NotifyModified(Document *document, DocModification mh, void *userData);
|
||||||
void NotifyDeleted(Document *document, void *userData);
|
void NotifyDeleted(Document *document, void *userData);
|
||||||
void NotifyStyleNeeded(Document *doc, void *userData, int endPos);
|
void NotifyStyleNeeded(Document *doc, void *userData, int endPos);
|
||||||
void NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long lParam);
|
void NotifyMacroRecord(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
|
||||||
|
|
||||||
void PageMove(int direction, bool extend=false);
|
void PageMove(int direction, bool extend=false);
|
||||||
void ChangeCaseOfSelection(bool makeUpperCase);
|
void ChangeCaseOfSelection(bool makeUpperCase);
|
||||||
void LineTranspose();
|
void LineTranspose();
|
||||||
virtual void CancelModes();
|
virtual void CancelModes();
|
||||||
|
void NewLine();
|
||||||
|
void CursorUpOrDown(int direction, bool extend=false);
|
||||||
virtual int KeyCommand(unsigned int iMessage);
|
virtual int KeyCommand(unsigned int iMessage);
|
||||||
virtual int KeyDefault(int /* key */, int /*modifiers*/);
|
virtual int KeyDefault(int /* key */, int /*modifiers*/);
|
||||||
int KeyDown(int key, bool shift, bool ctrl, bool alt, bool *consumed=0);
|
int KeyDown(int key, bool shift, bool ctrl, bool alt, bool *consumed=0);
|
||||||
@@ -405,9 +415,9 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
|
|
||||||
void Indent(bool forwards);
|
void Indent(bool forwards);
|
||||||
|
|
||||||
long FindText(unsigned long wParam, long lParam);
|
long FindText(uptr_t wParam, sptr_t lParam);
|
||||||
void SearchAnchor();
|
void SearchAnchor();
|
||||||
long SearchText(unsigned int iMessage, unsigned long wParam, long lParam);
|
long SearchText(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
|
||||||
long SearchInTarget(const char *text, int length);
|
long SearchInTarget(const char *text, int length);
|
||||||
void GoToLine(int lineNo);
|
void GoToLine(int lineNo);
|
||||||
|
|
||||||
|
@@ -23,10 +23,12 @@ const LexerModule *LexerModule::base = 0;
|
|||||||
int LexerModule::nextLanguage = SCLEX_AUTOMATIC+1;
|
int LexerModule::nextLanguage = SCLEX_AUTOMATIC+1;
|
||||||
|
|
||||||
LexerModule::LexerModule(int language_, LexerFunction fnLexer_,
|
LexerModule::LexerModule(int language_, LexerFunction fnLexer_,
|
||||||
const char *languageName_, LexerFunction fnFolder_) :
|
const char *languageName_, LexerFunction fnFolder_,
|
||||||
|
const char * const wordListDescriptions_[]) :
|
||||||
language(language_),
|
language(language_),
|
||||||
fnLexer(fnLexer_),
|
fnLexer(fnLexer_),
|
||||||
fnFolder(fnFolder_),
|
fnFolder(fnFolder_),
|
||||||
|
wordListDescriptions(wordListDescriptions_),
|
||||||
languageName(languageName_) {
|
languageName(languageName_) {
|
||||||
next = base;
|
next = base;
|
||||||
base = this;
|
base = this;
|
||||||
@@ -36,6 +38,31 @@ LexerModule::LexerModule(int language_, LexerFunction fnLexer_,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int LexerModule::GetNumWordLists() const {
|
||||||
|
if (wordListDescriptions == NULL) {
|
||||||
|
return -1;
|
||||||
|
} else {
|
||||||
|
int numWordLists = 0;
|
||||||
|
|
||||||
|
while (wordListDescriptions[numWordLists]) {
|
||||||
|
++numWordLists;
|
||||||
|
}
|
||||||
|
|
||||||
|
return numWordLists;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char * LexerModule::GetWordListDescription(int index) const {
|
||||||
|
static const char *emptyStr = "";
|
||||||
|
|
||||||
|
PLATFORM_ASSERT(index < GetNumWordLists());
|
||||||
|
if (index >= GetNumWordLists()) {
|
||||||
|
return emptyStr;
|
||||||
|
} else {
|
||||||
|
return wordListDescriptions[index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const LexerModule *LexerModule::Find(int language) {
|
const LexerModule *LexerModule::Find(int language) {
|
||||||
const LexerModule *lm = base;
|
const LexerModule *lm = base;
|
||||||
while (lm) {
|
while (lm) {
|
||||||
@@ -97,83 +124,55 @@ static void ColouriseNullDoc(unsigned int startPos, int length, int, WordList *[
|
|||||||
|
|
||||||
LexerModule lmNull(SCLEX_NULL, ColouriseNullDoc, "null");
|
LexerModule lmNull(SCLEX_NULL, ColouriseNullDoc, "null");
|
||||||
|
|
||||||
#ifdef __vms
|
// Alternative historical name for Scintilla_LinkLexers
|
||||||
#define LINK_LEXERS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef LINK_LEXERS
|
|
||||||
|
|
||||||
// The following code forces a reference to all of the Scintilla lexers.
|
|
||||||
// If we don't do something like this, then the linker tends to "optimize"
|
|
||||||
// them away. (eric@sourcegear.com)
|
|
||||||
|
|
||||||
// Taken from wxWindow's stc.cpp. Walter.
|
|
||||||
|
|
||||||
int wxForceScintillaLexers(void) {
|
int wxForceScintillaLexers(void) {
|
||||||
return Scintilla_LinkLexers();
|
return Scintilla_LinkLexers();
|
||||||
}
|
}
|
||||||
|
|
||||||
int Scintilla_LinkLexers() {
|
// To add or remove a lexer, add or remove its file and run LexGen.py.
|
||||||
extern LexerModule lmAda;
|
|
||||||
extern LexerModule lmAVE;
|
// Force a reference to all of the Scintilla lexers so that the linker will
|
||||||
extern LexerModule lmBaan;
|
// not remove the code of the lexers.
|
||||||
extern LexerModule lmBatch;
|
int Scintilla_LinkLexers() {
|
||||||
extern LexerModule lmConf;
|
static int forcer = 0;
|
||||||
extern LexerModule lmCPP;
|
|
||||||
extern LexerModule lmDiff;
|
// Shorten the code that declares a lexer and ensures it is linked in by calling a method.
|
||||||
extern LexerModule lmEiffel;
|
#define LINK_LEXER(lexer) extern LexerModule lexer; forcer += lexer.GetLanguage();
|
||||||
extern LexerModule lmEiffelkw;
|
|
||||||
extern LexerModule lmErrorList;
|
//++Autogenerated -- run src/LexGen.py to regenerate
|
||||||
extern LexerModule lmHTML;
|
//**\(\tLINK_LEXER(\*);\n\)
|
||||||
extern LexerModule lmLatex;
|
LINK_LEXER(lmAda);
|
||||||
extern LexerModule lmLISP;
|
LINK_LEXER(lmAVE);
|
||||||
extern LexerModule lmLua;
|
LINK_LEXER(lmBaan);
|
||||||
extern LexerModule lmMake;
|
LINK_LEXER(lmBullant);
|
||||||
extern LexerModule lmMatlab;
|
LINK_LEXER(lmConf);
|
||||||
extern LexerModule lmPascal;
|
LINK_LEXER(lmCPP);
|
||||||
extern LexerModule lmPerl;
|
LINK_LEXER(lmTCL);
|
||||||
extern LexerModule lmProps;
|
LINK_LEXER(lmNncrontab);
|
||||||
extern LexerModule lmPython;
|
LINK_LEXER(lmEiffel);
|
||||||
extern LexerModule lmRuby;
|
LINK_LEXER(lmEiffelkw);
|
||||||
extern LexerModule lmSQL;
|
LINK_LEXER(lmHTML);
|
||||||
extern LexerModule lmVB;
|
LINK_LEXER(lmXML);
|
||||||
extern LexerModule lmXML;
|
LINK_LEXER(lmASP);
|
||||||
extern LexerModule lmBullant;
|
LINK_LEXER(lmPHP);
|
||||||
|
LINK_LEXER(lmLISP);
|
||||||
|
LINK_LEXER(lmLua);
|
||||||
|
LINK_LEXER(lmMatlab);
|
||||||
|
LINK_LEXER(lmBatch);
|
||||||
|
LINK_LEXER(lmDiff);
|
||||||
|
LINK_LEXER(lmProps);
|
||||||
|
LINK_LEXER(lmMake);
|
||||||
|
LINK_LEXER(lmErrorList);
|
||||||
|
LINK_LEXER(lmLatex);
|
||||||
|
LINK_LEXER(lmPascal);
|
||||||
|
LINK_LEXER(lmPerl);
|
||||||
|
LINK_LEXER(lmPython);
|
||||||
|
LINK_LEXER(lmRuby);
|
||||||
|
LINK_LEXER(lmSQL);
|
||||||
|
LINK_LEXER(lmVB);
|
||||||
|
LINK_LEXER(lmVBScript);
|
||||||
|
|
||||||
|
//--Autogenerated -- end of automatically generated section
|
||||||
|
|
||||||
if (
|
|
||||||
&lmAda
|
|
||||||
&& &lmAVE
|
|
||||||
&& &lmBaan
|
|
||||||
&& &lmConf
|
|
||||||
&& &lmDiff
|
|
||||||
&& &lmLatex
|
|
||||||
&& &lmPascal
|
|
||||||
&& &lmCPP
|
|
||||||
&& &lmHTML
|
|
||||||
&& &lmXML
|
|
||||||
&& &lmProps
|
|
||||||
&& &lmErrorList
|
|
||||||
&& &lmMake
|
|
||||||
&& &lmMatlab
|
|
||||||
&& &lmBatch
|
|
||||||
&& &lmPerl
|
|
||||||
&& &lmPython
|
|
||||||
&& &lmSQL
|
|
||||||
&& &lmVB
|
|
||||||
&& &lmRuby
|
|
||||||
&& &lmEiffel
|
|
||||||
&& &lmEiffelkw
|
|
||||||
&& &lmLISP
|
|
||||||
&& &lmLua
|
|
||||||
&& &lmNull
|
|
||||||
&& &lmBullant
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
@@ -72,17 +72,18 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
|
|
||||||
for (; sc.More(); sc.Forward()) {
|
for (; sc.More(); sc.Forward()) {
|
||||||
|
|
||||||
|
if (sc.atLineStart && (sc.state == SCE_C_STRING)) {
|
||||||
|
// Prevent SCE_C_STRINGEOL from leaking back to previous line
|
||||||
|
sc.SetState(SCE_C_STRING);
|
||||||
|
}
|
||||||
|
|
||||||
// Handle line continuation generically.
|
// Handle line continuation generically.
|
||||||
if (sc.ch == '\\') {
|
if (sc.ch == '\\') {
|
||||||
if (sc.Match("\\\n")) {
|
if (sc.chNext == '\n' || sc.chNext == '\r') {
|
||||||
sc.Forward();
|
sc.Forward();
|
||||||
|
if (sc.ch == '\r' && sc.chNext == '\n') {
|
||||||
sc.Forward();
|
sc.Forward();
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
if (sc.Match("\\\r\n")) {
|
|
||||||
sc.Forward();
|
|
||||||
sc.Forward();
|
|
||||||
sc.Forward();
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -260,9 +261,17 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
sc.Complete();
|
sc.Complete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool IsStreamCommentStyle(int style) {
|
||||||
|
return style == SCE_C_COMMENT ||
|
||||||
|
style == SCE_C_COMMENTDOC ||
|
||||||
|
style == SCE_C_COMMENTDOCKEYWORD ||
|
||||||
|
style == SCE_C_COMMENTDOCKEYWORDERROR;
|
||||||
|
}
|
||||||
|
|
||||||
static void FoldCppDoc(unsigned int startPos, int length, int initStyle, WordList *[],
|
static void FoldCppDoc(unsigned int startPos, int length, int initStyle, WordList *[],
|
||||||
Accessor &styler) {
|
Accessor &styler) {
|
||||||
bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
|
bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
|
||||||
|
bool foldPreprocessor = styler.GetPropertyInt("fold.preprocessor") != 0;
|
||||||
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
|
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
|
||||||
unsigned int endPos = startPos + length;
|
unsigned int endPos = startPos + length;
|
||||||
int visibleChars = 0;
|
int visibleChars = 0;
|
||||||
@@ -279,15 +288,37 @@ static void FoldCppDoc(unsigned int startPos, int length, int initStyle, WordLis
|
|||||||
style = styleNext;
|
style = styleNext;
|
||||||
styleNext = styler.StyleAt(i + 1);
|
styleNext = styler.StyleAt(i + 1);
|
||||||
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
|
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
|
||||||
if (foldComment &&
|
if (foldComment && IsStreamCommentStyle(style)) {
|
||||||
(style == SCE_C_COMMENT || style == SCE_C_COMMENTDOC)) {
|
if (!IsStreamCommentStyle(stylePrev)) {
|
||||||
if (style != stylePrev) {
|
|
||||||
levelCurrent++;
|
levelCurrent++;
|
||||||
} else if ((style != styleNext) && !atEOL) {
|
} else if (!IsStreamCommentStyle(styleNext) && !atEOL) {
|
||||||
// Comments don't end at end of line and the next character may be unstyled.
|
// Comments don't end at end of line and the next character may be unstyled.
|
||||||
levelCurrent--;
|
levelCurrent--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (foldComment && (style == SCE_C_COMMENTLINE)) {
|
||||||
|
if ((ch == '/') && (chNext == '/')) {
|
||||||
|
char chNext2 = styler.SafeGetCharAt(i + 2);
|
||||||
|
if (chNext2 == '{') {
|
||||||
|
levelCurrent++;
|
||||||
|
} else if (chNext2 == '}') {
|
||||||
|
levelCurrent--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (foldPreprocessor && (style == SCE_C_PREPROCESSOR)) {
|
||||||
|
if (ch == '#') {
|
||||||
|
unsigned int j=i+1;
|
||||||
|
while ((j<endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) {
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
if (styler.Match(j, "region") || styler.Match(j, "if")) {
|
||||||
|
levelCurrent++;
|
||||||
|
} else if (styler.Match(j, "end")) {
|
||||||
|
levelCurrent--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (style == SCE_C_OPERATOR) {
|
if (style == SCE_C_OPERATOR) {
|
||||||
if (ch == '{') {
|
if (ch == '{') {
|
||||||
levelCurrent++;
|
levelCurrent++;
|
||||||
@@ -316,5 +347,12 @@ static void FoldCppDoc(unsigned int startPos, int length, int initStyle, WordLis
|
|||||||
styler.SetLevel(lineCurrent, levelPrev | flagsNext);
|
styler.SetLevel(lineCurrent, levelPrev | flagsNext);
|
||||||
}
|
}
|
||||||
|
|
||||||
LexerModule lmCPP(SCLEX_CPP, ColouriseCppDoc, "cpp", FoldCppDoc);
|
static const char * const cppWordLists[] = {
|
||||||
LexerModule lmTCL(SCLEX_TCL, ColouriseCppDoc, "tcl", FoldCppDoc);
|
"Primary keywords and identifiers",
|
||||||
|
"Secondary keywords and identifiers",
|
||||||
|
"Documentation comment keywords",
|
||||||
|
0,
|
||||||
|
};
|
||||||
|
|
||||||
|
LexerModule lmCPP(SCLEX_CPP, ColouriseCppDoc, "cpp", FoldCppDoc, cppWordLists);
|
||||||
|
LexerModule lmTCL(SCLEX_TCL, ColouriseCppDoc, "tcl", FoldCppDoc, cppWordLists);
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
/** @file LexCrontab.cxx
|
/** @file LexCrontab.cxx
|
||||||
** Lexer to use with extended crontab files used by a powerful
|
** Lexer to use with extended crontab files used by a powerful
|
||||||
** Windows scheduler/event monitor/automation manager nnCron.
|
** Windows scheduler/event monitor/automation manager nnCron.
|
||||||
** (http://nemtsev.virtualave.net/)
|
** (http://nemtsev.eserv.ru/)
|
||||||
**/
|
**/
|
||||||
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
|
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
|
||||||
// The License.txt file describes the conditions under which this software may be distributed.
|
// The License.txt file describes the conditions under which this software may be distributed.
|
||||||
@@ -62,7 +62,8 @@ static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordLi
|
|||||||
state = SCE_NNCRONTAB_TASK;
|
state = SCE_NNCRONTAB_TASK;
|
||||||
styler.ColourTo(i,SCE_NNCRONTAB_TASK);
|
styler.ColourTo(i,SCE_NNCRONTAB_TASK);
|
||||||
}
|
}
|
||||||
else if( ch == '\\' && styler.SafeGetCharAt(i+1) == ' ') {
|
else if( ch == '\\' && (styler.SafeGetCharAt(i+1) == ' ' ||
|
||||||
|
styler.SafeGetCharAt(i+1) == '\t')) {
|
||||||
// signals the start of an extended comment...
|
// signals the start of an extended comment...
|
||||||
state = SCE_NNCRONTAB_COMMENT;
|
state = SCE_NNCRONTAB_COMMENT;
|
||||||
styler.ColourTo(i,SCE_NNCRONTAB_COMMENT);
|
styler.ColourTo(i,SCE_NNCRONTAB_COMMENT);
|
||||||
@@ -81,6 +82,10 @@ static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordLi
|
|||||||
// signals environment variables
|
// signals environment variables
|
||||||
state = SCE_NNCRONTAB_ENVIRONMENT;
|
state = SCE_NNCRONTAB_ENVIRONMENT;
|
||||||
styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT);
|
styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT);
|
||||||
|
} else if( ch == '<' && styler.SafeGetCharAt(i+1) == '%') {
|
||||||
|
// signals environment variables
|
||||||
|
state = SCE_NNCRONTAB_ENVIRONMENT;
|
||||||
|
styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT);
|
||||||
} else if( ch == '*' ) {
|
} else if( ch == '*' ) {
|
||||||
// signals an asterisk
|
// signals an asterisk
|
||||||
// no state jump necessary for this simple case...
|
// no state jump necessary for this simple case...
|
||||||
@@ -148,7 +153,7 @@ static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordLi
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if( (ch == '%' && styler.SafeGetCharAt(i-1)!='\\')
|
if( (ch == '%' && styler.SafeGetCharAt(i-1)!='\\')
|
||||||
|| (ch == '\n') || (ch == '\r') ) {
|
|| (ch == '\n') || (ch == '\r') || (ch == '>') ) {
|
||||||
state = SCE_NNCRONTAB_DEFAULT;
|
state = SCE_NNCRONTAB_DEFAULT;
|
||||||
styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT);
|
styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT);
|
||||||
break;
|
break;
|
||||||
@@ -159,7 +164,8 @@ static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordLi
|
|||||||
case SCE_NNCRONTAB_IDENTIFIER:
|
case SCE_NNCRONTAB_IDENTIFIER:
|
||||||
// stay in CONF_IDENTIFIER state until we find a non-alphanumeric
|
// stay in CONF_IDENTIFIER state until we find a non-alphanumeric
|
||||||
if( isalnum(ch) || (ch == '_') || (ch == '-') || (ch == '/') ||
|
if( isalnum(ch) || (ch == '_') || (ch == '-') || (ch == '/') ||
|
||||||
(ch == '$') || (ch == '.') || (ch == '<') || (ch == '>') ) {
|
(ch == '$') || (ch == '.') || (ch == '<') || (ch == '>') ||
|
||||||
|
(ch == '@') ) {
|
||||||
buffer[bufferCount++] = ch;
|
buffer[bufferCount++] = ch;
|
||||||
} else {
|
} else {
|
||||||
state = SCE_NNCRONTAB_DEFAULT;
|
state = SCE_NNCRONTAB_DEFAULT;
|
||||||
|
@@ -220,9 +220,11 @@ static int classifyTagHTML(unsigned int start, unsigned int end,
|
|||||||
isScript = 0 == strcmp(s, "script");
|
isScript = 0 == strcmp(s, "script");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((chAttr == SCE_H_TAGUNKNOWN) && !keywords)
|
if ((chAttr == SCE_H_TAGUNKNOWN) && !keywords) {
|
||||||
// No keywords -> all are known
|
// No keywords -> all are known
|
||||||
chAttr = SCE_H_TAG;
|
chAttr = SCE_H_TAG;
|
||||||
|
isScript = 0 == strcmp(s, "script");
|
||||||
|
}
|
||||||
styler.ColourTo(end, chAttr);
|
styler.ColourTo(end, chAttr);
|
||||||
return isScript ? SCE_H_SCRIPT : chAttr;
|
return isScript ? SCE_H_SCRIPT : chAttr;
|
||||||
}
|
}
|
||||||
@@ -555,6 +557,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
|||||||
//case SCE_HJ_COMMENTLINE:
|
//case SCE_HJ_COMMENTLINE:
|
||||||
case SCE_HJ_DOUBLESTRING:
|
case SCE_HJ_DOUBLESTRING:
|
||||||
case SCE_HJ_SINGLESTRING:
|
case SCE_HJ_SINGLESTRING:
|
||||||
|
case SCE_HJ_REGEX:
|
||||||
case SCE_HB_STRING:
|
case SCE_HB_STRING:
|
||||||
case SCE_HP_STRING:
|
case SCE_HP_STRING:
|
||||||
case SCE_HP_TRIPLE:
|
case SCE_HP_TRIPLE:
|
||||||
@@ -1851,7 +1854,17 @@ static void ColourisePHPDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
sc.Complete();
|
sc.Complete();
|
||||||
}
|
}
|
||||||
|
|
||||||
LexerModule lmHTML(SCLEX_HTML, ColouriseHyperTextDoc, "hypertext");
|
static const char * const htmlWordListDesc[] = {
|
||||||
LexerModule lmXML(SCLEX_XML, ColouriseHyperTextDoc, "xml");
|
"HTML elements and attributes",
|
||||||
LexerModule lmASP(SCLEX_ASP, ColouriseASPDoc, "asp");
|
"JavaScript keywords",
|
||||||
LexerModule lmPHP(SCLEX_PHP, ColourisePHPDoc, "php");
|
"VBScript keywords",
|
||||||
|
"Python keywords",
|
||||||
|
"PHP keywords",
|
||||||
|
"SGML and DTD keywords",
|
||||||
|
0,
|
||||||
|
};
|
||||||
|
|
||||||
|
LexerModule lmHTML(SCLEX_HTML, ColouriseHyperTextDoc, "hypertext", 0, htmlWordListDesc);
|
||||||
|
LexerModule lmXML(SCLEX_XML, ColouriseHyperTextDoc, "xml", 0, htmlWordListDesc);
|
||||||
|
LexerModule lmASP(SCLEX_ASP, ColouriseASPDoc, "asp", 0, htmlWordListDesc);
|
||||||
|
LexerModule lmPHP(SCLEX_PHP, ColourisePHPDoc, "php", 0, htmlWordListDesc);
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
**
|
**
|
||||||
** Written by Paul Winwood.
|
** Written by Paul Winwood.
|
||||||
** Folder by Alexey Yutkin.
|
** Folder by Alexey Yutkin.
|
||||||
** Modified by Marcos E. Wurzius
|
** Modified by Marcos E. Wurzius & Philippe Lhoste
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -23,6 +23,7 @@
|
|||||||
#include "Scintilla.h"
|
#include "Scintilla.h"
|
||||||
#include "SciLexer.h"
|
#include "SciLexer.h"
|
||||||
|
|
||||||
|
#define SCE_LUA_LAST_STYLE SCE_LUA_WORD6
|
||||||
|
|
||||||
static inline bool IsAWordChar(const int ch) {
|
static inline bool IsAWordChar(const int ch) {
|
||||||
return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_');
|
return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_');
|
||||||
@@ -32,7 +33,6 @@ inline bool IsAWordStart(const int ch) {
|
|||||||
return (ch < 0x80) && (isalnum(ch) || ch == '_');
|
return (ch < 0x80) && (isalnum(ch) || ch == '_');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool isLuaOperator(char ch) {
|
inline bool isLuaOperator(char ch) {
|
||||||
if (isalnum(ch))
|
if (isalnum(ch))
|
||||||
return false;
|
return false;
|
||||||
@@ -47,8 +47,11 @@ inline bool isLuaOperator(char ch) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ColouriseLuaDoc(
|
||||||
static void ColouriseLuaDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
|
unsigned int startPos,
|
||||||
|
int length,
|
||||||
|
int initStyle,
|
||||||
|
WordList *keywordlists[],
|
||||||
Accessor &styler) {
|
Accessor &styler) {
|
||||||
|
|
||||||
WordList &keywords = *keywordlists[0];
|
WordList &keywords = *keywordlists[0];
|
||||||
@@ -57,28 +60,40 @@ static void ColouriseLuaDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
WordList &keywords4 = *keywordlists[3];
|
WordList &keywords4 = *keywordlists[3];
|
||||||
WordList &keywords5 = *keywordlists[4];
|
WordList &keywords5 = *keywordlists[4];
|
||||||
WordList &keywords6 = *keywordlists[5];
|
WordList &keywords6 = *keywordlists[5];
|
||||||
int literalString = 0;
|
|
||||||
int literalStringFlag =0;
|
// Must initialize the literal string nesting level, if we are inside such a string.
|
||||||
|
int literalStringLevel = 0;
|
||||||
|
if (initStyle == SCE_LUA_LITERALSTRING) {
|
||||||
|
literalStringLevel = 1;
|
||||||
|
}
|
||||||
|
// We use states above the last one to indicate nesting level of literal strings
|
||||||
|
if (initStyle > SCE_LUA_LAST_STYLE) {
|
||||||
|
literalStringLevel = initStyle - SCE_LUA_LAST_STYLE + 1;
|
||||||
|
}
|
||||||
|
|
||||||
// Do not leak onto next line
|
// Do not leak onto next line
|
||||||
if (initStyle == SCE_LUA_STRINGEOL)
|
if (initStyle == SCE_LUA_STRINGEOL) {
|
||||||
initStyle = SCE_LUA_DEFAULT;
|
initStyle = SCE_LUA_DEFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
StyleContext sc(startPos, length, initStyle, styler);
|
StyleContext sc(startPos, length, initStyle, styler);
|
||||||
if(startPos == 0 && sc.ch == '#') sc.SetState(SCE_LUA_COMMENTLINE);
|
if (startPos == 0 && sc.ch == '#') {
|
||||||
for (; sc.More(); sc.Forward()) {
|
sc.SetState(SCE_LUA_COMMENTLINE);
|
||||||
|
|
||||||
// Handle line continuation generically.
|
|
||||||
if (sc.ch == '\\') {
|
|
||||||
if (sc.Match("\\\n")) {
|
|
||||||
sc.Forward();
|
|
||||||
sc.Forward();
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
if (sc.Match("\\\r\n")) {
|
for (; sc.More(); sc.Forward()) {
|
||||||
sc.Forward();
|
if (sc.atLineStart && (sc.state == SCE_LUA_STRING)) {
|
||||||
|
// Prevent SCE_LUA_STRINGEOL from leaking back to previous line
|
||||||
|
sc.SetState(SCE_LUA_STRING);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle string line continuation
|
||||||
|
if ((sc.state == SCE_LUA_STRING || sc.state == SCE_LUA_CHARACTER) &&
|
||||||
|
sc.ch == '\\') {
|
||||||
|
if (sc.chNext == '\n' || sc.chNext == '\r') {
|
||||||
sc.Forward();
|
sc.Forward();
|
||||||
|
if (sc.ch == '\r' && sc.chNext == '\n') {
|
||||||
sc.Forward();
|
sc.Forward();
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -109,12 +124,14 @@ static void ColouriseLuaDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
}
|
}
|
||||||
sc.SetState(SCE_LUA_DEFAULT);
|
sc.SetState(SCE_LUA_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} else if (sc.state == SCE_LUA_COMMENTLINE ) {
|
} else if (sc.state == SCE_LUA_COMMENTLINE ) {
|
||||||
if (sc.atLineEnd) {
|
if (sc.atLineEnd) {
|
||||||
sc.SetState(SCE_LUA_DEFAULT);
|
sc.SetState(SCE_LUA_DEFAULT);
|
||||||
}
|
}
|
||||||
|
} else if (sc.state == SCE_LUA_PREPROCESSOR ) {
|
||||||
|
if (sc.atLineEnd) {
|
||||||
|
sc.SetState(SCE_LUA_DEFAULT);
|
||||||
|
}
|
||||||
} else if (sc.state == SCE_LUA_STRING) {
|
} else if (sc.state == SCE_LUA_STRING) {
|
||||||
if (sc.ch == '\\') {
|
if (sc.ch == '\\') {
|
||||||
if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') {
|
if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') {
|
||||||
@@ -126,7 +143,6 @@ static void ColouriseLuaDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
sc.ChangeState(SCE_LUA_STRINGEOL);
|
sc.ChangeState(SCE_LUA_STRINGEOL);
|
||||||
sc.ForwardSetState(SCE_LUA_DEFAULT);
|
sc.ForwardSetState(SCE_LUA_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (sc.state == SCE_LUA_CHARACTER) {
|
} else if (sc.state == SCE_LUA_CHARACTER) {
|
||||||
if (sc.ch == '\\') {
|
if (sc.ch == '\\') {
|
||||||
if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') {
|
if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') {
|
||||||
@@ -138,33 +154,41 @@ static void ColouriseLuaDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
sc.ChangeState(SCE_LUA_STRINGEOL);
|
sc.ChangeState(SCE_LUA_STRINGEOL);
|
||||||
sc.ForwardSetState(SCE_LUA_DEFAULT);
|
sc.ForwardSetState(SCE_LUA_DEFAULT);
|
||||||
}
|
}
|
||||||
} else if (sc.state == SCE_LUA_LITERALSTRING) {
|
} else if (sc.state == SCE_LUA_LITERALSTRING || sc.state > SCE_LUA_LAST_STYLE) {
|
||||||
if (sc.chPrev == '[' && sc.ch == '[' && literalStringFlag != 1) {
|
if (sc.Match('[', '[')) {
|
||||||
literalString++;
|
literalStringLevel++;
|
||||||
literalStringFlag = 1;
|
sc.SetState(SCE_LUA_LAST_STYLE + literalStringLevel - 1);
|
||||||
}
|
} else if (sc.Match(']', ']') && literalStringLevel > 0) {
|
||||||
else if (sc.chPrev == ']' && sc.ch == ']' && literalStringFlag != 2 ) {
|
literalStringLevel--;
|
||||||
if((--literalString == 1))
|
sc.Forward();
|
||||||
|
if (literalStringLevel == 0) {
|
||||||
sc.ForwardSetState(SCE_LUA_DEFAULT);
|
sc.ForwardSetState(SCE_LUA_DEFAULT);
|
||||||
literalStringFlag = 2;
|
} else if (literalStringLevel == 1) {
|
||||||
|
sc.ForwardSetState(SCE_LUA_LITERALSTRING);
|
||||||
|
} else {
|
||||||
|
sc.ForwardSetState(SCE_LUA_LAST_STYLE + literalStringLevel - 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else literalStringFlag = 0;
|
|
||||||
}
|
}
|
||||||
// Determine if a new state should be entered.
|
// Determine if a new state should be entered.
|
||||||
if (sc.state == SCE_LUA_DEFAULT) {
|
if (sc.state == SCE_LUA_DEFAULT) {
|
||||||
if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {
|
if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {
|
||||||
sc.SetState(SCE_LUA_NUMBER);
|
sc.SetState(SCE_LUA_NUMBER);
|
||||||
} else if (IsAWordStart(sc.ch) || (sc.ch == '@')) {
|
} else if (IsAWordStart(sc.ch)) {
|
||||||
sc.SetState(SCE_LUA_IDENTIFIER);
|
sc.SetState(SCE_LUA_IDENTIFIER);
|
||||||
} else if (sc.ch == '\"') {
|
} else if (sc.Match('\"')) {
|
||||||
sc.SetState(SCE_LUA_STRING);
|
sc.SetState(SCE_LUA_STRING);
|
||||||
} else if (sc.ch == '\'') {
|
} else if (sc.Match('\'')) {
|
||||||
sc.SetState(SCE_LUA_CHARACTER);
|
sc.SetState(SCE_LUA_CHARACTER);
|
||||||
} else if (sc.ch == '[' && sc.chNext == '[') {
|
} else if (sc.Match('[', '[')) {
|
||||||
|
literalStringLevel = 1;
|
||||||
sc.SetState(SCE_LUA_LITERALSTRING);
|
sc.SetState(SCE_LUA_LITERALSTRING);
|
||||||
literalString = 1;
|
sc.Forward();
|
||||||
} else if (sc.ch == '-' && sc.chNext == '-') {
|
} else if (sc.Match('-', '-')) {
|
||||||
sc.SetState(SCE_LUA_COMMENTLINE);
|
sc.SetState(SCE_LUA_COMMENTLINE);
|
||||||
|
sc.Forward();
|
||||||
|
} else if (sc.Match('$') && sc.atLineStart) {
|
||||||
|
sc.SetState(SCE_LUA_PREPROCESSOR); // Obsolete since Lua 4.0, but still in old code
|
||||||
} else if (isLuaOperator(static_cast<char>(sc.ch))) {
|
} else if (isLuaOperator(static_cast<char>(sc.ch))) {
|
||||||
sc.SetState(SCE_LUA_OPERATOR);
|
sc.SetState(SCE_LUA_OPERATOR);
|
||||||
}
|
}
|
||||||
@@ -185,6 +209,7 @@ static void FoldLuaDoc(unsigned int startPos, int length, int /* initStyle */, W
|
|||||||
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
|
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
|
||||||
int styleNext = styler.StyleAt(startPos);
|
int styleNext = styler.StyleAt(startPos);
|
||||||
char s[10];
|
char s[10];
|
||||||
|
|
||||||
for (unsigned int i = startPos; i < lengthDoc; i++) {
|
for (unsigned int i = startPos; i < lengthDoc; i++) {
|
||||||
char ch = chNext;
|
char ch = chNext;
|
||||||
chNext = styler.SafeGetCharAt(i + 1);
|
chNext = styler.SafeGetCharAt(i + 1);
|
||||||
@@ -192,36 +217,38 @@ static void FoldLuaDoc(unsigned int startPos, int length, int /* initStyle */, W
|
|||||||
styleNext = styler.StyleAt(i + 1);
|
styleNext = styler.StyleAt(i + 1);
|
||||||
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
|
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
|
||||||
if (style == SCE_LUA_WORD) {
|
if (style == SCE_LUA_WORD) {
|
||||||
if ( ch == 'i' || ch == 'e' || ch == 't' || ch == 'd' || ch == 'f') {
|
if (ch == 'i' || ch == 'd' || ch == 'f' || ch == 'e') {
|
||||||
for (unsigned int j = 0; j < 8; j++) {
|
for (unsigned int j = 0; j < 8; j++) {
|
||||||
if (!iswordchar(styler[i + j]))
|
if (!iswordchar(styler[i + j])) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
s[j] = styler[i + j];
|
s[j] = styler[i + j];
|
||||||
s[j + 1] = '\0';
|
s[j + 1] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((strcmp(s, "if") == 0) || (strcmp(s, "do") == 0)
|
if ((strcmp(s, "if") == 0) || (strcmp(s, "do") == 0) || (strcmp(s, "function") == 0)) {
|
||||||
|| (strcmp(s, "function") == 0))
|
|
||||||
levelCurrent++;
|
levelCurrent++;
|
||||||
if ((strcmp(s, "end") == 0) || (strcmp(s, "elseif") == 0))
|
}
|
||||||
|
if ((strcmp(s, "end") == 0) || (strcmp(s, "elseif") == 0)) {
|
||||||
levelCurrent--;
|
levelCurrent--;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (style == SCE_LUA_OPERATOR)
|
} else if (style == SCE_LUA_OPERATOR) {
|
||||||
{
|
if (ch == '{' || ch == '(') {
|
||||||
if(ch == '{' || ch == '(')
|
|
||||||
levelCurrent++;
|
levelCurrent++;
|
||||||
else if(ch == '}' || ch == ')')
|
} else if (ch == '}' || ch == ')') {
|
||||||
levelCurrent--;
|
levelCurrent--;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (atEOL) {
|
if (atEOL) {
|
||||||
int lev = levelPrev;
|
int lev = levelPrev;
|
||||||
if (visibleChars == 0 && foldCompact)
|
if (visibleChars == 0 && foldCompact) {
|
||||||
lev |= SC_FOLDLEVELWHITEFLAG;
|
lev |= SC_FOLDLEVELWHITEFLAG;
|
||||||
if ((levelCurrent > levelPrev) && (visibleChars > 0))
|
}
|
||||||
|
if ((levelCurrent > levelPrev) && (visibleChars > 0)) {
|
||||||
lev |= SC_FOLDLEVELHEADERFLAG;
|
lev |= SC_FOLDLEVELHEADERFLAG;
|
||||||
|
}
|
||||||
if (lev != styler.LevelAt(lineCurrent)) {
|
if (lev != styler.LevelAt(lineCurrent)) {
|
||||||
styler.SetLevel(lineCurrent, lev);
|
styler.SetLevel(lineCurrent, lev);
|
||||||
}
|
}
|
||||||
@@ -229,9 +256,10 @@ static void FoldLuaDoc(unsigned int startPos, int length, int /* initStyle */, W
|
|||||||
levelPrev = levelCurrent;
|
levelPrev = levelCurrent;
|
||||||
visibleChars = 0;
|
visibleChars = 0;
|
||||||
}
|
}
|
||||||
if (!isspacechar(ch))
|
if (!isspacechar(ch)) {
|
||||||
visibleChars++;
|
visibleChars++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Fill in the real level of the next line, keeping the current flags as they will be filled in later
|
// Fill in the real level of the next line, keeping the current flags as they will be filled in later
|
||||||
|
|
||||||
int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;
|
int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;
|
||||||
|
@@ -159,21 +159,23 @@ static void ColouriseDiffLine(char *lineBuffer, int endLine, Accessor &styler) {
|
|||||||
// difference starts then each line starting with ' ' is a whitespace
|
// difference starts then each line starting with ' ' is a whitespace
|
||||||
// otherwise it is considered a comment (Only in..., Binary file...)
|
// otherwise it is considered a comment (Only in..., Binary file...)
|
||||||
if (0 == strncmp(lineBuffer, "diff ", 3)) {
|
if (0 == strncmp(lineBuffer, "diff ", 3)) {
|
||||||
styler.ColourTo(endLine, 2);
|
styler.ColourTo(endLine, SCE_DIFF_COMMAND);
|
||||||
} else if (0 == strncmp(lineBuffer, "--- ", 3)) {
|
} else if (0 == strncmp(lineBuffer, "--- ", 3)) {
|
||||||
styler.ColourTo(endLine, 3);
|
styler.ColourTo(endLine, SCE_DIFF_HEADER);
|
||||||
} else if (0 == strncmp(lineBuffer, "+++ ", 3)) {
|
} else if (0 == strncmp(lineBuffer, "+++ ", 3)) {
|
||||||
styler.ColourTo(endLine, 3);
|
styler.ColourTo(endLine, SCE_DIFF_HEADER);
|
||||||
|
} else if (0 == strncmp(lineBuffer, "***", 3)) {
|
||||||
|
styler.ColourTo(endLine, SCE_DIFF_HEADER);
|
||||||
} else if (lineBuffer[0] == '@') {
|
} else if (lineBuffer[0] == '@') {
|
||||||
styler.ColourTo(endLine, 4);
|
styler.ColourTo(endLine, SCE_DIFF_POSITION);
|
||||||
} else if (lineBuffer[0] == '-') {
|
} else if (lineBuffer[0] == '-') {
|
||||||
styler.ColourTo(endLine, 5);
|
styler.ColourTo(endLine, SCE_DIFF_DELETED);
|
||||||
} else if (lineBuffer[0] == '+') {
|
} else if (lineBuffer[0] == '+') {
|
||||||
styler.ColourTo(endLine, 6);
|
styler.ColourTo(endLine, SCE_DIFF_ADDED);
|
||||||
} else if (lineBuffer[0] != ' ') {
|
} else if (lineBuffer[0] != ' ') {
|
||||||
styler.ColourTo(endLine, 1);
|
styler.ColourTo(endLine, SCE_DIFF_COMMENT);
|
||||||
} else {
|
} else {
|
||||||
styler.ColourTo(endLine, 0);
|
styler.ColourTo(endLine, SCE_DIFF_DEFAULT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,28 +210,28 @@ static void ColourisePropsLine(
|
|||||||
i++;
|
i++;
|
||||||
if (i < lengthLine) {
|
if (i < lengthLine) {
|
||||||
if (lineBuffer[i] == '#' || lineBuffer[i] == '!' || lineBuffer[i] == ';') {
|
if (lineBuffer[i] == '#' || lineBuffer[i] == '!' || lineBuffer[i] == ';') {
|
||||||
styler.ColourTo(endPos, 1);
|
styler.ColourTo(endPos, SCE_PROPS_COMMENT);
|
||||||
} else if (lineBuffer[i] == '[') {
|
} else if (lineBuffer[i] == '[') {
|
||||||
styler.ColourTo(endPos, 2);
|
styler.ColourTo(endPos, SCE_PROPS_SECTION);
|
||||||
} else if (lineBuffer[i] == '@') {
|
} else if (lineBuffer[i] == '@') {
|
||||||
styler.ColourTo(startLine + i, 4);
|
styler.ColourTo(startLine + i, SCE_PROPS_DEFVAL);
|
||||||
if (lineBuffer[++i] == '=')
|
if (lineBuffer[++i] == '=')
|
||||||
styler.ColourTo(startLine + i, 3);
|
styler.ColourTo(startLine + i, SCE_PROPS_ASSIGNMENT);
|
||||||
styler.ColourTo(endPos, 0);
|
styler.ColourTo(endPos, SCE_PROPS_DEFAULT);
|
||||||
} else {
|
} else {
|
||||||
// Search for the '=' character
|
// Search for the '=' character
|
||||||
while ((i < lengthLine) && (lineBuffer[i] != '='))
|
while ((i < lengthLine) && (lineBuffer[i] != '='))
|
||||||
i++;
|
i++;
|
||||||
if ((i < lengthLine) && (lineBuffer[i] == '=')) {
|
if ((i < lengthLine) && (lineBuffer[i] == '=')) {
|
||||||
styler.ColourTo(startLine + i - 1, 0);
|
styler.ColourTo(startLine + i - 1, SCE_PROPS_DEFAULT);
|
||||||
styler.ColourTo(startLine + i, 3);
|
styler.ColourTo(startLine + i, 3);
|
||||||
styler.ColourTo(endPos, 0);
|
styler.ColourTo(endPos, SCE_PROPS_DEFAULT);
|
||||||
} else {
|
} else {
|
||||||
styler.ColourTo(endPos, 0);
|
styler.ColourTo(endPos, SCE_PROPS_DEFAULT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
styler.ColourTo(endPos, 0);
|
styler.ColourTo(endPos, SCE_PROPS_DEFAULT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -386,6 +388,8 @@ static void ColouriseErrorListLine(
|
|||||||
state = 1;
|
state = 1;
|
||||||
} else if ((state == 0) && (lineBuffer[i] == '(')) {
|
} else if ((state == 0) && (lineBuffer[i] == '(')) {
|
||||||
state = 10;
|
state = 10;
|
||||||
|
} else if ((state == 0) && (lineBuffer[i] == '\t')) {
|
||||||
|
state = 20;
|
||||||
} else if ((state == 1) && isdigit(lineBuffer[i])) {
|
} else if ((state == 1) && isdigit(lineBuffer[i])) {
|
||||||
state = 2;
|
state = 2;
|
||||||
} else if ((state == 2) && (lineBuffer[i] == ':')) {
|
} else if ((state == 2) && (lineBuffer[i] == ':')) {
|
||||||
@@ -406,12 +410,22 @@ static void ColouriseErrorListLine(
|
|||||||
break;
|
break;
|
||||||
} else if (((state == 11) || (state == 14)) && !((lineBuffer[i] == ' ') || isdigit(lineBuffer[i]))) {
|
} else if (((state == 11) || (state == 14)) && !((lineBuffer[i] == ' ') || isdigit(lineBuffer[i]))) {
|
||||||
state = 99;
|
state = 99;
|
||||||
|
} else if ((state == 20) && isdigit(lineBuffer[i])) {
|
||||||
|
state = 24;
|
||||||
|
break;
|
||||||
|
} else if ((state == 20) && ((lineBuffer[i] == '/') && (lineBuffer[i+1] == '^'))) {
|
||||||
|
state = 21;
|
||||||
|
} else if ((state == 21) && ((lineBuffer[i] == '$') && (lineBuffer[i+1] == '/'))) {
|
||||||
|
state = 22;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (state == 3) {
|
if (state == 3) {
|
||||||
styler.ColourTo(endPos, SCE_ERR_GCC);
|
styler.ColourTo(endPos, SCE_ERR_GCC);
|
||||||
} else if ((state == 13) || (state == 14) || (state == 15)) {
|
} else if ((state == 13) || (state == 14) || (state == 15)) {
|
||||||
styler.ColourTo(endPos, SCE_ERR_MS);
|
styler.ColourTo(endPos, SCE_ERR_MS);
|
||||||
|
} else if (((state == 22) || (state == 24)) && (lineBuffer[0] != '\t')) {
|
||||||
|
styler.ColourTo(endPos, SCE_ERR_CTAG);
|
||||||
} else {
|
} else {
|
||||||
styler.ColourTo(endPos, SCE_ERR_DEFAULT);
|
styler.ColourTo(endPos, SCE_ERR_DEFAULT);
|
||||||
}
|
}
|
||||||
|
@@ -659,4 +659,9 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
|
|||||||
styler.ColourTo(lengthDoc - 1, state);
|
styler.ColourTo(lengthDoc - 1, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
LexerModule lmPerl(SCLEX_PERL, ColourisePerlDoc, "perl");
|
static const char * const perlWordListDesc[] = {
|
||||||
|
"Perl keywords",
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
|
LexerModule lmPerl(SCLEX_PERL, ColourisePerlDoc, "perl", 0, perlWordListDesc);
|
||||||
|
@@ -408,4 +408,10 @@ static void FoldPyDoc(unsigned int startPos, int length, int /*initStyle - unuse
|
|||||||
//styler.SetLevel(lineCurrent, indentCurrent);
|
//styler.SetLevel(lineCurrent, indentCurrent);
|
||||||
}
|
}
|
||||||
|
|
||||||
LexerModule lmPython(SCLEX_PYTHON, ColourisePyDoc, "python", FoldPyDoc);
|
static const char * const pythonWordListDesc[] = {
|
||||||
|
"Python keywords",
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
|
LexerModule lmPython(SCLEX_PYTHON, ColourisePyDoc, "python", FoldPyDoc,
|
||||||
|
pythonWordListDesc);
|
||||||
|
@@ -45,7 +45,7 @@ int CompareCaseInsensitive(const char *a, const char *b) {
|
|||||||
return *a - *b;
|
return *a - *b;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CompareNCaseInsensitive(const char *a, const char *b, int len) {
|
int CompareNCaseInsensitive(const char *a, const char *b, size_t len) {
|
||||||
while (*a && *b && len) {
|
while (*a && *b && len) {
|
||||||
if (*a != *b) {
|
if (*a != *b) {
|
||||||
char upperA = MakeUpperCase(*a);
|
char upperA = MakeUpperCase(*a);
|
||||||
@@ -68,7 +68,7 @@ bool EqualCaseInsensitive(const char *a, const char *b) {
|
|||||||
return 0 == CompareCaseInsensitive(a, b);
|
return 0 == CompareCaseInsensitive(a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline unsigned int HashString(const char *s, int len) {
|
inline unsigned int HashString(const char *s, size_t len) {
|
||||||
unsigned int ret = 0;
|
unsigned int ret = 0;
|
||||||
while (len--) {
|
while (len--) {
|
||||||
ret <<= 4;
|
ret <<= 4;
|
||||||
@@ -93,9 +93,9 @@ void PropSet::Set(const char *key, const char *val, int lenKey, int lenVal) {
|
|||||||
if (!*key) // Empty keys are not supported
|
if (!*key) // Empty keys are not supported
|
||||||
return;
|
return;
|
||||||
if (lenKey == -1)
|
if (lenKey == -1)
|
||||||
lenKey = strlen(key);
|
lenKey = static_cast<int>(strlen(key));
|
||||||
if (lenVal == -1)
|
if (lenVal == -1)
|
||||||
lenVal = strlen(val);
|
lenVal = static_cast<int>(strlen(val));
|
||||||
unsigned int hash = HashString(key, lenKey);
|
unsigned int hash = HashString(key, lenKey);
|
||||||
for (Property *p = props[hash % hashRoots]; p; p = p->next) {
|
for (Property *p = props[hash % hashRoots]; p; p = p->next) {
|
||||||
if ((hash == p->hash) &&
|
if ((hash == p->hash) &&
|
||||||
@@ -187,7 +187,7 @@ SString PropSet::Expand(const char *withVars) {
|
|||||||
int lenvar = cpendvar - cpvar - 2; // Subtract the $()
|
int lenvar = cpendvar - cpvar - 2; // Subtract the $()
|
||||||
char *var = StringDup(cpvar + 2, lenvar);
|
char *var = StringDup(cpvar + 2, lenvar);
|
||||||
SString val = GetExpanded(var);
|
SString val = GetExpanded(var);
|
||||||
int newlenbase = strlen(base) + val.length() - lenvar;
|
size_t newlenbase = strlen(base) + val.length() - lenvar;
|
||||||
char *newbase = new char[newlenbase];
|
char *newbase = new char[newlenbase];
|
||||||
strncpy(newbase, base, cpvar - base);
|
strncpy(newbase, base, cpvar - base);
|
||||||
strcpy(newbase + (cpvar - base), val.c_str());
|
strcpy(newbase + (cpvar - base), val.c_str());
|
||||||
@@ -224,11 +224,11 @@ bool isprefix(const char *target, const char *prefix) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool IsSuffixCaseInsensitive(const char *target, const char *suffix) {
|
static bool IsSuffixCaseInsensitive(const char *target, const char *suffix) {
|
||||||
int lentarget = strlen(target);
|
size_t lentarget = strlen(target);
|
||||||
int lensuffix = strlen(suffix);
|
size_t lensuffix = strlen(suffix);
|
||||||
if (lensuffix > lentarget)
|
if (lensuffix > lentarget)
|
||||||
return false;
|
return false;
|
||||||
for (int i = lensuffix - 1; i >= 0; i--) {
|
for (int i = static_cast<int>(lensuffix) - 1; i >= 0; i--) {
|
||||||
if (MakeUpperCase(target[i + lentarget - lensuffix]) !=
|
if (MakeUpperCase(target[i + lentarget - lensuffix]) !=
|
||||||
MakeUpperCase(suffix[i]))
|
MakeUpperCase(suffix[i]))
|
||||||
return false;
|
return false;
|
||||||
@@ -306,7 +306,7 @@ SString PropSet::GetNewExpand(const char *keybase, const char *filename) {
|
|||||||
int lenvar = cpendvar - cpvar - 2; // Subtract the $()
|
int lenvar = cpendvar - cpvar - 2; // Subtract the $()
|
||||||
char *var = StringDup(cpvar + 2, lenvar);
|
char *var = StringDup(cpvar + 2, lenvar);
|
||||||
SString val = GetWild(var, filename);
|
SString val = GetWild(var, filename);
|
||||||
int newlenbase = strlen(base) + val.length() - lenvar;
|
size_t newlenbase = strlen(base) + val.length() - lenvar;
|
||||||
char *newbase = new char[newlenbase];
|
char *newbase = new char[newlenbase];
|
||||||
strncpy(newbase, base, cpvar - base);
|
strncpy(newbase, base, cpvar - base);
|
||||||
strcpy(newbase + (cpvar - base), val.c_str());
|
strcpy(newbase + (cpvar - base), val.c_str());
|
||||||
@@ -340,7 +340,7 @@ void PropSet::Clear() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
char *PropSet::ToString() {
|
char *PropSet::ToString() {
|
||||||
unsigned int len=0;
|
size_t len=0;
|
||||||
for (int r = 0; r < hashRoots; r++) {
|
for (int r = 0; r < hashRoots; r++) {
|
||||||
for (Property *p = props[r]; p; p = p->next) {
|
for (Property *p = props[r]; p; p = p->next) {
|
||||||
len += strlen(p->key) + 1;
|
len += strlen(p->key) + 1;
|
||||||
@@ -435,8 +435,8 @@ static char **ArrayFromWordList(char *wordlist, int *len, bool onlyLineEnds = fa
|
|||||||
if (keywords) {
|
if (keywords) {
|
||||||
words = 0;
|
words = 0;
|
||||||
prev = '\0';
|
prev = '\0';
|
||||||
int slen = strlen(wordlist);
|
size_t slen = strlen(wordlist);
|
||||||
for (int k = 0; k < slen; k++) {
|
for (size_t k = 0; k < slen; k++) {
|
||||||
if (!iswordsep(wordlist[k], onlyLineEnds)) {
|
if (!iswordsep(wordlist[k], onlyLineEnds)) {
|
||||||
if (!prev) {
|
if (!prev) {
|
||||||
keywords[words] = &wordlist[k];
|
keywords[words] = &wordlist[k];
|
||||||
|
@@ -30,8 +30,8 @@
|
|||||||
* Modification history:
|
* Modification history:
|
||||||
*
|
*
|
||||||
* $Log$
|
* $Log$
|
||||||
* Revision 1.3 2002/03/18 22:31:00 RD
|
* Revision 1.4 2002/09/06 16:58:12 RD
|
||||||
* Updated wxSTC from Scintilla 1.40 to Scintilla 1.45
|
* Updated to Scintilla from 1.45 to 1.47
|
||||||
*
|
*
|
||||||
* Revision 1.6 2001/04/29 13:32:10 nyamatongwe
|
* Revision 1.6 2001/04/29 13:32:10 nyamatongwe
|
||||||
* Addition of new target methods - versions of ReplaceTarget that take counted
|
* Addition of new target methods - versions of ReplaceTarget that take counted
|
||||||
|
@@ -64,11 +64,18 @@ void ScintillaBase::RefreshColourPalette(Palette &pal, bool want) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ScintillaBase::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) {
|
void ScintillaBase::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) {
|
||||||
bool acActiveBeforeCharAdded = ac.Active();
|
bool isFillUp = ac.Active() && ac.IsFillUpChar(*s);
|
||||||
if (!acActiveBeforeCharAdded || !ac.IsFillUpChar(*s))
|
if (!isFillUp) {
|
||||||
Editor::AddCharUTF(s, len, treatAsDBCS);
|
Editor::AddCharUTF(s, len, treatAsDBCS);
|
||||||
if (acActiveBeforeCharAdded)
|
}
|
||||||
|
if (ac.Active()) {
|
||||||
AutoCompleteChanged(s[0]);
|
AutoCompleteChanged(s[0]);
|
||||||
|
// For fill ups add the character after the autocompletion has
|
||||||
|
// triggered so containers see the key so can display a calltip.
|
||||||
|
if (isFillUp) {
|
||||||
|
Editor::AddCharUTF(s, len, treatAsDBCS);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScintillaBase::Command(int cmdId) {
|
void ScintillaBase::Command(int cmdId) {
|
||||||
@@ -278,7 +285,7 @@ void ScintillaBase::AutoCompleteMoveToCurrentWord() {
|
|||||||
|
|
||||||
void ScintillaBase::AutoCompleteChanged(char ch) {
|
void ScintillaBase::AutoCompleteChanged(char ch) {
|
||||||
if (ac.IsFillUpChar(ch)) {
|
if (ac.IsFillUpChar(ch)) {
|
||||||
AutoCompleteCompleted(ch);
|
AutoCompleteCompleted();
|
||||||
} else if (currentPos <= ac.posStart - ac.startLen) {
|
} else if (currentPos <= ac.posStart - ac.startLen) {
|
||||||
ac.Cancel();
|
ac.Cancel();
|
||||||
} else if (ac.cancelAtStartPos && currentPos <= ac.posStart) {
|
} else if (ac.cancelAtStartPos && currentPos <= ac.posStart) {
|
||||||
@@ -290,7 +297,7 @@ void ScintillaBase::AutoCompleteChanged(char ch) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScintillaBase::AutoCompleteCompleted(char fillUp/*='\0'*/) {
|
void ScintillaBase::AutoCompleteCompleted() {
|
||||||
int item = ac.lb.GetSelection();
|
int item = ac.lb.GetSelection();
|
||||||
char selected[1000];
|
char selected[1000];
|
||||||
if (item != -1) {
|
if (item != -1) {
|
||||||
@@ -323,8 +330,6 @@ void ScintillaBase::AutoCompleteCompleted(char fillUp/*='\0'*/) {
|
|||||||
SetEmptySelection(ac.posStart);
|
SetEmptySelection(ac.posStart);
|
||||||
if (item != -1) {
|
if (item != -1) {
|
||||||
SString piece = selected;
|
SString piece = selected;
|
||||||
if (fillUp)
|
|
||||||
piece += fillUp;
|
|
||||||
pdoc->InsertString(firstPos, piece.c_str());
|
pdoc->InsertString(firstPos, piece.c_str());
|
||||||
SetEmptySelection(firstPos + piece.length());
|
SetEmptySelection(firstPos + piece.length());
|
||||||
}
|
}
|
||||||
@@ -332,6 +337,7 @@ void ScintillaBase::AutoCompleteCompleted(char fillUp/*='\0'*/) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ScintillaBase::ContextMenu(Point pt) {
|
void ScintillaBase::ContextMenu(Point pt) {
|
||||||
|
if (displayPopupMenu) {
|
||||||
bool writable = !WndProc(SCI_GETREADONLY, 0, 0);
|
bool writable = !WndProc(SCI_GETREADONLY, 0, 0);
|
||||||
popup.CreatePopUp();
|
popup.CreatePopUp();
|
||||||
AddToPopUp("Undo", idcmdUndo, writable && pdoc->CanUndo());
|
AddToPopUp("Undo", idcmdUndo, writable && pdoc->CanUndo());
|
||||||
@@ -344,6 +350,7 @@ void ScintillaBase::ContextMenu(Point pt) {
|
|||||||
AddToPopUp("");
|
AddToPopUp("");
|
||||||
AddToPopUp("Select All", idcmdSelectAll);
|
AddToPopUp("Select All", idcmdSelectAll);
|
||||||
popup.Show(pt, wMain);
|
popup.Show(pt, wMain);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScintillaBase::CancelModes() {
|
void ScintillaBase::CancelModes() {
|
||||||
|
@@ -66,7 +66,7 @@ protected:
|
|||||||
void AutoCompleteCancel();
|
void AutoCompleteCancel();
|
||||||
void AutoCompleteMove(int delta);
|
void AutoCompleteMove(int delta);
|
||||||
void AutoCompleteChanged(char ch=0);
|
void AutoCompleteChanged(char ch=0);
|
||||||
void AutoCompleteCompleted(char fillUp='\0');
|
void AutoCompleteCompleted();
|
||||||
void AutoCompleteMoveToCurrentWord();
|
void AutoCompleteMoveToCurrentWord();
|
||||||
static void AutoCompleteDoubleClick(void* p);
|
static void AutoCompleteDoubleClick(void* p);
|
||||||
|
|
||||||
|
@@ -144,6 +144,10 @@ inline bool IsASpace(unsigned int ch) {
|
|||||||
return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d));
|
return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool IsASpaceOrTab(unsigned int ch) {
|
||||||
|
return (ch == ' ') || (ch == '\t');
|
||||||
|
}
|
||||||
|
|
||||||
inline bool IsADigit(unsigned int ch) {
|
inline bool IsADigit(unsigned int ch) {
|
||||||
return (ch >= '0') && (ch <= '9');
|
return (ch >= '0') && (ch <= '9');
|
||||||
}
|
}
|
||||||
|
@@ -42,7 +42,16 @@ void WindowAccessor::Fill(int position) {
|
|||||||
endPos = lenDoc;
|
endPos = lenDoc;
|
||||||
|
|
||||||
TextRange tr = {{startPos, endPos}, buf};
|
TextRange tr = {{startPos, endPos}, buf};
|
||||||
Platform::SendScintilla(id, SCI_GETTEXTRANGE, 0, reinterpret_cast<long>(&tr));
|
Platform::SendScintillaPointer(id, SCI_GETTEXTRANGE, 0, &tr);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool WindowAccessor::Match(int pos, const char *s) {
|
||||||
|
for (int i=0; *s; i++) {
|
||||||
|
if (*s != SafeGetCharAt(pos+i))
|
||||||
|
return false;
|
||||||
|
s++;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
char WindowAccessor::StyleAt(int position) {
|
char WindowAccessor::StyleAt(int position) {
|
||||||
@@ -116,8 +125,8 @@ void WindowAccessor::Flush() {
|
|||||||
startPos = extremePosition;
|
startPos = extremePosition;
|
||||||
lenDoc = -1;
|
lenDoc = -1;
|
||||||
if (validLen > 0) {
|
if (validLen > 0) {
|
||||||
Platform::SendScintilla(id, SCI_SETSTYLINGEX, validLen,
|
Platform::SendScintillaPointer(id, SCI_SETSTYLINGEX, validLen,
|
||||||
reinterpret_cast<long>(styleBuf));
|
styleBuf);
|
||||||
validLen = 0;
|
validLen = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -81,6 +81,7 @@ DEFINE_EVENT_TYPE( wxEVT_STC_DWELLEND )
|
|||||||
DEFINE_EVENT_TYPE( wxEVT_STC_START_DRAG )
|
DEFINE_EVENT_TYPE( wxEVT_STC_START_DRAG )
|
||||||
DEFINE_EVENT_TYPE( wxEVT_STC_DRAG_OVER )
|
DEFINE_EVENT_TYPE( wxEVT_STC_DRAG_OVER )
|
||||||
DEFINE_EVENT_TYPE( wxEVT_STC_DO_DROP )
|
DEFINE_EVENT_TYPE( wxEVT_STC_DO_DROP )
|
||||||
|
DEFINE_EVENT_TYPE( wxEVT_STC_ZOOM )
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
|
BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
|
||||||
@@ -117,7 +118,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxStyledTextEvent, wxCommandEvent)
|
|||||||
|
|
||||||
#ifdef LINK_LEXERS
|
#ifdef LINK_LEXERS
|
||||||
// forces the linking of the lexer modules
|
// forces the linking of the lexer modules
|
||||||
int wxForceScintillaLexers();
|
int Scintilla_LinkLexers();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@@ -134,7 +135,7 @@ wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent,
|
|||||||
wxDefaultValidator, name)
|
wxDefaultValidator, name)
|
||||||
{
|
{
|
||||||
#ifdef LINK_LEXERS
|
#ifdef LINK_LEXERS
|
||||||
wxForceScintillaLexers();
|
Scintilla_LinkLexers();
|
||||||
#endif
|
#endif
|
||||||
m_swx = new ScintillaWX(this);
|
m_swx = new ScintillaWX(this);
|
||||||
m_stopWatch.Start();
|
m_stopWatch.Start();
|
||||||
@@ -168,58 +169,58 @@ long wxStyledTextCtrl::SendMsg(int msg, long wp, long lp) {
|
|||||||
// this file. Edit stc.cpp.in or gen_iface.py instead and regenerate.
|
// this file. Edit stc.cpp.in or gen_iface.py instead and regenerate.
|
||||||
|
|
||||||
|
|
||||||
// Add text to the document
|
// Add text to the document.
|
||||||
void wxStyledTextCtrl::AddText(const wxString& text) {
|
void wxStyledTextCtrl::AddText(const wxString& text) {
|
||||||
wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text);
|
wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text);
|
||||||
SendMsg(2001, strlen(buf), (long)(const char*)buf);
|
SendMsg(2001, strlen(buf), (long)(const char*)buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add array of cells to document
|
// Add array of cells to document.
|
||||||
void wxStyledTextCtrl::AddStyledText(const wxMemoryBuffer& data) {
|
void wxStyledTextCtrl::AddStyledText(const wxMemoryBuffer& data) {
|
||||||
SendMsg(2002, data.GetDataLen(), (long)data.GetData());
|
SendMsg(2002, data.GetDataLen(), (long)data.GetData());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert string at a position
|
// Insert string at a position.
|
||||||
void wxStyledTextCtrl::InsertText(int pos, const wxString& text) {
|
void wxStyledTextCtrl::InsertText(int pos, const wxString& text) {
|
||||||
SendMsg(2003, pos, (long)(const char*)wx2stc(text));
|
SendMsg(2003, pos, (long)(const char*)wx2stc(text));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete all text in the document
|
// Delete all text in the document.
|
||||||
void wxStyledTextCtrl::ClearAll() {
|
void wxStyledTextCtrl::ClearAll() {
|
||||||
SendMsg(2004, 0, 0);
|
SendMsg(2004, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set all style bytes to 0, remove all folding information
|
// Set all style bytes to 0, remove all folding information.
|
||||||
void wxStyledTextCtrl::ClearDocumentStyle() {
|
void wxStyledTextCtrl::ClearDocumentStyle() {
|
||||||
SendMsg(2005, 0, 0);
|
SendMsg(2005, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The number of characters in the document
|
// The number of characters in the document.
|
||||||
int wxStyledTextCtrl::GetLength() {
|
int wxStyledTextCtrl::GetLength() {
|
||||||
return SendMsg(2006, 0, 0);
|
return SendMsg(2006, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the character byte at the position
|
// Returns the character byte at the position.
|
||||||
int wxStyledTextCtrl::GetCharAt(int pos) {
|
int wxStyledTextCtrl::GetCharAt(int pos) {
|
||||||
return (unsigned char)SendMsg(2007, pos, 0);
|
return (unsigned char)SendMsg(2007, pos, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the position of the caret
|
// Returns the position of the caret.
|
||||||
int wxStyledTextCtrl::GetCurrentPos() {
|
int wxStyledTextCtrl::GetCurrentPos() {
|
||||||
return SendMsg(2008, 0, 0);
|
return SendMsg(2008, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the position of the opposite end of the selection to the caret
|
// Returns the position of the opposite end of the selection to the caret.
|
||||||
int wxStyledTextCtrl::GetAnchor() {
|
int wxStyledTextCtrl::GetAnchor() {
|
||||||
return SendMsg(2009, 0, 0);
|
return SendMsg(2009, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the style byte at the position
|
// Returns the style byte at the position.
|
||||||
int wxStyledTextCtrl::GetStyleAt(int pos) {
|
int wxStyledTextCtrl::GetStyleAt(int pos) {
|
||||||
return (unsigned char)SendMsg(2010, pos, 0);
|
return (unsigned char)SendMsg(2010, pos, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Redoes the next action on the undo history
|
// Redoes the next action on the undo history.
|
||||||
void wxStyledTextCtrl::Redo() {
|
void wxStyledTextCtrl::Redo() {
|
||||||
SendMsg(2011, 0, 0);
|
SendMsg(2011, 0, 0);
|
||||||
}
|
}
|
||||||
@@ -260,12 +261,12 @@ wxMemoryBuffer wxStyledTextCtrl::GetStyledText(int startPos, int endPos) {
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Are there any redoable actions in the undo history.
|
// Are there any redoable actions in the undo history?
|
||||||
bool wxStyledTextCtrl::CanRedo() {
|
bool wxStyledTextCtrl::CanRedo() {
|
||||||
return SendMsg(2016, 0, 0) != 0;
|
return SendMsg(2016, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve the line number at which a particular marker is located
|
// Retrieve the line number at which a particular marker is located.
|
||||||
int wxStyledTextCtrl::MarkerLineFromHandle(int handle) {
|
int wxStyledTextCtrl::MarkerLineFromHandle(int handle) {
|
||||||
return SendMsg(2017, handle, 0);
|
return SendMsg(2017, handle, 0);
|
||||||
}
|
}
|
||||||
@@ -358,8 +359,7 @@ void wxStyledTextCtrl::SetEOLMode(int eolMode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set the current styling position to pos and the styling mask to mask.
|
// Set the current styling position to pos and the styling mask to mask.
|
||||||
// The styling mask can be used to protect some bits in each styling byte from
|
// The styling mask can be used to protect some bits in each styling byte from modification.
|
||||||
// modification.
|
|
||||||
void wxStyledTextCtrl::StartStyling(int pos, int mask) {
|
void wxStyledTextCtrl::StartStyling(int pos, int mask) {
|
||||||
SendMsg(2032, pos, mask);
|
SendMsg(2032, pos, mask);
|
||||||
}
|
}
|
||||||
@@ -370,7 +370,7 @@ void wxStyledTextCtrl::SetStyling(int length, int style) {
|
|||||||
SendMsg(2033, length, style);
|
SendMsg(2033, length, style);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Is drawing done first into a buffer or direct to the screen.
|
// Is drawing done first into a buffer or direct to the screen?
|
||||||
bool wxStyledTextCtrl::GetBufferedDraw() {
|
bool wxStyledTextCtrl::GetBufferedDraw() {
|
||||||
return SendMsg(2034, 0, 0) != 0;
|
return SendMsg(2034, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
@@ -381,8 +381,7 @@ void wxStyledTextCtrl::SetBufferedDraw(bool buffered) {
|
|||||||
SendMsg(2035, buffered, 0);
|
SendMsg(2035, buffered, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change the visible size of a tab to be a multiple of the width of a space
|
// Change the visible size of a tab to be a multiple of the width of a space character.
|
||||||
// character.
|
|
||||||
void wxStyledTextCtrl::SetTabWidth(int tabWidth) {
|
void wxStyledTextCtrl::SetTabWidth(int tabWidth) {
|
||||||
SendMsg(2036, tabWidth, 0);
|
SendMsg(2036, tabWidth, 0);
|
||||||
}
|
}
|
||||||
@@ -432,12 +431,12 @@ int wxStyledTextCtrl::MarkerAdd(int line, int markerNumber) {
|
|||||||
return SendMsg(2043, line, markerNumber);
|
return SendMsg(2043, line, markerNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete a marker from a line
|
// Delete a marker from a line.
|
||||||
void wxStyledTextCtrl::MarkerDelete(int line, int markerNumber) {
|
void wxStyledTextCtrl::MarkerDelete(int line, int markerNumber) {
|
||||||
SendMsg(2044, line, markerNumber);
|
SendMsg(2044, line, markerNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete all markers with a particular number from all lines
|
// Delete all markers with a particular number from all lines.
|
||||||
void wxStyledTextCtrl::MarkerDeleteAll(int markerNumber) {
|
void wxStyledTextCtrl::MarkerDeleteAll(int markerNumber) {
|
||||||
SendMsg(2045, markerNumber, 0);
|
SendMsg(2045, markerNumber, 0);
|
||||||
}
|
}
|
||||||
@@ -607,8 +606,7 @@ void wxStyledTextCtrl::SetCaretPeriod(int periodMilliseconds) {
|
|||||||
SendMsg(2076, periodMilliseconds, 0);
|
SendMsg(2076, periodMilliseconds, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the set of characters making up words for when moving or selecting
|
// Set the set of characters making up words for when moving or selecting by word.
|
||||||
// by word.
|
|
||||||
void wxStyledTextCtrl::SetWordChars(const wxString& characters) {
|
void wxStyledTextCtrl::SetWordChars(const wxString& characters) {
|
||||||
SendMsg(2077, 0, (long)(const char*)wx2stc(characters));
|
SendMsg(2077, 0, (long)(const char*)wx2stc(characters));
|
||||||
}
|
}
|
||||||
@@ -645,8 +643,8 @@ wxColour wxStyledTextCtrl::IndicatorGetForeground(int indic) {
|
|||||||
return wxColourFromLong(c);
|
return wxColourFromLong(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Divide each styling byte into lexical class bits (default:5) and indicator
|
// Divide each styling byte into lexical class bits (default: 5) and indicator
|
||||||
// bits (default:3). If a lexer requires more than 32 lexical states, then this
|
// bits (default: 3). If a lexer requires more than 32 lexical states, then this
|
||||||
// is used to expand the possible states.
|
// is used to expand the possible states.
|
||||||
void wxStyledTextCtrl::SetStyleBits(int bits) {
|
void wxStyledTextCtrl::SetStyleBits(int bits) {
|
||||||
SendMsg(2090, bits, 0);
|
SendMsg(2090, bits, 0);
|
||||||
@@ -677,7 +675,7 @@ bool wxStyledTextCtrl::GetCaretLineVisible() {
|
|||||||
return SendMsg(2095, 0, 0) != 0;
|
return SendMsg(2095, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dsplay the background of the line containing the caret in a different colour.
|
// Display the background of the line containing the caret in a different colour.
|
||||||
void wxStyledTextCtrl::SetCaretLineVisible(bool show) {
|
void wxStyledTextCtrl::SetCaretLineVisible(bool show) {
|
||||||
SendMsg(2096, show, 0);
|
SendMsg(2096, show, 0);
|
||||||
}
|
}
|
||||||
@@ -716,8 +714,7 @@ bool wxStyledTextCtrl::AutoCompActive() {
|
|||||||
return SendMsg(2102, 0, 0) != 0;
|
return SendMsg(2102, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve the position of the caret when the auto-completion list was
|
// Retrieve the position of the caret when the auto-completion list was displayed.
|
||||||
// displayed.
|
|
||||||
int wxStyledTextCtrl::AutoCompPosStart() {
|
int wxStyledTextCtrl::AutoCompPosStart() {
|
||||||
return SendMsg(2103, 0, 0);
|
return SendMsg(2103, 0, 0);
|
||||||
}
|
}
|
||||||
@@ -732,8 +729,8 @@ void wxStyledTextCtrl::AutoCompStops(const wxString& characterSet) {
|
|||||||
SendMsg(2105, 0, (long)(const char*)wx2stc(characterSet));
|
SendMsg(2105, 0, (long)(const char*)wx2stc(characterSet));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change the separator character in the string setting up an auto-completion
|
// Change the separator character in the string setting up an auto-completion list.
|
||||||
// list. Default is space but can be changed if items contain space.
|
// Default is space but can be changed if items contain space.
|
||||||
void wxStyledTextCtrl::AutoCompSetSeparator(int separatorCharacter) {
|
void wxStyledTextCtrl::AutoCompSetSeparator(int separatorCharacter) {
|
||||||
SendMsg(2106, separatorCharacter, 0);
|
SendMsg(2106, separatorCharacter, 0);
|
||||||
}
|
}
|
||||||
@@ -790,22 +787,24 @@ void wxStyledTextCtrl::UserListShow(int listType, const wxString& itemList) {
|
|||||||
SendMsg(2117, listType, (long)(const char*)wx2stc(itemList));
|
SendMsg(2117, listType, (long)(const char*)wx2stc(itemList));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set whether or not autocompletion is hidden automatically when nothing matches
|
// Set whether or not autocompletion is hidden automatically when nothing matches.
|
||||||
void wxStyledTextCtrl::AutoCompSetAutoHide(bool autoHide) {
|
void wxStyledTextCtrl::AutoCompSetAutoHide(bool autoHide) {
|
||||||
SendMsg(2118, autoHide, 0);
|
SendMsg(2118, autoHide, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve whether or not autocompletion is hidden automatically when nothing matches
|
// Retrieve whether or not autocompletion is hidden automatically when nothing matches.
|
||||||
bool wxStyledTextCtrl::AutoCompGetAutoHide() {
|
bool wxStyledTextCtrl::AutoCompGetAutoHide() {
|
||||||
return SendMsg(2119, 0, 0) != 0;
|
return SendMsg(2119, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set whether or not autocompletion deletes any word characters after the inserted text upon completion
|
// Set whether or not autocompletion deletes any word characters
|
||||||
|
// after the inserted text upon completion.
|
||||||
void wxStyledTextCtrl::AutoCompSetDropRestOfWord(bool dropRestOfWord) {
|
void wxStyledTextCtrl::AutoCompSetDropRestOfWord(bool dropRestOfWord) {
|
||||||
SendMsg(2270, dropRestOfWord, 0);
|
SendMsg(2270, dropRestOfWord, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve whether or not autocompletion deletes any word characters after the inserted text upon completion
|
// Retrieve whether or not autocompletion deletes any word characters
|
||||||
|
// after the inserted text upon completion.
|
||||||
bool wxStyledTextCtrl::AutoCompGetDropRestOfWord() {
|
bool wxStyledTextCtrl::AutoCompGetDropRestOfWord() {
|
||||||
return SendMsg(2271, 0, 0) != 0;
|
return SendMsg(2271, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
@@ -961,7 +960,7 @@ int wxStyledTextCtrl::FindText(int minPos, int maxPos,
|
|||||||
return SendMsg(2150, flags, (long)&ft);
|
return SendMsg(2150, flags, (long)&ft);
|
||||||
}
|
}
|
||||||
|
|
||||||
// On Windows will draw the document into a display context such as a printer.
|
// On Windows, will draw the document into a display context such as a printer.
|
||||||
int wxStyledTextCtrl::FormatRange(bool doDraw,
|
int wxStyledTextCtrl::FormatRange(bool doDraw,
|
||||||
int startPos,
|
int startPos,
|
||||||
int endPos,
|
int endPos,
|
||||||
@@ -1123,7 +1122,7 @@ bool wxStyledTextCtrl::CanPaste() {
|
|||||||
return SendMsg(2173, 0, 0) != 0;
|
return SendMsg(2173, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Are there any undoable actions in the undo history.
|
// Are there any undoable actions in the undo history?
|
||||||
bool wxStyledTextCtrl::CanUndo() {
|
bool wxStyledTextCtrl::CanUndo() {
|
||||||
return SendMsg(2174, 0, 0) != 0;
|
return SendMsg(2174, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
@@ -1179,7 +1178,7 @@ int wxStyledTextCtrl::GetTextLength() {
|
|||||||
return SendMsg(2183, 0, 0);
|
return SendMsg(2183, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set to overtype (true) or insert mode
|
// Set to overtype (true) or insert mode.
|
||||||
void wxStyledTextCtrl::SetOvertype(bool overtype) {
|
void wxStyledTextCtrl::SetOvertype(bool overtype) {
|
||||||
SendMsg(2186, overtype, 0);
|
SendMsg(2186, overtype, 0);
|
||||||
}
|
}
|
||||||
@@ -1189,12 +1188,12 @@ bool wxStyledTextCtrl::GetOvertype() {
|
|||||||
return SendMsg(2187, 0, 0) != 0;
|
return SendMsg(2187, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the width of the insert mode caret
|
// Set the width of the insert mode caret.
|
||||||
void wxStyledTextCtrl::SetCaretWidth(int pixelWidth) {
|
void wxStyledTextCtrl::SetCaretWidth(int pixelWidth) {
|
||||||
SendMsg(2188, pixelWidth, 0);
|
SendMsg(2188, pixelWidth, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the width of the insert mode caret
|
// Returns the width of the insert mode caret.
|
||||||
int wxStyledTextCtrl::GetCaretWidth() {
|
int wxStyledTextCtrl::GetCaretWidth() {
|
||||||
return SendMsg(2189, 0, 0);
|
return SendMsg(2189, 0, 0);
|
||||||
}
|
}
|
||||||
@@ -1251,12 +1250,12 @@ int wxStyledTextCtrl::GetTargetEnd() {
|
|||||||
return SendMsg(2197, strlen(buf), (long)(const char*)buf);
|
return SendMsg(2197, strlen(buf), (long)(const char*)buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the search flags used by SearchInTarget
|
// Set the search flags used by SearchInTarget.
|
||||||
void wxStyledTextCtrl::SetSearchFlags(int flags) {
|
void wxStyledTextCtrl::SetSearchFlags(int flags) {
|
||||||
SendMsg(2198, flags, 0);
|
SendMsg(2198, flags, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the search flags used by SearchInTarget
|
// Get the search flags used by SearchInTarget.
|
||||||
int wxStyledTextCtrl::GetSearchFlags() {
|
int wxStyledTextCtrl::GetSearchFlags() {
|
||||||
return SendMsg(2199, 0, 0);
|
return SendMsg(2199, 0, 0);
|
||||||
}
|
}
|
||||||
@@ -1358,7 +1357,7 @@ void wxStyledTextCtrl::EnsureVisible(int line) {
|
|||||||
SendMsg(2232, line, 0);
|
SendMsg(2232, line, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set some debugging options for folding
|
// Set some debugging options for folding.
|
||||||
void wxStyledTextCtrl::SetFoldFlags(int flags) {
|
void wxStyledTextCtrl::SetFoldFlags(int flags) {
|
||||||
SendMsg(2233, flags, 0);
|
SendMsg(2233, flags, 0);
|
||||||
}
|
}
|
||||||
@@ -1369,7 +1368,7 @@ void wxStyledTextCtrl::EnsureVisibleEnforcePolicy(int line) {
|
|||||||
SendMsg(2234, line, 0);
|
SendMsg(2234, line, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets whether a tab pressed when caret is within indentation indents
|
// Sets whether a tab pressed when caret is within indentation indents.
|
||||||
void wxStyledTextCtrl::SetTabIndents(bool tabIndents) {
|
void wxStyledTextCtrl::SetTabIndents(bool tabIndents) {
|
||||||
SendMsg(2260, tabIndents, 0);
|
SendMsg(2260, tabIndents, 0);
|
||||||
}
|
}
|
||||||
@@ -1379,7 +1378,7 @@ bool wxStyledTextCtrl::GetTabIndents() {
|
|||||||
return SendMsg(2261, 0, 0) != 0;
|
return SendMsg(2261, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets whether a backspace pressed when caret is within indentation unindents
|
// Sets whether a backspace pressed when caret is within indentation unindents.
|
||||||
void wxStyledTextCtrl::SetBackSpaceUnIndents(bool bsUnIndents) {
|
void wxStyledTextCtrl::SetBackSpaceUnIndents(bool bsUnIndents) {
|
||||||
SendMsg(2262, bsUnIndents, 0);
|
SendMsg(2262, bsUnIndents, 0);
|
||||||
}
|
}
|
||||||
@@ -1389,52 +1388,87 @@ bool wxStyledTextCtrl::GetBackSpaceUnIndents() {
|
|||||||
return SendMsg(2263, 0, 0) != 0;
|
return SendMsg(2263, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the time the mouse must sit still to generate a mouse dwell event
|
// Sets the time the mouse must sit still to generate a mouse dwell event.
|
||||||
void wxStyledTextCtrl::SetMouseDwellTime(int periodMilliseconds) {
|
void wxStyledTextCtrl::SetMouseDwellTime(int periodMilliseconds) {
|
||||||
SendMsg(2264, periodMilliseconds, 0);
|
SendMsg(2264, periodMilliseconds, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve the time the mouse must sit still to generate a mouse dwell event
|
// Retrieve the time the mouse must sit still to generate a mouse dwell event.
|
||||||
int wxStyledTextCtrl::GetMouseDwellTime() {
|
int wxStyledTextCtrl::GetMouseDwellTime() {
|
||||||
return SendMsg(2265, 0, 0);
|
return SendMsg(2265, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get position of start of word
|
// Get position of start of word.
|
||||||
int wxStyledTextCtrl::WordStartPosition(int pos, bool onlyWordCharacters) {
|
int wxStyledTextCtrl::WordStartPosition(int pos, bool onlyWordCharacters) {
|
||||||
return SendMsg(2266, pos, onlyWordCharacters);
|
return SendMsg(2266, pos, onlyWordCharacters);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get position of end of word
|
// Get position of end of word.
|
||||||
int wxStyledTextCtrl::WordEndPosition(int pos, bool onlyWordCharacters) {
|
int wxStyledTextCtrl::WordEndPosition(int pos, bool onlyWordCharacters) {
|
||||||
return SendMsg(2267, pos, onlyWordCharacters);
|
return SendMsg(2267, pos, onlyWordCharacters);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets whether text is word wrapped
|
// Sets whether text is word wrapped.
|
||||||
void wxStyledTextCtrl::SetWrapMode(int mode) {
|
void wxStyledTextCtrl::SetWrapMode(int mode) {
|
||||||
SendMsg(2268, mode, 0);
|
SendMsg(2268, mode, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve whether text is word wrapped
|
// Retrieve whether text is word wrapped.
|
||||||
int wxStyledTextCtrl::GetWrapMode() {
|
int wxStyledTextCtrl::GetWrapMode() {
|
||||||
return SendMsg(2269, 0, 0);
|
return SendMsg(2269, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the degree of caching of layout information
|
// Sets the degree of caching of layout information.
|
||||||
void wxStyledTextCtrl::SetLayoutCache(int mode) {
|
void wxStyledTextCtrl::SetLayoutCache(int mode) {
|
||||||
SendMsg(2272, mode, 0);
|
SendMsg(2272, mode, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve the degree of caching of layout information
|
// Retrieve the degree of caching of layout information.
|
||||||
int wxStyledTextCtrl::GetLayoutCache() {
|
int wxStyledTextCtrl::GetLayoutCache() {
|
||||||
return SendMsg(2273, 0, 0);
|
return SendMsg(2273, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move the caret inside current view if it's not there already
|
// Sets the document width assumed for scrolling.
|
||||||
|
void wxStyledTextCtrl::SetScrollWidth(int pixelWidth) {
|
||||||
|
SendMsg(2274, pixelWidth, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve the document width assumed for scrolling.
|
||||||
|
int wxStyledTextCtrl::GetScrollWidth() {
|
||||||
|
return SendMsg(2275, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Measure the pixel width of some text in a particular style.
|
||||||
|
// Nul terminated text argument.
|
||||||
|
// Does not handle tab or control characters.
|
||||||
|
int wxStyledTextCtrl::TextWidth(int style, const wxString& text) {
|
||||||
|
return SendMsg(2276, style, (long)(const char*)wx2stc(text));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sets the scroll range so that maximum scroll position has
|
||||||
|
// the last line at the bottom of the view (default).
|
||||||
|
// Setting this to false allows scrolling one page below the last line.
|
||||||
|
void wxStyledTextCtrl::SetEndAtLastLine(bool endAtLastLine) {
|
||||||
|
SendMsg(2277, endAtLastLine, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve whether the maximum scroll position has the last
|
||||||
|
// line at the bottom of the view.
|
||||||
|
int wxStyledTextCtrl::GetEndAtLastLine() {
|
||||||
|
return SendMsg(2278, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve the height of a particular line of text in pixels.
|
||||||
|
int wxStyledTextCtrl::TextHeight(int line) {
|
||||||
|
return SendMsg(2279, line, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Move the caret inside current view if it's not there already.
|
||||||
void wxStyledTextCtrl::MoveCaretInsideView() {
|
void wxStyledTextCtrl::MoveCaretInsideView() {
|
||||||
SendMsg(2401, 0, 0);
|
SendMsg(2401, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// How many characters are on a line, not including end of line characters.
|
// How many characters are on a line, not including end of line characters?
|
||||||
int wxStyledTextCtrl::LineLength(int line) {
|
int wxStyledTextCtrl::LineLength(int line) {
|
||||||
return SendMsg(2350, line, 0);
|
return SendMsg(2350, line, 0);
|
||||||
}
|
}
|
||||||
@@ -1454,12 +1488,12 @@ int wxStyledTextCtrl::BraceMatch(int pos) {
|
|||||||
return SendMsg(2353, pos, 0);
|
return SendMsg(2353, pos, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Are the end of line characters visible.
|
// Are the end of line characters visible?
|
||||||
bool wxStyledTextCtrl::GetViewEOL() {
|
bool wxStyledTextCtrl::GetViewEOL() {
|
||||||
return SendMsg(2355, 0, 0) != 0;
|
return SendMsg(2355, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make the end of line characters visible or invisible
|
// Make the end of line characters visible or invisible.
|
||||||
void wxStyledTextCtrl::SetViewEOL(bool visible) {
|
void wxStyledTextCtrl::SetViewEOL(bool visible) {
|
||||||
SendMsg(2356, visible, 0);
|
SendMsg(2356, visible, 0);
|
||||||
}
|
}
|
||||||
@@ -1529,11 +1563,6 @@ int wxStyledTextCtrl::SearchPrev(int flags, const wxString& text) {
|
|||||||
return SendMsg(2368, flags, (long)(const char*)wx2stc(text));
|
return SendMsg(2368, flags, (long)(const char*)wx2stc(text));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the way the line the caret is on is kept visible.
|
|
||||||
void wxStyledTextCtrl::SetCaretPolicy(int caretPolicy, int caretSlop) {
|
|
||||||
SendMsg(2369, caretPolicy, caretSlop);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Retrieves the number of lines completely visible.
|
// Retrieves the number of lines completely visible.
|
||||||
int wxStyledTextCtrl::LinesOnScreen() {
|
int wxStyledTextCtrl::LinesOnScreen() {
|
||||||
return SendMsg(2370, 0, 0);
|
return SendMsg(2370, 0, 0);
|
||||||
@@ -1545,7 +1574,7 @@ void wxStyledTextCtrl::UsePopUp(bool allowPopUp) {
|
|||||||
SendMsg(2371, allowPopUp, 0);
|
SendMsg(2371, allowPopUp, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Is the selection a rectangular. The alternative is the more common stream selection.
|
// Is the selection rectangular? The alternative is the more common stream selection.
|
||||||
bool wxStyledTextCtrl::SelectionIsRectangle() {
|
bool wxStyledTextCtrl::SelectionIsRectangle() {
|
||||||
return SendMsg(2372, 0, 0) != 0;
|
return SendMsg(2372, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
@@ -1582,93 +1611,96 @@ int wxStyledTextCtrl::GetModEventMask() {
|
|||||||
return SendMsg(2378, 0, 0);
|
return SendMsg(2378, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change internal focus flag
|
// Change internal focus flag.
|
||||||
void wxStyledTextCtrl::SetSTCFocus(bool focus) {
|
void wxStyledTextCtrl::SetSTCFocus(bool focus) {
|
||||||
SendMsg(2380, focus, 0);
|
SendMsg(2380, focus, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get internal focus flag
|
// Get internal focus flag.
|
||||||
bool wxStyledTextCtrl::GetSTCFocus() {
|
bool wxStyledTextCtrl::GetSTCFocus() {
|
||||||
return SendMsg(2381, 0, 0) != 0;
|
return SendMsg(2381, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change error status - 0 = OK
|
// Change error status - 0 = OK.
|
||||||
void wxStyledTextCtrl::SetStatus(int statusCode) {
|
void wxStyledTextCtrl::SetStatus(int statusCode) {
|
||||||
SendMsg(2382, statusCode, 0);
|
SendMsg(2382, statusCode, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get error status
|
// Get error status.
|
||||||
int wxStyledTextCtrl::GetStatus() {
|
int wxStyledTextCtrl::GetStatus() {
|
||||||
return SendMsg(2383, 0, 0);
|
return SendMsg(2383, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set whether the mouse is captured when its button is pressed
|
// Set whether the mouse is captured when its button is pressed.
|
||||||
void wxStyledTextCtrl::SetMouseDownCaptures(bool captures) {
|
void wxStyledTextCtrl::SetMouseDownCaptures(bool captures) {
|
||||||
SendMsg(2384, captures, 0);
|
SendMsg(2384, captures, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get whether mouse gets captured
|
// Get whether mouse gets captured.
|
||||||
bool wxStyledTextCtrl::GetMouseDownCaptures() {
|
bool wxStyledTextCtrl::GetMouseDownCaptures() {
|
||||||
return SendMsg(2385, 0, 0) != 0;
|
return SendMsg(2385, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the cursor to one of the SC_CURSOR* values
|
// Sets the cursor to one of the SC_CURSOR* values.
|
||||||
void wxStyledTextCtrl::SetCursor(int cursorType) {
|
void wxStyledTextCtrl::SetCursor(int cursorType) {
|
||||||
SendMsg(2386, cursorType, 0);
|
SendMsg(2386, cursorType, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get cursor type
|
// Get cursor type.
|
||||||
int wxStyledTextCtrl::GetCursor() {
|
int wxStyledTextCtrl::GetCursor() {
|
||||||
return SendMsg(2387, 0, 0);
|
return SendMsg(2387, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change the way control characters are displayed:
|
// Change the way control characters are displayed:
|
||||||
// If symbol is < 32, keep the drawn way, else, use the given character
|
// If symbol is < 32, keep the drawn way, else, use the given character.
|
||||||
void wxStyledTextCtrl::SetControlCharSymbol(int symbol) {
|
void wxStyledTextCtrl::SetControlCharSymbol(int symbol) {
|
||||||
SendMsg(2388, symbol, 0);
|
SendMsg(2388, symbol, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the way control characters are displayed
|
// Get the way control characters are displayed.
|
||||||
int wxStyledTextCtrl::GetControlCharSymbol() {
|
int wxStyledTextCtrl::GetControlCharSymbol() {
|
||||||
return SendMsg(2389, 0, 0);
|
return SendMsg(2389, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move to the previous change in capitalistion
|
// Move to the previous change in capitalisation.
|
||||||
void wxStyledTextCtrl::WordPartLeft() {
|
void wxStyledTextCtrl::WordPartLeft() {
|
||||||
SendMsg(2390, 0, 0);
|
SendMsg(2390, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move to the previous change in capitalistion extending selection to new caret position.
|
// Move to the previous change in capitalisation extending selection
|
||||||
|
// to new caret position.
|
||||||
void wxStyledTextCtrl::WordPartLeftExtend() {
|
void wxStyledTextCtrl::WordPartLeftExtend() {
|
||||||
SendMsg(2391, 0, 0);
|
SendMsg(2391, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move to the change next in capitalistion
|
// Move to the change next in capitalisation.
|
||||||
void wxStyledTextCtrl::WordPartRight() {
|
void wxStyledTextCtrl::WordPartRight() {
|
||||||
SendMsg(2392, 0, 0);
|
SendMsg(2392, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move to the next change in capitalistion extending selection to new caret position.
|
// Move to the next change in capitalisation extending selection
|
||||||
|
// to new caret position.
|
||||||
void wxStyledTextCtrl::WordPartRightExtend() {
|
void wxStyledTextCtrl::WordPartRightExtend() {
|
||||||
SendMsg(2393, 0, 0);
|
SendMsg(2393, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the way the display area is determined when a particular line is to be moved to.
|
// Set the way the display area is determined when a particular line
|
||||||
|
// is to be moved to by Find, FindNext, GotoLine, etc.
|
||||||
void wxStyledTextCtrl::SetVisiblePolicy(int visiblePolicy, int visibleSlop) {
|
void wxStyledTextCtrl::SetVisiblePolicy(int visiblePolicy, int visibleSlop) {
|
||||||
SendMsg(2394, visiblePolicy, visibleSlop);
|
SendMsg(2394, visiblePolicy, visibleSlop);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete back from the current position to the start of the line
|
// Delete back from the current position to the start of the line.
|
||||||
void wxStyledTextCtrl::DelLineLeft() {
|
void wxStyledTextCtrl::DelLineLeft() {
|
||||||
SendMsg(2395, 0, 0);
|
SendMsg(2395, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete forwards from the current position to the end of the line
|
// Delete forwards from the current position to the end of the line.
|
||||||
void wxStyledTextCtrl::DelLineRight() {
|
void wxStyledTextCtrl::DelLineRight() {
|
||||||
SendMsg(2396, 0, 0);
|
SendMsg(2396, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get and Set the xOffset (ie, horizonal scroll position)
|
// Get and Set the xOffset (ie, horizonal scroll position).
|
||||||
void wxStyledTextCtrl::SetXOffset(int newOffset) {
|
void wxStyledTextCtrl::SetXOffset(int newOffset) {
|
||||||
SendMsg(2397, newOffset, 0);
|
SendMsg(2397, newOffset, 0);
|
||||||
}
|
}
|
||||||
@@ -1676,6 +1708,18 @@ int wxStyledTextCtrl::GetXOffset() {
|
|||||||
return SendMsg(2398, 0, 0);
|
return SendMsg(2398, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the way the caret is kept visible when going sideway.
|
||||||
|
// The exclusion zone is given in pixels.
|
||||||
|
void wxStyledTextCtrl::SetXCaretPolicy(int caretPolicy, int caretSlop) {
|
||||||
|
SendMsg(2402, caretPolicy, caretSlop);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the way the line the caret is on is kept visible.
|
||||||
|
// The exclusion zone is given in lines.
|
||||||
|
void wxStyledTextCtrl::SetYCaretPolicy(int caretPolicy, int caretSlop) {
|
||||||
|
SendMsg(2403, caretPolicy, caretSlop);
|
||||||
|
}
|
||||||
|
|
||||||
// Start notifying the container of all key presses and commands.
|
// Start notifying the container of all key presses and commands.
|
||||||
void wxStyledTextCtrl::StartRecord() {
|
void wxStyledTextCtrl::StartRecord() {
|
||||||
SendMsg(3001, 0, 0);
|
SendMsg(3001, 0, 0);
|
||||||
@@ -2104,6 +2148,10 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
|
|||||||
evt.SetY(scn.y);
|
evt.SetY(scn.y);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SCN_ZOOM:
|
||||||
|
evt.SetEventType(wxEVT_STC_ZOOM);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -81,6 +81,7 @@ DEFINE_EVENT_TYPE( wxEVT_STC_DWELLEND )
|
|||||||
DEFINE_EVENT_TYPE( wxEVT_STC_START_DRAG )
|
DEFINE_EVENT_TYPE( wxEVT_STC_START_DRAG )
|
||||||
DEFINE_EVENT_TYPE( wxEVT_STC_DRAG_OVER )
|
DEFINE_EVENT_TYPE( wxEVT_STC_DRAG_OVER )
|
||||||
DEFINE_EVENT_TYPE( wxEVT_STC_DO_DROP )
|
DEFINE_EVENT_TYPE( wxEVT_STC_DO_DROP )
|
||||||
|
DEFINE_EVENT_TYPE( wxEVT_STC_ZOOM )
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
|
BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
|
||||||
@@ -117,7 +118,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxStyledTextEvent, wxCommandEvent)
|
|||||||
|
|
||||||
#ifdef LINK_LEXERS
|
#ifdef LINK_LEXERS
|
||||||
// forces the linking of the lexer modules
|
// forces the linking of the lexer modules
|
||||||
int wxForceScintillaLexers();
|
int Scintilla_LinkLexers();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@@ -134,7 +135,7 @@ wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent,
|
|||||||
wxDefaultValidator, name)
|
wxDefaultValidator, name)
|
||||||
{
|
{
|
||||||
#ifdef LINK_LEXERS
|
#ifdef LINK_LEXERS
|
||||||
wxForceScintillaLexers();
|
Scintilla_LinkLexers();
|
||||||
#endif
|
#endif
|
||||||
m_swx = new ScintillaWX(this);
|
m_swx = new ScintillaWX(this);
|
||||||
m_stopWatch.Start();
|
m_stopWatch.Start();
|
||||||
@@ -557,6 +558,10 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
|
|||||||
evt.SetY(scn.y);
|
evt.SetY(scn.y);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SCN_ZOOM:
|
||||||
|
evt.SetEventType(wxEVT_STC_ZOOM);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -338,6 +338,7 @@ BEGIN_DECLARE_EVENT_TYPES()
|
|||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_START_DRAG, 1669)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_START_DRAG, 1669)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DRAG_OVER, 1670)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DRAG_OVER, 1670)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DO_DROP, 1671)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DO_DROP, 1671)
|
||||||
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_ZOOM, 1672)
|
||||||
END_DECLARE_EVENT_TYPES()
|
END_DECLARE_EVENT_TYPES()
|
||||||
#else
|
#else
|
||||||
enum {
|
enum {
|
||||||
@@ -363,6 +364,7 @@ END_DECLARE_EVENT_TYPES()
|
|||||||
wxEVT_STC_START_DRAG,
|
wxEVT_STC_START_DRAG,
|
||||||
wxEVT_STC_DRAG_OVER,
|
wxEVT_STC_DRAG_OVER,
|
||||||
wxEVT_STC_DO_DROP,
|
wxEVT_STC_DO_DROP,
|
||||||
|
wxEVT_STC_ZOOM,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -393,6 +395,7 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
|
|||||||
#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
|
#define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@@ -44,7 +44,7 @@
|
|||||||
#define wxSTC_OPTIONAL_START 3000
|
#define wxSTC_OPTIONAL_START 3000
|
||||||
#define wxSTC_LEXER_START 4000
|
#define wxSTC_LEXER_START 4000
|
||||||
|
|
||||||
// Redoes the next action on the undo history
|
// Redoes the next action on the undo history.
|
||||||
#define wxSTC_CMD_REDO 2011
|
#define wxSTC_CMD_REDO 2011
|
||||||
|
|
||||||
// Select all the text in the document.
|
// Select all the text in the document.
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
#define wxSTC_MARK_MINUS 7
|
#define wxSTC_MARK_MINUS 7
|
||||||
#define wxSTC_MARK_PLUS 8
|
#define wxSTC_MARK_PLUS 8
|
||||||
|
|
||||||
// Shapes used for outlining column
|
// Shapes used for outlining column.
|
||||||
#define wxSTC_MARK_VLINE 9
|
#define wxSTC_MARK_VLINE 9
|
||||||
#define wxSTC_MARK_LCORNER 10
|
#define wxSTC_MARK_LCORNER 10
|
||||||
#define wxSTC_MARK_TCORNER 11
|
#define wxSTC_MARK_TCORNER 11
|
||||||
@@ -85,11 +85,11 @@
|
|||||||
#define wxSTC_MARK_CIRCLEMINUS 20
|
#define wxSTC_MARK_CIRCLEMINUS 20
|
||||||
#define wxSTC_MARK_CIRCLEMINUSCONNECTED 21
|
#define wxSTC_MARK_CIRCLEMINUSCONNECTED 21
|
||||||
|
|
||||||
// Invisible mark that only sets the line background color
|
// Invisible mark that only sets the line background color.
|
||||||
#define wxSTC_MARK_BACKGROUND 22
|
#define wxSTC_MARK_BACKGROUND 22
|
||||||
#define wxSTC_MARK_CHARACTER 10000
|
#define wxSTC_MARK_CHARACTER 10000
|
||||||
|
|
||||||
// Markers used for outlining column
|
// Markers used for outlining column.
|
||||||
#define wxSTC_MARKNUM_FOLDEREND 25
|
#define wxSTC_MARKNUM_FOLDEREND 25
|
||||||
#define wxSTC_MARKNUM_FOLDEROPENMID 26
|
#define wxSTC_MARKNUM_FOLDEROPENMID 26
|
||||||
#define wxSTC_MARKNUM_FOLDERMIDTAIL 27
|
#define wxSTC_MARKNUM_FOLDERMIDTAIL 27
|
||||||
@@ -270,8 +270,7 @@
|
|||||||
// Delete the selection or if no selection, the character before the caret.
|
// Delete the selection or if no selection, the character before the caret.
|
||||||
#define wxSTC_CMD_DELETEBACK 2326
|
#define wxSTC_CMD_DELETEBACK 2326
|
||||||
|
|
||||||
// If selection is empty or all on one line replace the selection with a tab
|
// If selection is empty or all on one line replace the selection with a tab character.
|
||||||
// character.
|
|
||||||
// If more than one line selected, indent the lines.
|
// If more than one line selected, indent the lines.
|
||||||
#define wxSTC_CMD_TAB 2327
|
#define wxSTC_CMD_TAB 2327
|
||||||
|
|
||||||
@@ -325,40 +324,46 @@
|
|||||||
#define wxSTC_CMD_LINESCROLLUP 2343
|
#define wxSTC_CMD_LINESCROLLUP 2343
|
||||||
|
|
||||||
// Delete the selection or if no selection, the character before the caret.
|
// Delete the selection or if no selection, the character before the caret.
|
||||||
// Will not delete the chraacter before at the start of a line.
|
// Will not delete the character before at the start of a line.
|
||||||
#define wxSTC_CMD_DELETEBACKNOTLINE 2344
|
#define wxSTC_CMD_DELETEBACKNOTLINE 2344
|
||||||
#define wxSTC_EDGE_NONE 0
|
#define wxSTC_EDGE_NONE 0
|
||||||
#define wxSTC_EDGE_LINE 1
|
#define wxSTC_EDGE_LINE 1
|
||||||
#define wxSTC_EDGE_BACKGROUND 2
|
#define wxSTC_EDGE_BACKGROUND 2
|
||||||
|
|
||||||
// Show caret within N lines of edge when it's scrolled to view
|
|
||||||
// If CARET_SLOP not set then centre caret on screen when it's
|
|
||||||
// scrolled to view
|
|
||||||
#define wxSTC_CARET_SLOP 0x01
|
|
||||||
|
|
||||||
// Value not used
|
|
||||||
#define wxSTC_CARET_CENTER 0x02
|
|
||||||
|
|
||||||
// If CARET_SLOP also set then reposition whenever outside slop border
|
|
||||||
// If CARET_SLOP not set then recentre even when visible
|
|
||||||
#define wxSTC_CARET_STRICT 0x04
|
|
||||||
|
|
||||||
// If CARET_XEVEN set then both left and right margins are given equal weight
|
|
||||||
// rather than favouring left following behaviour.
|
|
||||||
#define wxSTC_CARET_XEVEN 0x08
|
|
||||||
|
|
||||||
// If CARET_XJUMPS set then when caret reaches the margin the display jumps
|
|
||||||
// enough to leave the caret solidly within the display.
|
|
||||||
#define wxSTC_CARET_XJUMPS 0x10
|
|
||||||
#define wxSTC_CURSORNORMAL -1
|
#define wxSTC_CURSORNORMAL -1
|
||||||
#define wxSTC_CURSORWAIT 3
|
#define wxSTC_CURSORWAIT 3
|
||||||
|
|
||||||
// Constants for use with SetVisiblePolicy, similar to SetCaretPolicy
|
// Constants for use with SetVisiblePolicy, similar to SetCaretPolicy.
|
||||||
#define wxSTC_VISIBLE_SLOP 0x01
|
#define wxSTC_VISIBLE_SLOP 0x01
|
||||||
#define wxSTC_VISIBLE_STRICT 0x04
|
#define wxSTC_VISIBLE_STRICT 0x04
|
||||||
|
|
||||||
|
// Caret policy, used by SetXCaretPolicy and SetYCaretPolicy.
|
||||||
|
// If CARET_SLOP is set, we can define a slop value: caretSlop.
|
||||||
|
// This value defines an unwanted zone (UZ) where the caret is... unwanted.
|
||||||
|
// This zone is defined as a number of pixels near the vertical margins,
|
||||||
|
// and as a number of lines near the horizontal margins.
|
||||||
|
// By keeping the caret away from the edges, it is seen within its context,
|
||||||
|
// so it is likely that the identifier that the caret is on can be completely seen,
|
||||||
|
// and that the current line is seen with some of the lines following it which are
|
||||||
|
// often dependent on that line.
|
||||||
|
#define wxSTC_CARET_SLOP 0x01
|
||||||
|
|
||||||
|
// If CARET_STRICT is set, the policy is enforced... strictly.
|
||||||
|
// The caret is centred on the display if slop is not set,
|
||||||
|
// and cannot go in the UZ if slop is set.
|
||||||
|
#define wxSTC_CARET_STRICT 0x04
|
||||||
|
|
||||||
|
// If CARET_JUMPS is set, the display is moved more energetically
|
||||||
|
// so the caret can move in the same direction longer before the policy is applied again.
|
||||||
|
#define wxSTC_CARET_JUMPS 0x10
|
||||||
|
|
||||||
|
// If CARET_EVEN is not set, instead of having symmetrical UZs,
|
||||||
|
// the left and bottom UZs are extended up to right and top UZs respectively.
|
||||||
|
// This way, we favour the displaying of useful information: the begining of lines,
|
||||||
|
// where most code reside, and the lines after the caret, eg. the body of a function.
|
||||||
|
#define wxSTC_CARET_EVEN 0x08
|
||||||
|
|
||||||
// Notifications
|
// Notifications
|
||||||
// Type of modification and the action which caused the modification
|
// Type of modification and the action which caused the modification.
|
||||||
// These are defined as a bit mask to make it easy to specify which notifications are wanted.
|
// These are defined as a bit mask to make it easy to specify which notifications are wanted.
|
||||||
// One bit is set from each of SC_MOD_* and SC_PERFORMED_*.
|
// One bit is set from each of SC_MOD_* and SC_PERFORMED_*.
|
||||||
#define wxSTC_MOD_INSERTTEXT 0x1
|
#define wxSTC_MOD_INSERTTEXT 0x1
|
||||||
@@ -374,9 +379,9 @@
|
|||||||
#define wxSTC_MOD_BEFOREDELETE 0x800
|
#define wxSTC_MOD_BEFOREDELETE 0x800
|
||||||
#define wxSTC_MODEVENTMASKALL 0xF77
|
#define wxSTC_MODEVENTMASKALL 0xF77
|
||||||
|
|
||||||
// Symbolic key codes and modifier flags
|
// Symbolic key codes and modifier flags.
|
||||||
// ASCII and other printable characters below 256
|
// ASCII and other printable characters below 256.
|
||||||
// Extended keys above 300
|
// Extended keys above 300.
|
||||||
#define wxSTC_KEY_DOWN 300
|
#define wxSTC_KEY_DOWN 300
|
||||||
#define wxSTC_KEY_UP 301
|
#define wxSTC_KEY_UP 301
|
||||||
#define wxSTC_KEY_LEFT 302
|
#define wxSTC_KEY_LEFT 302
|
||||||
@@ -432,6 +437,7 @@
|
|||||||
#define wxSTC_LEX_PHP 30
|
#define wxSTC_LEX_PHP 30
|
||||||
#define wxSTC_LEX_BAAN 31
|
#define wxSTC_LEX_BAAN 31
|
||||||
#define wxSTC_LEX_MATLAB 32
|
#define wxSTC_LEX_MATLAB 32
|
||||||
|
#define wxSTC_LEX_SCRIPTOL 33
|
||||||
|
|
||||||
// When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
|
// When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
|
||||||
// value assigned in sequence from SCLEX_AUTOMATIC+1.
|
// value assigned in sequence from SCLEX_AUTOMATIC+1.
|
||||||
@@ -474,17 +480,6 @@
|
|||||||
#define wxSTC_C_COMMENTDOCKEYWORD 17
|
#define wxSTC_C_COMMENTDOCKEYWORD 17
|
||||||
#define wxSTC_C_COMMENTDOCKEYWORDERROR 18
|
#define wxSTC_C_COMMENTDOCKEYWORDERROR 18
|
||||||
|
|
||||||
// Lexical states for SCLEX_VB, SCLEX_VBSCRIPT
|
|
||||||
#define wxSTC_B_DEFAULT 0
|
|
||||||
#define wxSTC_B_COMMENT 1
|
|
||||||
#define wxSTC_B_NUMBER 2
|
|
||||||
#define wxSTC_B_KEYWORD 3
|
|
||||||
#define wxSTC_B_STRING 4
|
|
||||||
#define wxSTC_B_PREPROCESSOR 5
|
|
||||||
#define wxSTC_B_OPERATOR 6
|
|
||||||
#define wxSTC_B_IDENTIFIER 7
|
|
||||||
#define wxSTC_B_DATE 8
|
|
||||||
|
|
||||||
// Lexical states for SCLEX_HTML, SCLEX_XML
|
// Lexical states for SCLEX_HTML, SCLEX_XML
|
||||||
#define wxSTC_H_DEFAULT 0
|
#define wxSTC_H_DEFAULT 0
|
||||||
#define wxSTC_H_TAG 1
|
#define wxSTC_H_TAG 1
|
||||||
@@ -651,6 +646,24 @@
|
|||||||
#define wxSTC_PL_STRING_QR 29
|
#define wxSTC_PL_STRING_QR 29
|
||||||
#define wxSTC_PL_STRING_QW 30
|
#define wxSTC_PL_STRING_QW 30
|
||||||
|
|
||||||
|
// Lexical states for SCLEX_VB, SCLEX_VBSCRIPT
|
||||||
|
#define wxSTC_B_DEFAULT 0
|
||||||
|
#define wxSTC_B_COMMENT 1
|
||||||
|
#define wxSTC_B_NUMBER 2
|
||||||
|
#define wxSTC_B_KEYWORD 3
|
||||||
|
#define wxSTC_B_STRING 4
|
||||||
|
#define wxSTC_B_PREPROCESSOR 5
|
||||||
|
#define wxSTC_B_OPERATOR 6
|
||||||
|
#define wxSTC_B_IDENTIFIER 7
|
||||||
|
#define wxSTC_B_DATE 8
|
||||||
|
|
||||||
|
// Lexical states for SCLEX_PROPERTIES
|
||||||
|
#define wxSTC_PROPS_DEFAULT 0
|
||||||
|
#define wxSTC_PROPS_COMMENT 1
|
||||||
|
#define wxSTC_PROPS_SECTION 2
|
||||||
|
#define wxSTC_PROPS_ASSIGNMENT 3
|
||||||
|
#define wxSTC_PROPS_DEFVAL 4
|
||||||
|
|
||||||
// Lexical states for SCLEX_LATEX
|
// Lexical states for SCLEX_LATEX
|
||||||
#define wxSTC_L_DEFAULT 0
|
#define wxSTC_L_DEFAULT 0
|
||||||
#define wxSTC_L_COMMAND 1
|
#define wxSTC_L_COMMAND 1
|
||||||
@@ -688,6 +701,7 @@
|
|||||||
#define wxSTC_ERR_PERL 6
|
#define wxSTC_ERR_PERL 6
|
||||||
#define wxSTC_ERR_NET 7
|
#define wxSTC_ERR_NET 7
|
||||||
#define wxSTC_ERR_LUA 8
|
#define wxSTC_ERR_LUA 8
|
||||||
|
#define wxSTC_ERR_CTAG 9
|
||||||
#define wxSTC_ERR_DIFF_CHANGED 10
|
#define wxSTC_ERR_DIFF_CHANGED 10
|
||||||
#define wxSTC_ERR_DIFF_ADDITION 11
|
#define wxSTC_ERR_DIFF_ADDITION 11
|
||||||
#define wxSTC_ERR_DIFF_DELETION 12
|
#define wxSTC_ERR_DIFF_DELETION 12
|
||||||
@@ -712,7 +726,16 @@
|
|||||||
#define wxSTC_MAKE_TARGET 5
|
#define wxSTC_MAKE_TARGET 5
|
||||||
#define wxSTC_MAKE_IDEOL 9
|
#define wxSTC_MAKE_IDEOL 9
|
||||||
|
|
||||||
// Lexical states for the SCLEX_CONF (Apache Configuration Files Lexer)
|
// Lexical states for SCLEX_DIFF
|
||||||
|
#define wxSTC_DIFF_DEFAULT 0
|
||||||
|
#define wxSTC_DIFF_COMMENT 1
|
||||||
|
#define wxSTC_DIFF_COMMAND 2
|
||||||
|
#define wxSTC_DIFF_HEADER 3
|
||||||
|
#define wxSTC_DIFF_POSITION 4
|
||||||
|
#define wxSTC_DIFF_DELETED 5
|
||||||
|
#define wxSTC_DIFF_ADDED 6
|
||||||
|
|
||||||
|
// Lexical states for SCLEX_CONF (Apache Configuration Files Lexer)
|
||||||
#define wxSTC_CONF_DEFAULT 0
|
#define wxSTC_CONF_DEFAULT 0
|
||||||
#define wxSTC_CONF_COMMENT 1
|
#define wxSTC_CONF_COMMENT 1
|
||||||
#define wxSTC_CONF_NUMBER 2
|
#define wxSTC_CONF_NUMBER 2
|
||||||
@@ -724,7 +747,7 @@
|
|||||||
#define wxSTC_CONF_IP 8
|
#define wxSTC_CONF_IP 8
|
||||||
#define wxSTC_CONF_DIRECTIVE 9
|
#define wxSTC_CONF_DIRECTIVE 9
|
||||||
|
|
||||||
// Avenue
|
// Lexical states for SCLEX_AVE, Avenue
|
||||||
#define wxSTC_AVE_DEFAULT 0
|
#define wxSTC_AVE_DEFAULT 0
|
||||||
#define wxSTC_AVE_COMMENT 1
|
#define wxSTC_AVE_COMMENT 1
|
||||||
#define wxSTC_AVE_NUMBER 2
|
#define wxSTC_AVE_NUMBER 2
|
||||||
@@ -782,7 +805,7 @@
|
|||||||
#define wxSTC_EIFFEL_IDENTIFIER 7
|
#define wxSTC_EIFFEL_IDENTIFIER 7
|
||||||
#define wxSTC_EIFFEL_STRINGEOL 8
|
#define wxSTC_EIFFEL_STRINGEOL 8
|
||||||
|
|
||||||
// Lexical states for the SCLEX_NNCRONTAB (nnCron crontab Lexer)
|
// Lexical states for SCLEX_NNCRONTAB (nnCron crontab Lexer)
|
||||||
#define wxSTC_NNCRONTAB_DEFAULT 0
|
#define wxSTC_NNCRONTAB_DEFAULT 0
|
||||||
#define wxSTC_NNCRONTAB_COMMENT 1
|
#define wxSTC_NNCRONTAB_COMMENT 1
|
||||||
#define wxSTC_NNCRONTAB_TASK 2
|
#define wxSTC_NNCRONTAB_TASK 2
|
||||||
@@ -805,6 +828,28 @@
|
|||||||
#define wxSTC_MATLAB_OPERATOR 6
|
#define wxSTC_MATLAB_OPERATOR 6
|
||||||
#define wxSTC_MATLAB_IDENTIFIER 7
|
#define wxSTC_MATLAB_IDENTIFIER 7
|
||||||
|
|
||||||
|
// Lexical states for SCLEX_SCRIPTOL
|
||||||
|
#define wxSTC_SCRIPTOL_DEFAULT 0
|
||||||
|
#define wxSTC_SCRIPTOL_COMMENT 1
|
||||||
|
#define wxSTC_SCRIPTOL_COMMENTLINE 2
|
||||||
|
#define wxSTC_SCRIPTOL_COMMENTDOC 3
|
||||||
|
#define wxSTC_SCRIPTOL_NUMBER 4
|
||||||
|
#define wxSTC_SCRIPTOL_WORD 5
|
||||||
|
#define wxSTC_SCRIPTOL_STRING 6
|
||||||
|
#define wxSTC_SCRIPTOL_CHARACTER 7
|
||||||
|
#define wxSTC_SCRIPTOL_UUID 8
|
||||||
|
#define wxSTC_SCRIPTOL_PREPROCESSOR 9
|
||||||
|
#define wxSTC_SCRIPTOL_OPERATOR 10
|
||||||
|
#define wxSTC_SCRIPTOL_IDENTIFIER 11
|
||||||
|
#define wxSTC_SCRIPTOL_STRINGEOL 12
|
||||||
|
#define wxSTC_SCRIPTOL_VERBATIM 13
|
||||||
|
#define wxSTC_SCRIPTOL_REGEX 14
|
||||||
|
#define wxSTC_SCRIPTOL_COMMENTLINEDOC 15
|
||||||
|
#define wxSTC_SCRIPTOL_WORD2 16
|
||||||
|
#define wxSTC_SCRIPTOL_COMMENTDOCKEYWORD 17
|
||||||
|
#define wxSTC_SCRIPTOL_COMMENTDOCKEYWORDERROR 18
|
||||||
|
#define wxSTC_SCRIPTOL_COMMENTBASIC 19
|
||||||
|
|
||||||
// END of generated section
|
// END of generated section
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -845,37 +890,37 @@ public:
|
|||||||
// and regenerate
|
// and regenerate
|
||||||
|
|
||||||
|
|
||||||
// Add text to the document
|
// Add text to the document.
|
||||||
void AddText(const wxString& text);
|
void AddText(const wxString& text);
|
||||||
|
|
||||||
// Add array of cells to document
|
// Add array of cells to document.
|
||||||
void AddStyledText(const wxMemoryBuffer& data);
|
void AddStyledText(const wxMemoryBuffer& data);
|
||||||
|
|
||||||
// Insert string at a position
|
// Insert string at a position.
|
||||||
void InsertText(int pos, const wxString& text);
|
void InsertText(int pos, const wxString& text);
|
||||||
|
|
||||||
// Delete all text in the document
|
// Delete all text in the document.
|
||||||
void ClearAll();
|
void ClearAll();
|
||||||
|
|
||||||
// Set all style bytes to 0, remove all folding information
|
// Set all style bytes to 0, remove all folding information.
|
||||||
void ClearDocumentStyle();
|
void ClearDocumentStyle();
|
||||||
|
|
||||||
// The number of characters in the document
|
// The number of characters in the document.
|
||||||
int GetLength();
|
int GetLength();
|
||||||
|
|
||||||
// Returns the character byte at the position
|
// Returns the character byte at the position.
|
||||||
int GetCharAt(int pos);
|
int GetCharAt(int pos);
|
||||||
|
|
||||||
// Returns the position of the caret
|
// Returns the position of the caret.
|
||||||
int GetCurrentPos();
|
int GetCurrentPos();
|
||||||
|
|
||||||
// Returns the position of the opposite end of the selection to the caret
|
// Returns the position of the opposite end of the selection to the caret.
|
||||||
int GetAnchor();
|
int GetAnchor();
|
||||||
|
|
||||||
// Returns the style byte at the position
|
// Returns the style byte at the position.
|
||||||
int GetStyleAt(int pos);
|
int GetStyleAt(int pos);
|
||||||
|
|
||||||
// Redoes the next action on the undo history
|
// Redoes the next action on the undo history.
|
||||||
void Redo();
|
void Redo();
|
||||||
|
|
||||||
// Choose between collecting actions into the undo
|
// Choose between collecting actions into the undo
|
||||||
@@ -892,10 +937,10 @@ public:
|
|||||||
// Retrieve a buffer of cells.
|
// Retrieve a buffer of cells.
|
||||||
wxMemoryBuffer GetStyledText(int startPos, int endPos);
|
wxMemoryBuffer GetStyledText(int startPos, int endPos);
|
||||||
|
|
||||||
// Are there any redoable actions in the undo history.
|
// Are there any redoable actions in the undo history?
|
||||||
bool CanRedo();
|
bool CanRedo();
|
||||||
|
|
||||||
// Retrieve the line number at which a particular marker is located
|
// Retrieve the line number at which a particular marker is located.
|
||||||
int MarkerLineFromHandle(int handle);
|
int MarkerLineFromHandle(int handle);
|
||||||
|
|
||||||
// Delete a marker.
|
// Delete a marker.
|
||||||
@@ -949,23 +994,21 @@ public:
|
|||||||
void SetEOLMode(int eolMode);
|
void SetEOLMode(int eolMode);
|
||||||
|
|
||||||
// Set the current styling position to pos and the styling mask to mask.
|
// Set the current styling position to pos and the styling mask to mask.
|
||||||
// The styling mask can be used to protect some bits in each styling byte from
|
// The styling mask can be used to protect some bits in each styling byte from modification.
|
||||||
// modification.
|
|
||||||
void StartStyling(int pos, int mask);
|
void StartStyling(int pos, int mask);
|
||||||
|
|
||||||
// Change style from current styling position for length characters to a style
|
// Change style from current styling position for length characters to a style
|
||||||
// and move the current styling position to after this newly styled segment.
|
// and move the current styling position to after this newly styled segment.
|
||||||
void SetStyling(int length, int style);
|
void SetStyling(int length, int style);
|
||||||
|
|
||||||
// Is drawing done first into a buffer or direct to the screen.
|
// Is drawing done first into a buffer or direct to the screen?
|
||||||
bool GetBufferedDraw();
|
bool GetBufferedDraw();
|
||||||
|
|
||||||
// If drawing is buffered then each line of text is drawn into a bitmap buffer
|
// If drawing is buffered then each line of text is drawn into a bitmap buffer
|
||||||
// before drawing it to the screen to avoid flicker.
|
// before drawing it to the screen to avoid flicker.
|
||||||
void SetBufferedDraw(bool buffered);
|
void SetBufferedDraw(bool buffered);
|
||||||
|
|
||||||
// Change the visible size of a tab to be a multiple of the width of a space
|
// Change the visible size of a tab to be a multiple of the width of a space character.
|
||||||
// character.
|
|
||||||
void SetTabWidth(int tabWidth);
|
void SetTabWidth(int tabWidth);
|
||||||
|
|
||||||
// Retrieve the visible size of a tab.
|
// Retrieve the visible size of a tab.
|
||||||
@@ -989,10 +1032,10 @@ public:
|
|||||||
// Add a marker to a line, returning an ID which can be used to find or delete the marker.
|
// Add a marker to a line, returning an ID which can be used to find or delete the marker.
|
||||||
int MarkerAdd(int line, int markerNumber);
|
int MarkerAdd(int line, int markerNumber);
|
||||||
|
|
||||||
// Delete a marker from a line
|
// Delete a marker from a line.
|
||||||
void MarkerDelete(int line, int markerNumber);
|
void MarkerDelete(int line, int markerNumber);
|
||||||
|
|
||||||
// Delete all markers with a particular number from all lines
|
// Delete all markers with a particular number from all lines.
|
||||||
void MarkerDeleteAll(int markerNumber);
|
void MarkerDeleteAll(int markerNumber);
|
||||||
|
|
||||||
// Get a bit mask of all the markers set on a line.
|
// Get a bit mask of all the markers set on a line.
|
||||||
@@ -1094,8 +1137,7 @@ public:
|
|||||||
// Get the time in milliseconds that the caret is on and off. 0 = steady on.
|
// Get the time in milliseconds that the caret is on and off. 0 = steady on.
|
||||||
void SetCaretPeriod(int periodMilliseconds);
|
void SetCaretPeriod(int periodMilliseconds);
|
||||||
|
|
||||||
// Set the set of characters making up words for when moving or selecting
|
// Set the set of characters making up words for when moving or selecting by word.
|
||||||
// by word.
|
|
||||||
void SetWordChars(const wxString& characters);
|
void SetWordChars(const wxString& characters);
|
||||||
|
|
||||||
// Start a sequence of actions that is undone and redone as a unit.
|
// Start a sequence of actions that is undone and redone as a unit.
|
||||||
@@ -1117,8 +1159,8 @@ public:
|
|||||||
// Retrieve the foreground colour of an indicator.
|
// Retrieve the foreground colour of an indicator.
|
||||||
wxColour IndicatorGetForeground(int indic);
|
wxColour IndicatorGetForeground(int indic);
|
||||||
|
|
||||||
// Divide each styling byte into lexical class bits (default:5) and indicator
|
// Divide each styling byte into lexical class bits (default: 5) and indicator
|
||||||
// bits (default:3). If a lexer requires more than 32 lexical states, then this
|
// bits (default: 3). If a lexer requires more than 32 lexical states, then this
|
||||||
// is used to expand the possible states.
|
// is used to expand the possible states.
|
||||||
void SetStyleBits(int bits);
|
void SetStyleBits(int bits);
|
||||||
|
|
||||||
@@ -1137,7 +1179,7 @@ public:
|
|||||||
// Is the background of the line containing the caret in a different colour?
|
// Is the background of the line containing the caret in a different colour?
|
||||||
bool GetCaretLineVisible();
|
bool GetCaretLineVisible();
|
||||||
|
|
||||||
// Dsplay the background of the line containing the caret in a different colour.
|
// Display the background of the line containing the caret in a different colour.
|
||||||
void SetCaretLineVisible(bool show);
|
void SetCaretLineVisible(bool show);
|
||||||
|
|
||||||
// Get the colour of the background of the line containing the caret.
|
// Get the colour of the background of the line containing the caret.
|
||||||
@@ -1161,8 +1203,7 @@ public:
|
|||||||
// Is there an auto-completion list visible?
|
// Is there an auto-completion list visible?
|
||||||
bool AutoCompActive();
|
bool AutoCompActive();
|
||||||
|
|
||||||
// Retrieve the position of the caret when the auto-completion list was
|
// Retrieve the position of the caret when the auto-completion list was displayed.
|
||||||
// displayed.
|
|
||||||
int AutoCompPosStart();
|
int AutoCompPosStart();
|
||||||
|
|
||||||
// User has selected an item so remove the list and insert the selection.
|
// User has selected an item so remove the list and insert the selection.
|
||||||
@@ -1171,8 +1212,8 @@ public:
|
|||||||
// Define a set of character that when typed cancel the auto-completion list.
|
// Define a set of character that when typed cancel the auto-completion list.
|
||||||
void AutoCompStops(const wxString& characterSet);
|
void AutoCompStops(const wxString& characterSet);
|
||||||
|
|
||||||
// Change the separator character in the string setting up an auto-completion
|
// Change the separator character in the string setting up an auto-completion list.
|
||||||
// list. Default is space but can be changed if items contain space.
|
// Default is space but can be changed if items contain space.
|
||||||
void AutoCompSetSeparator(int separatorCharacter);
|
void AutoCompSetSeparator(int separatorCharacter);
|
||||||
|
|
||||||
// Retrieve the auto-completion list separator character.
|
// Retrieve the auto-completion list separator character.
|
||||||
@@ -1207,16 +1248,18 @@ public:
|
|||||||
// Display a list of strings and send notification when user chooses one.
|
// Display a list of strings and send notification when user chooses one.
|
||||||
void UserListShow(int listType, const wxString& itemList);
|
void UserListShow(int listType, const wxString& itemList);
|
||||||
|
|
||||||
// Set whether or not autocompletion is hidden automatically when nothing matches
|
// Set whether or not autocompletion is hidden automatically when nothing matches.
|
||||||
void AutoCompSetAutoHide(bool autoHide);
|
void AutoCompSetAutoHide(bool autoHide);
|
||||||
|
|
||||||
// Retrieve whether or not autocompletion is hidden automatically when nothing matches
|
// Retrieve whether or not autocompletion is hidden automatically when nothing matches.
|
||||||
bool AutoCompGetAutoHide();
|
bool AutoCompGetAutoHide();
|
||||||
|
|
||||||
// Set whether or not autocompletion deletes any word characters after the inserted text upon completion
|
// Set whether or not autocompletion deletes any word characters
|
||||||
|
// after the inserted text upon completion.
|
||||||
void AutoCompSetDropRestOfWord(bool dropRestOfWord);
|
void AutoCompSetDropRestOfWord(bool dropRestOfWord);
|
||||||
|
|
||||||
// Retrieve whether or not autocompletion deletes any word characters after the inserted text upon completion
|
// Retrieve whether or not autocompletion deletes any word characters
|
||||||
|
// after the inserted text upon completion.
|
||||||
bool AutoCompGetDropRestOfWord();
|
bool AutoCompGetDropRestOfWord();
|
||||||
|
|
||||||
// Set the number of spaces used for one level of indentation.
|
// Set the number of spaces used for one level of indentation.
|
||||||
@@ -1305,7 +1348,7 @@ public:
|
|||||||
// Find some text in the document.
|
// Find some text in the document.
|
||||||
int FindText(int minPos, int maxPos, const wxString& text, int flags=0);
|
int FindText(int minPos, int maxPos, const wxString& text, int flags=0);
|
||||||
|
|
||||||
// On Windows will draw the document into a display context such as a printer.
|
// On Windows, will draw the document into a display context such as a printer.
|
||||||
int FormatRange(bool doDraw,
|
int FormatRange(bool doDraw,
|
||||||
int startPos,
|
int startPos,
|
||||||
int endPos,
|
int endPos,
|
||||||
@@ -1371,7 +1414,7 @@ public:
|
|||||||
// Will a paste succeed?
|
// Will a paste succeed?
|
||||||
bool CanPaste();
|
bool CanPaste();
|
||||||
|
|
||||||
// Are there any undoable actions in the undo history.
|
// Are there any undoable actions in the undo history?
|
||||||
bool CanUndo();
|
bool CanUndo();
|
||||||
|
|
||||||
// Delete the undo history.
|
// Delete the undo history.
|
||||||
@@ -1401,16 +1444,16 @@ public:
|
|||||||
// Retrieve the number of characters in the document.
|
// Retrieve the number of characters in the document.
|
||||||
int GetTextLength();
|
int GetTextLength();
|
||||||
|
|
||||||
// Set to overtype (true) or insert mode
|
// Set to overtype (true) or insert mode.
|
||||||
void SetOvertype(bool overtype);
|
void SetOvertype(bool overtype);
|
||||||
|
|
||||||
// Returns true if overtype mode is active otherwise false is returned.
|
// Returns true if overtype mode is active otherwise false is returned.
|
||||||
bool GetOvertype();
|
bool GetOvertype();
|
||||||
|
|
||||||
// Set the width of the insert mode caret
|
// Set the width of the insert mode caret.
|
||||||
void SetCaretWidth(int pixelWidth);
|
void SetCaretWidth(int pixelWidth);
|
||||||
|
|
||||||
// Returns the width of the insert mode caret
|
// Returns the width of the insert mode caret.
|
||||||
int GetCaretWidth();
|
int GetCaretWidth();
|
||||||
|
|
||||||
// Sets the position that starts the target which is used for updating the
|
// Sets the position that starts the target which is used for updating the
|
||||||
@@ -1445,10 +1488,10 @@ public:
|
|||||||
// Returns length of range or -1 for failure in which case target is not moved.
|
// Returns length of range or -1 for failure in which case target is not moved.
|
||||||
int SearchInTarget(const wxString& text);
|
int SearchInTarget(const wxString& text);
|
||||||
|
|
||||||
// Set the search flags used by SearchInTarget
|
// Set the search flags used by SearchInTarget.
|
||||||
void SetSearchFlags(int flags);
|
void SetSearchFlags(int flags);
|
||||||
|
|
||||||
// Get the search flags used by SearchInTarget
|
// Get the search flags used by SearchInTarget.
|
||||||
int GetSearchFlags();
|
int GetSearchFlags();
|
||||||
|
|
||||||
// Show a call tip containing a definition near position pos.
|
// Show a call tip containing a definition near position pos.
|
||||||
@@ -1510,53 +1553,76 @@ public:
|
|||||||
// Ensure a particular line is visible by expanding any header line hiding it.
|
// Ensure a particular line is visible by expanding any header line hiding it.
|
||||||
void EnsureVisible(int line);
|
void EnsureVisible(int line);
|
||||||
|
|
||||||
// Set some debugging options for folding
|
// Set some debugging options for folding.
|
||||||
void SetFoldFlags(int flags);
|
void SetFoldFlags(int flags);
|
||||||
|
|
||||||
// Ensure a particular line is visible by expanding any header line hiding it.
|
// Ensure a particular line is visible by expanding any header line hiding it.
|
||||||
// Use the currently set visibility policy to determine which range to display.
|
// Use the currently set visibility policy to determine which range to display.
|
||||||
void EnsureVisibleEnforcePolicy(int line);
|
void EnsureVisibleEnforcePolicy(int line);
|
||||||
|
|
||||||
// Sets whether a tab pressed when caret is within indentation indents
|
// Sets whether a tab pressed when caret is within indentation indents.
|
||||||
void SetTabIndents(bool tabIndents);
|
void SetTabIndents(bool tabIndents);
|
||||||
|
|
||||||
// Does a tab pressed when caret is within indentation indent?
|
// Does a tab pressed when caret is within indentation indent?
|
||||||
bool GetTabIndents();
|
bool GetTabIndents();
|
||||||
|
|
||||||
// Sets whether a backspace pressed when caret is within indentation unindents
|
// Sets whether a backspace pressed when caret is within indentation unindents.
|
||||||
void SetBackSpaceUnIndents(bool bsUnIndents);
|
void SetBackSpaceUnIndents(bool bsUnIndents);
|
||||||
|
|
||||||
// Does a backspace pressed when caret is within indentation unindent?
|
// Does a backspace pressed when caret is within indentation unindent?
|
||||||
bool GetBackSpaceUnIndents();
|
bool GetBackSpaceUnIndents();
|
||||||
|
|
||||||
// Sets the time the mouse must sit still to generate a mouse dwell event
|
// Sets the time the mouse must sit still to generate a mouse dwell event.
|
||||||
void SetMouseDwellTime(int periodMilliseconds);
|
void SetMouseDwellTime(int periodMilliseconds);
|
||||||
|
|
||||||
// Retrieve the time the mouse must sit still to generate a mouse dwell event
|
// Retrieve the time the mouse must sit still to generate a mouse dwell event.
|
||||||
int GetMouseDwellTime();
|
int GetMouseDwellTime();
|
||||||
|
|
||||||
// Get position of start of word
|
// Get position of start of word.
|
||||||
int WordStartPosition(int pos, bool onlyWordCharacters);
|
int WordStartPosition(int pos, bool onlyWordCharacters);
|
||||||
|
|
||||||
// Get position of end of word
|
// Get position of end of word.
|
||||||
int WordEndPosition(int pos, bool onlyWordCharacters);
|
int WordEndPosition(int pos, bool onlyWordCharacters);
|
||||||
|
|
||||||
// Sets whether text is word wrapped
|
// Sets whether text is word wrapped.
|
||||||
void SetWrapMode(int mode);
|
void SetWrapMode(int mode);
|
||||||
|
|
||||||
// Retrieve whether text is word wrapped
|
// Retrieve whether text is word wrapped.
|
||||||
int GetWrapMode();
|
int GetWrapMode();
|
||||||
|
|
||||||
// Sets the degree of caching of layout information
|
// Sets the degree of caching of layout information.
|
||||||
void SetLayoutCache(int mode);
|
void SetLayoutCache(int mode);
|
||||||
|
|
||||||
// Retrieve the degree of caching of layout information
|
// Retrieve the degree of caching of layout information.
|
||||||
int GetLayoutCache();
|
int GetLayoutCache();
|
||||||
|
|
||||||
// Move the caret inside current view if it's not there already
|
// Sets the document width assumed for scrolling.
|
||||||
|
void SetScrollWidth(int pixelWidth);
|
||||||
|
|
||||||
|
// Retrieve the document width assumed for scrolling.
|
||||||
|
int GetScrollWidth();
|
||||||
|
|
||||||
|
// Measure the pixel width of some text in a particular style.
|
||||||
|
// Nul terminated text argument.
|
||||||
|
// Does not handle tab or control characters.
|
||||||
|
int TextWidth(int style, const wxString& text);
|
||||||
|
|
||||||
|
// Sets the scroll range so that maximum scroll position has
|
||||||
|
// the last line at the bottom of the view (default).
|
||||||
|
// Setting this to false allows scrolling one page below the last line.
|
||||||
|
void SetEndAtLastLine(bool endAtLastLine);
|
||||||
|
|
||||||
|
// Retrieve whether the maximum scroll position has the last
|
||||||
|
// line at the bottom of the view.
|
||||||
|
int GetEndAtLastLine();
|
||||||
|
|
||||||
|
// Retrieve the height of a particular line of text in pixels.
|
||||||
|
int TextHeight(int line);
|
||||||
|
|
||||||
|
// Move the caret inside current view if it's not there already.
|
||||||
void MoveCaretInsideView();
|
void MoveCaretInsideView();
|
||||||
|
|
||||||
// How many characters are on a line, not including end of line characters.
|
// How many characters are on a line, not including end of line characters?
|
||||||
int LineLength(int line);
|
int LineLength(int line);
|
||||||
|
|
||||||
// Highlight the characters at two positions.
|
// Highlight the characters at two positions.
|
||||||
@@ -1568,10 +1634,10 @@ public:
|
|||||||
// Find the position of a matching brace or INVALID_POSITION if no match.
|
// Find the position of a matching brace or INVALID_POSITION if no match.
|
||||||
int BraceMatch(int pos);
|
int BraceMatch(int pos);
|
||||||
|
|
||||||
// Are the end of line characters visible.
|
// Are the end of line characters visible?
|
||||||
bool GetViewEOL();
|
bool GetViewEOL();
|
||||||
|
|
||||||
// Make the end of line characters visible or invisible
|
// Make the end of line characters visible or invisible.
|
||||||
void SetViewEOL(bool visible);
|
void SetViewEOL(bool visible);
|
||||||
|
|
||||||
// Retrieve a pointer to the document object.
|
// Retrieve a pointer to the document object.
|
||||||
@@ -1614,9 +1680,6 @@ public:
|
|||||||
// Does not ensure the selection is visible.
|
// Does not ensure the selection is visible.
|
||||||
int SearchPrev(int flags, const wxString& text);
|
int SearchPrev(int flags, const wxString& text);
|
||||||
|
|
||||||
// Set the way the line the caret is on is kept visible.
|
|
||||||
void SetCaretPolicy(int caretPolicy, int caretSlop);
|
|
||||||
|
|
||||||
// Retrieves the number of lines completely visible.
|
// Retrieves the number of lines completely visible.
|
||||||
int LinesOnScreen();
|
int LinesOnScreen();
|
||||||
|
|
||||||
@@ -1624,7 +1687,7 @@ public:
|
|||||||
// the wrong mouse button.
|
// the wrong mouse button.
|
||||||
void UsePopUp(bool allowPopUp);
|
void UsePopUp(bool allowPopUp);
|
||||||
|
|
||||||
// Is the selection a rectangular. The alternative is the more common stream selection.
|
// Is the selection rectangular? The alternative is the more common stream selection.
|
||||||
bool SelectionIsRectangle();
|
bool SelectionIsRectangle();
|
||||||
|
|
||||||
// Set the zoom level. This number of points is added to the size of all fonts.
|
// Set the zoom level. This number of points is added to the size of all fonts.
|
||||||
@@ -1647,62 +1710,73 @@ public:
|
|||||||
// Get which document modification events are sent to the container.
|
// Get which document modification events are sent to the container.
|
||||||
int GetModEventMask();
|
int GetModEventMask();
|
||||||
|
|
||||||
// Change internal focus flag
|
// Change internal focus flag.
|
||||||
void SetSTCFocus(bool focus);
|
void SetSTCFocus(bool focus);
|
||||||
|
|
||||||
// Get internal focus flag
|
// Get internal focus flag.
|
||||||
bool GetSTCFocus();
|
bool GetSTCFocus();
|
||||||
|
|
||||||
// Change error status - 0 = OK
|
// Change error status - 0 = OK.
|
||||||
void SetStatus(int statusCode);
|
void SetStatus(int statusCode);
|
||||||
|
|
||||||
// Get error status
|
// Get error status.
|
||||||
int GetStatus();
|
int GetStatus();
|
||||||
|
|
||||||
// Set whether the mouse is captured when its button is pressed
|
// Set whether the mouse is captured when its button is pressed.
|
||||||
void SetMouseDownCaptures(bool captures);
|
void SetMouseDownCaptures(bool captures);
|
||||||
|
|
||||||
// Get whether mouse gets captured
|
// Get whether mouse gets captured.
|
||||||
bool GetMouseDownCaptures();
|
bool GetMouseDownCaptures();
|
||||||
|
|
||||||
// Sets the cursor to one of the SC_CURSOR* values
|
// Sets the cursor to one of the SC_CURSOR* values.
|
||||||
void SetCursor(int cursorType);
|
void SetCursor(int cursorType);
|
||||||
|
|
||||||
// Get cursor type
|
// Get cursor type.
|
||||||
int GetCursor();
|
int GetCursor();
|
||||||
|
|
||||||
// Change the way control characters are displayed:
|
// Change the way control characters are displayed:
|
||||||
// If symbol is < 32, keep the drawn way, else, use the given character
|
// If symbol is < 32, keep the drawn way, else, use the given character.
|
||||||
void SetControlCharSymbol(int symbol);
|
void SetControlCharSymbol(int symbol);
|
||||||
|
|
||||||
// Get the way control characters are displayed
|
// Get the way control characters are displayed.
|
||||||
int GetControlCharSymbol();
|
int GetControlCharSymbol();
|
||||||
|
|
||||||
// Move to the previous change in capitalistion
|
// Move to the previous change in capitalisation.
|
||||||
void WordPartLeft();
|
void WordPartLeft();
|
||||||
|
|
||||||
// Move to the previous change in capitalistion extending selection to new caret position.
|
// Move to the previous change in capitalisation extending selection
|
||||||
|
// to new caret position.
|
||||||
void WordPartLeftExtend();
|
void WordPartLeftExtend();
|
||||||
|
|
||||||
// Move to the change next in capitalistion
|
// Move to the change next in capitalisation.
|
||||||
void WordPartRight();
|
void WordPartRight();
|
||||||
|
|
||||||
// Move to the next change in capitalistion extending selection to new caret position.
|
// Move to the next change in capitalisation extending selection
|
||||||
|
// to new caret position.
|
||||||
void WordPartRightExtend();
|
void WordPartRightExtend();
|
||||||
|
|
||||||
// Set the way the display area is determined when a particular line is to be moved to.
|
// Set the way the display area is determined when a particular line
|
||||||
|
// is to be moved to by Find, FindNext, GotoLine, etc.
|
||||||
void SetVisiblePolicy(int visiblePolicy, int visibleSlop);
|
void SetVisiblePolicy(int visiblePolicy, int visibleSlop);
|
||||||
|
|
||||||
// Delete back from the current position to the start of the line
|
// Delete back from the current position to the start of the line.
|
||||||
void DelLineLeft();
|
void DelLineLeft();
|
||||||
|
|
||||||
// Delete forwards from the current position to the end of the line
|
// Delete forwards from the current position to the end of the line.
|
||||||
void DelLineRight();
|
void DelLineRight();
|
||||||
|
|
||||||
// Get and Set the xOffset (ie, horizonal scroll position)
|
// Get and Set the xOffset (ie, horizonal scroll position).
|
||||||
void SetXOffset(int newOffset);
|
void SetXOffset(int newOffset);
|
||||||
int GetXOffset();
|
int GetXOffset();
|
||||||
|
|
||||||
|
// Set the way the caret is kept visible when going sideway.
|
||||||
|
// The exclusion zone is given in pixels.
|
||||||
|
void SetXCaretPolicy(int caretPolicy, int caretSlop);
|
||||||
|
|
||||||
|
// Set the way the line the caret is on is kept visible.
|
||||||
|
// The exclusion zone is given in lines.
|
||||||
|
void SetYCaretPolicy(int caretPolicy, int caretSlop);
|
||||||
|
|
||||||
// Start notifying the container of all key presses and commands.
|
// Start notifying the container of all key presses and commands.
|
||||||
void StartRecord();
|
void StartRecord();
|
||||||
|
|
||||||
@@ -1986,6 +2060,7 @@ BEGIN_DECLARE_EVENT_TYPES()
|
|||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_START_DRAG, 1669)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_START_DRAG, 1669)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DRAG_OVER, 1670)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DRAG_OVER, 1670)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DO_DROP, 1671)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DO_DROP, 1671)
|
||||||
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_ZOOM, 1672)
|
||||||
END_DECLARE_EVENT_TYPES()
|
END_DECLARE_EVENT_TYPES()
|
||||||
#else
|
#else
|
||||||
enum {
|
enum {
|
||||||
@@ -2011,6 +2086,7 @@ END_DECLARE_EVENT_TYPES()
|
|||||||
wxEVT_STC_START_DRAG,
|
wxEVT_STC_START_DRAG,
|
||||||
wxEVT_STC_DRAG_OVER,
|
wxEVT_STC_DRAG_OVER,
|
||||||
wxEVT_STC_DO_DROP,
|
wxEVT_STC_DO_DROP,
|
||||||
|
wxEVT_STC_ZOOM,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -2041,6 +2117,7 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
|
|||||||
#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
|
#define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@@ -906,6 +906,15 @@ long Platform::SendScintilla(WindowID w,
|
|||||||
return stc->SendMsg(msg, wParam, lParam);
|
return stc->SendMsg(msg, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long Platform::SendScintillaPointer(WindowID w,
|
||||||
|
unsigned int msg,
|
||||||
|
unsigned long wParam,
|
||||||
|
void *lParam) {
|
||||||
|
|
||||||
|
wxStyledTextCtrl* stc = (wxStyledTextCtrl*)w;
|
||||||
|
return stc->SendMsg(msg, wParam, (long)lParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// These are utility functions not really tied to a platform
|
// These are utility functions not really tied to a platform
|
||||||
|
|
||||||
|
@@ -19,13 +19,6 @@
|
|||||||
#include "wx/stc/stc.h"
|
#include "wx/stc/stc.h"
|
||||||
#include "PlatWX.h"
|
#include "PlatWX.h"
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
|
|
||||||
const int H_SCROLL_MAX = 4000;
|
|
||||||
const int H_SCROLL_STEP = 20;
|
|
||||||
const int H_SCROLL_PAGE = 200;
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// Helper classes
|
// Helper classes
|
||||||
|
|
||||||
@@ -265,10 +258,12 @@ void ScintillaWX::SetHorizontalScrollPos() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const int H_SCROLL_STEP = 20;
|
||||||
|
|
||||||
bool ScintillaWX::ModifyScrollBars(int nMax, int nPage) {
|
bool ScintillaWX::ModifyScrollBars(int nMax, int nPage) {
|
||||||
bool modified = false;
|
bool modified = false;
|
||||||
|
|
||||||
|
// Check the vertical scrollbar
|
||||||
if (stc->m_vScrollBar == NULL) { // Use built-in scrollbar
|
if (stc->m_vScrollBar == NULL) { // Use built-in scrollbar
|
||||||
int sbMax = stc->GetScrollRange(wxVERTICAL);
|
int sbMax = stc->GetScrollRange(wxVERTICAL);
|
||||||
int sbThumb = stc->GetScrollThumb(wxVERTICAL);
|
int sbThumb = stc->GetScrollThumb(wxVERTICAL);
|
||||||
@@ -289,24 +284,40 @@ bool ScintillaWX::ModifyScrollBars(int nMax, int nPage) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (horizontalScrollBarVisible) {
|
// Check the horizontal scrollbar
|
||||||
|
PRectangle rcText = GetTextRectangle();
|
||||||
|
int horizEnd = scrollWidth;
|
||||||
|
if (horizEnd < 0)
|
||||||
|
horizEnd = 0;
|
||||||
|
if (!horizontalScrollBarVisible || (wrapState != eWrapNone))
|
||||||
|
horizEnd = 0;
|
||||||
|
int pageWidth = rcText.Width();
|
||||||
|
|
||||||
if (stc->m_hScrollBar == NULL) { // Use built-in scrollbar
|
if (stc->m_hScrollBar == NULL) { // Use built-in scrollbar
|
||||||
int sbMax = stc->GetScrollRange(wxHORIZONTAL);
|
int sbMax = stc->GetScrollRange(wxHORIZONTAL);
|
||||||
int sbThumb = stc->GetScrollThumb(wxHORIZONTAL);
|
int sbThumb = stc->GetScrollThumb(wxHORIZONTAL);
|
||||||
if ((sbMax != H_SCROLL_MAX) || (sbThumb != H_SCROLL_STEP)) {
|
int sbPos = stc->GetScrollPos(wxHORIZONTAL);
|
||||||
stc->SetScrollbar(wxHORIZONTAL, 0, H_SCROLL_STEP, H_SCROLL_MAX);
|
if ((sbMax != horizEnd) || (sbThumb != pageWidth) || (sbPos != 0)) {
|
||||||
|
stc->SetScrollbar(wxHORIZONTAL, 0, pageWidth, horizEnd);
|
||||||
modified = true;
|
modified = true;
|
||||||
|
if (scrollWidth < pageWidth) {
|
||||||
|
HorizontalScrollTo(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // otherwise use the one that's been given to us
|
else { // otherwise use the one that's been given to us
|
||||||
int sbMax = stc->m_hScrollBar->GetRange();
|
int sbMax = stc->m_hScrollBar->GetRange();
|
||||||
int sbPage = stc->m_hScrollBar->GetPageSize();
|
int sbThumb = stc->m_hScrollBar->GetPageSize();
|
||||||
if ((sbMax != H_SCROLL_MAX) || (sbPage != H_SCROLL_STEP)) {
|
int sbPos = stc->m_hScrollBar->GetThumbPosition();
|
||||||
stc->m_hScrollBar->SetScrollbar(0, H_SCROLL_STEP, H_SCROLL_MAX, H_SCROLL_STEP);
|
if ((sbMax != horizEnd) || (sbThumb != pageWidth) || (sbPos != 0)) {
|
||||||
|
stc->m_hScrollBar->SetScrollbar(0, pageWidth, horizEnd, pageWidth);
|
||||||
modified = true;
|
modified = true;
|
||||||
|
if (scrollWidth < pageWidth) {
|
||||||
|
HorizontalScrollTo(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return modified;
|
return modified;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -443,18 +454,24 @@ void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) {
|
|||||||
|
|
||||||
void ScintillaWX::DoHScroll(int type, int pos) {
|
void ScintillaWX::DoHScroll(int type, int pos) {
|
||||||
int xPos = xOffset;
|
int xPos = xOffset;
|
||||||
|
PRectangle rcText = GetTextRectangle();
|
||||||
|
int pageWidth = rcText.Width() * 2 / 3;
|
||||||
if (type == wxEVT_SCROLLWIN_LINEUP || type == wxEVT_SCROLL_LINEUP)
|
if (type == wxEVT_SCROLLWIN_LINEUP || type == wxEVT_SCROLL_LINEUP)
|
||||||
xPos -= H_SCROLL_STEP;
|
xPos -= H_SCROLL_STEP;
|
||||||
else if (type == wxEVT_SCROLLWIN_LINEDOWN || type == wxEVT_SCROLL_LINEDOWN)
|
else if (type == wxEVT_SCROLLWIN_LINEDOWN || type == wxEVT_SCROLL_LINEDOWN)
|
||||||
xPos += H_SCROLL_STEP;
|
xPos += H_SCROLL_STEP;
|
||||||
else if (type == wxEVT_SCROLLWIN_PAGEUP || type == wxEVT_SCROLL_PAGEUP)
|
else if (type == wxEVT_SCROLLWIN_PAGEUP || type == wxEVT_SCROLL_PAGEUP)
|
||||||
xPos -= H_SCROLL_PAGE;
|
xPos -= pageWidth;
|
||||||
else if (type == wxEVT_SCROLLWIN_PAGEDOWN || type == wxEVT_SCROLL_PAGEDOWN)
|
else if (type == wxEVT_SCROLLWIN_PAGEDOWN || type == wxEVT_SCROLL_PAGEDOWN) {
|
||||||
xPos += H_SCROLL_PAGE;
|
xPos += pageWidth;
|
||||||
|
if (xPos > scrollWidth - rcText.Width()) {
|
||||||
|
xPos = scrollWidth - rcText.Width();
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (type == wxEVT_SCROLLWIN_TOP || type == wxEVT_SCROLL_TOP)
|
else if (type == wxEVT_SCROLLWIN_TOP || type == wxEVT_SCROLL_TOP)
|
||||||
xPos = 0;
|
xPos = 0;
|
||||||
else if (type == wxEVT_SCROLLWIN_BOTTOM || type == wxEVT_SCROLL_BOTTOM)
|
else if (type == wxEVT_SCROLLWIN_BOTTOM || type == wxEVT_SCROLL_BOTTOM)
|
||||||
xPos = H_SCROLL_MAX;
|
xPos = scrollWidth;
|
||||||
else if (type == wxEVT_SCROLLWIN_THUMBTRACK || type == wxEVT_SCROLL_THUMBTRACK)
|
else if (type == wxEVT_SCROLLWIN_THUMBTRACK || type == wxEVT_SCROLL_THUMBTRACK)
|
||||||
xPos = pos;
|
xPos = pos;
|
||||||
|
|
||||||
|
@@ -553,6 +553,12 @@ def processIface(iface, h_tmplt, cpp_tmplt, h_dest, cpp_dest):
|
|||||||
elif op == 'evt ':
|
elif op == 'evt ':
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
elif op == 'enu ':
|
||||||
|
pass
|
||||||
|
|
||||||
|
elif op == 'lex ':
|
||||||
|
pass
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print '***** Unknown line type: ', line
|
print '***** Unknown line type: ', line
|
||||||
|
|
||||||
|
@@ -3,5 +3,5 @@ scintilla/include directories from the Scintilla/SCiTE source
|
|||||||
distribution. All other code needed to implement Scintilla on top of
|
distribution. All other code needed to implement Scintilla on top of
|
||||||
wxWindows is located in the directory above this one.
|
wxWindows is located in the directory above this one.
|
||||||
|
|
||||||
The current version of the Scintilla code is 1.45
|
The current version of the Scintilla code is 1.47
|
||||||
|
|
||||||
|
@@ -55,6 +55,7 @@ public:
|
|||||||
}
|
}
|
||||||
void SetCodePage(int codePage_) { codePage = codePage_; }
|
void SetCodePage(int codePage_) { codePage = codePage_; }
|
||||||
|
|
||||||
|
virtual bool Match(int pos, const char *s)=0;
|
||||||
virtual char StyleAt(int position)=0;
|
virtual char StyleAt(int position)=0;
|
||||||
virtual int GetLine(int position)=0;
|
virtual int GetLine(int position)=0;
|
||||||
virtual int LineStart(int line)=0;
|
virtual int LineStart(int line)=0;
|
||||||
|
@@ -19,6 +19,7 @@ protected:
|
|||||||
int language;
|
int language;
|
||||||
LexerFunction fnLexer;
|
LexerFunction fnLexer;
|
||||||
LexerFunction fnFolder;
|
LexerFunction fnFolder;
|
||||||
|
const char * const * wordListDescriptions;
|
||||||
|
|
||||||
static const LexerModule *base;
|
static const LexerModule *base;
|
||||||
static int nextLanguage;
|
static int nextLanguage;
|
||||||
@@ -26,8 +27,14 @@ protected:
|
|||||||
public:
|
public:
|
||||||
const char *languageName;
|
const char *languageName;
|
||||||
LexerModule(int language_, LexerFunction fnLexer_,
|
LexerModule(int language_, LexerFunction fnLexer_,
|
||||||
const char *languageName_=0, LexerFunction fnFolder_=0);
|
const char *languageName_=0, LexerFunction fnFolder_=0,
|
||||||
|
const char * const wordListDescriptions_[] = NULL);
|
||||||
int GetLanguage() const { return language; }
|
int GetLanguage() const { return language; }
|
||||||
|
|
||||||
|
// -1 is returned if no WordList information is available
|
||||||
|
int GetNumWordLists() const;
|
||||||
|
const char *GetWordListDescription(int index) const;
|
||||||
|
|
||||||
virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle,
|
virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle,
|
||||||
WordList *keywordlists[], Accessor &styler) const;
|
WordList *keywordlists[], Accessor &styler) const;
|
||||||
virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle,
|
virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle,
|
||||||
|
@@ -106,8 +106,8 @@ public:
|
|||||||
(rc.top >= top) && (rc.bottom <= bottom);
|
(rc.top >= top) && (rc.bottom <= bottom);
|
||||||
}
|
}
|
||||||
bool Intersects(PRectangle other) {
|
bool Intersects(PRectangle other) {
|
||||||
return (right >= other.left) && (left <= other.right) &&
|
return (right > other.left) && (left < other.right) &&
|
||||||
(bottom >= other.top) && (top <= other.bottom);
|
(bottom > other.top) && (top < other.bottom);
|
||||||
}
|
}
|
||||||
int Width() { return right - left; }
|
int Width() { return right - left; }
|
||||||
int Height() { return bottom - top; }
|
int Height() { return bottom - top; }
|
||||||
@@ -430,6 +430,8 @@ public:
|
|||||||
static bool IsKeyDown(int key);
|
static bool IsKeyDown(int key);
|
||||||
static long SendScintilla(
|
static long SendScintilla(
|
||||||
WindowID w, unsigned int msg, unsigned long wParam=0, long lParam=0);
|
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 bool IsDBCSLeadByte(int codePage, char ch);
|
||||||
|
|
||||||
// These are utility functions not really tied to a platform
|
// These are utility functions not really tied to a platform
|
||||||
|
@@ -76,10 +76,6 @@ public:
|
|||||||
bool ignoreCase=false, char otherSeparator='\0');
|
bool ignoreCase=false, char otherSeparator='\0');
|
||||||
};
|
};
|
||||||
|
|
||||||
inline bool nonFuncChar(char ch) {
|
|
||||||
return strchr("\t\n\r !\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~", ch) != NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool IsAlphabetic(unsigned int ch) {
|
inline bool IsAlphabetic(unsigned int ch) {
|
||||||
return ((ch >= 'A') && (ch <= 'Z')) || ((ch >= 'a') && (ch <= 'z'));
|
return ((ch >= 'A') && (ch <= 'Z')) || ((ch >= 'a') && (ch <= 'z'));
|
||||||
}
|
}
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
// These functions are implemented because each platform calls them something different.
|
// These functions are implemented because each platform calls them something different.
|
||||||
int CompareCaseInsensitive(const char *a, const char *b);
|
int CompareCaseInsensitive(const char *a, const char *b);
|
||||||
int CompareNCaseInsensitive(const char *a, const char *b, int len);
|
int CompareNCaseInsensitive(const char *a, const char *b, size_t len);
|
||||||
bool EqualCaseInsensitive(const char *a, const char *b);
|
bool EqualCaseInsensitive(const char *a, const char *b);
|
||||||
|
|
||||||
// Define another string class.
|
// Define another string class.
|
||||||
@@ -22,13 +22,13 @@ bool EqualCaseInsensitive(const char *a, const char *b);
|
|||||||
*
|
*
|
||||||
* Hold the length of the string for quick operations,
|
* 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.
|
* 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 rely too heavily on C string
|
* 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.
|
* functions to allow reliable manipulations of these strings, other than simple appends, etc.
|
||||||
**/
|
**/
|
||||||
class SString {
|
class SString {
|
||||||
public:
|
public:
|
||||||
/** Type of string lengths (sizes) and positions (indexes). */
|
/** Type of string lengths (sizes) and positions (indexes). */
|
||||||
typedef unsigned int lenpos_t;
|
typedef size_t lenpos_t;
|
||||||
/** Out of bounds value indicating that the string argument should be measured. */
|
/** Out of bounds value indicating that the string argument should be measured. */
|
||||||
enum { measure_length=0xffffffffU};
|
enum { measure_length=0xffffffffU};
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ private:
|
|||||||
}
|
}
|
||||||
if (sSize > 0 && sSize_ <= sSize) { // Does not allocate new buffer if the current is big enough
|
if (sSize > 0 && sSize_ <= sSize) { // Does not allocate new buffer if the current is big enough
|
||||||
if (s && sSize_) {
|
if (s && sSize_) {
|
||||||
strncpy(s, sOther, sSize_);
|
memcpy(s, sOther, sSize_);
|
||||||
}
|
}
|
||||||
s[sSize_] = '\0';
|
s[sSize_] = '\0';
|
||||||
sLen = sSize_;
|
sLen = sSize_;
|
||||||
@@ -92,6 +92,7 @@ public:
|
|||||||
sSize = sLen = (s) ? strlen(s) : 0;
|
sSize = sLen = (s) ? strlen(s) : 0;
|
||||||
}
|
}
|
||||||
SString(const char *s_, lenpos_t first, lenpos_t last) : sizeGrowth(sizeGrowthDefault) {
|
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);
|
s = StringAllocate(s_ + first, last - first);
|
||||||
sSize = sLen = (s) ? strlen(s) : 0;
|
sSize = sLen = (s) ? strlen(s) : 0;
|
||||||
}
|
}
|
||||||
@@ -188,6 +189,27 @@ public:
|
|||||||
else
|
else
|
||||||
return '\0';
|
return '\0';
|
||||||
}
|
}
|
||||||
|
SString substr(lenpos_t subPos, lenpos_t subLen=measure_length) const {
|
||||||
|
if (subPos >= sLen) {
|
||||||
|
return SString(); // return a null string if start index is out of bounds
|
||||||
|
}
|
||||||
|
if ((subLen == measure_length) || (subPos + subLen > sLen)) {
|
||||||
|
subLen = sLen - subPos; // can't substr past end of source string
|
||||||
|
}
|
||||||
|
return SString(s, subPos, subPos + subLen);
|
||||||
|
}
|
||||||
|
SString &lowercase(lenpos_t subPos = 0, lenpos_t subLen=measure_length) {
|
||||||
|
if ((subLen == measure_length) || (subPos + subLen > sLen)) {
|
||||||
|
subLen = sLen - subPos; // don't apply past end of string
|
||||||
|
}
|
||||||
|
for (lenpos_t i = subPos; i < subPos + subLen; i++) {
|
||||||
|
if (s[i] < 'A' || s[i] > 'Z')
|
||||||
|
continue;
|
||||||
|
else
|
||||||
|
s[i] = static_cast<char>(s[i] - 'A' + 'a');
|
||||||
|
}
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
SString &append(const char *sOther, lenpos_t sLenOther=measure_length, char sep = '\0') {
|
SString &append(const char *sOther, lenpos_t sLenOther=measure_length, char sep = '\0') {
|
||||||
if (!sOther) {
|
if (!sOther) {
|
||||||
return *this;
|
return *this;
|
||||||
@@ -206,7 +228,7 @@ public:
|
|||||||
s[sLen] = sep;
|
s[sLen] = sep;
|
||||||
sLen++;
|
sLen++;
|
||||||
}
|
}
|
||||||
strncpy(&s[sLen], sOther, sLenOther);
|
memcpy(&s[sLen], sOther, sLenOther);
|
||||||
sLen += sLenOther;
|
sLen += sLenOther;
|
||||||
s[sLen] = '\0';
|
s[sLen] = '\0';
|
||||||
}
|
}
|
||||||
@@ -259,6 +281,13 @@ public:
|
|||||||
sLen -= len;
|
sLen -= len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
SString &change(lenpos_t pos, char ch) {
|
||||||
|
if (pos >= sLen) { // character changed must be in string bounds
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
*(s + pos) = ch;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
/** Read an integral numeric value from the string. */
|
/** Read an integral numeric value from the string. */
|
||||||
int value() const {
|
int value() const {
|
||||||
if (s)
|
if (s)
|
||||||
@@ -266,7 +295,7 @@ public:
|
|||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int search(const char *sFind, lenpos_t start=0) {
|
int search(const char *sFind, lenpos_t start=0) const {
|
||||||
if (start < sLen) {
|
if (start < sLen) {
|
||||||
const char *sFound = strstr(s + start, sFind);
|
const char *sFound = strstr(s + start, sFind);
|
||||||
if (sFound) {
|
if (sFound) {
|
||||||
@@ -325,7 +354,7 @@ public:
|
|||||||
}
|
}
|
||||||
char *sNew = new char[len + 1];
|
char *sNew = new char[len + 1];
|
||||||
if (sNew) {
|
if (sNew) {
|
||||||
strncpy(sNew, s, len);
|
memcpy(sNew, s, len);
|
||||||
sNew[len] = '\0';
|
sNew[len] = '\0';
|
||||||
}
|
}
|
||||||
return sNew;
|
return sNew;
|
||||||
|
@@ -47,6 +47,7 @@
|
|||||||
#define SCLEX_PHP 30
|
#define SCLEX_PHP 30
|
||||||
#define SCLEX_BAAN 31
|
#define SCLEX_BAAN 31
|
||||||
#define SCLEX_MATLAB 32
|
#define SCLEX_MATLAB 32
|
||||||
|
#define SCLEX_SCRIPTOL 33
|
||||||
#define SCLEX_AUTOMATIC 1000
|
#define SCLEX_AUTOMATIC 1000
|
||||||
#define SCE_P_DEFAULT 0
|
#define SCE_P_DEFAULT 0
|
||||||
#define SCE_P_COMMENTLINE 1
|
#define SCE_P_COMMENTLINE 1
|
||||||
@@ -81,15 +82,6 @@
|
|||||||
#define SCE_C_WORD2 16
|
#define SCE_C_WORD2 16
|
||||||
#define SCE_C_COMMENTDOCKEYWORD 17
|
#define SCE_C_COMMENTDOCKEYWORD 17
|
||||||
#define SCE_C_COMMENTDOCKEYWORDERROR 18
|
#define SCE_C_COMMENTDOCKEYWORDERROR 18
|
||||||
#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_H_DEFAULT 0
|
#define SCE_H_DEFAULT 0
|
||||||
#define SCE_H_TAG 1
|
#define SCE_H_TAG 1
|
||||||
#define SCE_H_TAGUNKNOWN 2
|
#define SCE_H_TAGUNKNOWN 2
|
||||||
@@ -230,6 +222,20 @@
|
|||||||
#define SCE_PL_STRING_QX 28
|
#define SCE_PL_STRING_QX 28
|
||||||
#define SCE_PL_STRING_QR 29
|
#define SCE_PL_STRING_QR 29
|
||||||
#define SCE_PL_STRING_QW 30
|
#define SCE_PL_STRING_QW 30
|
||||||
|
#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_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_L_DEFAULT 0
|
#define SCE_L_DEFAULT 0
|
||||||
#define SCE_L_COMMAND 1
|
#define SCE_L_COMMAND 1
|
||||||
#define SCE_L_TAG 2
|
#define SCE_L_TAG 2
|
||||||
@@ -262,6 +268,7 @@
|
|||||||
#define SCE_ERR_PERL 6
|
#define SCE_ERR_PERL 6
|
||||||
#define SCE_ERR_NET 7
|
#define SCE_ERR_NET 7
|
||||||
#define SCE_ERR_LUA 8
|
#define SCE_ERR_LUA 8
|
||||||
|
#define SCE_ERR_CTAG 9
|
||||||
#define SCE_ERR_DIFF_CHANGED 10
|
#define SCE_ERR_DIFF_CHANGED 10
|
||||||
#define SCE_ERR_DIFF_ADDITION 11
|
#define SCE_ERR_DIFF_ADDITION 11
|
||||||
#define SCE_ERR_DIFF_DELETION 12
|
#define SCE_ERR_DIFF_DELETION 12
|
||||||
@@ -281,6 +288,13 @@
|
|||||||
#define SCE_MAKE_OPERATOR 4
|
#define SCE_MAKE_OPERATOR 4
|
||||||
#define SCE_MAKE_TARGET 5
|
#define SCE_MAKE_TARGET 5
|
||||||
#define SCE_MAKE_IDEOL 9
|
#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_CONF_DEFAULT 0
|
#define SCE_CONF_DEFAULT 0
|
||||||
#define SCE_CONF_COMMENT 1
|
#define SCE_CONF_COMMENT 1
|
||||||
#define SCE_CONF_NUMBER 2
|
#define SCE_CONF_NUMBER 2
|
||||||
@@ -358,6 +372,26 @@
|
|||||||
#define SCE_MATLAB_STRING 5
|
#define SCE_MATLAB_STRING 5
|
||||||
#define SCE_MATLAB_OPERATOR 6
|
#define SCE_MATLAB_OPERATOR 6
|
||||||
#define SCE_MATLAB_IDENTIFIER 7
|
#define SCE_MATLAB_IDENTIFIER 7
|
||||||
|
#define SCE_SCRIPTOL_DEFAULT 0
|
||||||
|
#define SCE_SCRIPTOL_COMMENT 1
|
||||||
|
#define SCE_SCRIPTOL_COMMENTLINE 2
|
||||||
|
#define SCE_SCRIPTOL_COMMENTDOC 3
|
||||||
|
#define SCE_SCRIPTOL_NUMBER 4
|
||||||
|
#define SCE_SCRIPTOL_WORD 5
|
||||||
|
#define SCE_SCRIPTOL_STRING 6
|
||||||
|
#define SCE_SCRIPTOL_CHARACTER 7
|
||||||
|
#define SCE_SCRIPTOL_UUID 8
|
||||||
|
#define SCE_SCRIPTOL_PREPROCESSOR 9
|
||||||
|
#define SCE_SCRIPTOL_OPERATOR 10
|
||||||
|
#define SCE_SCRIPTOL_IDENTIFIER 11
|
||||||
|
#define SCE_SCRIPTOL_STRINGEOL 12
|
||||||
|
#define SCE_SCRIPTOL_VERBATIM 13
|
||||||
|
#define SCE_SCRIPTOL_REGEX 14
|
||||||
|
#define SCE_SCRIPTOL_COMMENTLINEDOC 15
|
||||||
|
#define SCE_SCRIPTOL_WORD2 16
|
||||||
|
#define SCE_SCRIPTOL_COMMENTDOCKEYWORD 17
|
||||||
|
#define SCE_SCRIPTOL_COMMENTDOCKEYWORDERROR 18
|
||||||
|
#define SCE_SCRIPTOL_COMMENTBASIC 19
|
||||||
//--Autogenerated -- end of section automatically generated from Scintilla.iface
|
//--Autogenerated -- end of section automatically generated from Scintilla.iface
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -21,8 +21,16 @@ int Scintilla_LinkLexers();
|
|||||||
// Here should be placed typedefs for uptr_t, an unsigned integer type large enough to
|
// Here should be placed typedefs for uptr_t, an unsigned integer type large enough to
|
||||||
// hold a pointer and sptr_t, a signed integer large enough to hold a pointer.
|
// hold a pointer and sptr_t, a signed integer large enough to hold a pointer.
|
||||||
// May need to be changed for 64 bit platforms.
|
// May need to be changed for 64 bit platforms.
|
||||||
|
#if _MSC_VER >= 1300
|
||||||
|
#include <BaseTsd.h>
|
||||||
|
#endif
|
||||||
|
#ifdef MAXULONG_PTR
|
||||||
|
typedef ULONG_PTR uptr_t;
|
||||||
|
typedef LONG_PTR sptr_t;
|
||||||
|
#else
|
||||||
typedef unsigned long uptr_t;
|
typedef unsigned long uptr_t;
|
||||||
typedef long sptr_t;
|
typedef long sptr_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam);
|
typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam);
|
||||||
|
|
||||||
@@ -359,6 +367,12 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
|||||||
#define SC_CACHE_DOCUMENT 3
|
#define SC_CACHE_DOCUMENT 3
|
||||||
#define SCI_SETLAYOUTCACHE 2272
|
#define SCI_SETLAYOUTCACHE 2272
|
||||||
#define SCI_GETLAYOUTCACHE 2273
|
#define SCI_GETLAYOUTCACHE 2273
|
||||||
|
#define SCI_SETSCROLLWIDTH 2274
|
||||||
|
#define SCI_GETSCROLLWIDTH 2275
|
||||||
|
#define SCI_TEXTWIDTH 2276
|
||||||
|
#define SCI_SETENDATLASTLINE 2277
|
||||||
|
#define SCI_GETENDATLASTLINE 2278
|
||||||
|
#define SCI_TEXTHEIGHT 2279
|
||||||
#define SCI_LINEDOWN 2300
|
#define SCI_LINEDOWN 2300
|
||||||
#define SCI_LINEDOWNEXTEND 2301
|
#define SCI_LINEDOWNEXTEND 2301
|
||||||
#define SCI_LINEUP 2302
|
#define SCI_LINEUP 2302
|
||||||
@@ -426,12 +440,6 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
|||||||
#define SCI_SEARCHANCHOR 2366
|
#define SCI_SEARCHANCHOR 2366
|
||||||
#define SCI_SEARCHNEXT 2367
|
#define SCI_SEARCHNEXT 2367
|
||||||
#define SCI_SEARCHPREV 2368
|
#define SCI_SEARCHPREV 2368
|
||||||
#define CARET_SLOP 0x01
|
|
||||||
#define CARET_CENTER 0x02
|
|
||||||
#define CARET_STRICT 0x04
|
|
||||||
#define CARET_XEVEN 0x08
|
|
||||||
#define CARET_XJUMPS 0x10
|
|
||||||
#define SCI_SETCARETPOLICY 2369
|
|
||||||
#define SCI_LINESONSCREEN 2370
|
#define SCI_LINESONSCREEN 2370
|
||||||
#define SCI_USEPOPUP 2371
|
#define SCI_USEPOPUP 2371
|
||||||
#define SCI_SELECTIONISRECTANGLE 2372
|
#define SCI_SELECTIONISRECTANGLE 2372
|
||||||
@@ -465,6 +473,12 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
|||||||
#define SCI_SETXOFFSET 2397
|
#define SCI_SETXOFFSET 2397
|
||||||
#define SCI_GETXOFFSET 2398
|
#define SCI_GETXOFFSET 2398
|
||||||
#define SCI_GRABFOCUS 2400
|
#define SCI_GRABFOCUS 2400
|
||||||
|
#define CARET_SLOP 0x01
|
||||||
|
#define CARET_STRICT 0x04
|
||||||
|
#define CARET_JUMPS 0x10
|
||||||
|
#define CARET_EVEN 0x08
|
||||||
|
#define SCI_SETXCARETPOLICY 2402
|
||||||
|
#define SCI_SETYCARETPOLICY 2403
|
||||||
#define SCI_STARTRECORD 3001
|
#define SCI_STARTRECORD 3001
|
||||||
#define SCI_STOPRECORD 3002
|
#define SCI_STOPRECORD 3002
|
||||||
#define SCI_SETLEXER 4001
|
#define SCI_SETLEXER 4001
|
||||||
@@ -525,6 +539,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
|||||||
#define SCN_URIDROPPED 2015
|
#define SCN_URIDROPPED 2015
|
||||||
#define SCN_DWELLSTART 2016
|
#define SCN_DWELLSTART 2016
|
||||||
#define SCN_DWELLEND 2017
|
#define SCN_DWELLEND 2017
|
||||||
|
#define SCN_ZOOM 2018
|
||||||
//--Autogenerated -- end of section automatically generated from Scintilla.iface
|
//--Autogenerated -- end of section automatically generated from Scintilla.iface
|
||||||
|
|
||||||
// These structures are defined to be exactly the same shape as the Win32
|
// These structures are defined to be exactly the same shape as the Win32
|
||||||
@@ -598,6 +613,11 @@ struct SCNotification {
|
|||||||
|
|
||||||
#ifdef INCLUDE_DEPRECATED_FEATURES
|
#ifdef INCLUDE_DEPRECATED_FEATURES
|
||||||
|
|
||||||
|
#define SCI_SETCARETPOLICY 2369
|
||||||
|
#define CARET_CENTER 0x02
|
||||||
|
#define CARET_XEVEN 0x08
|
||||||
|
#define CARET_XJUMPS 0x10
|
||||||
|
|
||||||
#define SCN_POSCHANGED 2012
|
#define SCN_POSCHANGED 2012
|
||||||
#define SCN_CHECKBRACE 2007
|
#define SCN_CHECKBRACE 2007
|
||||||
|
|
||||||
|
@@ -17,6 +17,9 @@
|
|||||||
## set -> a property set function
|
## set -> a property set function
|
||||||
## val -> definition of a constant
|
## val -> definition of a constant
|
||||||
## evt -> an event
|
## evt -> an event
|
||||||
|
## enu -> associate an enumeration with a set of vals with a prefix
|
||||||
|
## lex -> associate a lexer with the lexical classes it produces
|
||||||
|
##
|
||||||
## All other feature names should be ignored. They may be defined in the future.
|
## All other feature names should be ignored. They may be defined in the future.
|
||||||
## A property may have a set function, a get function or both. Each will have
|
## A property may have a set function, a get function or both. Each will have
|
||||||
## "Get" or "Set" in their names and the corresponding name will have the obvious switch.
|
## "Get" or "Set" in their names and the corresponding name will have the obvious switch.
|
||||||
@@ -31,6 +34,16 @@
|
|||||||
## The feature numbers are stable so features will not be renumbered.
|
## The feature numbers are stable so features will not be renumbered.
|
||||||
## Features may be removed but they will go through a period of deprecation
|
## Features may be removed but they will go through a period of deprecation
|
||||||
## before removal which is signalled by moving them into the Deprecated category.
|
## before removal which is signalled by moving them into the Deprecated category.
|
||||||
|
##
|
||||||
|
## enu has the syntax enu<ws><enumeration>=<prefix>[<ws><prefix>]* where all the val
|
||||||
|
## features in this file starting with a given <prefix> are considered part of the
|
||||||
|
## enumeration.
|
||||||
|
##
|
||||||
|
## lex has the syntax lex<ws><name>=<lexerVal><ws><prefix>[<ws><prefix>]*
|
||||||
|
## where name is a reasonably capitalised (Python, XML) identifier or UI name,
|
||||||
|
## lexerVal is the val used to specify the lexer, and the list of prefixes is similar
|
||||||
|
## to enu. The name may not be the same as that used within the lexer so the lexerVal
|
||||||
|
## should be used to tie these entities together.
|
||||||
|
|
||||||
## Types:
|
## Types:
|
||||||
## void
|
## void
|
||||||
@@ -73,37 +86,37 @@ val SCI_START=2000
|
|||||||
val SCI_OPTIONAL_START=3000
|
val SCI_OPTIONAL_START=3000
|
||||||
val SCI_LEXER_START=4000
|
val SCI_LEXER_START=4000
|
||||||
|
|
||||||
# Add text to the document
|
# Add text to the document.
|
||||||
fun void AddText=2001(int length, string text)
|
fun void AddText=2001(int length, string text)
|
||||||
|
|
||||||
# Add array of cells to document
|
# Add array of cells to document.
|
||||||
fun void AddStyledText=2002(int length, cells c)
|
fun void AddStyledText=2002(int length, cells c)
|
||||||
|
|
||||||
# Insert string at a position
|
# Insert string at a position.
|
||||||
fun void InsertText=2003(position pos, string text)
|
fun void InsertText=2003(position pos, string text)
|
||||||
|
|
||||||
# Delete all text in the document
|
# Delete all text in the document.
|
||||||
fun void ClearAll=2004(,)
|
fun void ClearAll=2004(,)
|
||||||
|
|
||||||
# Set all style bytes to 0, remove all folding information
|
# Set all style bytes to 0, remove all folding information.
|
||||||
fun void ClearDocumentStyle=2005(,)
|
fun void ClearDocumentStyle=2005(,)
|
||||||
|
|
||||||
# The number of characters in the document
|
# The number of characters in the document.
|
||||||
get int GetLength=2006(,)
|
get int GetLength=2006(,)
|
||||||
|
|
||||||
# Returns the character byte at the position
|
# Returns the character byte at the position.
|
||||||
get int GetCharAt=2007(position pos,)
|
get int GetCharAt=2007(position pos,)
|
||||||
|
|
||||||
# Returns the position of the caret
|
# Returns the position of the caret.
|
||||||
get position GetCurrentPos=2008(,)
|
get position GetCurrentPos=2008(,)
|
||||||
|
|
||||||
# Returns the position of the opposite end of the selection to the caret
|
# Returns the position of the opposite end of the selection to the caret.
|
||||||
get position GetAnchor=2009(,)
|
get position GetAnchor=2009(,)
|
||||||
|
|
||||||
# Returns the style byte at the position
|
# Returns the style byte at the position.
|
||||||
get int GetStyleAt=2010(position pos,)
|
get int GetStyleAt=2010(position pos,)
|
||||||
|
|
||||||
# Redoes the next action on the undo history
|
# Redoes the next action on the undo history.
|
||||||
fun void Redo=2011(,)
|
fun void Redo=2011(,)
|
||||||
|
|
||||||
# Choose between collecting actions into the undo
|
# Choose between collecting actions into the undo
|
||||||
@@ -121,10 +134,10 @@ fun void SetSavePoint=2014(,)
|
|||||||
# Returns the number of bytes in the buffer not including terminating nulls.
|
# Returns the number of bytes in the buffer not including terminating nulls.
|
||||||
fun int GetStyledText=2015(, textrange tr)
|
fun int GetStyledText=2015(, textrange tr)
|
||||||
|
|
||||||
# Are there any redoable actions in the undo history.
|
# Are there any redoable actions in the undo history?
|
||||||
fun bool CanRedo=2016(,)
|
fun bool CanRedo=2016(,)
|
||||||
|
|
||||||
# Retrieve the line number at which a particular marker is located
|
# Retrieve the line number at which a particular marker is located.
|
||||||
fun int MarkerLineFromHandle=2017(int handle,)
|
fun int MarkerLineFromHandle=2017(int handle,)
|
||||||
|
|
||||||
# Delete a marker.
|
# Delete a marker.
|
||||||
@@ -133,6 +146,7 @@ fun void MarkerDeleteHandle=2018(int handle,)
|
|||||||
# Is undo history being collected?
|
# Is undo history being collected?
|
||||||
get bool GetUndoCollection=2019(,)
|
get bool GetUndoCollection=2019(,)
|
||||||
|
|
||||||
|
enu WhiteSpace=SCWS_
|
||||||
val SCWS_INVISIBLE=0
|
val SCWS_INVISIBLE=0
|
||||||
val SCWS_VISIBLEALWAYS=1
|
val SCWS_VISIBLEALWAYS=1
|
||||||
val SCWS_VISIBLEAFTERINDENT=2
|
val SCWS_VISIBLEAFTERINDENT=2
|
||||||
@@ -168,6 +182,7 @@ fun int GetCurLine=2027(int length, stringresult text)
|
|||||||
# Retrieve the position of the last correctly styled character.
|
# Retrieve the position of the last correctly styled character.
|
||||||
get position GetEndStyled=2028(,)
|
get position GetEndStyled=2028(,)
|
||||||
|
|
||||||
|
enu EndOfLine=SC_EOL_
|
||||||
val SC_EOL_CRLF=0
|
val SC_EOL_CRLF=0
|
||||||
val SC_EOL_CR=1
|
val SC_EOL_CR=1
|
||||||
val SC_EOL_LF=2
|
val SC_EOL_LF=2
|
||||||
@@ -182,23 +197,21 @@ get int GetEOLMode=2030(,)
|
|||||||
set void SetEOLMode=2031(int eolMode,)
|
set void SetEOLMode=2031(int eolMode,)
|
||||||
|
|
||||||
# Set the current styling position to pos and the styling mask to mask.
|
# Set the current styling position to pos and the styling mask to mask.
|
||||||
# The styling mask can be used to protect some bits in each styling byte from
|
# The styling mask can be used to protect some bits in each styling byte from modification.
|
||||||
# modification.
|
|
||||||
fun void StartStyling=2032(position pos, int mask)
|
fun void StartStyling=2032(position pos, int mask)
|
||||||
|
|
||||||
# Change style from current styling position for length characters to a style
|
# Change style from current styling position for length characters to a style
|
||||||
# and move the current styling position to after this newly styled segment.
|
# and move the current styling position to after this newly styled segment.
|
||||||
fun void SetStyling=2033(int length, int style)
|
fun void SetStyling=2033(int length, int style)
|
||||||
|
|
||||||
# Is drawing done first into a buffer or direct to the screen.
|
# Is drawing done first into a buffer or direct to the screen?
|
||||||
get bool GetBufferedDraw=2034(,)
|
get bool GetBufferedDraw=2034(,)
|
||||||
|
|
||||||
# If drawing is buffered then each line of text is drawn into a bitmap buffer
|
# If drawing is buffered then each line of text is drawn into a bitmap buffer
|
||||||
# before drawing it to the screen to avoid flicker.
|
# before drawing it to the screen to avoid flicker.
|
||||||
set void SetBufferedDraw=2035(bool buffered,)
|
set void SetBufferedDraw=2035(bool buffered,)
|
||||||
|
|
||||||
# Change the visible size of a tab to be a multiple of the width of a space
|
# Change the visible size of a tab to be a multiple of the width of a space character.
|
||||||
# character.
|
|
||||||
set void SetTabWidth=2036(int tabWidth,)
|
set void SetTabWidth=2036(int tabWidth,)
|
||||||
|
|
||||||
# Retrieve the visible size of a tab.
|
# Retrieve the visible size of a tab.
|
||||||
@@ -212,10 +225,11 @@ val SC_CP_UTF8=65001
|
|||||||
# The SC_CP_UTF8 value can be used to enter Unicode mode.
|
# The SC_CP_UTF8 value can be used to enter Unicode mode.
|
||||||
set void SetCodePage=2037(int codePage,)
|
set void SetCodePage=2037(int codePage,)
|
||||||
|
|
||||||
# In palette mode, Scintilla uses the environments palette calls to display
|
# In palette mode, Scintilla uses the environment's palette calls to display
|
||||||
# more colours. This may lead to ugly displays.
|
# more colours. This may lead to ugly displays.
|
||||||
set void SetUsePalette=2039(bool usePalette,)
|
set void SetUsePalette=2039(bool usePalette,)
|
||||||
|
|
||||||
|
enu MarkerSymbol=SC_MARK_
|
||||||
val MARKER_MAX=31
|
val MARKER_MAX=31
|
||||||
val SC_MARK_CIRCLE=0
|
val SC_MARK_CIRCLE=0
|
||||||
val SC_MARK_ROUNDRECT=1
|
val SC_MARK_ROUNDRECT=1
|
||||||
@@ -227,7 +241,7 @@ val SC_MARK_ARROWDOWN=6
|
|||||||
val SC_MARK_MINUS=7
|
val SC_MARK_MINUS=7
|
||||||
val SC_MARK_PLUS=8
|
val SC_MARK_PLUS=8
|
||||||
|
|
||||||
# Shapes used for outlining column
|
# Shapes used for outlining column.
|
||||||
val SC_MARK_VLINE=9
|
val SC_MARK_VLINE=9
|
||||||
val SC_MARK_LCORNER=10
|
val SC_MARK_LCORNER=10
|
||||||
val SC_MARK_TCORNER=11
|
val SC_MARK_TCORNER=11
|
||||||
@@ -242,12 +256,13 @@ val SC_MARK_CIRCLEPLUSCONNECTED=19
|
|||||||
val SC_MARK_CIRCLEMINUS=20
|
val SC_MARK_CIRCLEMINUS=20
|
||||||
val SC_MARK_CIRCLEMINUSCONNECTED=21
|
val SC_MARK_CIRCLEMINUSCONNECTED=21
|
||||||
|
|
||||||
# Invisible mark that only sets the line background color
|
# Invisible mark that only sets the line background color.
|
||||||
val SC_MARK_BACKGROUND=22
|
val SC_MARK_BACKGROUND=22
|
||||||
|
|
||||||
val SC_MARK_CHARACTER=10000
|
val SC_MARK_CHARACTER=10000
|
||||||
|
|
||||||
# Markers used for outlining column
|
enu MarkerOutline=SC_MARKNUM_
|
||||||
|
# Markers used for outlining column.
|
||||||
val SC_MARKNUM_FOLDEREND=25
|
val SC_MARKNUM_FOLDEREND=25
|
||||||
val SC_MARKNUM_FOLDEROPENMID=26
|
val SC_MARKNUM_FOLDEROPENMID=26
|
||||||
val SC_MARKNUM_FOLDERMIDTAIL=27
|
val SC_MARKNUM_FOLDERMIDTAIL=27
|
||||||
@@ -270,10 +285,10 @@ fun void MarkerSetBack=2042(int markerNumber, colour back)
|
|||||||
# Add a marker to a line, returning an ID which can be used to find or delete the marker.
|
# Add a marker to a line, returning an ID which can be used to find or delete the marker.
|
||||||
fun int MarkerAdd=2043(int line, int markerNumber)
|
fun int MarkerAdd=2043(int line, int markerNumber)
|
||||||
|
|
||||||
# Delete a marker from a line
|
# Delete a marker from a line.
|
||||||
fun void MarkerDelete=2044(int line, int markerNumber)
|
fun void MarkerDelete=2044(int line, int markerNumber)
|
||||||
|
|
||||||
# Delete all markers with a particular number from all lines
|
# Delete all markers with a particular number from all lines.
|
||||||
fun void MarkerDeleteAll=2045(int markerNumber,)
|
fun void MarkerDeleteAll=2045(int markerNumber,)
|
||||||
|
|
||||||
# Get a bit mask of all the markers set on a line.
|
# Get a bit mask of all the markers set on a line.
|
||||||
@@ -285,6 +300,7 @@ fun int MarkerNext=2047(int lineStart, int markerMask)
|
|||||||
# Find the previous line before lineStart that includes a marker in mask.
|
# Find the previous line before lineStart that includes a marker in mask.
|
||||||
fun int MarkerPrevious=2048(int lineStart, int markerMask)
|
fun int MarkerPrevious=2048(int lineStart, int markerMask)
|
||||||
|
|
||||||
|
enu MarginType=SC_MARGIN_
|
||||||
val SC_MARGIN_SYMBOL=0
|
val SC_MARGIN_SYMBOL=0
|
||||||
val SC_MARGIN_NUMBER=1
|
val SC_MARGIN_NUMBER=1
|
||||||
|
|
||||||
@@ -314,6 +330,7 @@ get bool GetMarginSensitiveN=2247(int margin,)
|
|||||||
|
|
||||||
# Styles in range 32..37 are predefined for parts of the UI and are not used as normal styles.
|
# Styles in range 32..37 are predefined for parts of the UI and are not used as normal styles.
|
||||||
# Styles 38 and 39 are for future use.
|
# Styles 38 and 39 are for future use.
|
||||||
|
enu StylesCommon=STYLE_
|
||||||
val STYLE_DEFAULT=32
|
val STYLE_DEFAULT=32
|
||||||
val STYLE_LINENUMBER=33
|
val STYLE_LINENUMBER=33
|
||||||
val STYLE_BRACELIGHT=34
|
val STYLE_BRACELIGHT=34
|
||||||
@@ -325,6 +342,7 @@ val STYLE_MAX=127
|
|||||||
|
|
||||||
# Character set identifiers are used in StyleSetCharacterSet.
|
# Character set identifiers are used in StyleSetCharacterSet.
|
||||||
# The values are the same as the Windows *_CHARSET values.
|
# The values are the same as the Windows *_CHARSET values.
|
||||||
|
enu CharacterSet=SC_CHARSET_
|
||||||
val SC_CHARSET_ANSI=0
|
val SC_CHARSET_ANSI=0
|
||||||
val SC_CHARSET_DEFAULT=1
|
val SC_CHARSET_DEFAULT=1
|
||||||
val SC_CHARSET_BALTIC=186
|
val SC_CHARSET_BALTIC=186
|
||||||
@@ -375,6 +393,7 @@ fun void StyleResetDefault=2058(,)
|
|||||||
# Set a style to be underlined or not.
|
# Set a style to be underlined or not.
|
||||||
set void StyleSetUnderline=2059(int style, bool underline)
|
set void StyleSetUnderline=2059(int style, bool underline)
|
||||||
|
|
||||||
|
enu CaseVisible=SC_CASE_
|
||||||
val SC_CASE_MIXED=0
|
val SC_CASE_MIXED=0
|
||||||
val SC_CASE_UPPER=1
|
val SC_CASE_UPPER=1
|
||||||
val SC_CASE_LOWER=2
|
val SC_CASE_LOWER=2
|
||||||
@@ -414,8 +433,7 @@ get int GetCaretPeriod=2075(,)
|
|||||||
# Get the time in milliseconds that the caret is on and off. 0 = steady on.
|
# Get the time in milliseconds that the caret is on and off. 0 = steady on.
|
||||||
set void SetCaretPeriod=2076(int periodMilliseconds,)
|
set void SetCaretPeriod=2076(int periodMilliseconds,)
|
||||||
|
|
||||||
# Set the set of characters making up words for when moving or selecting
|
# Set the set of characters making up words for when moving or selecting by word.
|
||||||
# by word.
|
|
||||||
set void SetWordChars=2077(, string characters)
|
set void SetWordChars=2077(, string characters)
|
||||||
|
|
||||||
# Start a sequence of actions that is undone and redone as a unit.
|
# Start a sequence of actions that is undone and redone as a unit.
|
||||||
@@ -425,6 +443,7 @@ fun void BeginUndoAction=2078(,)
|
|||||||
# End a sequence of actions that is undone and redone as a unit.
|
# End a sequence of actions that is undone and redone as a unit.
|
||||||
fun void EndUndoAction=2079(,)
|
fun void EndUndoAction=2079(,)
|
||||||
|
|
||||||
|
enu IndicatorStyle=INDIC_
|
||||||
val INDIC_MAX=7
|
val INDIC_MAX=7
|
||||||
val INDIC_PLAIN=0
|
val INDIC_PLAIN=0
|
||||||
val INDIC_SQUIGGLE=1
|
val INDIC_SQUIGGLE=1
|
||||||
@@ -448,8 +467,8 @@ set void IndicSetFore=2082(int indic, colour fore)
|
|||||||
# Retrieve the foreground colour of an indicator.
|
# Retrieve the foreground colour of an indicator.
|
||||||
get colour IndicGetFore=2083(int indic,)
|
get colour IndicGetFore=2083(int indic,)
|
||||||
|
|
||||||
# Divide each styling byte into lexical class bits (default:5) and indicator
|
# Divide each styling byte into lexical class bits (default: 5) and indicator
|
||||||
# bits (default:3). If a lexer requires more than 32 lexical states, then this
|
# bits (default: 3). If a lexer requires more than 32 lexical states, then this
|
||||||
# is used to expand the possible states.
|
# is used to expand the possible states.
|
||||||
set void SetStyleBits=2090(int bits,)
|
set void SetStyleBits=2090(int bits,)
|
||||||
|
|
||||||
@@ -468,7 +487,7 @@ get int GetMaxLineState=2094(,)
|
|||||||
# Is the background of the line containing the caret in a different colour?
|
# Is the background of the line containing the caret in a different colour?
|
||||||
get bool GetCaretLineVisible=2095(,)
|
get bool GetCaretLineVisible=2095(,)
|
||||||
|
|
||||||
# Dsplay the background of the line containing the caret in a different colour.
|
# Display the background of the line containing the caret in a different colour.
|
||||||
set void SetCaretLineVisible=2096(bool show,)
|
set void SetCaretLineVisible=2096(bool show,)
|
||||||
|
|
||||||
# Get the colour of the background of the line containing the caret.
|
# Get the colour of the background of the line containing the caret.
|
||||||
@@ -492,8 +511,7 @@ fun void AutoCCancel=2101(,)
|
|||||||
# Is there an auto-completion list visible?
|
# Is there an auto-completion list visible?
|
||||||
fun bool AutoCActive=2102(,)
|
fun bool AutoCActive=2102(,)
|
||||||
|
|
||||||
# Retrieve the position of the caret when the auto-completion list was
|
# Retrieve the position of the caret when the auto-completion list was displayed.
|
||||||
# displayed.
|
|
||||||
fun position AutoCPosStart=2103(,)
|
fun position AutoCPosStart=2103(,)
|
||||||
|
|
||||||
# User has selected an item so remove the list and insert the selection.
|
# User has selected an item so remove the list and insert the selection.
|
||||||
@@ -502,8 +520,8 @@ fun void AutoCComplete=2104(,)
|
|||||||
# Define a set of character that when typed cancel the auto-completion list.
|
# Define a set of character that when typed cancel the auto-completion list.
|
||||||
fun void AutoCStops=2105(, string characterSet)
|
fun void AutoCStops=2105(, string characterSet)
|
||||||
|
|
||||||
# Change the separator character in the string setting up an auto-completion
|
# Change the separator character in the string setting up an auto-completion list.
|
||||||
# list. Default is space but can be changed if items contain space.
|
# Default is space but can be changed if items contain space.
|
||||||
set void AutoCSetSeparator=2106(int separatorCharacter,)
|
set void AutoCSetSeparator=2106(int separatorCharacter,)
|
||||||
|
|
||||||
# Retrieve the auto-completion list separator character.
|
# Retrieve the auto-completion list separator character.
|
||||||
@@ -538,16 +556,18 @@ get bool AutoCGetIgnoreCase=2116(,)
|
|||||||
# Display a list of strings and send notification when user chooses one.
|
# Display a list of strings and send notification when user chooses one.
|
||||||
fun void UserListShow=2117(int listType, string itemList)
|
fun void UserListShow=2117(int listType, string itemList)
|
||||||
|
|
||||||
# Set whether or not autocompletion is hidden automatically when nothing matches
|
# Set whether or not autocompletion is hidden automatically when nothing matches.
|
||||||
set void AutoCSetAutoHide=2118(bool autoHide,)
|
set void AutoCSetAutoHide=2118(bool autoHide,)
|
||||||
|
|
||||||
# Retrieve whether or not autocompletion is hidden automatically when nothing matches
|
# Retrieve whether or not autocompletion is hidden automatically when nothing matches.
|
||||||
get bool AutoCGetAutoHide=2119(,)
|
get bool AutoCGetAutoHide=2119(,)
|
||||||
|
|
||||||
# Set whether or not autocompletion deletes any word characters after the inserted text upon completion
|
# Set whether or not autocompletion deletes any word characters
|
||||||
|
# after the inserted text upon completion.
|
||||||
set void AutoCSetDropRestOfWord=2270(bool dropRestOfWord,)
|
set void AutoCSetDropRestOfWord=2270(bool dropRestOfWord,)
|
||||||
|
|
||||||
# Retrieve whether or not autocompletion deletes any word characters after the inserted text upon completion
|
# Retrieve whether or not autocompletion deletes any word characters
|
||||||
|
# after the inserted text upon completion.
|
||||||
get bool AutoCGetDropRestOfWord=2271(,)
|
get bool AutoCGetDropRestOfWord=2271(,)
|
||||||
|
|
||||||
# Set the number of spaces used for one level of indentation.
|
# Set the number of spaces used for one level of indentation.
|
||||||
@@ -630,6 +650,7 @@ set void SetPrintMagnification=2146(int magnification,)
|
|||||||
# Returns the print magnification.
|
# Returns the print magnification.
|
||||||
get int GetPrintMagnification=2147(,)
|
get int GetPrintMagnification=2147(,)
|
||||||
|
|
||||||
|
enu PrintOption=SC_PRINT_
|
||||||
# PrintColourMode - use same colours as screen.
|
# PrintColourMode - use same colours as screen.
|
||||||
val SC_PRINT_NORMAL=0
|
val SC_PRINT_NORMAL=0
|
||||||
# PrintColourMode - invert the light value of each style for printing.
|
# PrintColourMode - invert the light value of each style for printing.
|
||||||
@@ -647,6 +668,7 @@ set void SetPrintColourMode=2148(int mode,)
|
|||||||
# Returns the print colour mode.
|
# Returns the print colour mode.
|
||||||
get int GetPrintColourMode=2149(,)
|
get int GetPrintColourMode=2149(,)
|
||||||
|
|
||||||
|
enu FindOption=SCFIND_
|
||||||
val SCFIND_WHOLEWORD=2
|
val SCFIND_WHOLEWORD=2
|
||||||
val SCFIND_MATCHCASE=4
|
val SCFIND_MATCHCASE=4
|
||||||
val SCFIND_WORDSTART=0x00100000
|
val SCFIND_WORDSTART=0x00100000
|
||||||
@@ -655,7 +677,7 @@ val SCFIND_REGEXP=0x00200000
|
|||||||
# Find some text in the document.
|
# Find some text in the document.
|
||||||
fun position FindText=2150(int flags, findtext ft)
|
fun position FindText=2150(int flags, findtext ft)
|
||||||
|
|
||||||
# On Windows will draw the document into a display context such as a printer.
|
# On Windows, will draw the document into a display context such as a printer.
|
||||||
fun void FormatRange=2151(bool draw, formatrange fr)
|
fun void FormatRange=2151(bool draw, formatrange fr)
|
||||||
|
|
||||||
# Retrieve the line at the top of the display.
|
# Retrieve the line at the top of the display.
|
||||||
@@ -727,7 +749,7 @@ fun void Null=2172(,)
|
|||||||
# Will a paste succeed?
|
# Will a paste succeed?
|
||||||
fun bool CanPaste=2173(,)
|
fun bool CanPaste=2173(,)
|
||||||
|
|
||||||
# Are there any undoable actions in the undo history.
|
# Are there any undoable actions in the undo history?
|
||||||
fun bool CanUndo=2174(,)
|
fun bool CanUndo=2174(,)
|
||||||
|
|
||||||
# Delete the undo history.
|
# Delete the undo history.
|
||||||
@@ -765,16 +787,16 @@ get int GetDirectFunction=2184(,)
|
|||||||
# the function returned by GetDirectFunction.
|
# the function returned by GetDirectFunction.
|
||||||
get int GetDirectPointer=2185(,)
|
get int GetDirectPointer=2185(,)
|
||||||
|
|
||||||
# Set to overtype (true) or insert mode
|
# Set to overtype (true) or insert mode.
|
||||||
set void SetOvertype=2186(bool overtype,)
|
set void SetOvertype=2186(bool overtype,)
|
||||||
|
|
||||||
# Returns true if overtype mode is active otherwise false is returned.
|
# Returns true if overtype mode is active otherwise false is returned.
|
||||||
get bool GetOvertype=2187(,)
|
get bool GetOvertype=2187(,)
|
||||||
|
|
||||||
# Set the width of the insert mode caret
|
# Set the width of the insert mode caret.
|
||||||
set void SetCaretWidth=2188(int pixelWidth,)
|
set void SetCaretWidth=2188(int pixelWidth,)
|
||||||
|
|
||||||
# Returns the width of the insert mode caret
|
# Returns the width of the insert mode caret.
|
||||||
get int GetCaretWidth=2189(,)
|
get int GetCaretWidth=2189(,)
|
||||||
|
|
||||||
# Sets the position that starts the target which is used for updating the
|
# Sets the position that starts the target which is used for updating the
|
||||||
@@ -809,10 +831,10 @@ fun int ReplaceTargetRE=2195(int length, string text)
|
|||||||
# Returns length of range or -1 for failure in which case target is not moved.
|
# Returns length of range or -1 for failure in which case target is not moved.
|
||||||
fun int SearchInTarget=2197(int length, string text)
|
fun int SearchInTarget=2197(int length, string text)
|
||||||
|
|
||||||
# Set the search flags used by SearchInTarget
|
# Set the search flags used by SearchInTarget.
|
||||||
set void SetSearchFlags=2198(int flags,)
|
set void SetSearchFlags=2198(int flags,)
|
||||||
|
|
||||||
# Get the search flags used by SearchInTarget
|
# Get the search flags used by SearchInTarget.
|
||||||
get int GetSearchFlags=2199(,)
|
get int GetSearchFlags=2199(,)
|
||||||
|
|
||||||
# Show a call tip containing a definition near position pos.
|
# Show a call tip containing a definition near position pos.
|
||||||
@@ -839,6 +861,7 @@ fun int VisibleFromDocLine=2220(int line,)
|
|||||||
# Find the document line of a display line taking hidden lines into account.
|
# Find the document line of a display line taking hidden lines into account.
|
||||||
fun int DocLineFromVisible=2221(int lineDisplay,)
|
fun int DocLineFromVisible=2221(int lineDisplay,)
|
||||||
|
|
||||||
|
enu FoldLevel=SC_FOLDLEVEL
|
||||||
val SC_FOLDLEVELBASE=0x400
|
val SC_FOLDLEVELBASE=0x400
|
||||||
val SC_FOLDLEVELWHITEFLAG=0x1000
|
val SC_FOLDLEVELWHITEFLAG=0x1000
|
||||||
val SC_FOLDLEVELHEADERFLAG=0x2000
|
val SC_FOLDLEVELHEADERFLAG=0x2000
|
||||||
@@ -879,20 +902,20 @@ fun void ToggleFold=2231(int line,)
|
|||||||
# Ensure a particular line is visible by expanding any header line hiding it.
|
# Ensure a particular line is visible by expanding any header line hiding it.
|
||||||
fun void EnsureVisible=2232(int line,)
|
fun void EnsureVisible=2232(int line,)
|
||||||
|
|
||||||
# Set some debugging options for folding
|
# Set some debugging options for folding.
|
||||||
fun void SetFoldFlags=2233(int flags,)
|
fun void SetFoldFlags=2233(int flags,)
|
||||||
|
|
||||||
# Ensure a particular line is visible by expanding any header line hiding it.
|
# Ensure a particular line is visible by expanding any header line hiding it.
|
||||||
# Use the currently set visibility policy to determine which range to display.
|
# Use the currently set visibility policy to determine which range to display.
|
||||||
fun void EnsureVisibleEnforcePolicy=2234(int line,)
|
fun void EnsureVisibleEnforcePolicy=2234(int line,)
|
||||||
|
|
||||||
# Sets whether a tab pressed when caret is within indentation indents
|
# Sets whether a tab pressed when caret is within indentation indents.
|
||||||
set void SetTabIndents=2260(bool tabIndents,)
|
set void SetTabIndents=2260(bool tabIndents,)
|
||||||
|
|
||||||
# Does a tab pressed when caret is within indentation indent?
|
# Does a tab pressed when caret is within indentation indent?
|
||||||
get bool GetTabIndents=2261(,)
|
get bool GetTabIndents=2261(,)
|
||||||
|
|
||||||
# Sets whether a backspace pressed when caret is within indentation unindents
|
# Sets whether a backspace pressed when caret is within indentation unindents.
|
||||||
set void SetBackSpaceUnIndents=2262(bool bsUnIndents,)
|
set void SetBackSpaceUnIndents=2262(bool bsUnIndents,)
|
||||||
|
|
||||||
# Does a backspace pressed when caret is within indentation unindent?
|
# Does a backspace pressed when caret is within indentation unindent?
|
||||||
@@ -900,38 +923,63 @@ get bool GetBackSpaceUnIndents=2263(,)
|
|||||||
|
|
||||||
val SC_TIME_FOREVER=10000000
|
val SC_TIME_FOREVER=10000000
|
||||||
|
|
||||||
# Sets the time the mouse must sit still to generate a mouse dwell event
|
# Sets the time the mouse must sit still to generate a mouse dwell event.
|
||||||
set void SetMouseDwellTime=2264(int periodMilliseconds,)
|
set void SetMouseDwellTime=2264(int periodMilliseconds,)
|
||||||
|
|
||||||
# Retrieve the time the mouse must sit still to generate a mouse dwell event
|
# Retrieve the time the mouse must sit still to generate a mouse dwell event.
|
||||||
get int GetMouseDwellTime=2265(,)
|
get int GetMouseDwellTime=2265(,)
|
||||||
|
|
||||||
# Get position of start of word
|
# Get position of start of word.
|
||||||
fun int WordStartPosition=2266(position pos, bool onlyWordCharacters)
|
fun int WordStartPosition=2266(position pos, bool onlyWordCharacters)
|
||||||
|
|
||||||
# Get position of end of word
|
# Get position of end of word.
|
||||||
fun int WordEndPosition=2267(position pos, bool onlyWordCharacters)
|
fun int WordEndPosition=2267(position pos, bool onlyWordCharacters)
|
||||||
|
|
||||||
|
enu Wrap=SC_WRAP_
|
||||||
val SC_WRAP_NONE=0
|
val SC_WRAP_NONE=0
|
||||||
val SC_WRAP_WORD=1
|
val SC_WRAP_WORD=1
|
||||||
|
|
||||||
# Sets whether text is word wrapped
|
# Sets whether text is word wrapped.
|
||||||
set void SetWrapMode=2268(int mode,)
|
set void SetWrapMode=2268(int mode,)
|
||||||
|
|
||||||
# Retrieve whether text is word wrapped
|
# Retrieve whether text is word wrapped.
|
||||||
get int GetWrapMode=2269(,)
|
get int GetWrapMode=2269(,)
|
||||||
|
|
||||||
|
enu LineCache=SC_CACHE_
|
||||||
val SC_CACHE_NONE=0
|
val SC_CACHE_NONE=0
|
||||||
val SC_CACHE_CARET=1
|
val SC_CACHE_CARET=1
|
||||||
val SC_CACHE_PAGE=2
|
val SC_CACHE_PAGE=2
|
||||||
val SC_CACHE_DOCUMENT=3
|
val SC_CACHE_DOCUMENT=3
|
||||||
|
|
||||||
# Sets the degree of caching of layout information
|
# Sets the degree of caching of layout information.
|
||||||
set void SetLayoutCache=2272(int mode,)
|
set void SetLayoutCache=2272(int mode,)
|
||||||
|
|
||||||
# Retrieve the degree of caching of layout information
|
# Retrieve the degree of caching of layout information.
|
||||||
get int GetLayoutCache=2273(,)
|
get int GetLayoutCache=2273(,)
|
||||||
|
|
||||||
|
# Sets the document width assumed for scrolling.
|
||||||
|
set void SetScrollWidth=2274(int pixelWidth,)
|
||||||
|
|
||||||
|
# Retrieve the document width assumed for scrolling.
|
||||||
|
get int GetScrollWidth=2275(,)
|
||||||
|
|
||||||
|
# Measure the pixel width of some text in a particular style.
|
||||||
|
# Nul terminated text argument.
|
||||||
|
# Does not handle tab or control characters.
|
||||||
|
fun int TextWidth=2276(int style, string text)
|
||||||
|
|
||||||
|
# Sets the scroll range so that maximum scroll position has
|
||||||
|
# the last line at the bottom of the view (default).
|
||||||
|
# Setting this to false allows scrolling one page below the last line.
|
||||||
|
set void SetEndAtLastLine=2277(bool endAtLastLine,)
|
||||||
|
|
||||||
|
# Retrieve whether the maximum scroll position has the last
|
||||||
|
# line at the bottom of the view.
|
||||||
|
get int GetEndAtLastLine=2278(,)
|
||||||
|
|
||||||
|
# Retrieve the height of a particular line of text in pixels.
|
||||||
|
fun int TextHeight=2279(int line,)
|
||||||
|
|
||||||
## Start of key messages
|
## Start of key messages
|
||||||
# Move caret down one line.
|
# Move caret down one line.
|
||||||
fun void LineDown=2300(,)
|
fun void LineDown=2300(,)
|
||||||
@@ -1014,8 +1062,7 @@ fun void Cancel=2325(,)
|
|||||||
# Delete the selection or if no selection, the character before the caret.
|
# Delete the selection or if no selection, the character before the caret.
|
||||||
fun void DeleteBack=2326(,)
|
fun void DeleteBack=2326(,)
|
||||||
|
|
||||||
# If selection is empty or all on one line replace the selection with a tab
|
# If selection is empty or all on one line replace the selection with a tab character.
|
||||||
# character.
|
|
||||||
# If more than one line selected, indent the lines.
|
# If more than one line selected, indent the lines.
|
||||||
fun void Tab=2327(,)
|
fun void Tab=2327(,)
|
||||||
|
|
||||||
@@ -1069,17 +1116,17 @@ fun void LineScrollDown=2342(,)
|
|||||||
fun void LineScrollUp=2343(,)
|
fun void LineScrollUp=2343(,)
|
||||||
|
|
||||||
# Delete the selection or if no selection, the character before the caret.
|
# Delete the selection or if no selection, the character before the caret.
|
||||||
# Will not delete the chraacter before at the start of a line.
|
# Will not delete the character before at the start of a line.
|
||||||
fun void DeleteBackNotLine=2344(,)
|
fun void DeleteBackNotLine=2344(,)
|
||||||
|
|
||||||
# Move the caret inside current view if it's not there already
|
# Move the caret inside current view if it's not there already.
|
||||||
fun void MoveCaretInsideView=2401(,)
|
fun void MoveCaretInsideView=2401(,)
|
||||||
|
|
||||||
# How many characters are on a line, not including end of line characters.
|
# How many characters are on a line, not including end of line characters?
|
||||||
fun int LineLength=2350(int line,)
|
fun int LineLength=2350(int line,)
|
||||||
|
|
||||||
# Highlight the characters at two positions.
|
# Highlight the characters at two positions.
|
||||||
fun void BraceHighlight=2351(position pos1,position pos2)
|
fun void BraceHighlight=2351(position pos1, position pos2)
|
||||||
|
|
||||||
# Highlight the character at a position indicating there is no matching brace.
|
# Highlight the character at a position indicating there is no matching brace.
|
||||||
fun void BraceBadLight=2352(position pos,)
|
fun void BraceBadLight=2352(position pos,)
|
||||||
@@ -1087,10 +1134,10 @@ fun void BraceBadLight=2352(position pos,)
|
|||||||
# Find the position of a matching brace or INVALID_POSITION if no match.
|
# Find the position of a matching brace or INVALID_POSITION if no match.
|
||||||
fun position BraceMatch=2353(position pos,)
|
fun position BraceMatch=2353(position pos,)
|
||||||
|
|
||||||
# Are the end of line characters visible.
|
# Are the end of line characters visible?
|
||||||
get bool GetViewEOL=2355(,)
|
get bool GetViewEOL=2355(,)
|
||||||
|
|
||||||
# Make the end of line characters visible or invisible
|
# Make the end of line characters visible or invisible.
|
||||||
set void SetViewEOL=2356(bool visible,)
|
set void SetViewEOL=2356(bool visible,)
|
||||||
|
|
||||||
# Retrieve a pointer to the document object.
|
# Retrieve a pointer to the document object.
|
||||||
@@ -1102,6 +1149,7 @@ set void SetDocPointer=2358(,int pointer)
|
|||||||
# Set which document modification events are sent to the container.
|
# Set which document modification events are sent to the container.
|
||||||
set void SetModEventMask=2359(int mask,)
|
set void SetModEventMask=2359(int mask,)
|
||||||
|
|
||||||
|
enu EdgeVisualStyle=EDGE_
|
||||||
val EDGE_NONE=0
|
val EDGE_NONE=0
|
||||||
val EDGE_LINE=1
|
val EDGE_LINE=1
|
||||||
val EDGE_BACKGROUND=2
|
val EDGE_BACKGROUND=2
|
||||||
@@ -1137,24 +1185,6 @@ fun int SearchNext=2367(int flags, string text)
|
|||||||
# Does not ensure the selection is visible.
|
# Does not ensure the selection is visible.
|
||||||
fun int SearchPrev=2368(int flags, string text)
|
fun int SearchPrev=2368(int flags, string text)
|
||||||
|
|
||||||
# Show caret within N lines of edge when it's scrolled to view
|
|
||||||
# If CARET_SLOP not set then centre caret on screen when it's
|
|
||||||
# scrolled to view
|
|
||||||
val CARET_SLOP=0x01
|
|
||||||
# Value not used
|
|
||||||
val CARET_CENTER=0x02
|
|
||||||
# If CARET_SLOP also set then reposition whenever outside slop border
|
|
||||||
# If CARET_SLOP not set then recentre even when visible
|
|
||||||
val CARET_STRICT=0x04
|
|
||||||
# If CARET_XEVEN set then both left and right margins are given equal weight
|
|
||||||
# rather than favouring left following behaviour.
|
|
||||||
val CARET_XEVEN=0x08
|
|
||||||
# If CARET_XJUMPS set then when caret reaches the margin the display jumps
|
|
||||||
# enough to leave the caret solidly within the display.
|
|
||||||
val CARET_XJUMPS=0x10
|
|
||||||
# Set the way the line the caret is on is kept visible.
|
|
||||||
fun void SetCaretPolicy=2369(int caretPolicy, int caretSlop)
|
|
||||||
|
|
||||||
# Retrieves the number of lines completely visible.
|
# Retrieves the number of lines completely visible.
|
||||||
get int LinesOnScreen=2370(,)
|
get int LinesOnScreen=2370(,)
|
||||||
|
|
||||||
@@ -1162,7 +1192,7 @@ get int LinesOnScreen=2370(,)
|
|||||||
# the wrong mouse button.
|
# the wrong mouse button.
|
||||||
fun void UsePopUp=2371(bool allowPopUp,)
|
fun void UsePopUp=2371(bool allowPopUp,)
|
||||||
|
|
||||||
# Is the selection a rectangular. The alternative is the more common stream selection.
|
# Is the selection rectangular? The alternative is the more common stream selection.
|
||||||
get bool SelectionIsRectangle=2372(,)
|
get bool SelectionIsRectangle=2372(,)
|
||||||
|
|
||||||
# Set the zoom level. This number of points is added to the size of all fonts.
|
# Set the zoom level. This number of points is added to the size of all fonts.
|
||||||
@@ -1182,63 +1212,99 @@ fun void ReleaseDocument=2377(, int doc)
|
|||||||
# Get which document modification events are sent to the container.
|
# Get which document modification events are sent to the container.
|
||||||
get int GetModEventMask=2378(,)
|
get int GetModEventMask=2378(,)
|
||||||
|
|
||||||
# Change internal focus flag
|
# Change internal focus flag.
|
||||||
set void SetFocus=2380(bool focus,)
|
set void SetFocus=2380(bool focus,)
|
||||||
# Get internal focus flag
|
# Get internal focus flag.
|
||||||
get bool GetFocus=2381(,)
|
get bool GetFocus=2381(,)
|
||||||
|
|
||||||
# Change error status - 0 = OK
|
# Change error status - 0 = OK.
|
||||||
set void SetStatus=2382(int statusCode,)
|
set void SetStatus=2382(int statusCode,)
|
||||||
# Get error status
|
# Get error status.
|
||||||
get int GetStatus=2383(,)
|
get int GetStatus=2383(,)
|
||||||
|
|
||||||
# Set whether the mouse is captured when its button is pressed
|
# Set whether the mouse is captured when its button is pressed.
|
||||||
set void SetMouseDownCaptures=2384(bool captures,)
|
set void SetMouseDownCaptures=2384(bool captures,)
|
||||||
# Get whether mouse gets captured
|
# Get whether mouse gets captured.
|
||||||
get bool GetMouseDownCaptures=2385(,)
|
get bool GetMouseDownCaptures=2385(,)
|
||||||
|
|
||||||
|
enu CursorShape=SC_CURSOR
|
||||||
val SC_CURSORNORMAL=-1
|
val SC_CURSORNORMAL=-1
|
||||||
val SC_CURSORWAIT=3
|
val SC_CURSORWAIT=3
|
||||||
# Sets the cursor to one of the SC_CURSOR* values
|
# Sets the cursor to one of the SC_CURSOR* values.
|
||||||
set void SetCursor=2386(int cursorType,)
|
set void SetCursor=2386(int cursorType,)
|
||||||
# Get cursor type
|
# Get cursor type.
|
||||||
get int GetCursor=2387(,)
|
get int GetCursor=2387(,)
|
||||||
|
|
||||||
# Change the way control characters are displayed:
|
# Change the way control characters are displayed:
|
||||||
# If symbol is < 32, keep the drawn way, else, use the given character
|
# If symbol is < 32, keep the drawn way, else, use the given character.
|
||||||
set void SetControlCharSymbol=2388(int symbol,)
|
set void SetControlCharSymbol=2388(int symbol,)
|
||||||
# Get the way control characters are displayed
|
# Get the way control characters are displayed.
|
||||||
get int GetControlCharSymbol=2389(,)
|
get int GetControlCharSymbol=2389(,)
|
||||||
|
|
||||||
# Move to the previous change in capitalistion
|
# Move to the previous change in capitalisation.
|
||||||
fun void WordPartLeft=2390(,)
|
fun void WordPartLeft=2390(,)
|
||||||
# Move to the previous change in capitalistion extending selection to new caret position.
|
# Move to the previous change in capitalisation extending selection
|
||||||
|
# to new caret position.
|
||||||
fun void WordPartLeftExtend=2391(,)
|
fun void WordPartLeftExtend=2391(,)
|
||||||
# Move to the change next in capitalistion
|
# Move to the change next in capitalisation.
|
||||||
fun void WordPartRight=2392(,)
|
fun void WordPartRight=2392(,)
|
||||||
# Move to the next change in capitalistion extending selection to new caret position.
|
# Move to the next change in capitalisation extending selection
|
||||||
|
# to new caret position.
|
||||||
fun void WordPartRightExtend=2393(,)
|
fun void WordPartRightExtend=2393(,)
|
||||||
|
|
||||||
# Constants for use with SetVisiblePolicy, similar to SetCaretPolicy
|
# Constants for use with SetVisiblePolicy, similar to SetCaretPolicy.
|
||||||
val VISIBLE_SLOP=0x01
|
val VISIBLE_SLOP=0x01
|
||||||
val VISIBLE_STRICT=0x04
|
val VISIBLE_STRICT=0x04
|
||||||
# Set the way the display area is determined when a particular line is to be moved to.
|
# Set the way the display area is determined when a particular line
|
||||||
|
# is to be moved to by Find, FindNext, GotoLine, etc.
|
||||||
fun void SetVisiblePolicy=2394(int visiblePolicy, int visibleSlop)
|
fun void SetVisiblePolicy=2394(int visiblePolicy, int visibleSlop)
|
||||||
|
|
||||||
# Delete back from the current position to the start of the line
|
# Delete back from the current position to the start of the line.
|
||||||
fun void DelLineLeft=2395(,)
|
fun void DelLineLeft=2395(,)
|
||||||
|
|
||||||
# Delete forwards from the current position to the end of the line
|
# Delete forwards from the current position to the end of the line.
|
||||||
fun void DelLineRight=2396(,)
|
fun void DelLineRight=2396(,)
|
||||||
|
|
||||||
# Get and Set the xOffset (ie, horizonal scroll position)
|
# Get and Set the xOffset (ie, horizonal scroll position).
|
||||||
set void SetXOffset=2397(int newOffset,)
|
set void SetXOffset=2397(int newOffset,)
|
||||||
get int GetXOffset=2398(,)
|
get int GetXOffset=2398(,)
|
||||||
|
|
||||||
# Set the focus to this Scintilla widget.
|
# Set the focus to this Scintilla widget.
|
||||||
# GTK+ Specific
|
# GTK+ Specific.
|
||||||
fun void GrabFocus=2400(,)
|
fun void GrabFocus=2400(,)
|
||||||
|
|
||||||
|
enu CaretPolicy = CARET_
|
||||||
|
# Caret policy, used by SetXCaretPolicy and SetYCaretPolicy.
|
||||||
|
# If CARET_SLOP is set, we can define a slop value: caretSlop.
|
||||||
|
# This value defines an unwanted zone (UZ) where the caret is... unwanted.
|
||||||
|
# This zone is defined as a number of pixels near the vertical margins,
|
||||||
|
# and as a number of lines near the horizontal margins.
|
||||||
|
# By keeping the caret away from the edges, it is seen within its context,
|
||||||
|
# so it is likely that the identifier that the caret is on can be completely seen,
|
||||||
|
# and that the current line is seen with some of the lines following it which are
|
||||||
|
# often dependent on that line.
|
||||||
|
val CARET_SLOP=0x01
|
||||||
|
# If CARET_STRICT is set, the policy is enforced... strictly.
|
||||||
|
# The caret is centred on the display if slop is not set,
|
||||||
|
# and cannot go in the UZ if slop is set.
|
||||||
|
val CARET_STRICT=0x04
|
||||||
|
# If CARET_JUMPS is set, the display is moved more energetically
|
||||||
|
# so the caret can move in the same direction longer before the policy is applied again.
|
||||||
|
val CARET_JUMPS=0x10
|
||||||
|
# If CARET_EVEN is not set, instead of having symmetrical UZs,
|
||||||
|
# the left and bottom UZs are extended up to right and top UZs respectively.
|
||||||
|
# This way, we favour the displaying of useful information: the begining of lines,
|
||||||
|
# where most code reside, and the lines after the caret, eg. the body of a function.
|
||||||
|
val CARET_EVEN=0x08
|
||||||
|
|
||||||
|
# Set the way the caret is kept visible when going sideway.
|
||||||
|
# The exclusion zone is given in pixels.
|
||||||
|
fun void SetXCaretPolicy=2402(int caretPolicy, int caretSlop)
|
||||||
|
|
||||||
|
# Set the way the line the caret is on is kept visible.
|
||||||
|
# The exclusion zone is given in lines.
|
||||||
|
fun void SetYCaretPolicy=2403(int caretPolicy, int caretSlop)
|
||||||
|
|
||||||
# Start notifying the container of all key presses and commands.
|
# Start notifying the container of all key presses and commands.
|
||||||
fun void StartRecord=3001(,)
|
fun void StartRecord=3001(,)
|
||||||
|
|
||||||
@@ -1264,9 +1330,10 @@ set void SetKeyWords=4005(int keywordSet, string keyWords)
|
|||||||
set void SetLexerLanguage=4006(, string language)
|
set void SetLexerLanguage=4006(, string language)
|
||||||
|
|
||||||
# Notifications
|
# Notifications
|
||||||
# Type of modification and the action which caused the modification
|
# Type of modification and the action which caused the modification.
|
||||||
# These are defined as a bit mask to make it easy to specify which notifications are wanted.
|
# These are defined as a bit mask to make it easy to specify which notifications are wanted.
|
||||||
# One bit is set from each of SC_MOD_* and SC_PERFORMED_*.
|
# One bit is set from each of SC_MOD_* and SC_PERFORMED_*.
|
||||||
|
enu ModificationFlags=SC_MOD_ SC_PERFORMED_ SC_LAST
|
||||||
val SC_MOD_INSERTTEXT=0x1
|
val SC_MOD_INSERTTEXT=0x1
|
||||||
val SC_MOD_DELETETEXT=0x2
|
val SC_MOD_DELETETEXT=0x2
|
||||||
val SC_MOD_CHANGESTYLE=0x4
|
val SC_MOD_CHANGESTYLE=0x4
|
||||||
@@ -1281,15 +1348,18 @@ val SC_MOD_BEFOREDELETE=0x800
|
|||||||
val SC_MODEVENTMASKALL=0xF77
|
val SC_MODEVENTMASKALL=0xF77
|
||||||
|
|
||||||
# For compatibility, these go through the COMMAND notification rather than NOTIFY
|
# For compatibility, these go through the COMMAND notification rather than NOTIFY
|
||||||
# and have exactly the same values as the EN_* constants.
|
# and should have had exactly the same values as the EN_* constants.
|
||||||
|
# Unfortunately the SETFOCUS and KILLFOCUS are flipped over from EN_*
|
||||||
|
# As clients depend on these constants, this will not be changed.
|
||||||
val SCEN_CHANGE=768
|
val SCEN_CHANGE=768
|
||||||
val SCEN_SETFOCUS=512
|
val SCEN_SETFOCUS=512
|
||||||
val SCEN_KILLFOCUS=256
|
val SCEN_KILLFOCUS=256
|
||||||
|
|
||||||
# Symbolic key codes and modifier flags
|
# Symbolic key codes and modifier flags.
|
||||||
# ASCII and other printable characters below 256
|
# ASCII and other printable characters below 256.
|
||||||
# Extended keys above 300
|
# Extended keys above 300.
|
||||||
|
|
||||||
|
enu Keys=SCK_
|
||||||
val SCK_DOWN=300
|
val SCK_DOWN=300
|
||||||
val SCK_UP=301
|
val SCK_UP=301
|
||||||
val SCK_LEFT=302
|
val SCK_LEFT=302
|
||||||
@@ -1308,12 +1378,14 @@ val SCK_ADD=310
|
|||||||
val SCK_SUBTRACT=311
|
val SCK_SUBTRACT=311
|
||||||
val SCK_DIVIDE=312
|
val SCK_DIVIDE=312
|
||||||
|
|
||||||
|
enu KeyMod=SCMOD_
|
||||||
val SCMOD_SHIFT=1
|
val SCMOD_SHIFT=1
|
||||||
val SCMOD_CTRL=2
|
val SCMOD_CTRL=2
|
||||||
val SCMOD_ALT=4
|
val SCMOD_ALT=4
|
||||||
|
|
||||||
################################################
|
################################################
|
||||||
# For SciLexer.h
|
# For SciLexer.h
|
||||||
|
enu Lexer=SCLEX_
|
||||||
val SCLEX_CONTAINER=0
|
val SCLEX_CONTAINER=0
|
||||||
val SCLEX_NULL=1
|
val SCLEX_NULL=1
|
||||||
val SCLEX_PYTHON=2
|
val SCLEX_PYTHON=2
|
||||||
@@ -1347,11 +1419,14 @@ val SCLEX_ASP=29
|
|||||||
val SCLEX_PHP=30
|
val SCLEX_PHP=30
|
||||||
val SCLEX_BAAN=31
|
val SCLEX_BAAN=31
|
||||||
val SCLEX_MATLAB=32
|
val SCLEX_MATLAB=32
|
||||||
|
val SCLEX_SCRIPTOL=33
|
||||||
|
|
||||||
# When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
|
# When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
|
||||||
# value assigned in sequence from SCLEX_AUTOMATIC+1.
|
# value assigned in sequence from SCLEX_AUTOMATIC+1.
|
||||||
val SCLEX_AUTOMATIC=1000
|
val SCLEX_AUTOMATIC=1000
|
||||||
# Lexical states for SCLEX_PYTHON
|
# Lexical states for SCLEX_PYTHON
|
||||||
|
lex Python=SCLEX_PYTHON SCE_P_
|
||||||
|
lex Ruby=SCLEX_RUBY SCE_P_
|
||||||
val SCE_P_DEFAULT=0
|
val SCE_P_DEFAULT=0
|
||||||
val SCE_P_COMMENTLINE=1
|
val SCE_P_COMMENTLINE=1
|
||||||
val SCE_P_NUMBER=2
|
val SCE_P_NUMBER=2
|
||||||
@@ -1367,6 +1442,11 @@ val SCE_P_IDENTIFIER=11
|
|||||||
val SCE_P_COMMENTBLOCK=12
|
val SCE_P_COMMENTBLOCK=12
|
||||||
val SCE_P_STRINGEOL=13
|
val SCE_P_STRINGEOL=13
|
||||||
# Lexical states for SCLEX_CPP
|
# Lexical states for SCLEX_CPP
|
||||||
|
lex Cpp=SCLEX_CPP SCE_C_
|
||||||
|
lex SQL=SCLEX_SQL SCE_C_
|
||||||
|
lex Pascal=SCLEX_PASCAL SCE_C_
|
||||||
|
lex TCL=SCLEX_TCL SCE_C_
|
||||||
|
lex BullAnt=SCLEX_BULLANT SCE_C_
|
||||||
val SCE_C_DEFAULT=0
|
val SCE_C_DEFAULT=0
|
||||||
val SCE_C_COMMENT=1
|
val SCE_C_COMMENT=1
|
||||||
val SCE_C_COMMENTLINE=2
|
val SCE_C_COMMENTLINE=2
|
||||||
@@ -1386,17 +1466,11 @@ val SCE_C_COMMENTLINEDOC=15
|
|||||||
val SCE_C_WORD2=16
|
val SCE_C_WORD2=16
|
||||||
val SCE_C_COMMENTDOCKEYWORD=17
|
val SCE_C_COMMENTDOCKEYWORD=17
|
||||||
val SCE_C_COMMENTDOCKEYWORDERROR=18
|
val SCE_C_COMMENTDOCKEYWORDERROR=18
|
||||||
# Lexical states for SCLEX_VB, SCLEX_VBSCRIPT
|
|
||||||
val SCE_B_DEFAULT=0
|
|
||||||
val SCE_B_COMMENT=1
|
|
||||||
val SCE_B_NUMBER=2
|
|
||||||
val SCE_B_KEYWORD=3
|
|
||||||
val SCE_B_STRING=4
|
|
||||||
val SCE_B_PREPROCESSOR=5
|
|
||||||
val SCE_B_OPERATOR=6
|
|
||||||
val SCE_B_IDENTIFIER=7
|
|
||||||
val SCE_B_DATE=8
|
|
||||||
# Lexical states for SCLEX_HTML, SCLEX_XML
|
# Lexical states for SCLEX_HTML, SCLEX_XML
|
||||||
|
lex HTML=SCLEX_HTML SCE_H
|
||||||
|
lex XML=SCLEX_XML SCE_H
|
||||||
|
lex ASP=SCLEX_ASP SCE_H
|
||||||
|
lex PHP=SCLEX_PHP SCE_H
|
||||||
val SCE_H_DEFAULT=0
|
val SCE_H_DEFAULT=0
|
||||||
val SCE_H_TAG=1
|
val SCE_H_TAG=1
|
||||||
val SCE_H_TAGUNKNOWN=2
|
val SCE_H_TAGUNKNOWN=2
|
||||||
@@ -1519,6 +1593,7 @@ val SCE_HPHP_COMMENTLINE=125
|
|||||||
val SCE_HPHP_HSTRING_VARIABLE=126
|
val SCE_HPHP_HSTRING_VARIABLE=126
|
||||||
val SCE_HPHP_OPERATOR=127
|
val SCE_HPHP_OPERATOR=127
|
||||||
# Lexical states for SCLEX_PERL
|
# Lexical states for SCLEX_PERL
|
||||||
|
lex Perl=SCLEX_PERL SCE_PL_
|
||||||
val SCE_PL_DEFAULT=0
|
val SCE_PL_DEFAULT=0
|
||||||
val SCE_PL_ERROR=1
|
val SCE_PL_ERROR=1
|
||||||
val SCE_PL_COMMENTLINE=2
|
val SCE_PL_COMMENTLINE=2
|
||||||
@@ -1549,13 +1624,34 @@ val SCE_PL_STRING_QQ=27
|
|||||||
val SCE_PL_STRING_QX=28
|
val SCE_PL_STRING_QX=28
|
||||||
val SCE_PL_STRING_QR=29
|
val SCE_PL_STRING_QR=29
|
||||||
val SCE_PL_STRING_QW=30
|
val SCE_PL_STRING_QW=30
|
||||||
|
# Lexical states for SCLEX_VB, SCLEX_VBSCRIPT
|
||||||
|
lex VB=SCLEX_VB SCE_B_
|
||||||
|
lex VBScript=SCLEX_VBSCRIPT SCE_B_
|
||||||
|
val SCE_B_DEFAULT=0
|
||||||
|
val SCE_B_COMMENT=1
|
||||||
|
val SCE_B_NUMBER=2
|
||||||
|
val SCE_B_KEYWORD=3
|
||||||
|
val SCE_B_STRING=4
|
||||||
|
val SCE_B_PREPROCESSOR=5
|
||||||
|
val SCE_B_OPERATOR=6
|
||||||
|
val SCE_B_IDENTIFIER=7
|
||||||
|
val SCE_B_DATE=8
|
||||||
|
# Lexical states for SCLEX_PROPERTIES
|
||||||
|
lex Properties=SCLEX_PROPERTIES SCE_PROPS_
|
||||||
|
val SCE_PROPS_DEFAULT=0
|
||||||
|
val SCE_PROPS_COMMENT=1
|
||||||
|
val SCE_PROPS_SECTION=2
|
||||||
|
val SCE_PROPS_ASSIGNMENT=3
|
||||||
|
val SCE_PROPS_DEFVAL=4
|
||||||
# Lexical states for SCLEX_LATEX
|
# Lexical states for SCLEX_LATEX
|
||||||
|
lex LaTeX=SCLEX_LATEX SCE_L_
|
||||||
val SCE_L_DEFAULT=0
|
val SCE_L_DEFAULT=0
|
||||||
val SCE_L_COMMAND=1
|
val SCE_L_COMMAND=1
|
||||||
val SCE_L_TAG=2
|
val SCE_L_TAG=2
|
||||||
val SCE_L_MATH=3
|
val SCE_L_MATH=3
|
||||||
val SCE_L_COMMENT=4
|
val SCE_L_COMMENT=4
|
||||||
# Lexical states for SCLEX_LUA
|
# Lexical states for SCLEX_LUA
|
||||||
|
lex Lua=SCLEX_LUA SCE_LUA_
|
||||||
val SCE_LUA_DEFAULT=0
|
val SCE_LUA_DEFAULT=0
|
||||||
val SCE_LUA_COMMENT=1
|
val SCE_LUA_COMMENT=1
|
||||||
val SCE_LUA_COMMENTLINE=2
|
val SCE_LUA_COMMENTLINE=2
|
||||||
@@ -1575,6 +1671,7 @@ val SCE_LUA_WORD4=15
|
|||||||
val SCE_LUA_WORD5=16
|
val SCE_LUA_WORD5=16
|
||||||
val SCE_LUA_WORD6=17
|
val SCE_LUA_WORD6=17
|
||||||
# Lexical states for SCLEX_ERRORLIST
|
# Lexical states for SCLEX_ERRORLIST
|
||||||
|
lex ErrorList=SCLEX_ERRORLIST SCE_ERR_
|
||||||
val SCE_ERR_DEFAULT=0
|
val SCE_ERR_DEFAULT=0
|
||||||
val SCE_ERR_PYTHON=1
|
val SCE_ERR_PYTHON=1
|
||||||
val SCE_ERR_GCC=2
|
val SCE_ERR_GCC=2
|
||||||
@@ -1584,11 +1681,13 @@ val SCE_ERR_BORLAND=5
|
|||||||
val SCE_ERR_PERL=6
|
val SCE_ERR_PERL=6
|
||||||
val SCE_ERR_NET=7
|
val SCE_ERR_NET=7
|
||||||
val SCE_ERR_LUA=8
|
val SCE_ERR_LUA=8
|
||||||
|
val SCE_ERR_CTAG=9
|
||||||
val SCE_ERR_DIFF_CHANGED=10
|
val SCE_ERR_DIFF_CHANGED=10
|
||||||
val SCE_ERR_DIFF_ADDITION=11
|
val SCE_ERR_DIFF_ADDITION=11
|
||||||
val SCE_ERR_DIFF_DELETION=12
|
val SCE_ERR_DIFF_DELETION=12
|
||||||
val SCE_ERR_DIFF_MESSAGE=13
|
val SCE_ERR_DIFF_MESSAGE=13
|
||||||
# Lexical states for SCLEX_BATCH
|
# Lexical states for SCLEX_BATCH
|
||||||
|
lex Batch=SCLEX_BATCH SCE_BAT_
|
||||||
val SCE_BAT_DEFAULT=0
|
val SCE_BAT_DEFAULT=0
|
||||||
val SCE_BAT_COMMENT=1
|
val SCE_BAT_COMMENT=1
|
||||||
val SCE_BAT_WORD=2
|
val SCE_BAT_WORD=2
|
||||||
@@ -1598,6 +1697,7 @@ val SCE_BAT_COMMAND=5
|
|||||||
val SCE_BAT_IDENTIFIER=6
|
val SCE_BAT_IDENTIFIER=6
|
||||||
val SCE_BAT_OPERATOR=7
|
val SCE_BAT_OPERATOR=7
|
||||||
# Lexical states for SCLEX_MAKEFILE
|
# Lexical states for SCLEX_MAKEFILE
|
||||||
|
lex MakeFile=SCLEX_MAKEFILE SCE_MAKE_
|
||||||
val SCE_MAKE_DEFAULT=0
|
val SCE_MAKE_DEFAULT=0
|
||||||
val SCE_MAKE_COMMENT=1
|
val SCE_MAKE_COMMENT=1
|
||||||
val SCE_MAKE_PREPROCESSOR=2
|
val SCE_MAKE_PREPROCESSOR=2
|
||||||
@@ -1605,7 +1705,17 @@ val SCE_MAKE_IDENTIFIER=3
|
|||||||
val SCE_MAKE_OPERATOR=4
|
val SCE_MAKE_OPERATOR=4
|
||||||
val SCE_MAKE_TARGET=5
|
val SCE_MAKE_TARGET=5
|
||||||
val SCE_MAKE_IDEOL=9
|
val SCE_MAKE_IDEOL=9
|
||||||
# Lexical states for the SCLEX_CONF (Apache Configuration Files Lexer)
|
# Lexical states for SCLEX_DIFF
|
||||||
|
lex Diff=SCLEX_DIFF SCE_DIFF_
|
||||||
|
val SCE_DIFF_DEFAULT=0
|
||||||
|
val SCE_DIFF_COMMENT=1
|
||||||
|
val SCE_DIFF_COMMAND=2
|
||||||
|
val SCE_DIFF_HEADER=3
|
||||||
|
val SCE_DIFF_POSITION=4
|
||||||
|
val SCE_DIFF_DELETED=5
|
||||||
|
val SCE_DIFF_ADDED=6
|
||||||
|
# Lexical states for SCLEX_CONF (Apache Configuration Files Lexer)
|
||||||
|
lex Conf=SCLEX_CONF SCE_CONF_
|
||||||
val SCE_CONF_DEFAULT=0
|
val SCE_CONF_DEFAULT=0
|
||||||
val SCE_CONF_COMMENT=1
|
val SCE_CONF_COMMENT=1
|
||||||
val SCE_CONF_NUMBER=2
|
val SCE_CONF_NUMBER=2
|
||||||
@@ -1616,7 +1726,8 @@ val SCE_CONF_STRING=6
|
|||||||
val SCE_CONF_OPERATOR=7
|
val SCE_CONF_OPERATOR=7
|
||||||
val SCE_CONF_IP=8
|
val SCE_CONF_IP=8
|
||||||
val SCE_CONF_DIRECTIVE=9
|
val SCE_CONF_DIRECTIVE=9
|
||||||
# Avenue
|
# Lexical states for SCLEX_AVE, Avenue
|
||||||
|
lex Avenue=SCLEX_AVE SCE_AVE_
|
||||||
val SCE_AVE_DEFAULT=0
|
val SCE_AVE_DEFAULT=0
|
||||||
val SCE_AVE_COMMENT=1
|
val SCE_AVE_COMMENT=1
|
||||||
val SCE_AVE_NUMBER=2
|
val SCE_AVE_NUMBER=2
|
||||||
@@ -1629,6 +1740,7 @@ val SCE_AVE_STRINGEOL=8
|
|||||||
val SCE_AVE_IDENTIFIER=9
|
val SCE_AVE_IDENTIFIER=9
|
||||||
val SCE_AVE_OPERATOR=10
|
val SCE_AVE_OPERATOR=10
|
||||||
# Lexical states for SCLEX_ADA
|
# Lexical states for SCLEX_ADA
|
||||||
|
lex Ada=SCLEX_ADA SCE_ADA_
|
||||||
val SCE_ADA_DEFAULT=0
|
val SCE_ADA_DEFAULT=0
|
||||||
val SCE_ADA_COMMENT=1
|
val SCE_ADA_COMMENT=1
|
||||||
val SCE_ADA_NUMBER=2
|
val SCE_ADA_NUMBER=2
|
||||||
@@ -1639,6 +1751,7 @@ val SCE_ADA_OPERATOR=6
|
|||||||
val SCE_ADA_IDENTIFIER=7
|
val SCE_ADA_IDENTIFIER=7
|
||||||
val SCE_ADA_STRINGEOL=8
|
val SCE_ADA_STRINGEOL=8
|
||||||
# Lexical states for SCLEX_BAAN
|
# Lexical states for SCLEX_BAAN
|
||||||
|
lex Baan=SCLEX_BAAN SCE_BAAN_
|
||||||
val SCE_BAAN_DEFAULT=0
|
val SCE_BAAN_DEFAULT=0
|
||||||
val SCE_BAAN_COMMENT=1
|
val SCE_BAAN_COMMENT=1
|
||||||
val SCE_BAAN_COMMENTDOC=2
|
val SCE_BAAN_COMMENTDOC=2
|
||||||
@@ -1651,6 +1764,7 @@ val SCE_BAAN_IDENTIFIER=8
|
|||||||
val SCE_BAAN_STRINGEOL=9
|
val SCE_BAAN_STRINGEOL=9
|
||||||
val SCE_BAAN_WORD2=10
|
val SCE_BAAN_WORD2=10
|
||||||
# Lexical states for SCLEX_LISP
|
# Lexical states for SCLEX_LISP
|
||||||
|
lex Lisp=SCLEX_LISP SCE_LISP_
|
||||||
val SCE_LISP_DEFAULT=0
|
val SCE_LISP_DEFAULT=0
|
||||||
val SCE_LISP_COMMENT=1
|
val SCE_LISP_COMMENT=1
|
||||||
val SCE_LISP_NUMBER=2
|
val SCE_LISP_NUMBER=2
|
||||||
@@ -1660,6 +1774,8 @@ val SCE_LISP_STRINGEOL=8
|
|||||||
val SCE_LISP_IDENTIFIER=9
|
val SCE_LISP_IDENTIFIER=9
|
||||||
val SCE_LISP_OPERATOR=10
|
val SCE_LISP_OPERATOR=10
|
||||||
# Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW
|
# Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW
|
||||||
|
lex Eiffel=SCLEX_EIFFEL SCE_EIFFEL_
|
||||||
|
lex EiffelKW=SCLEX_EIFFELKW SCE_EIFFEL_
|
||||||
val SCE_EIFFEL_DEFAULT=0
|
val SCE_EIFFEL_DEFAULT=0
|
||||||
val SCE_EIFFEL_COMMENTLINE=1
|
val SCE_EIFFEL_COMMENTLINE=1
|
||||||
val SCE_EIFFEL_NUMBER=2
|
val SCE_EIFFEL_NUMBER=2
|
||||||
@@ -1669,7 +1785,8 @@ val SCE_EIFFEL_CHARACTER=5
|
|||||||
val SCE_EIFFEL_OPERATOR=6
|
val SCE_EIFFEL_OPERATOR=6
|
||||||
val SCE_EIFFEL_IDENTIFIER=7
|
val SCE_EIFFEL_IDENTIFIER=7
|
||||||
val SCE_EIFFEL_STRINGEOL=8
|
val SCE_EIFFEL_STRINGEOL=8
|
||||||
# Lexical states for the SCLEX_NNCRONTAB (nnCron crontab Lexer)
|
# Lexical states for SCLEX_NNCRONTAB (nnCron crontab Lexer)
|
||||||
|
lex NNCronTab=SCLEX_NNCRONTAB SCE_NNCRONTAB_
|
||||||
val SCE_NNCRONTAB_DEFAULT=0
|
val SCE_NNCRONTAB_DEFAULT=0
|
||||||
val SCE_NNCRONTAB_COMMENT=1
|
val SCE_NNCRONTAB_COMMENT=1
|
||||||
val SCE_NNCRONTAB_TASK=2
|
val SCE_NNCRONTAB_TASK=2
|
||||||
@@ -1682,6 +1799,7 @@ val SCE_NNCRONTAB_STRING=8
|
|||||||
val SCE_NNCRONTAB_ENVIRONMENT=9
|
val SCE_NNCRONTAB_ENVIRONMENT=9
|
||||||
val SCE_NNCRONTAB_IDENTIFIER=10
|
val SCE_NNCRONTAB_IDENTIFIER=10
|
||||||
# Lexical states for SCLEX_MATLAB
|
# Lexical states for SCLEX_MATLAB
|
||||||
|
lex MatLab=SCLEX_MATLAB SCE_MATLAB_
|
||||||
val SCE_MATLAB_DEFAULT=0
|
val SCE_MATLAB_DEFAULT=0
|
||||||
val SCE_MATLAB_COMMENT=1
|
val SCE_MATLAB_COMMENT=1
|
||||||
val SCE_MATLAB_COMMAND=2
|
val SCE_MATLAB_COMMAND=2
|
||||||
@@ -1690,6 +1808,28 @@ val SCE_MATLAB_KEYWORD=4
|
|||||||
val SCE_MATLAB_STRING=5
|
val SCE_MATLAB_STRING=5
|
||||||
val SCE_MATLAB_OPERATOR=6
|
val SCE_MATLAB_OPERATOR=6
|
||||||
val SCE_MATLAB_IDENTIFIER=7
|
val SCE_MATLAB_IDENTIFIER=7
|
||||||
|
# Lexical states for SCLEX_SCRIPTOL
|
||||||
|
lex Sol=SCLEX_SCRIPTOL SCE_SCRIPTOL_
|
||||||
|
val SCE_SCRIPTOL_DEFAULT=0
|
||||||
|
val SCE_SCRIPTOL_COMMENT=1
|
||||||
|
val SCE_SCRIPTOL_COMMENTLINE=2
|
||||||
|
val SCE_SCRIPTOL_COMMENTDOC=3
|
||||||
|
val SCE_SCRIPTOL_NUMBER=4
|
||||||
|
val SCE_SCRIPTOL_WORD=5
|
||||||
|
val SCE_SCRIPTOL_STRING=6
|
||||||
|
val SCE_SCRIPTOL_CHARACTER=7
|
||||||
|
val SCE_SCRIPTOL_UUID=8
|
||||||
|
val SCE_SCRIPTOL_PREPROCESSOR=9
|
||||||
|
val SCE_SCRIPTOL_OPERATOR=10
|
||||||
|
val SCE_SCRIPTOL_IDENTIFIER=11
|
||||||
|
val SCE_SCRIPTOL_STRINGEOL=12
|
||||||
|
val SCE_SCRIPTOL_VERBATIM=13
|
||||||
|
val SCE_SCRIPTOL_REGEX=14
|
||||||
|
val SCE_SCRIPTOL_COMMENTLINEDOC=15
|
||||||
|
val SCE_SCRIPTOL_WORD2=16
|
||||||
|
val SCE_SCRIPTOL_COMMENTDOCKEYWORD=17
|
||||||
|
val SCE_SCRIPTOL_COMMENTDOCKEYWORDERROR=18
|
||||||
|
val SCE_SCRIPTOL_COMMENTBASIC=19
|
||||||
|
|
||||||
# Events
|
# Events
|
||||||
|
|
||||||
@@ -1711,9 +1851,17 @@ evt void UserListSelection=2014(int listType, string text)
|
|||||||
evt void URIDropped=2015(string text)
|
evt void URIDropped=2015(string text)
|
||||||
evt void DwellStart=2016(int position)
|
evt void DwellStart=2016(int position)
|
||||||
evt void DwellEnd=2017(int position)
|
evt void DwellEnd=2017(int position)
|
||||||
|
evt void Zoom=2018(void)
|
||||||
|
|
||||||
cat Deprecated
|
cat Deprecated
|
||||||
|
|
||||||
|
# CARET_POLICY changed in 1.47
|
||||||
|
fun void SetCaretPolicy=2369(int caretPolicy, int caretSlop)
|
||||||
|
val CARET_CENTER=0x02
|
||||||
|
val CARET_XEVEN=0x08
|
||||||
|
val CARET_XJUMPS=0x10
|
||||||
|
|
||||||
# The old name for SCN_UPDATEUI
|
# The old name for SCN_UPDATEUI
|
||||||
val SCN_CHECKBRACE=2007
|
val SCN_CHECKBRACE=2007
|
||||||
evt void PosChanged=2012(int position)
|
evt void PosChanged=2012(int position)
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@ struct _ScintillaObject {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct _ScintillaClass {
|
struct _ScintillaClass {
|
||||||
GtkFixedClass parent_class;
|
GtkContainerClass parent_class;
|
||||||
|
|
||||||
void (* command) (ScintillaObject *ttt);
|
void (* command) (ScintillaObject *ttt);
|
||||||
void (* notify) (ScintillaObject *ttt);
|
void (* notify) (ScintillaObject *ttt);
|
||||||
@@ -39,6 +39,12 @@ GtkWidget* scintilla_new (void);
|
|||||||
void scintilla_set_id (ScintillaObject *sci,int id);
|
void scintilla_set_id (ScintillaObject *sci,int id);
|
||||||
sptr_t scintilla_send_message (ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam);
|
sptr_t scintilla_send_message (ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam);
|
||||||
|
|
||||||
|
#if GTK_MAJOR_VERSION < 2
|
||||||
|
#define SCINTILLA_NOTIFY "notify"
|
||||||
|
#else
|
||||||
|
#define SCINTILLA_NOTIFY "sci-notify"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -31,6 +31,7 @@ public:
|
|||||||
lenDoc(-1), validLen(0), chFlags(0), chWhile(0) {
|
lenDoc(-1), validLen(0), chFlags(0), chWhile(0) {
|
||||||
}
|
}
|
||||||
~WindowAccessor();
|
~WindowAccessor();
|
||||||
|
bool Match(int pos, const char *s);
|
||||||
char StyleAt(int position);
|
char StyleAt(int position);
|
||||||
int GetLine(int position);
|
int GetLine(int position);
|
||||||
int LineStart(int line);
|
int LineStart(int line);
|
||||||
|
@@ -118,7 +118,7 @@ void AutoComplete::Move(int delta) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AutoComplete::Select(const char *word) {
|
void AutoComplete::Select(const char *word) {
|
||||||
int lenWord = strlen(word);
|
size_t lenWord = strlen(word);
|
||||||
int location = -1;
|
int location = -1;
|
||||||
const int maxItemLen=1000;
|
const int maxItemLen=1000;
|
||||||
char item[maxItemLen];
|
char item[maxItemLen];
|
||||||
|
@@ -148,7 +148,7 @@ PRectangle CallTip::CallTipStart(int pos, Point pt, const char *defn,
|
|||||||
look = newline + 1;
|
look = newline + 1;
|
||||||
numLines++;
|
numLines++;
|
||||||
}
|
}
|
||||||
int lastWidth = surfaceMeasure->WidthText(font, look, strlen(look));
|
int lastWidth = surfaceMeasure->WidthText(font, look, static_cast<int>(strlen(look)));
|
||||||
width = Platform::Maximum(width, lastWidth) + 10;
|
width = Platform::Maximum(width, lastWidth) + 10;
|
||||||
int lineHeight = surfaceMeasure->Height(font);
|
int lineHeight = surfaceMeasure->Height(font);
|
||||||
// Extra line for border and an empty line at top and bottom
|
// Extra line for border and an empty line at top and bottom
|
||||||
|
@@ -958,10 +958,13 @@ void CellBuffer::BasicDeleteChars(int position, int deleteLength) {
|
|||||||
//Platform::DebugPrintf("Removing cr end of line\n");
|
//Platform::DebugPrintf("Removing cr end of line\n");
|
||||||
lv.Remove(lineRemove);
|
lv.Remove(lineRemove);
|
||||||
}
|
}
|
||||||
} else if ((ch == '\n') && !ignoreNL) {
|
} else if (ch == '\n') {
|
||||||
|
if (ignoreNL) {
|
||||||
|
ignoreNL = false; // Further \n are real deletions
|
||||||
|
} else {
|
||||||
//Platform::DebugPrintf("Removing lf end of line\n");
|
//Platform::DebugPrintf("Removing lf end of line\n");
|
||||||
lv.Remove(lineRemove);
|
lv.Remove(lineRemove);
|
||||||
ignoreNL = false; // Further \n are not real deletions
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ch = chNext;
|
ch = chNext;
|
||||||
|
@@ -344,17 +344,19 @@ void Document::ModifiedAt(int pos) {
|
|||||||
// SetStyleAt does not change the persistent state of a document
|
// SetStyleAt does not change the persistent state of a document
|
||||||
|
|
||||||
// Unlike Undo, Redo, and InsertStyledString, the pos argument is a cell number not a char number
|
// Unlike Undo, Redo, and InsertStyledString, the pos argument is a cell number not a char number
|
||||||
void Document::DeleteChars(int pos, int len) {
|
bool Document::DeleteChars(int pos, int len) {
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
return;
|
return false;
|
||||||
if ((pos + len) > Length())
|
if ((pos + len) > Length())
|
||||||
return;
|
return false;
|
||||||
if (cb.IsReadOnly() && enteredReadOnlyCount == 0) {
|
if (cb.IsReadOnly() && enteredReadOnlyCount == 0) {
|
||||||
enteredReadOnlyCount++;
|
enteredReadOnlyCount++;
|
||||||
NotifyModifyAttempt();
|
NotifyModifyAttempt();
|
||||||
enteredReadOnlyCount--;
|
enteredReadOnlyCount--;
|
||||||
}
|
}
|
||||||
if (enteredCount == 0) {
|
if (enteredCount != 0) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
enteredCount++;
|
enteredCount++;
|
||||||
if (!cb.IsReadOnly()) {
|
if (!cb.IsReadOnly()) {
|
||||||
NotifyModified(
|
NotifyModified(
|
||||||
@@ -379,15 +381,18 @@ void Document::DeleteChars(int pos, int len) {
|
|||||||
}
|
}
|
||||||
enteredCount--;
|
enteredCount--;
|
||||||
}
|
}
|
||||||
|
return !cb.IsReadOnly();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Document::InsertStyledString(int position, char *s, int insertLength) {
|
bool Document::InsertStyledString(int position, char *s, int insertLength) {
|
||||||
if (cb.IsReadOnly() && enteredReadOnlyCount == 0) {
|
if (cb.IsReadOnly() && enteredReadOnlyCount == 0) {
|
||||||
enteredReadOnlyCount++;
|
enteredReadOnlyCount++;
|
||||||
NotifyModifyAttempt();
|
NotifyModifyAttempt();
|
||||||
enteredReadOnlyCount--;
|
enteredReadOnlyCount--;
|
||||||
}
|
}
|
||||||
if (enteredCount == 0) {
|
if (enteredCount != 0) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
enteredCount++;
|
enteredCount++;
|
||||||
if (!cb.IsReadOnly()) {
|
if (!cb.IsReadOnly()) {
|
||||||
NotifyModified(
|
NotifyModified(
|
||||||
@@ -409,6 +414,7 @@ void Document::InsertStyledString(int position, char *s, int insertLength) {
|
|||||||
}
|
}
|
||||||
enteredCount--;
|
enteredCount--;
|
||||||
}
|
}
|
||||||
|
return !cb.IsReadOnly();
|
||||||
}
|
}
|
||||||
|
|
||||||
int Document::Undo() {
|
int Document::Undo() {
|
||||||
@@ -497,29 +503,32 @@ int Document::Redo() {
|
|||||||
return newPos;
|
return newPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Document::InsertChar(int pos, char ch) {
|
bool Document::InsertChar(int pos, char ch) {
|
||||||
char chs[2];
|
char chs[2];
|
||||||
chs[0] = ch;
|
chs[0] = ch;
|
||||||
chs[1] = 0;
|
chs[1] = 0;
|
||||||
InsertStyledString(pos*2, chs, 2);
|
return InsertStyledString(pos*2, chs, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert a null terminated string
|
// Insert a null terminated string
|
||||||
void Document::InsertString(int position, const char *s) {
|
bool Document::InsertString(int position, const char *s) {
|
||||||
InsertString(position, s, strlen(s));
|
return InsertString(position, s, strlen(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert a string with a length
|
// Insert a string with a length
|
||||||
void Document::InsertString(int position, const char *s, int insertLength) {
|
bool Document::InsertString(int position, const char *s, size_t insertLength) {
|
||||||
|
bool changed = false;
|
||||||
char *sWithStyle = new char[insertLength * 2];
|
char *sWithStyle = new char[insertLength * 2];
|
||||||
if (sWithStyle) {
|
if (sWithStyle) {
|
||||||
for (int i = 0; i < insertLength; i++) {
|
for (size_t i = 0; i < insertLength; i++) {
|
||||||
sWithStyle[i*2] = s[i];
|
sWithStyle[i*2] = s[i];
|
||||||
sWithStyle[i*2 + 1] = 0;
|
sWithStyle[i*2 + 1] = 0;
|
||||||
}
|
}
|
||||||
InsertStyledString(position*2, sWithStyle, insertLength*2);
|
changed = InsertStyledString(position*2, sWithStyle,
|
||||||
|
static_cast<int>(insertLength*2));
|
||||||
delete []sWithStyle;
|
delete []sWithStyle;
|
||||||
}
|
}
|
||||||
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Document::ChangeChar(int pos, char ch) {
|
void Document::ChangeChar(int pos, char ch) {
|
||||||
@@ -531,22 +540,18 @@ void Document::DelChar(int pos) {
|
|||||||
DeleteChars(pos, LenChar(pos));
|
DeleteChars(pos, LenChar(pos));
|
||||||
}
|
}
|
||||||
|
|
||||||
int Document::DelCharBack(int pos) {
|
void Document::DelCharBack(int pos) {
|
||||||
if (pos <= 0) {
|
if (pos <= 0) {
|
||||||
return pos;
|
return;
|
||||||
} else if (IsCrLf(pos - 2)) {
|
} else if (IsCrLf(pos - 2)) {
|
||||||
DeleteChars(pos - 2, 2);
|
DeleteChars(pos - 2, 2);
|
||||||
return pos - 2;
|
|
||||||
} else if (SC_CP_UTF8 == dbcsCodePage) {
|
} else if (SC_CP_UTF8 == dbcsCodePage) {
|
||||||
int startChar = MovePositionOutsideChar(pos - 1, -1, false);
|
int startChar = MovePositionOutsideChar(pos - 1, -1, false);
|
||||||
DeleteChars(startChar, pos - startChar);
|
DeleteChars(startChar, pos - startChar);
|
||||||
return startChar;
|
|
||||||
} else if (IsDBCS(pos - 1)) {
|
} else if (IsDBCS(pos - 1)) {
|
||||||
DeleteChars(pos - 2, 2);
|
DeleteChars(pos - 2, 2);
|
||||||
return pos - 2;
|
|
||||||
} else {
|
} else {
|
||||||
DeleteChars(pos - 1, 1);
|
DeleteChars(pos - 1, 1);
|
||||||
return pos - 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -822,8 +827,9 @@ class DocumentIndexer : public CharacterIndexer {
|
|||||||
Document *pdoc;
|
Document *pdoc;
|
||||||
int end;
|
int end;
|
||||||
public:
|
public:
|
||||||
DocumentIndexer(Document *pdoc_, int end_) :
|
DocumentIndexer(Document *pdoc_, int end_) :
|
||||||
pdoc(pdoc_), end(end_) {}
|
pdoc(pdoc_), end(end_) {
|
||||||
|
}
|
||||||
|
|
||||||
virtual char CharAt(int index) {
|
virtual char CharAt(int index) {
|
||||||
if (index < 0 || index >= end)
|
if (index < 0 || index >= end)
|
||||||
@@ -928,7 +934,7 @@ long Document::FindText(int minPos, int maxPos, const char *s,
|
|||||||
// Compute actual search ranges needed
|
// Compute actual search ranges needed
|
||||||
int lengthFind = *length;
|
int lengthFind = *length;
|
||||||
if (lengthFind == -1)
|
if (lengthFind == -1)
|
||||||
lengthFind = strlen(s);
|
lengthFind = static_cast<int>(strlen(s));
|
||||||
int endSearch = endPos;
|
int endSearch = endPos;
|
||||||
if (startPos <= endPos) {
|
if (startPos <= endPos) {
|
||||||
endSearch = endPos - lengthFind + 1;
|
endSearch = endPos - lengthFind + 1;
|
||||||
@@ -1081,8 +1087,10 @@ void Document::StartStyling(int position, char mask) {
|
|||||||
endStyled = position;
|
endStyled = position;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Document::SetStyleFor(int length, char style) {
|
bool Document::SetStyleFor(int length, char style) {
|
||||||
if (enteredCount == 0) {
|
if (enteredCount != 0) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
enteredCount++;
|
enteredCount++;
|
||||||
int prevEndStyled = endStyled;
|
int prevEndStyled = endStyled;
|
||||||
if (cb.SetStyleFor(endStyled, length, style, stylingMask)) {
|
if (cb.SetStyleFor(endStyled, length, style, stylingMask)) {
|
||||||
@@ -1092,26 +1100,32 @@ void Document::SetStyleFor(int length, char style) {
|
|||||||
}
|
}
|
||||||
endStyled += length;
|
endStyled += length;
|
||||||
enteredCount--;
|
enteredCount--;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Document::SetStyles(int length, char *styles) {
|
bool Document::SetStyles(int length, char *styles) {
|
||||||
if (enteredCount == 0) {
|
if (enteredCount != 0) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
enteredCount++;
|
enteredCount++;
|
||||||
int prevEndStyled = endStyled;
|
int prevEndStyled = endStyled;
|
||||||
bool didChange = false;
|
bool didChange = false;
|
||||||
|
int lastChange = 0;
|
||||||
for (int iPos = 0; iPos < length; iPos++, endStyled++) {
|
for (int iPos = 0; iPos < length; iPos++, endStyled++) {
|
||||||
PLATFORM_ASSERT(endStyled < Length());
|
PLATFORM_ASSERT(endStyled < Length());
|
||||||
if (cb.SetStyleAt(endStyled, styles[iPos], stylingMask)) {
|
if (cb.SetStyleAt(endStyled, styles[iPos], stylingMask)) {
|
||||||
didChange = true;
|
didChange = true;
|
||||||
|
lastChange = iPos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (didChange) {
|
if (didChange) {
|
||||||
DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER,
|
DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER,
|
||||||
prevEndStyled, endStyled - prevEndStyled);
|
prevEndStyled, lastChange);
|
||||||
NotifyModified(mh);
|
NotifyModified(mh);
|
||||||
}
|
}
|
||||||
enteredCount--;
|
enteredCount--;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1121,10 +1135,11 @@ bool Document::EnsureStyledTo(int pos) {
|
|||||||
if (styleClock > 0x100000) {
|
if (styleClock > 0x100000) {
|
||||||
styleClock = 0;
|
styleClock = 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Ask the watchers to style, and stop as soon as one responds.
|
// Ask the watchers to style, and stop as soon as one responds.
|
||||||
for (int i = 0; pos > GetEndStyled() && i < lenWatchers; i++)
|
for (int i = 0; pos > GetEndStyled() && i < lenWatchers; i++) {
|
||||||
watchers[i].watcher->NotifyStyleNeeded(this, watchers[i].userData, pos);
|
watchers[i].watcher->NotifyStyleNeeded(this, watchers[i].userData, pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
return pos <= GetEndStyled();
|
return pos <= GetEndStyled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -132,8 +132,8 @@ public:
|
|||||||
int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true);
|
int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true);
|
||||||
|
|
||||||
// Gateways to modifying document
|
// Gateways to modifying document
|
||||||
void DeleteChars(int pos, int len);
|
bool DeleteChars(int pos, int len);
|
||||||
void InsertStyledString(int position, char *s, int insertLength);
|
bool InsertStyledString(int position, char *s, int insertLength);
|
||||||
int Undo();
|
int Undo();
|
||||||
int Redo();
|
int Redo();
|
||||||
bool CanUndo() { return cb.CanUndo(); }
|
bool CanUndo() { return cb.CanUndo(); }
|
||||||
@@ -158,12 +158,12 @@ public:
|
|||||||
void SetReadOnly(bool set) { cb.SetReadOnly(set); }
|
void SetReadOnly(bool set) { cb.SetReadOnly(set); }
|
||||||
bool IsReadOnly() { return cb.IsReadOnly(); }
|
bool IsReadOnly() { return cb.IsReadOnly(); }
|
||||||
|
|
||||||
void InsertChar(int pos, char ch);
|
bool InsertChar(int pos, char ch);
|
||||||
void InsertString(int position, const char *s);
|
bool InsertString(int position, const char *s);
|
||||||
void InsertString(int position, const char *s, int insertLength);
|
bool InsertString(int position, const char *s, size_t insertLength);
|
||||||
void ChangeChar(int pos, char ch);
|
void ChangeChar(int pos, char ch);
|
||||||
void DelChar(int pos);
|
void DelChar(int pos);
|
||||||
int DelCharBack(int pos);
|
void DelCharBack(int pos);
|
||||||
|
|
||||||
char CharAt(int position) { return cb.CharAt(position); }
|
char CharAt(int position) { return cb.CharAt(position); }
|
||||||
void GetCharRange(char *buffer, int position, int lengthRetrieve) {
|
void GetCharRange(char *buffer, int position, int lengthRetrieve) {
|
||||||
@@ -202,8 +202,8 @@ public:
|
|||||||
void SetWordChars(unsigned char *chars);
|
void SetWordChars(unsigned char *chars);
|
||||||
void SetStylingBits(int bits);
|
void SetStylingBits(int bits);
|
||||||
void StartStyling(int position, char mask);
|
void StartStyling(int position, char mask);
|
||||||
void SetStyleFor(int length, char style);
|
bool SetStyleFor(int length, char style);
|
||||||
void SetStyles(int length, char *styles);
|
bool SetStyles(int length, char *styles);
|
||||||
int GetEndStyled() { return endStyled; }
|
int GetEndStyled() { return endStyled; }
|
||||||
bool EnsureStyledTo(int pos);
|
bool EnsureStyledTo(int pos);
|
||||||
int GetStyleClock() { return styleClock; }
|
int GetStyleClock() { return styleClock; }
|
||||||
|
@@ -48,6 +48,15 @@ void DocumentAccessor::Fill(int position) {
|
|||||||
buf[endPos-startPos] = '\0';
|
buf[endPos-startPos] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool DocumentAccessor::Match(int pos, const char *s) {
|
||||||
|
for (int i=0; *s; i++) {
|
||||||
|
if (*s != SafeGetCharAt(pos+i))
|
||||||
|
return false;
|
||||||
|
s++;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
char DocumentAccessor::StyleAt(int position) {
|
char DocumentAccessor::StyleAt(int position) {
|
||||||
return pdoc->StyleAt(position);
|
return pdoc->StyleAt(position);
|
||||||
}
|
}
|
||||||
|
@@ -38,6 +38,7 @@ public:
|
|||||||
startSeg(0), startPosStyling(0) {
|
startSeg(0), startPosStyling(0) {
|
||||||
}
|
}
|
||||||
~DocumentAccessor();
|
~DocumentAccessor();
|
||||||
|
bool Match(int pos, const char *s);
|
||||||
char StyleAt(int position);
|
char StyleAt(int position);
|
||||||
int GetLine(int position);
|
int GetLine(int position);
|
||||||
int LineStart(int line);
|
int LineStart(int line);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -45,7 +45,7 @@ public:
|
|||||||
enum { wrapWidthInfinite = 0x7ffffff };
|
enum { wrapWidthInfinite = 0x7ffffff };
|
||||||
int maxLineLength;
|
int maxLineLength;
|
||||||
int numCharsInLine;
|
int numCharsInLine;
|
||||||
enum validLevel { llInvalid, llPositions, llLines } validity;
|
enum validLevel { llInvalid, llCheckTextAndStyle, llPositions, llLines } validity;
|
||||||
int xHighlightGuide;
|
int xHighlightGuide;
|
||||||
bool highlightColumn;
|
bool highlightColumn;
|
||||||
int selStart;
|
int selStart;
|
||||||
@@ -200,6 +200,8 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
int xOffset; ///< Horizontal scrolled amount in pixels
|
int xOffset; ///< Horizontal scrolled amount in pixels
|
||||||
int xCaretMargin; ///< Ensure this many pixels visible on both sides of caret
|
int xCaretMargin; ///< Ensure this many pixels visible on both sides of caret
|
||||||
bool horizontalScrollBarVisible;
|
bool horizontalScrollBarVisible;
|
||||||
|
int scrollWidth;
|
||||||
|
bool endAtLastLine;
|
||||||
|
|
||||||
Surface *pixmapLine;
|
Surface *pixmapLine;
|
||||||
Surface *pixmapSelMargin;
|
Surface *pixmapSelMargin;
|
||||||
@@ -257,8 +259,11 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
int xEndSelect;
|
int xEndSelect;
|
||||||
bool primarySelection;
|
bool primarySelection;
|
||||||
|
|
||||||
int caretPolicy;
|
int caretXPolicy;
|
||||||
int caretSlop;
|
int caretXSlop; ///< Ensure this many pixels visible on both sides of caret
|
||||||
|
|
||||||
|
int caretYPolicy;
|
||||||
|
int caretYSlop; ///< Ensure this many lines visible on both sides of caret
|
||||||
|
|
||||||
int visiblePolicy;
|
int visiblePolicy;
|
||||||
int visibleSlop;
|
int visibleSlop;
|
||||||
@@ -302,6 +307,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
int LineFromLocation(Point pt);
|
int LineFromLocation(Point pt);
|
||||||
void SetTopLine(int topLineNew);
|
void SetTopLine(int topLineNew);
|
||||||
|
|
||||||
|
bool AbandonPaint();
|
||||||
void RedrawRect(PRectangle rc);
|
void RedrawRect(PRectangle rc);
|
||||||
void Redraw();
|
void Redraw();
|
||||||
void RedrawSelMargin();
|
void RedrawSelMargin();
|
||||||
@@ -342,6 +348,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
PRectangle rcLine, LineLayout *ll, int subLine=0);
|
PRectangle rcLine, LineLayout *ll, int subLine=0);
|
||||||
void Paint(Surface *surfaceWindow, PRectangle rcArea);
|
void Paint(Surface *surfaceWindow, PRectangle rcArea);
|
||||||
long FormatRange(bool draw, RangeToFormat *pfr);
|
long FormatRange(bool draw, RangeToFormat *pfr);
|
||||||
|
int TextWidth(int style, const char *text);
|
||||||
|
|
||||||
virtual void SetVerticalScrollPos() = 0;
|
virtual void SetVerticalScrollPos() = 0;
|
||||||
virtual void SetHorizontalScrollPos() = 0;
|
virtual void SetHorizontalScrollPos() = 0;
|
||||||
@@ -383,6 +390,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
bool NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt);
|
bool NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt);
|
||||||
void NotifyNeedShown(int pos, int len);
|
void NotifyNeedShown(int pos, int len);
|
||||||
void NotifyDwelling(Point pt, bool state);
|
void NotifyDwelling(Point pt, bool state);
|
||||||
|
void NotifyZoom();
|
||||||
|
|
||||||
void NotifyModifyAttempt(Document *document, void *userData);
|
void NotifyModifyAttempt(Document *document, void *userData);
|
||||||
void NotifySavePoint(Document *document, void *userData, bool atSavePoint);
|
void NotifySavePoint(Document *document, void *userData, bool atSavePoint);
|
||||||
@@ -390,12 +398,14 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
void NotifyModified(Document *document, DocModification mh, void *userData);
|
void NotifyModified(Document *document, DocModification mh, void *userData);
|
||||||
void NotifyDeleted(Document *document, void *userData);
|
void NotifyDeleted(Document *document, void *userData);
|
||||||
void NotifyStyleNeeded(Document *doc, void *userData, int endPos);
|
void NotifyStyleNeeded(Document *doc, void *userData, int endPos);
|
||||||
void NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long lParam);
|
void NotifyMacroRecord(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
|
||||||
|
|
||||||
void PageMove(int direction, bool extend=false);
|
void PageMove(int direction, bool extend=false);
|
||||||
void ChangeCaseOfSelection(bool makeUpperCase);
|
void ChangeCaseOfSelection(bool makeUpperCase);
|
||||||
void LineTranspose();
|
void LineTranspose();
|
||||||
virtual void CancelModes();
|
virtual void CancelModes();
|
||||||
|
void NewLine();
|
||||||
|
void CursorUpOrDown(int direction, bool extend=false);
|
||||||
virtual int KeyCommand(unsigned int iMessage);
|
virtual int KeyCommand(unsigned int iMessage);
|
||||||
virtual int KeyDefault(int /* key */, int /*modifiers*/);
|
virtual int KeyDefault(int /* key */, int /*modifiers*/);
|
||||||
int KeyDown(int key, bool shift, bool ctrl, bool alt, bool *consumed=0);
|
int KeyDown(int key, bool shift, bool ctrl, bool alt, bool *consumed=0);
|
||||||
@@ -405,9 +415,9 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
|
|
||||||
void Indent(bool forwards);
|
void Indent(bool forwards);
|
||||||
|
|
||||||
long FindText(unsigned long wParam, long lParam);
|
long FindText(uptr_t wParam, sptr_t lParam);
|
||||||
void SearchAnchor();
|
void SearchAnchor();
|
||||||
long SearchText(unsigned int iMessage, unsigned long wParam, long lParam);
|
long SearchText(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
|
||||||
long SearchInTarget(const char *text, int length);
|
long SearchInTarget(const char *text, int length);
|
||||||
void GoToLine(int lineNo);
|
void GoToLine(int lineNo);
|
||||||
|
|
||||||
|
@@ -23,10 +23,12 @@ const LexerModule *LexerModule::base = 0;
|
|||||||
int LexerModule::nextLanguage = SCLEX_AUTOMATIC+1;
|
int LexerModule::nextLanguage = SCLEX_AUTOMATIC+1;
|
||||||
|
|
||||||
LexerModule::LexerModule(int language_, LexerFunction fnLexer_,
|
LexerModule::LexerModule(int language_, LexerFunction fnLexer_,
|
||||||
const char *languageName_, LexerFunction fnFolder_) :
|
const char *languageName_, LexerFunction fnFolder_,
|
||||||
|
const char * const wordListDescriptions_[]) :
|
||||||
language(language_),
|
language(language_),
|
||||||
fnLexer(fnLexer_),
|
fnLexer(fnLexer_),
|
||||||
fnFolder(fnFolder_),
|
fnFolder(fnFolder_),
|
||||||
|
wordListDescriptions(wordListDescriptions_),
|
||||||
languageName(languageName_) {
|
languageName(languageName_) {
|
||||||
next = base;
|
next = base;
|
||||||
base = this;
|
base = this;
|
||||||
@@ -36,6 +38,31 @@ LexerModule::LexerModule(int language_, LexerFunction fnLexer_,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int LexerModule::GetNumWordLists() const {
|
||||||
|
if (wordListDescriptions == NULL) {
|
||||||
|
return -1;
|
||||||
|
} else {
|
||||||
|
int numWordLists = 0;
|
||||||
|
|
||||||
|
while (wordListDescriptions[numWordLists]) {
|
||||||
|
++numWordLists;
|
||||||
|
}
|
||||||
|
|
||||||
|
return numWordLists;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char * LexerModule::GetWordListDescription(int index) const {
|
||||||
|
static const char *emptyStr = "";
|
||||||
|
|
||||||
|
PLATFORM_ASSERT(index < GetNumWordLists());
|
||||||
|
if (index >= GetNumWordLists()) {
|
||||||
|
return emptyStr;
|
||||||
|
} else {
|
||||||
|
return wordListDescriptions[index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const LexerModule *LexerModule::Find(int language) {
|
const LexerModule *LexerModule::Find(int language) {
|
||||||
const LexerModule *lm = base;
|
const LexerModule *lm = base;
|
||||||
while (lm) {
|
while (lm) {
|
||||||
@@ -97,83 +124,55 @@ static void ColouriseNullDoc(unsigned int startPos, int length, int, WordList *[
|
|||||||
|
|
||||||
LexerModule lmNull(SCLEX_NULL, ColouriseNullDoc, "null");
|
LexerModule lmNull(SCLEX_NULL, ColouriseNullDoc, "null");
|
||||||
|
|
||||||
#ifdef __vms
|
// Alternative historical name for Scintilla_LinkLexers
|
||||||
#define LINK_LEXERS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef LINK_LEXERS
|
|
||||||
|
|
||||||
// The following code forces a reference to all of the Scintilla lexers.
|
|
||||||
// If we don't do something like this, then the linker tends to "optimize"
|
|
||||||
// them away. (eric@sourcegear.com)
|
|
||||||
|
|
||||||
// Taken from wxWindow's stc.cpp. Walter.
|
|
||||||
|
|
||||||
int wxForceScintillaLexers(void) {
|
int wxForceScintillaLexers(void) {
|
||||||
return Scintilla_LinkLexers();
|
return Scintilla_LinkLexers();
|
||||||
}
|
}
|
||||||
|
|
||||||
int Scintilla_LinkLexers() {
|
// To add or remove a lexer, add or remove its file and run LexGen.py.
|
||||||
extern LexerModule lmAda;
|
|
||||||
extern LexerModule lmAVE;
|
// Force a reference to all of the Scintilla lexers so that the linker will
|
||||||
extern LexerModule lmBaan;
|
// not remove the code of the lexers.
|
||||||
extern LexerModule lmBatch;
|
int Scintilla_LinkLexers() {
|
||||||
extern LexerModule lmConf;
|
static int forcer = 0;
|
||||||
extern LexerModule lmCPP;
|
|
||||||
extern LexerModule lmDiff;
|
// Shorten the code that declares a lexer and ensures it is linked in by calling a method.
|
||||||
extern LexerModule lmEiffel;
|
#define LINK_LEXER(lexer) extern LexerModule lexer; forcer += lexer.GetLanguage();
|
||||||
extern LexerModule lmEiffelkw;
|
|
||||||
extern LexerModule lmErrorList;
|
//++Autogenerated -- run src/LexGen.py to regenerate
|
||||||
extern LexerModule lmHTML;
|
//**\(\tLINK_LEXER(\*);\n\)
|
||||||
extern LexerModule lmLatex;
|
LINK_LEXER(lmAda);
|
||||||
extern LexerModule lmLISP;
|
LINK_LEXER(lmAVE);
|
||||||
extern LexerModule lmLua;
|
LINK_LEXER(lmBaan);
|
||||||
extern LexerModule lmMake;
|
LINK_LEXER(lmBullant);
|
||||||
extern LexerModule lmMatlab;
|
LINK_LEXER(lmConf);
|
||||||
extern LexerModule lmPascal;
|
LINK_LEXER(lmCPP);
|
||||||
extern LexerModule lmPerl;
|
LINK_LEXER(lmTCL);
|
||||||
extern LexerModule lmProps;
|
LINK_LEXER(lmNncrontab);
|
||||||
extern LexerModule lmPython;
|
LINK_LEXER(lmEiffel);
|
||||||
extern LexerModule lmRuby;
|
LINK_LEXER(lmEiffelkw);
|
||||||
extern LexerModule lmSQL;
|
LINK_LEXER(lmHTML);
|
||||||
extern LexerModule lmVB;
|
LINK_LEXER(lmXML);
|
||||||
extern LexerModule lmXML;
|
LINK_LEXER(lmASP);
|
||||||
extern LexerModule lmBullant;
|
LINK_LEXER(lmPHP);
|
||||||
|
LINK_LEXER(lmLISP);
|
||||||
|
LINK_LEXER(lmLua);
|
||||||
|
LINK_LEXER(lmMatlab);
|
||||||
|
LINK_LEXER(lmBatch);
|
||||||
|
LINK_LEXER(lmDiff);
|
||||||
|
LINK_LEXER(lmProps);
|
||||||
|
LINK_LEXER(lmMake);
|
||||||
|
LINK_LEXER(lmErrorList);
|
||||||
|
LINK_LEXER(lmLatex);
|
||||||
|
LINK_LEXER(lmPascal);
|
||||||
|
LINK_LEXER(lmPerl);
|
||||||
|
LINK_LEXER(lmPython);
|
||||||
|
LINK_LEXER(lmRuby);
|
||||||
|
LINK_LEXER(lmSQL);
|
||||||
|
LINK_LEXER(lmVB);
|
||||||
|
LINK_LEXER(lmVBScript);
|
||||||
|
|
||||||
|
//--Autogenerated -- end of automatically generated section
|
||||||
|
|
||||||
if (
|
|
||||||
&lmAda
|
|
||||||
&& &lmAVE
|
|
||||||
&& &lmBaan
|
|
||||||
&& &lmConf
|
|
||||||
&& &lmDiff
|
|
||||||
&& &lmLatex
|
|
||||||
&& &lmPascal
|
|
||||||
&& &lmCPP
|
|
||||||
&& &lmHTML
|
|
||||||
&& &lmXML
|
|
||||||
&& &lmProps
|
|
||||||
&& &lmErrorList
|
|
||||||
&& &lmMake
|
|
||||||
&& &lmMatlab
|
|
||||||
&& &lmBatch
|
|
||||||
&& &lmPerl
|
|
||||||
&& &lmPython
|
|
||||||
&& &lmSQL
|
|
||||||
&& &lmVB
|
|
||||||
&& &lmRuby
|
|
||||||
&& &lmEiffel
|
|
||||||
&& &lmEiffelkw
|
|
||||||
&& &lmLISP
|
|
||||||
&& &lmLua
|
|
||||||
&& &lmNull
|
|
||||||
&& &lmBullant
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
@@ -72,17 +72,18 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
|
|
||||||
for (; sc.More(); sc.Forward()) {
|
for (; sc.More(); sc.Forward()) {
|
||||||
|
|
||||||
|
if (sc.atLineStart && (sc.state == SCE_C_STRING)) {
|
||||||
|
// Prevent SCE_C_STRINGEOL from leaking back to previous line
|
||||||
|
sc.SetState(SCE_C_STRING);
|
||||||
|
}
|
||||||
|
|
||||||
// Handle line continuation generically.
|
// Handle line continuation generically.
|
||||||
if (sc.ch == '\\') {
|
if (sc.ch == '\\') {
|
||||||
if (sc.Match("\\\n")) {
|
if (sc.chNext == '\n' || sc.chNext == '\r') {
|
||||||
sc.Forward();
|
sc.Forward();
|
||||||
|
if (sc.ch == '\r' && sc.chNext == '\n') {
|
||||||
sc.Forward();
|
sc.Forward();
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
if (sc.Match("\\\r\n")) {
|
|
||||||
sc.Forward();
|
|
||||||
sc.Forward();
|
|
||||||
sc.Forward();
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -260,9 +261,17 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
sc.Complete();
|
sc.Complete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool IsStreamCommentStyle(int style) {
|
||||||
|
return style == SCE_C_COMMENT ||
|
||||||
|
style == SCE_C_COMMENTDOC ||
|
||||||
|
style == SCE_C_COMMENTDOCKEYWORD ||
|
||||||
|
style == SCE_C_COMMENTDOCKEYWORDERROR;
|
||||||
|
}
|
||||||
|
|
||||||
static void FoldCppDoc(unsigned int startPos, int length, int initStyle, WordList *[],
|
static void FoldCppDoc(unsigned int startPos, int length, int initStyle, WordList *[],
|
||||||
Accessor &styler) {
|
Accessor &styler) {
|
||||||
bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
|
bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
|
||||||
|
bool foldPreprocessor = styler.GetPropertyInt("fold.preprocessor") != 0;
|
||||||
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
|
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
|
||||||
unsigned int endPos = startPos + length;
|
unsigned int endPos = startPos + length;
|
||||||
int visibleChars = 0;
|
int visibleChars = 0;
|
||||||
@@ -279,15 +288,37 @@ static void FoldCppDoc(unsigned int startPos, int length, int initStyle, WordLis
|
|||||||
style = styleNext;
|
style = styleNext;
|
||||||
styleNext = styler.StyleAt(i + 1);
|
styleNext = styler.StyleAt(i + 1);
|
||||||
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
|
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
|
||||||
if (foldComment &&
|
if (foldComment && IsStreamCommentStyle(style)) {
|
||||||
(style == SCE_C_COMMENT || style == SCE_C_COMMENTDOC)) {
|
if (!IsStreamCommentStyle(stylePrev)) {
|
||||||
if (style != stylePrev) {
|
|
||||||
levelCurrent++;
|
levelCurrent++;
|
||||||
} else if ((style != styleNext) && !atEOL) {
|
} else if (!IsStreamCommentStyle(styleNext) && !atEOL) {
|
||||||
// Comments don't end at end of line and the next character may be unstyled.
|
// Comments don't end at end of line and the next character may be unstyled.
|
||||||
levelCurrent--;
|
levelCurrent--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (foldComment && (style == SCE_C_COMMENTLINE)) {
|
||||||
|
if ((ch == '/') && (chNext == '/')) {
|
||||||
|
char chNext2 = styler.SafeGetCharAt(i + 2);
|
||||||
|
if (chNext2 == '{') {
|
||||||
|
levelCurrent++;
|
||||||
|
} else if (chNext2 == '}') {
|
||||||
|
levelCurrent--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (foldPreprocessor && (style == SCE_C_PREPROCESSOR)) {
|
||||||
|
if (ch == '#') {
|
||||||
|
unsigned int j=i+1;
|
||||||
|
while ((j<endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) {
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
if (styler.Match(j, "region") || styler.Match(j, "if")) {
|
||||||
|
levelCurrent++;
|
||||||
|
} else if (styler.Match(j, "end")) {
|
||||||
|
levelCurrent--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (style == SCE_C_OPERATOR) {
|
if (style == SCE_C_OPERATOR) {
|
||||||
if (ch == '{') {
|
if (ch == '{') {
|
||||||
levelCurrent++;
|
levelCurrent++;
|
||||||
@@ -316,5 +347,12 @@ static void FoldCppDoc(unsigned int startPos, int length, int initStyle, WordLis
|
|||||||
styler.SetLevel(lineCurrent, levelPrev | flagsNext);
|
styler.SetLevel(lineCurrent, levelPrev | flagsNext);
|
||||||
}
|
}
|
||||||
|
|
||||||
LexerModule lmCPP(SCLEX_CPP, ColouriseCppDoc, "cpp", FoldCppDoc);
|
static const char * const cppWordLists[] = {
|
||||||
LexerModule lmTCL(SCLEX_TCL, ColouriseCppDoc, "tcl", FoldCppDoc);
|
"Primary keywords and identifiers",
|
||||||
|
"Secondary keywords and identifiers",
|
||||||
|
"Documentation comment keywords",
|
||||||
|
0,
|
||||||
|
};
|
||||||
|
|
||||||
|
LexerModule lmCPP(SCLEX_CPP, ColouriseCppDoc, "cpp", FoldCppDoc, cppWordLists);
|
||||||
|
LexerModule lmTCL(SCLEX_TCL, ColouriseCppDoc, "tcl", FoldCppDoc, cppWordLists);
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
/** @file LexCrontab.cxx
|
/** @file LexCrontab.cxx
|
||||||
** Lexer to use with extended crontab files used by a powerful
|
** Lexer to use with extended crontab files used by a powerful
|
||||||
** Windows scheduler/event monitor/automation manager nnCron.
|
** Windows scheduler/event monitor/automation manager nnCron.
|
||||||
** (http://nemtsev.virtualave.net/)
|
** (http://nemtsev.eserv.ru/)
|
||||||
**/
|
**/
|
||||||
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
|
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
|
||||||
// The License.txt file describes the conditions under which this software may be distributed.
|
// The License.txt file describes the conditions under which this software may be distributed.
|
||||||
@@ -62,7 +62,8 @@ static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordLi
|
|||||||
state = SCE_NNCRONTAB_TASK;
|
state = SCE_NNCRONTAB_TASK;
|
||||||
styler.ColourTo(i,SCE_NNCRONTAB_TASK);
|
styler.ColourTo(i,SCE_NNCRONTAB_TASK);
|
||||||
}
|
}
|
||||||
else if( ch == '\\' && styler.SafeGetCharAt(i+1) == ' ') {
|
else if( ch == '\\' && (styler.SafeGetCharAt(i+1) == ' ' ||
|
||||||
|
styler.SafeGetCharAt(i+1) == '\t')) {
|
||||||
// signals the start of an extended comment...
|
// signals the start of an extended comment...
|
||||||
state = SCE_NNCRONTAB_COMMENT;
|
state = SCE_NNCRONTAB_COMMENT;
|
||||||
styler.ColourTo(i,SCE_NNCRONTAB_COMMENT);
|
styler.ColourTo(i,SCE_NNCRONTAB_COMMENT);
|
||||||
@@ -81,6 +82,10 @@ static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordLi
|
|||||||
// signals environment variables
|
// signals environment variables
|
||||||
state = SCE_NNCRONTAB_ENVIRONMENT;
|
state = SCE_NNCRONTAB_ENVIRONMENT;
|
||||||
styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT);
|
styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT);
|
||||||
|
} else if( ch == '<' && styler.SafeGetCharAt(i+1) == '%') {
|
||||||
|
// signals environment variables
|
||||||
|
state = SCE_NNCRONTAB_ENVIRONMENT;
|
||||||
|
styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT);
|
||||||
} else if( ch == '*' ) {
|
} else if( ch == '*' ) {
|
||||||
// signals an asterisk
|
// signals an asterisk
|
||||||
// no state jump necessary for this simple case...
|
// no state jump necessary for this simple case...
|
||||||
@@ -148,7 +153,7 @@ static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordLi
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if( (ch == '%' && styler.SafeGetCharAt(i-1)!='\\')
|
if( (ch == '%' && styler.SafeGetCharAt(i-1)!='\\')
|
||||||
|| (ch == '\n') || (ch == '\r') ) {
|
|| (ch == '\n') || (ch == '\r') || (ch == '>') ) {
|
||||||
state = SCE_NNCRONTAB_DEFAULT;
|
state = SCE_NNCRONTAB_DEFAULT;
|
||||||
styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT);
|
styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT);
|
||||||
break;
|
break;
|
||||||
@@ -159,7 +164,8 @@ static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordLi
|
|||||||
case SCE_NNCRONTAB_IDENTIFIER:
|
case SCE_NNCRONTAB_IDENTIFIER:
|
||||||
// stay in CONF_IDENTIFIER state until we find a non-alphanumeric
|
// stay in CONF_IDENTIFIER state until we find a non-alphanumeric
|
||||||
if( isalnum(ch) || (ch == '_') || (ch == '-') || (ch == '/') ||
|
if( isalnum(ch) || (ch == '_') || (ch == '-') || (ch == '/') ||
|
||||||
(ch == '$') || (ch == '.') || (ch == '<') || (ch == '>') ) {
|
(ch == '$') || (ch == '.') || (ch == '<') || (ch == '>') ||
|
||||||
|
(ch == '@') ) {
|
||||||
buffer[bufferCount++] = ch;
|
buffer[bufferCount++] = ch;
|
||||||
} else {
|
} else {
|
||||||
state = SCE_NNCRONTAB_DEFAULT;
|
state = SCE_NNCRONTAB_DEFAULT;
|
||||||
|
@@ -220,9 +220,11 @@ static int classifyTagHTML(unsigned int start, unsigned int end,
|
|||||||
isScript = 0 == strcmp(s, "script");
|
isScript = 0 == strcmp(s, "script");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((chAttr == SCE_H_TAGUNKNOWN) && !keywords)
|
if ((chAttr == SCE_H_TAGUNKNOWN) && !keywords) {
|
||||||
// No keywords -> all are known
|
// No keywords -> all are known
|
||||||
chAttr = SCE_H_TAG;
|
chAttr = SCE_H_TAG;
|
||||||
|
isScript = 0 == strcmp(s, "script");
|
||||||
|
}
|
||||||
styler.ColourTo(end, chAttr);
|
styler.ColourTo(end, chAttr);
|
||||||
return isScript ? SCE_H_SCRIPT : chAttr;
|
return isScript ? SCE_H_SCRIPT : chAttr;
|
||||||
}
|
}
|
||||||
@@ -555,6 +557,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
|||||||
//case SCE_HJ_COMMENTLINE:
|
//case SCE_HJ_COMMENTLINE:
|
||||||
case SCE_HJ_DOUBLESTRING:
|
case SCE_HJ_DOUBLESTRING:
|
||||||
case SCE_HJ_SINGLESTRING:
|
case SCE_HJ_SINGLESTRING:
|
||||||
|
case SCE_HJ_REGEX:
|
||||||
case SCE_HB_STRING:
|
case SCE_HB_STRING:
|
||||||
case SCE_HP_STRING:
|
case SCE_HP_STRING:
|
||||||
case SCE_HP_TRIPLE:
|
case SCE_HP_TRIPLE:
|
||||||
@@ -1851,7 +1854,17 @@ static void ColourisePHPDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
sc.Complete();
|
sc.Complete();
|
||||||
}
|
}
|
||||||
|
|
||||||
LexerModule lmHTML(SCLEX_HTML, ColouriseHyperTextDoc, "hypertext");
|
static const char * const htmlWordListDesc[] = {
|
||||||
LexerModule lmXML(SCLEX_XML, ColouriseHyperTextDoc, "xml");
|
"HTML elements and attributes",
|
||||||
LexerModule lmASP(SCLEX_ASP, ColouriseASPDoc, "asp");
|
"JavaScript keywords",
|
||||||
LexerModule lmPHP(SCLEX_PHP, ColourisePHPDoc, "php");
|
"VBScript keywords",
|
||||||
|
"Python keywords",
|
||||||
|
"PHP keywords",
|
||||||
|
"SGML and DTD keywords",
|
||||||
|
0,
|
||||||
|
};
|
||||||
|
|
||||||
|
LexerModule lmHTML(SCLEX_HTML, ColouriseHyperTextDoc, "hypertext", 0, htmlWordListDesc);
|
||||||
|
LexerModule lmXML(SCLEX_XML, ColouriseHyperTextDoc, "xml", 0, htmlWordListDesc);
|
||||||
|
LexerModule lmASP(SCLEX_ASP, ColouriseASPDoc, "asp", 0, htmlWordListDesc);
|
||||||
|
LexerModule lmPHP(SCLEX_PHP, ColourisePHPDoc, "php", 0, htmlWordListDesc);
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
**
|
**
|
||||||
** Written by Paul Winwood.
|
** Written by Paul Winwood.
|
||||||
** Folder by Alexey Yutkin.
|
** Folder by Alexey Yutkin.
|
||||||
** Modified by Marcos E. Wurzius
|
** Modified by Marcos E. Wurzius & Philippe Lhoste
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -23,6 +23,7 @@
|
|||||||
#include "Scintilla.h"
|
#include "Scintilla.h"
|
||||||
#include "SciLexer.h"
|
#include "SciLexer.h"
|
||||||
|
|
||||||
|
#define SCE_LUA_LAST_STYLE SCE_LUA_WORD6
|
||||||
|
|
||||||
static inline bool IsAWordChar(const int ch) {
|
static inline bool IsAWordChar(const int ch) {
|
||||||
return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_');
|
return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_');
|
||||||
@@ -32,7 +33,6 @@ inline bool IsAWordStart(const int ch) {
|
|||||||
return (ch < 0x80) && (isalnum(ch) || ch == '_');
|
return (ch < 0x80) && (isalnum(ch) || ch == '_');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool isLuaOperator(char ch) {
|
inline bool isLuaOperator(char ch) {
|
||||||
if (isalnum(ch))
|
if (isalnum(ch))
|
||||||
return false;
|
return false;
|
||||||
@@ -47,8 +47,11 @@ inline bool isLuaOperator(char ch) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ColouriseLuaDoc(
|
||||||
static void ColouriseLuaDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
|
unsigned int startPos,
|
||||||
|
int length,
|
||||||
|
int initStyle,
|
||||||
|
WordList *keywordlists[],
|
||||||
Accessor &styler) {
|
Accessor &styler) {
|
||||||
|
|
||||||
WordList &keywords = *keywordlists[0];
|
WordList &keywords = *keywordlists[0];
|
||||||
@@ -57,28 +60,40 @@ static void ColouriseLuaDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
WordList &keywords4 = *keywordlists[3];
|
WordList &keywords4 = *keywordlists[3];
|
||||||
WordList &keywords5 = *keywordlists[4];
|
WordList &keywords5 = *keywordlists[4];
|
||||||
WordList &keywords6 = *keywordlists[5];
|
WordList &keywords6 = *keywordlists[5];
|
||||||
int literalString = 0;
|
|
||||||
int literalStringFlag =0;
|
// Must initialize the literal string nesting level, if we are inside such a string.
|
||||||
|
int literalStringLevel = 0;
|
||||||
|
if (initStyle == SCE_LUA_LITERALSTRING) {
|
||||||
|
literalStringLevel = 1;
|
||||||
|
}
|
||||||
|
// We use states above the last one to indicate nesting level of literal strings
|
||||||
|
if (initStyle > SCE_LUA_LAST_STYLE) {
|
||||||
|
literalStringLevel = initStyle - SCE_LUA_LAST_STYLE + 1;
|
||||||
|
}
|
||||||
|
|
||||||
// Do not leak onto next line
|
// Do not leak onto next line
|
||||||
if (initStyle == SCE_LUA_STRINGEOL)
|
if (initStyle == SCE_LUA_STRINGEOL) {
|
||||||
initStyle = SCE_LUA_DEFAULT;
|
initStyle = SCE_LUA_DEFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
StyleContext sc(startPos, length, initStyle, styler);
|
StyleContext sc(startPos, length, initStyle, styler);
|
||||||
if(startPos == 0 && sc.ch == '#') sc.SetState(SCE_LUA_COMMENTLINE);
|
if (startPos == 0 && sc.ch == '#') {
|
||||||
for (; sc.More(); sc.Forward()) {
|
sc.SetState(SCE_LUA_COMMENTLINE);
|
||||||
|
|
||||||
// Handle line continuation generically.
|
|
||||||
if (sc.ch == '\\') {
|
|
||||||
if (sc.Match("\\\n")) {
|
|
||||||
sc.Forward();
|
|
||||||
sc.Forward();
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
if (sc.Match("\\\r\n")) {
|
for (; sc.More(); sc.Forward()) {
|
||||||
sc.Forward();
|
if (sc.atLineStart && (sc.state == SCE_LUA_STRING)) {
|
||||||
|
// Prevent SCE_LUA_STRINGEOL from leaking back to previous line
|
||||||
|
sc.SetState(SCE_LUA_STRING);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle string line continuation
|
||||||
|
if ((sc.state == SCE_LUA_STRING || sc.state == SCE_LUA_CHARACTER) &&
|
||||||
|
sc.ch == '\\') {
|
||||||
|
if (sc.chNext == '\n' || sc.chNext == '\r') {
|
||||||
sc.Forward();
|
sc.Forward();
|
||||||
|
if (sc.ch == '\r' && sc.chNext == '\n') {
|
||||||
sc.Forward();
|
sc.Forward();
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -109,12 +124,14 @@ static void ColouriseLuaDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
}
|
}
|
||||||
sc.SetState(SCE_LUA_DEFAULT);
|
sc.SetState(SCE_LUA_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} else if (sc.state == SCE_LUA_COMMENTLINE ) {
|
} else if (sc.state == SCE_LUA_COMMENTLINE ) {
|
||||||
if (sc.atLineEnd) {
|
if (sc.atLineEnd) {
|
||||||
sc.SetState(SCE_LUA_DEFAULT);
|
sc.SetState(SCE_LUA_DEFAULT);
|
||||||
}
|
}
|
||||||
|
} else if (sc.state == SCE_LUA_PREPROCESSOR ) {
|
||||||
|
if (sc.atLineEnd) {
|
||||||
|
sc.SetState(SCE_LUA_DEFAULT);
|
||||||
|
}
|
||||||
} else if (sc.state == SCE_LUA_STRING) {
|
} else if (sc.state == SCE_LUA_STRING) {
|
||||||
if (sc.ch == '\\') {
|
if (sc.ch == '\\') {
|
||||||
if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') {
|
if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') {
|
||||||
@@ -126,7 +143,6 @@ static void ColouriseLuaDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
sc.ChangeState(SCE_LUA_STRINGEOL);
|
sc.ChangeState(SCE_LUA_STRINGEOL);
|
||||||
sc.ForwardSetState(SCE_LUA_DEFAULT);
|
sc.ForwardSetState(SCE_LUA_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (sc.state == SCE_LUA_CHARACTER) {
|
} else if (sc.state == SCE_LUA_CHARACTER) {
|
||||||
if (sc.ch == '\\') {
|
if (sc.ch == '\\') {
|
||||||
if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') {
|
if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') {
|
||||||
@@ -138,33 +154,41 @@ static void ColouriseLuaDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
sc.ChangeState(SCE_LUA_STRINGEOL);
|
sc.ChangeState(SCE_LUA_STRINGEOL);
|
||||||
sc.ForwardSetState(SCE_LUA_DEFAULT);
|
sc.ForwardSetState(SCE_LUA_DEFAULT);
|
||||||
}
|
}
|
||||||
} else if (sc.state == SCE_LUA_LITERALSTRING) {
|
} else if (sc.state == SCE_LUA_LITERALSTRING || sc.state > SCE_LUA_LAST_STYLE) {
|
||||||
if (sc.chPrev == '[' && sc.ch == '[' && literalStringFlag != 1) {
|
if (sc.Match('[', '[')) {
|
||||||
literalString++;
|
literalStringLevel++;
|
||||||
literalStringFlag = 1;
|
sc.SetState(SCE_LUA_LAST_STYLE + literalStringLevel - 1);
|
||||||
}
|
} else if (sc.Match(']', ']') && literalStringLevel > 0) {
|
||||||
else if (sc.chPrev == ']' && sc.ch == ']' && literalStringFlag != 2 ) {
|
literalStringLevel--;
|
||||||
if((--literalString == 1))
|
sc.Forward();
|
||||||
|
if (literalStringLevel == 0) {
|
||||||
sc.ForwardSetState(SCE_LUA_DEFAULT);
|
sc.ForwardSetState(SCE_LUA_DEFAULT);
|
||||||
literalStringFlag = 2;
|
} else if (literalStringLevel == 1) {
|
||||||
|
sc.ForwardSetState(SCE_LUA_LITERALSTRING);
|
||||||
|
} else {
|
||||||
|
sc.ForwardSetState(SCE_LUA_LAST_STYLE + literalStringLevel - 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else literalStringFlag = 0;
|
|
||||||
}
|
}
|
||||||
// Determine if a new state should be entered.
|
// Determine if a new state should be entered.
|
||||||
if (sc.state == SCE_LUA_DEFAULT) {
|
if (sc.state == SCE_LUA_DEFAULT) {
|
||||||
if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {
|
if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {
|
||||||
sc.SetState(SCE_LUA_NUMBER);
|
sc.SetState(SCE_LUA_NUMBER);
|
||||||
} else if (IsAWordStart(sc.ch) || (sc.ch == '@')) {
|
} else if (IsAWordStart(sc.ch)) {
|
||||||
sc.SetState(SCE_LUA_IDENTIFIER);
|
sc.SetState(SCE_LUA_IDENTIFIER);
|
||||||
} else if (sc.ch == '\"') {
|
} else if (sc.Match('\"')) {
|
||||||
sc.SetState(SCE_LUA_STRING);
|
sc.SetState(SCE_LUA_STRING);
|
||||||
} else if (sc.ch == '\'') {
|
} else if (sc.Match('\'')) {
|
||||||
sc.SetState(SCE_LUA_CHARACTER);
|
sc.SetState(SCE_LUA_CHARACTER);
|
||||||
} else if (sc.ch == '[' && sc.chNext == '[') {
|
} else if (sc.Match('[', '[')) {
|
||||||
|
literalStringLevel = 1;
|
||||||
sc.SetState(SCE_LUA_LITERALSTRING);
|
sc.SetState(SCE_LUA_LITERALSTRING);
|
||||||
literalString = 1;
|
sc.Forward();
|
||||||
} else if (sc.ch == '-' && sc.chNext == '-') {
|
} else if (sc.Match('-', '-')) {
|
||||||
sc.SetState(SCE_LUA_COMMENTLINE);
|
sc.SetState(SCE_LUA_COMMENTLINE);
|
||||||
|
sc.Forward();
|
||||||
|
} else if (sc.Match('$') && sc.atLineStart) {
|
||||||
|
sc.SetState(SCE_LUA_PREPROCESSOR); // Obsolete since Lua 4.0, but still in old code
|
||||||
} else if (isLuaOperator(static_cast<char>(sc.ch))) {
|
} else if (isLuaOperator(static_cast<char>(sc.ch))) {
|
||||||
sc.SetState(SCE_LUA_OPERATOR);
|
sc.SetState(SCE_LUA_OPERATOR);
|
||||||
}
|
}
|
||||||
@@ -185,6 +209,7 @@ static void FoldLuaDoc(unsigned int startPos, int length, int /* initStyle */, W
|
|||||||
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
|
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
|
||||||
int styleNext = styler.StyleAt(startPos);
|
int styleNext = styler.StyleAt(startPos);
|
||||||
char s[10];
|
char s[10];
|
||||||
|
|
||||||
for (unsigned int i = startPos; i < lengthDoc; i++) {
|
for (unsigned int i = startPos; i < lengthDoc; i++) {
|
||||||
char ch = chNext;
|
char ch = chNext;
|
||||||
chNext = styler.SafeGetCharAt(i + 1);
|
chNext = styler.SafeGetCharAt(i + 1);
|
||||||
@@ -192,36 +217,38 @@ static void FoldLuaDoc(unsigned int startPos, int length, int /* initStyle */, W
|
|||||||
styleNext = styler.StyleAt(i + 1);
|
styleNext = styler.StyleAt(i + 1);
|
||||||
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
|
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
|
||||||
if (style == SCE_LUA_WORD) {
|
if (style == SCE_LUA_WORD) {
|
||||||
if ( ch == 'i' || ch == 'e' || ch == 't' || ch == 'd' || ch == 'f') {
|
if (ch == 'i' || ch == 'd' || ch == 'f' || ch == 'e') {
|
||||||
for (unsigned int j = 0; j < 8; j++) {
|
for (unsigned int j = 0; j < 8; j++) {
|
||||||
if (!iswordchar(styler[i + j]))
|
if (!iswordchar(styler[i + j])) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
s[j] = styler[i + j];
|
s[j] = styler[i + j];
|
||||||
s[j + 1] = '\0';
|
s[j + 1] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((strcmp(s, "if") == 0) || (strcmp(s, "do") == 0)
|
if ((strcmp(s, "if") == 0) || (strcmp(s, "do") == 0) || (strcmp(s, "function") == 0)) {
|
||||||
|| (strcmp(s, "function") == 0))
|
|
||||||
levelCurrent++;
|
levelCurrent++;
|
||||||
if ((strcmp(s, "end") == 0) || (strcmp(s, "elseif") == 0))
|
}
|
||||||
|
if ((strcmp(s, "end") == 0) || (strcmp(s, "elseif") == 0)) {
|
||||||
levelCurrent--;
|
levelCurrent--;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (style == SCE_LUA_OPERATOR)
|
} else if (style == SCE_LUA_OPERATOR) {
|
||||||
{
|
if (ch == '{' || ch == '(') {
|
||||||
if(ch == '{' || ch == '(')
|
|
||||||
levelCurrent++;
|
levelCurrent++;
|
||||||
else if(ch == '}' || ch == ')')
|
} else if (ch == '}' || ch == ')') {
|
||||||
levelCurrent--;
|
levelCurrent--;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (atEOL) {
|
if (atEOL) {
|
||||||
int lev = levelPrev;
|
int lev = levelPrev;
|
||||||
if (visibleChars == 0 && foldCompact)
|
if (visibleChars == 0 && foldCompact) {
|
||||||
lev |= SC_FOLDLEVELWHITEFLAG;
|
lev |= SC_FOLDLEVELWHITEFLAG;
|
||||||
if ((levelCurrent > levelPrev) && (visibleChars > 0))
|
}
|
||||||
|
if ((levelCurrent > levelPrev) && (visibleChars > 0)) {
|
||||||
lev |= SC_FOLDLEVELHEADERFLAG;
|
lev |= SC_FOLDLEVELHEADERFLAG;
|
||||||
|
}
|
||||||
if (lev != styler.LevelAt(lineCurrent)) {
|
if (lev != styler.LevelAt(lineCurrent)) {
|
||||||
styler.SetLevel(lineCurrent, lev);
|
styler.SetLevel(lineCurrent, lev);
|
||||||
}
|
}
|
||||||
@@ -229,9 +256,10 @@ static void FoldLuaDoc(unsigned int startPos, int length, int /* initStyle */, W
|
|||||||
levelPrev = levelCurrent;
|
levelPrev = levelCurrent;
|
||||||
visibleChars = 0;
|
visibleChars = 0;
|
||||||
}
|
}
|
||||||
if (!isspacechar(ch))
|
if (!isspacechar(ch)) {
|
||||||
visibleChars++;
|
visibleChars++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Fill in the real level of the next line, keeping the current flags as they will be filled in later
|
// Fill in the real level of the next line, keeping the current flags as they will be filled in later
|
||||||
|
|
||||||
int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;
|
int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;
|
||||||
|
@@ -159,21 +159,23 @@ static void ColouriseDiffLine(char *lineBuffer, int endLine, Accessor &styler) {
|
|||||||
// difference starts then each line starting with ' ' is a whitespace
|
// difference starts then each line starting with ' ' is a whitespace
|
||||||
// otherwise it is considered a comment (Only in..., Binary file...)
|
// otherwise it is considered a comment (Only in..., Binary file...)
|
||||||
if (0 == strncmp(lineBuffer, "diff ", 3)) {
|
if (0 == strncmp(lineBuffer, "diff ", 3)) {
|
||||||
styler.ColourTo(endLine, 2);
|
styler.ColourTo(endLine, SCE_DIFF_COMMAND);
|
||||||
} else if (0 == strncmp(lineBuffer, "--- ", 3)) {
|
} else if (0 == strncmp(lineBuffer, "--- ", 3)) {
|
||||||
styler.ColourTo(endLine, 3);
|
styler.ColourTo(endLine, SCE_DIFF_HEADER);
|
||||||
} else if (0 == strncmp(lineBuffer, "+++ ", 3)) {
|
} else if (0 == strncmp(lineBuffer, "+++ ", 3)) {
|
||||||
styler.ColourTo(endLine, 3);
|
styler.ColourTo(endLine, SCE_DIFF_HEADER);
|
||||||
|
} else if (0 == strncmp(lineBuffer, "***", 3)) {
|
||||||
|
styler.ColourTo(endLine, SCE_DIFF_HEADER);
|
||||||
} else if (lineBuffer[0] == '@') {
|
} else if (lineBuffer[0] == '@') {
|
||||||
styler.ColourTo(endLine, 4);
|
styler.ColourTo(endLine, SCE_DIFF_POSITION);
|
||||||
} else if (lineBuffer[0] == '-') {
|
} else if (lineBuffer[0] == '-') {
|
||||||
styler.ColourTo(endLine, 5);
|
styler.ColourTo(endLine, SCE_DIFF_DELETED);
|
||||||
} else if (lineBuffer[0] == '+') {
|
} else if (lineBuffer[0] == '+') {
|
||||||
styler.ColourTo(endLine, 6);
|
styler.ColourTo(endLine, SCE_DIFF_ADDED);
|
||||||
} else if (lineBuffer[0] != ' ') {
|
} else if (lineBuffer[0] != ' ') {
|
||||||
styler.ColourTo(endLine, 1);
|
styler.ColourTo(endLine, SCE_DIFF_COMMENT);
|
||||||
} else {
|
} else {
|
||||||
styler.ColourTo(endLine, 0);
|
styler.ColourTo(endLine, SCE_DIFF_DEFAULT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,28 +210,28 @@ static void ColourisePropsLine(
|
|||||||
i++;
|
i++;
|
||||||
if (i < lengthLine) {
|
if (i < lengthLine) {
|
||||||
if (lineBuffer[i] == '#' || lineBuffer[i] == '!' || lineBuffer[i] == ';') {
|
if (lineBuffer[i] == '#' || lineBuffer[i] == '!' || lineBuffer[i] == ';') {
|
||||||
styler.ColourTo(endPos, 1);
|
styler.ColourTo(endPos, SCE_PROPS_COMMENT);
|
||||||
} else if (lineBuffer[i] == '[') {
|
} else if (lineBuffer[i] == '[') {
|
||||||
styler.ColourTo(endPos, 2);
|
styler.ColourTo(endPos, SCE_PROPS_SECTION);
|
||||||
} else if (lineBuffer[i] == '@') {
|
} else if (lineBuffer[i] == '@') {
|
||||||
styler.ColourTo(startLine + i, 4);
|
styler.ColourTo(startLine + i, SCE_PROPS_DEFVAL);
|
||||||
if (lineBuffer[++i] == '=')
|
if (lineBuffer[++i] == '=')
|
||||||
styler.ColourTo(startLine + i, 3);
|
styler.ColourTo(startLine + i, SCE_PROPS_ASSIGNMENT);
|
||||||
styler.ColourTo(endPos, 0);
|
styler.ColourTo(endPos, SCE_PROPS_DEFAULT);
|
||||||
} else {
|
} else {
|
||||||
// Search for the '=' character
|
// Search for the '=' character
|
||||||
while ((i < lengthLine) && (lineBuffer[i] != '='))
|
while ((i < lengthLine) && (lineBuffer[i] != '='))
|
||||||
i++;
|
i++;
|
||||||
if ((i < lengthLine) && (lineBuffer[i] == '=')) {
|
if ((i < lengthLine) && (lineBuffer[i] == '=')) {
|
||||||
styler.ColourTo(startLine + i - 1, 0);
|
styler.ColourTo(startLine + i - 1, SCE_PROPS_DEFAULT);
|
||||||
styler.ColourTo(startLine + i, 3);
|
styler.ColourTo(startLine + i, 3);
|
||||||
styler.ColourTo(endPos, 0);
|
styler.ColourTo(endPos, SCE_PROPS_DEFAULT);
|
||||||
} else {
|
} else {
|
||||||
styler.ColourTo(endPos, 0);
|
styler.ColourTo(endPos, SCE_PROPS_DEFAULT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
styler.ColourTo(endPos, 0);
|
styler.ColourTo(endPos, SCE_PROPS_DEFAULT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -386,6 +388,8 @@ static void ColouriseErrorListLine(
|
|||||||
state = 1;
|
state = 1;
|
||||||
} else if ((state == 0) && (lineBuffer[i] == '(')) {
|
} else if ((state == 0) && (lineBuffer[i] == '(')) {
|
||||||
state = 10;
|
state = 10;
|
||||||
|
} else if ((state == 0) && (lineBuffer[i] == '\t')) {
|
||||||
|
state = 20;
|
||||||
} else if ((state == 1) && isdigit(lineBuffer[i])) {
|
} else if ((state == 1) && isdigit(lineBuffer[i])) {
|
||||||
state = 2;
|
state = 2;
|
||||||
} else if ((state == 2) && (lineBuffer[i] == ':')) {
|
} else if ((state == 2) && (lineBuffer[i] == ':')) {
|
||||||
@@ -406,12 +410,22 @@ static void ColouriseErrorListLine(
|
|||||||
break;
|
break;
|
||||||
} else if (((state == 11) || (state == 14)) && !((lineBuffer[i] == ' ') || isdigit(lineBuffer[i]))) {
|
} else if (((state == 11) || (state == 14)) && !((lineBuffer[i] == ' ') || isdigit(lineBuffer[i]))) {
|
||||||
state = 99;
|
state = 99;
|
||||||
|
} else if ((state == 20) && isdigit(lineBuffer[i])) {
|
||||||
|
state = 24;
|
||||||
|
break;
|
||||||
|
} else if ((state == 20) && ((lineBuffer[i] == '/') && (lineBuffer[i+1] == '^'))) {
|
||||||
|
state = 21;
|
||||||
|
} else if ((state == 21) && ((lineBuffer[i] == '$') && (lineBuffer[i+1] == '/'))) {
|
||||||
|
state = 22;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (state == 3) {
|
if (state == 3) {
|
||||||
styler.ColourTo(endPos, SCE_ERR_GCC);
|
styler.ColourTo(endPos, SCE_ERR_GCC);
|
||||||
} else if ((state == 13) || (state == 14) || (state == 15)) {
|
} else if ((state == 13) || (state == 14) || (state == 15)) {
|
||||||
styler.ColourTo(endPos, SCE_ERR_MS);
|
styler.ColourTo(endPos, SCE_ERR_MS);
|
||||||
|
} else if (((state == 22) || (state == 24)) && (lineBuffer[0] != '\t')) {
|
||||||
|
styler.ColourTo(endPos, SCE_ERR_CTAG);
|
||||||
} else {
|
} else {
|
||||||
styler.ColourTo(endPos, SCE_ERR_DEFAULT);
|
styler.ColourTo(endPos, SCE_ERR_DEFAULT);
|
||||||
}
|
}
|
||||||
|
@@ -659,4 +659,9 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
|
|||||||
styler.ColourTo(lengthDoc - 1, state);
|
styler.ColourTo(lengthDoc - 1, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
LexerModule lmPerl(SCLEX_PERL, ColourisePerlDoc, "perl");
|
static const char * const perlWordListDesc[] = {
|
||||||
|
"Perl keywords",
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
|
LexerModule lmPerl(SCLEX_PERL, ColourisePerlDoc, "perl", 0, perlWordListDesc);
|
||||||
|
@@ -408,4 +408,10 @@ static void FoldPyDoc(unsigned int startPos, int length, int /*initStyle - unuse
|
|||||||
//styler.SetLevel(lineCurrent, indentCurrent);
|
//styler.SetLevel(lineCurrent, indentCurrent);
|
||||||
}
|
}
|
||||||
|
|
||||||
LexerModule lmPython(SCLEX_PYTHON, ColourisePyDoc, "python", FoldPyDoc);
|
static const char * const pythonWordListDesc[] = {
|
||||||
|
"Python keywords",
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
|
LexerModule lmPython(SCLEX_PYTHON, ColourisePyDoc, "python", FoldPyDoc,
|
||||||
|
pythonWordListDesc);
|
||||||
|
@@ -45,7 +45,7 @@ int CompareCaseInsensitive(const char *a, const char *b) {
|
|||||||
return *a - *b;
|
return *a - *b;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CompareNCaseInsensitive(const char *a, const char *b, int len) {
|
int CompareNCaseInsensitive(const char *a, const char *b, size_t len) {
|
||||||
while (*a && *b && len) {
|
while (*a && *b && len) {
|
||||||
if (*a != *b) {
|
if (*a != *b) {
|
||||||
char upperA = MakeUpperCase(*a);
|
char upperA = MakeUpperCase(*a);
|
||||||
@@ -68,7 +68,7 @@ bool EqualCaseInsensitive(const char *a, const char *b) {
|
|||||||
return 0 == CompareCaseInsensitive(a, b);
|
return 0 == CompareCaseInsensitive(a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline unsigned int HashString(const char *s, int len) {
|
inline unsigned int HashString(const char *s, size_t len) {
|
||||||
unsigned int ret = 0;
|
unsigned int ret = 0;
|
||||||
while (len--) {
|
while (len--) {
|
||||||
ret <<= 4;
|
ret <<= 4;
|
||||||
@@ -93,9 +93,9 @@ void PropSet::Set(const char *key, const char *val, int lenKey, int lenVal) {
|
|||||||
if (!*key) // Empty keys are not supported
|
if (!*key) // Empty keys are not supported
|
||||||
return;
|
return;
|
||||||
if (lenKey == -1)
|
if (lenKey == -1)
|
||||||
lenKey = strlen(key);
|
lenKey = static_cast<int>(strlen(key));
|
||||||
if (lenVal == -1)
|
if (lenVal == -1)
|
||||||
lenVal = strlen(val);
|
lenVal = static_cast<int>(strlen(val));
|
||||||
unsigned int hash = HashString(key, lenKey);
|
unsigned int hash = HashString(key, lenKey);
|
||||||
for (Property *p = props[hash % hashRoots]; p; p = p->next) {
|
for (Property *p = props[hash % hashRoots]; p; p = p->next) {
|
||||||
if ((hash == p->hash) &&
|
if ((hash == p->hash) &&
|
||||||
@@ -187,7 +187,7 @@ SString PropSet::Expand(const char *withVars) {
|
|||||||
int lenvar = cpendvar - cpvar - 2; // Subtract the $()
|
int lenvar = cpendvar - cpvar - 2; // Subtract the $()
|
||||||
char *var = StringDup(cpvar + 2, lenvar);
|
char *var = StringDup(cpvar + 2, lenvar);
|
||||||
SString val = GetExpanded(var);
|
SString val = GetExpanded(var);
|
||||||
int newlenbase = strlen(base) + val.length() - lenvar;
|
size_t newlenbase = strlen(base) + val.length() - lenvar;
|
||||||
char *newbase = new char[newlenbase];
|
char *newbase = new char[newlenbase];
|
||||||
strncpy(newbase, base, cpvar - base);
|
strncpy(newbase, base, cpvar - base);
|
||||||
strcpy(newbase + (cpvar - base), val.c_str());
|
strcpy(newbase + (cpvar - base), val.c_str());
|
||||||
@@ -224,11 +224,11 @@ bool isprefix(const char *target, const char *prefix) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool IsSuffixCaseInsensitive(const char *target, const char *suffix) {
|
static bool IsSuffixCaseInsensitive(const char *target, const char *suffix) {
|
||||||
int lentarget = strlen(target);
|
size_t lentarget = strlen(target);
|
||||||
int lensuffix = strlen(suffix);
|
size_t lensuffix = strlen(suffix);
|
||||||
if (lensuffix > lentarget)
|
if (lensuffix > lentarget)
|
||||||
return false;
|
return false;
|
||||||
for (int i = lensuffix - 1; i >= 0; i--) {
|
for (int i = static_cast<int>(lensuffix) - 1; i >= 0; i--) {
|
||||||
if (MakeUpperCase(target[i + lentarget - lensuffix]) !=
|
if (MakeUpperCase(target[i + lentarget - lensuffix]) !=
|
||||||
MakeUpperCase(suffix[i]))
|
MakeUpperCase(suffix[i]))
|
||||||
return false;
|
return false;
|
||||||
@@ -306,7 +306,7 @@ SString PropSet::GetNewExpand(const char *keybase, const char *filename) {
|
|||||||
int lenvar = cpendvar - cpvar - 2; // Subtract the $()
|
int lenvar = cpendvar - cpvar - 2; // Subtract the $()
|
||||||
char *var = StringDup(cpvar + 2, lenvar);
|
char *var = StringDup(cpvar + 2, lenvar);
|
||||||
SString val = GetWild(var, filename);
|
SString val = GetWild(var, filename);
|
||||||
int newlenbase = strlen(base) + val.length() - lenvar;
|
size_t newlenbase = strlen(base) + val.length() - lenvar;
|
||||||
char *newbase = new char[newlenbase];
|
char *newbase = new char[newlenbase];
|
||||||
strncpy(newbase, base, cpvar - base);
|
strncpy(newbase, base, cpvar - base);
|
||||||
strcpy(newbase + (cpvar - base), val.c_str());
|
strcpy(newbase + (cpvar - base), val.c_str());
|
||||||
@@ -340,7 +340,7 @@ void PropSet::Clear() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
char *PropSet::ToString() {
|
char *PropSet::ToString() {
|
||||||
unsigned int len=0;
|
size_t len=0;
|
||||||
for (int r = 0; r < hashRoots; r++) {
|
for (int r = 0; r < hashRoots; r++) {
|
||||||
for (Property *p = props[r]; p; p = p->next) {
|
for (Property *p = props[r]; p; p = p->next) {
|
||||||
len += strlen(p->key) + 1;
|
len += strlen(p->key) + 1;
|
||||||
@@ -435,8 +435,8 @@ static char **ArrayFromWordList(char *wordlist, int *len, bool onlyLineEnds = fa
|
|||||||
if (keywords) {
|
if (keywords) {
|
||||||
words = 0;
|
words = 0;
|
||||||
prev = '\0';
|
prev = '\0';
|
||||||
int slen = strlen(wordlist);
|
size_t slen = strlen(wordlist);
|
||||||
for (int k = 0; k < slen; k++) {
|
for (size_t k = 0; k < slen; k++) {
|
||||||
if (!iswordsep(wordlist[k], onlyLineEnds)) {
|
if (!iswordsep(wordlist[k], onlyLineEnds)) {
|
||||||
if (!prev) {
|
if (!prev) {
|
||||||
keywords[words] = &wordlist[k];
|
keywords[words] = &wordlist[k];
|
||||||
|
@@ -30,8 +30,8 @@
|
|||||||
* Modification history:
|
* Modification history:
|
||||||
*
|
*
|
||||||
* $Log$
|
* $Log$
|
||||||
* Revision 1.3 2002/03/18 22:31:00 RD
|
* Revision 1.4 2002/09/06 16:58:12 RD
|
||||||
* Updated wxSTC from Scintilla 1.40 to Scintilla 1.45
|
* Updated to Scintilla from 1.45 to 1.47
|
||||||
*
|
*
|
||||||
* Revision 1.6 2001/04/29 13:32:10 nyamatongwe
|
* Revision 1.6 2001/04/29 13:32:10 nyamatongwe
|
||||||
* Addition of new target methods - versions of ReplaceTarget that take counted
|
* Addition of new target methods - versions of ReplaceTarget that take counted
|
||||||
|
@@ -64,11 +64,18 @@ void ScintillaBase::RefreshColourPalette(Palette &pal, bool want) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ScintillaBase::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) {
|
void ScintillaBase::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) {
|
||||||
bool acActiveBeforeCharAdded = ac.Active();
|
bool isFillUp = ac.Active() && ac.IsFillUpChar(*s);
|
||||||
if (!acActiveBeforeCharAdded || !ac.IsFillUpChar(*s))
|
if (!isFillUp) {
|
||||||
Editor::AddCharUTF(s, len, treatAsDBCS);
|
Editor::AddCharUTF(s, len, treatAsDBCS);
|
||||||
if (acActiveBeforeCharAdded)
|
}
|
||||||
|
if (ac.Active()) {
|
||||||
AutoCompleteChanged(s[0]);
|
AutoCompleteChanged(s[0]);
|
||||||
|
// For fill ups add the character after the autocompletion has
|
||||||
|
// triggered so containers see the key so can display a calltip.
|
||||||
|
if (isFillUp) {
|
||||||
|
Editor::AddCharUTF(s, len, treatAsDBCS);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScintillaBase::Command(int cmdId) {
|
void ScintillaBase::Command(int cmdId) {
|
||||||
@@ -278,7 +285,7 @@ void ScintillaBase::AutoCompleteMoveToCurrentWord() {
|
|||||||
|
|
||||||
void ScintillaBase::AutoCompleteChanged(char ch) {
|
void ScintillaBase::AutoCompleteChanged(char ch) {
|
||||||
if (ac.IsFillUpChar(ch)) {
|
if (ac.IsFillUpChar(ch)) {
|
||||||
AutoCompleteCompleted(ch);
|
AutoCompleteCompleted();
|
||||||
} else if (currentPos <= ac.posStart - ac.startLen) {
|
} else if (currentPos <= ac.posStart - ac.startLen) {
|
||||||
ac.Cancel();
|
ac.Cancel();
|
||||||
} else if (ac.cancelAtStartPos && currentPos <= ac.posStart) {
|
} else if (ac.cancelAtStartPos && currentPos <= ac.posStart) {
|
||||||
@@ -290,7 +297,7 @@ void ScintillaBase::AutoCompleteChanged(char ch) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScintillaBase::AutoCompleteCompleted(char fillUp/*='\0'*/) {
|
void ScintillaBase::AutoCompleteCompleted() {
|
||||||
int item = ac.lb.GetSelection();
|
int item = ac.lb.GetSelection();
|
||||||
char selected[1000];
|
char selected[1000];
|
||||||
if (item != -1) {
|
if (item != -1) {
|
||||||
@@ -323,8 +330,6 @@ void ScintillaBase::AutoCompleteCompleted(char fillUp/*='\0'*/) {
|
|||||||
SetEmptySelection(ac.posStart);
|
SetEmptySelection(ac.posStart);
|
||||||
if (item != -1) {
|
if (item != -1) {
|
||||||
SString piece = selected;
|
SString piece = selected;
|
||||||
if (fillUp)
|
|
||||||
piece += fillUp;
|
|
||||||
pdoc->InsertString(firstPos, piece.c_str());
|
pdoc->InsertString(firstPos, piece.c_str());
|
||||||
SetEmptySelection(firstPos + piece.length());
|
SetEmptySelection(firstPos + piece.length());
|
||||||
}
|
}
|
||||||
@@ -332,6 +337,7 @@ void ScintillaBase::AutoCompleteCompleted(char fillUp/*='\0'*/) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ScintillaBase::ContextMenu(Point pt) {
|
void ScintillaBase::ContextMenu(Point pt) {
|
||||||
|
if (displayPopupMenu) {
|
||||||
bool writable = !WndProc(SCI_GETREADONLY, 0, 0);
|
bool writable = !WndProc(SCI_GETREADONLY, 0, 0);
|
||||||
popup.CreatePopUp();
|
popup.CreatePopUp();
|
||||||
AddToPopUp("Undo", idcmdUndo, writable && pdoc->CanUndo());
|
AddToPopUp("Undo", idcmdUndo, writable && pdoc->CanUndo());
|
||||||
@@ -344,6 +350,7 @@ void ScintillaBase::ContextMenu(Point pt) {
|
|||||||
AddToPopUp("");
|
AddToPopUp("");
|
||||||
AddToPopUp("Select All", idcmdSelectAll);
|
AddToPopUp("Select All", idcmdSelectAll);
|
||||||
popup.Show(pt, wMain);
|
popup.Show(pt, wMain);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScintillaBase::CancelModes() {
|
void ScintillaBase::CancelModes() {
|
||||||
|
@@ -66,7 +66,7 @@ protected:
|
|||||||
void AutoCompleteCancel();
|
void AutoCompleteCancel();
|
||||||
void AutoCompleteMove(int delta);
|
void AutoCompleteMove(int delta);
|
||||||
void AutoCompleteChanged(char ch=0);
|
void AutoCompleteChanged(char ch=0);
|
||||||
void AutoCompleteCompleted(char fillUp='\0');
|
void AutoCompleteCompleted();
|
||||||
void AutoCompleteMoveToCurrentWord();
|
void AutoCompleteMoveToCurrentWord();
|
||||||
static void AutoCompleteDoubleClick(void* p);
|
static void AutoCompleteDoubleClick(void* p);
|
||||||
|
|
||||||
|
@@ -144,6 +144,10 @@ inline bool IsASpace(unsigned int ch) {
|
|||||||
return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d));
|
return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool IsASpaceOrTab(unsigned int ch) {
|
||||||
|
return (ch == ' ') || (ch == '\t');
|
||||||
|
}
|
||||||
|
|
||||||
inline bool IsADigit(unsigned int ch) {
|
inline bool IsADigit(unsigned int ch) {
|
||||||
return (ch >= '0') && (ch <= '9');
|
return (ch >= '0') && (ch <= '9');
|
||||||
}
|
}
|
||||||
|
@@ -42,7 +42,16 @@ void WindowAccessor::Fill(int position) {
|
|||||||
endPos = lenDoc;
|
endPos = lenDoc;
|
||||||
|
|
||||||
TextRange tr = {{startPos, endPos}, buf};
|
TextRange tr = {{startPos, endPos}, buf};
|
||||||
Platform::SendScintilla(id, SCI_GETTEXTRANGE, 0, reinterpret_cast<long>(&tr));
|
Platform::SendScintillaPointer(id, SCI_GETTEXTRANGE, 0, &tr);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool WindowAccessor::Match(int pos, const char *s) {
|
||||||
|
for (int i=0; *s; i++) {
|
||||||
|
if (*s != SafeGetCharAt(pos+i))
|
||||||
|
return false;
|
||||||
|
s++;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
char WindowAccessor::StyleAt(int position) {
|
char WindowAccessor::StyleAt(int position) {
|
||||||
@@ -116,8 +125,8 @@ void WindowAccessor::Flush() {
|
|||||||
startPos = extremePosition;
|
startPos = extremePosition;
|
||||||
lenDoc = -1;
|
lenDoc = -1;
|
||||||
if (validLen > 0) {
|
if (validLen > 0) {
|
||||||
Platform::SendScintilla(id, SCI_SETSTYLINGEX, validLen,
|
Platform::SendScintillaPointer(id, SCI_SETSTYLINGEX, validLen,
|
||||||
reinterpret_cast<long>(styleBuf));
|
styleBuf);
|
||||||
validLen = 0;
|
validLen = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
210
src/stc/stc.cpp
210
src/stc/stc.cpp
@@ -81,6 +81,7 @@ DEFINE_EVENT_TYPE( wxEVT_STC_DWELLEND )
|
|||||||
DEFINE_EVENT_TYPE( wxEVT_STC_START_DRAG )
|
DEFINE_EVENT_TYPE( wxEVT_STC_START_DRAG )
|
||||||
DEFINE_EVENT_TYPE( wxEVT_STC_DRAG_OVER )
|
DEFINE_EVENT_TYPE( wxEVT_STC_DRAG_OVER )
|
||||||
DEFINE_EVENT_TYPE( wxEVT_STC_DO_DROP )
|
DEFINE_EVENT_TYPE( wxEVT_STC_DO_DROP )
|
||||||
|
DEFINE_EVENT_TYPE( wxEVT_STC_ZOOM )
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
|
BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
|
||||||
@@ -117,7 +118,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxStyledTextEvent, wxCommandEvent)
|
|||||||
|
|
||||||
#ifdef LINK_LEXERS
|
#ifdef LINK_LEXERS
|
||||||
// forces the linking of the lexer modules
|
// forces the linking of the lexer modules
|
||||||
int wxForceScintillaLexers();
|
int Scintilla_LinkLexers();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@@ -134,7 +135,7 @@ wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent,
|
|||||||
wxDefaultValidator, name)
|
wxDefaultValidator, name)
|
||||||
{
|
{
|
||||||
#ifdef LINK_LEXERS
|
#ifdef LINK_LEXERS
|
||||||
wxForceScintillaLexers();
|
Scintilla_LinkLexers();
|
||||||
#endif
|
#endif
|
||||||
m_swx = new ScintillaWX(this);
|
m_swx = new ScintillaWX(this);
|
||||||
m_stopWatch.Start();
|
m_stopWatch.Start();
|
||||||
@@ -168,58 +169,58 @@ long wxStyledTextCtrl::SendMsg(int msg, long wp, long lp) {
|
|||||||
// this file. Edit stc.cpp.in or gen_iface.py instead and regenerate.
|
// this file. Edit stc.cpp.in or gen_iface.py instead and regenerate.
|
||||||
|
|
||||||
|
|
||||||
// Add text to the document
|
// Add text to the document.
|
||||||
void wxStyledTextCtrl::AddText(const wxString& text) {
|
void wxStyledTextCtrl::AddText(const wxString& text) {
|
||||||
wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text);
|
wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text);
|
||||||
SendMsg(2001, strlen(buf), (long)(const char*)buf);
|
SendMsg(2001, strlen(buf), (long)(const char*)buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add array of cells to document
|
// Add array of cells to document.
|
||||||
void wxStyledTextCtrl::AddStyledText(const wxMemoryBuffer& data) {
|
void wxStyledTextCtrl::AddStyledText(const wxMemoryBuffer& data) {
|
||||||
SendMsg(2002, data.GetDataLen(), (long)data.GetData());
|
SendMsg(2002, data.GetDataLen(), (long)data.GetData());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert string at a position
|
// Insert string at a position.
|
||||||
void wxStyledTextCtrl::InsertText(int pos, const wxString& text) {
|
void wxStyledTextCtrl::InsertText(int pos, const wxString& text) {
|
||||||
SendMsg(2003, pos, (long)(const char*)wx2stc(text));
|
SendMsg(2003, pos, (long)(const char*)wx2stc(text));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete all text in the document
|
// Delete all text in the document.
|
||||||
void wxStyledTextCtrl::ClearAll() {
|
void wxStyledTextCtrl::ClearAll() {
|
||||||
SendMsg(2004, 0, 0);
|
SendMsg(2004, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set all style bytes to 0, remove all folding information
|
// Set all style bytes to 0, remove all folding information.
|
||||||
void wxStyledTextCtrl::ClearDocumentStyle() {
|
void wxStyledTextCtrl::ClearDocumentStyle() {
|
||||||
SendMsg(2005, 0, 0);
|
SendMsg(2005, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The number of characters in the document
|
// The number of characters in the document.
|
||||||
int wxStyledTextCtrl::GetLength() {
|
int wxStyledTextCtrl::GetLength() {
|
||||||
return SendMsg(2006, 0, 0);
|
return SendMsg(2006, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the character byte at the position
|
// Returns the character byte at the position.
|
||||||
int wxStyledTextCtrl::GetCharAt(int pos) {
|
int wxStyledTextCtrl::GetCharAt(int pos) {
|
||||||
return (unsigned char)SendMsg(2007, pos, 0);
|
return (unsigned char)SendMsg(2007, pos, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the position of the caret
|
// Returns the position of the caret.
|
||||||
int wxStyledTextCtrl::GetCurrentPos() {
|
int wxStyledTextCtrl::GetCurrentPos() {
|
||||||
return SendMsg(2008, 0, 0);
|
return SendMsg(2008, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the position of the opposite end of the selection to the caret
|
// Returns the position of the opposite end of the selection to the caret.
|
||||||
int wxStyledTextCtrl::GetAnchor() {
|
int wxStyledTextCtrl::GetAnchor() {
|
||||||
return SendMsg(2009, 0, 0);
|
return SendMsg(2009, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the style byte at the position
|
// Returns the style byte at the position.
|
||||||
int wxStyledTextCtrl::GetStyleAt(int pos) {
|
int wxStyledTextCtrl::GetStyleAt(int pos) {
|
||||||
return (unsigned char)SendMsg(2010, pos, 0);
|
return (unsigned char)SendMsg(2010, pos, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Redoes the next action on the undo history
|
// Redoes the next action on the undo history.
|
||||||
void wxStyledTextCtrl::Redo() {
|
void wxStyledTextCtrl::Redo() {
|
||||||
SendMsg(2011, 0, 0);
|
SendMsg(2011, 0, 0);
|
||||||
}
|
}
|
||||||
@@ -260,12 +261,12 @@ wxMemoryBuffer wxStyledTextCtrl::GetStyledText(int startPos, int endPos) {
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Are there any redoable actions in the undo history.
|
// Are there any redoable actions in the undo history?
|
||||||
bool wxStyledTextCtrl::CanRedo() {
|
bool wxStyledTextCtrl::CanRedo() {
|
||||||
return SendMsg(2016, 0, 0) != 0;
|
return SendMsg(2016, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve the line number at which a particular marker is located
|
// Retrieve the line number at which a particular marker is located.
|
||||||
int wxStyledTextCtrl::MarkerLineFromHandle(int handle) {
|
int wxStyledTextCtrl::MarkerLineFromHandle(int handle) {
|
||||||
return SendMsg(2017, handle, 0);
|
return SendMsg(2017, handle, 0);
|
||||||
}
|
}
|
||||||
@@ -358,8 +359,7 @@ void wxStyledTextCtrl::SetEOLMode(int eolMode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set the current styling position to pos and the styling mask to mask.
|
// Set the current styling position to pos and the styling mask to mask.
|
||||||
// The styling mask can be used to protect some bits in each styling byte from
|
// The styling mask can be used to protect some bits in each styling byte from modification.
|
||||||
// modification.
|
|
||||||
void wxStyledTextCtrl::StartStyling(int pos, int mask) {
|
void wxStyledTextCtrl::StartStyling(int pos, int mask) {
|
||||||
SendMsg(2032, pos, mask);
|
SendMsg(2032, pos, mask);
|
||||||
}
|
}
|
||||||
@@ -370,7 +370,7 @@ void wxStyledTextCtrl::SetStyling(int length, int style) {
|
|||||||
SendMsg(2033, length, style);
|
SendMsg(2033, length, style);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Is drawing done first into a buffer or direct to the screen.
|
// Is drawing done first into a buffer or direct to the screen?
|
||||||
bool wxStyledTextCtrl::GetBufferedDraw() {
|
bool wxStyledTextCtrl::GetBufferedDraw() {
|
||||||
return SendMsg(2034, 0, 0) != 0;
|
return SendMsg(2034, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
@@ -381,8 +381,7 @@ void wxStyledTextCtrl::SetBufferedDraw(bool buffered) {
|
|||||||
SendMsg(2035, buffered, 0);
|
SendMsg(2035, buffered, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change the visible size of a tab to be a multiple of the width of a space
|
// Change the visible size of a tab to be a multiple of the width of a space character.
|
||||||
// character.
|
|
||||||
void wxStyledTextCtrl::SetTabWidth(int tabWidth) {
|
void wxStyledTextCtrl::SetTabWidth(int tabWidth) {
|
||||||
SendMsg(2036, tabWidth, 0);
|
SendMsg(2036, tabWidth, 0);
|
||||||
}
|
}
|
||||||
@@ -432,12 +431,12 @@ int wxStyledTextCtrl::MarkerAdd(int line, int markerNumber) {
|
|||||||
return SendMsg(2043, line, markerNumber);
|
return SendMsg(2043, line, markerNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete a marker from a line
|
// Delete a marker from a line.
|
||||||
void wxStyledTextCtrl::MarkerDelete(int line, int markerNumber) {
|
void wxStyledTextCtrl::MarkerDelete(int line, int markerNumber) {
|
||||||
SendMsg(2044, line, markerNumber);
|
SendMsg(2044, line, markerNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete all markers with a particular number from all lines
|
// Delete all markers with a particular number from all lines.
|
||||||
void wxStyledTextCtrl::MarkerDeleteAll(int markerNumber) {
|
void wxStyledTextCtrl::MarkerDeleteAll(int markerNumber) {
|
||||||
SendMsg(2045, markerNumber, 0);
|
SendMsg(2045, markerNumber, 0);
|
||||||
}
|
}
|
||||||
@@ -607,8 +606,7 @@ void wxStyledTextCtrl::SetCaretPeriod(int periodMilliseconds) {
|
|||||||
SendMsg(2076, periodMilliseconds, 0);
|
SendMsg(2076, periodMilliseconds, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the set of characters making up words for when moving or selecting
|
// Set the set of characters making up words for when moving or selecting by word.
|
||||||
// by word.
|
|
||||||
void wxStyledTextCtrl::SetWordChars(const wxString& characters) {
|
void wxStyledTextCtrl::SetWordChars(const wxString& characters) {
|
||||||
SendMsg(2077, 0, (long)(const char*)wx2stc(characters));
|
SendMsg(2077, 0, (long)(const char*)wx2stc(characters));
|
||||||
}
|
}
|
||||||
@@ -645,8 +643,8 @@ wxColour wxStyledTextCtrl::IndicatorGetForeground(int indic) {
|
|||||||
return wxColourFromLong(c);
|
return wxColourFromLong(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Divide each styling byte into lexical class bits (default:5) and indicator
|
// Divide each styling byte into lexical class bits (default: 5) and indicator
|
||||||
// bits (default:3). If a lexer requires more than 32 lexical states, then this
|
// bits (default: 3). If a lexer requires more than 32 lexical states, then this
|
||||||
// is used to expand the possible states.
|
// is used to expand the possible states.
|
||||||
void wxStyledTextCtrl::SetStyleBits(int bits) {
|
void wxStyledTextCtrl::SetStyleBits(int bits) {
|
||||||
SendMsg(2090, bits, 0);
|
SendMsg(2090, bits, 0);
|
||||||
@@ -677,7 +675,7 @@ bool wxStyledTextCtrl::GetCaretLineVisible() {
|
|||||||
return SendMsg(2095, 0, 0) != 0;
|
return SendMsg(2095, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dsplay the background of the line containing the caret in a different colour.
|
// Display the background of the line containing the caret in a different colour.
|
||||||
void wxStyledTextCtrl::SetCaretLineVisible(bool show) {
|
void wxStyledTextCtrl::SetCaretLineVisible(bool show) {
|
||||||
SendMsg(2096, show, 0);
|
SendMsg(2096, show, 0);
|
||||||
}
|
}
|
||||||
@@ -716,8 +714,7 @@ bool wxStyledTextCtrl::AutoCompActive() {
|
|||||||
return SendMsg(2102, 0, 0) != 0;
|
return SendMsg(2102, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve the position of the caret when the auto-completion list was
|
// Retrieve the position of the caret when the auto-completion list was displayed.
|
||||||
// displayed.
|
|
||||||
int wxStyledTextCtrl::AutoCompPosStart() {
|
int wxStyledTextCtrl::AutoCompPosStart() {
|
||||||
return SendMsg(2103, 0, 0);
|
return SendMsg(2103, 0, 0);
|
||||||
}
|
}
|
||||||
@@ -732,8 +729,8 @@ void wxStyledTextCtrl::AutoCompStops(const wxString& characterSet) {
|
|||||||
SendMsg(2105, 0, (long)(const char*)wx2stc(characterSet));
|
SendMsg(2105, 0, (long)(const char*)wx2stc(characterSet));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change the separator character in the string setting up an auto-completion
|
// Change the separator character in the string setting up an auto-completion list.
|
||||||
// list. Default is space but can be changed if items contain space.
|
// Default is space but can be changed if items contain space.
|
||||||
void wxStyledTextCtrl::AutoCompSetSeparator(int separatorCharacter) {
|
void wxStyledTextCtrl::AutoCompSetSeparator(int separatorCharacter) {
|
||||||
SendMsg(2106, separatorCharacter, 0);
|
SendMsg(2106, separatorCharacter, 0);
|
||||||
}
|
}
|
||||||
@@ -790,22 +787,24 @@ void wxStyledTextCtrl::UserListShow(int listType, const wxString& itemList) {
|
|||||||
SendMsg(2117, listType, (long)(const char*)wx2stc(itemList));
|
SendMsg(2117, listType, (long)(const char*)wx2stc(itemList));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set whether or not autocompletion is hidden automatically when nothing matches
|
// Set whether or not autocompletion is hidden automatically when nothing matches.
|
||||||
void wxStyledTextCtrl::AutoCompSetAutoHide(bool autoHide) {
|
void wxStyledTextCtrl::AutoCompSetAutoHide(bool autoHide) {
|
||||||
SendMsg(2118, autoHide, 0);
|
SendMsg(2118, autoHide, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve whether or not autocompletion is hidden automatically when nothing matches
|
// Retrieve whether or not autocompletion is hidden automatically when nothing matches.
|
||||||
bool wxStyledTextCtrl::AutoCompGetAutoHide() {
|
bool wxStyledTextCtrl::AutoCompGetAutoHide() {
|
||||||
return SendMsg(2119, 0, 0) != 0;
|
return SendMsg(2119, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set whether or not autocompletion deletes any word characters after the inserted text upon completion
|
// Set whether or not autocompletion deletes any word characters
|
||||||
|
// after the inserted text upon completion.
|
||||||
void wxStyledTextCtrl::AutoCompSetDropRestOfWord(bool dropRestOfWord) {
|
void wxStyledTextCtrl::AutoCompSetDropRestOfWord(bool dropRestOfWord) {
|
||||||
SendMsg(2270, dropRestOfWord, 0);
|
SendMsg(2270, dropRestOfWord, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve whether or not autocompletion deletes any word characters after the inserted text upon completion
|
// Retrieve whether or not autocompletion deletes any word characters
|
||||||
|
// after the inserted text upon completion.
|
||||||
bool wxStyledTextCtrl::AutoCompGetDropRestOfWord() {
|
bool wxStyledTextCtrl::AutoCompGetDropRestOfWord() {
|
||||||
return SendMsg(2271, 0, 0) != 0;
|
return SendMsg(2271, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
@@ -961,7 +960,7 @@ int wxStyledTextCtrl::FindText(int minPos, int maxPos,
|
|||||||
return SendMsg(2150, flags, (long)&ft);
|
return SendMsg(2150, flags, (long)&ft);
|
||||||
}
|
}
|
||||||
|
|
||||||
// On Windows will draw the document into a display context such as a printer.
|
// On Windows, will draw the document into a display context such as a printer.
|
||||||
int wxStyledTextCtrl::FormatRange(bool doDraw,
|
int wxStyledTextCtrl::FormatRange(bool doDraw,
|
||||||
int startPos,
|
int startPos,
|
||||||
int endPos,
|
int endPos,
|
||||||
@@ -1123,7 +1122,7 @@ bool wxStyledTextCtrl::CanPaste() {
|
|||||||
return SendMsg(2173, 0, 0) != 0;
|
return SendMsg(2173, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Are there any undoable actions in the undo history.
|
// Are there any undoable actions in the undo history?
|
||||||
bool wxStyledTextCtrl::CanUndo() {
|
bool wxStyledTextCtrl::CanUndo() {
|
||||||
return SendMsg(2174, 0, 0) != 0;
|
return SendMsg(2174, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
@@ -1179,7 +1178,7 @@ int wxStyledTextCtrl::GetTextLength() {
|
|||||||
return SendMsg(2183, 0, 0);
|
return SendMsg(2183, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set to overtype (true) or insert mode
|
// Set to overtype (true) or insert mode.
|
||||||
void wxStyledTextCtrl::SetOvertype(bool overtype) {
|
void wxStyledTextCtrl::SetOvertype(bool overtype) {
|
||||||
SendMsg(2186, overtype, 0);
|
SendMsg(2186, overtype, 0);
|
||||||
}
|
}
|
||||||
@@ -1189,12 +1188,12 @@ bool wxStyledTextCtrl::GetOvertype() {
|
|||||||
return SendMsg(2187, 0, 0) != 0;
|
return SendMsg(2187, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the width of the insert mode caret
|
// Set the width of the insert mode caret.
|
||||||
void wxStyledTextCtrl::SetCaretWidth(int pixelWidth) {
|
void wxStyledTextCtrl::SetCaretWidth(int pixelWidth) {
|
||||||
SendMsg(2188, pixelWidth, 0);
|
SendMsg(2188, pixelWidth, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the width of the insert mode caret
|
// Returns the width of the insert mode caret.
|
||||||
int wxStyledTextCtrl::GetCaretWidth() {
|
int wxStyledTextCtrl::GetCaretWidth() {
|
||||||
return SendMsg(2189, 0, 0);
|
return SendMsg(2189, 0, 0);
|
||||||
}
|
}
|
||||||
@@ -1251,12 +1250,12 @@ int wxStyledTextCtrl::GetTargetEnd() {
|
|||||||
return SendMsg(2197, strlen(buf), (long)(const char*)buf);
|
return SendMsg(2197, strlen(buf), (long)(const char*)buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the search flags used by SearchInTarget
|
// Set the search flags used by SearchInTarget.
|
||||||
void wxStyledTextCtrl::SetSearchFlags(int flags) {
|
void wxStyledTextCtrl::SetSearchFlags(int flags) {
|
||||||
SendMsg(2198, flags, 0);
|
SendMsg(2198, flags, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the search flags used by SearchInTarget
|
// Get the search flags used by SearchInTarget.
|
||||||
int wxStyledTextCtrl::GetSearchFlags() {
|
int wxStyledTextCtrl::GetSearchFlags() {
|
||||||
return SendMsg(2199, 0, 0);
|
return SendMsg(2199, 0, 0);
|
||||||
}
|
}
|
||||||
@@ -1358,7 +1357,7 @@ void wxStyledTextCtrl::EnsureVisible(int line) {
|
|||||||
SendMsg(2232, line, 0);
|
SendMsg(2232, line, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set some debugging options for folding
|
// Set some debugging options for folding.
|
||||||
void wxStyledTextCtrl::SetFoldFlags(int flags) {
|
void wxStyledTextCtrl::SetFoldFlags(int flags) {
|
||||||
SendMsg(2233, flags, 0);
|
SendMsg(2233, flags, 0);
|
||||||
}
|
}
|
||||||
@@ -1369,7 +1368,7 @@ void wxStyledTextCtrl::EnsureVisibleEnforcePolicy(int line) {
|
|||||||
SendMsg(2234, line, 0);
|
SendMsg(2234, line, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets whether a tab pressed when caret is within indentation indents
|
// Sets whether a tab pressed when caret is within indentation indents.
|
||||||
void wxStyledTextCtrl::SetTabIndents(bool tabIndents) {
|
void wxStyledTextCtrl::SetTabIndents(bool tabIndents) {
|
||||||
SendMsg(2260, tabIndents, 0);
|
SendMsg(2260, tabIndents, 0);
|
||||||
}
|
}
|
||||||
@@ -1379,7 +1378,7 @@ bool wxStyledTextCtrl::GetTabIndents() {
|
|||||||
return SendMsg(2261, 0, 0) != 0;
|
return SendMsg(2261, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets whether a backspace pressed when caret is within indentation unindents
|
// Sets whether a backspace pressed when caret is within indentation unindents.
|
||||||
void wxStyledTextCtrl::SetBackSpaceUnIndents(bool bsUnIndents) {
|
void wxStyledTextCtrl::SetBackSpaceUnIndents(bool bsUnIndents) {
|
||||||
SendMsg(2262, bsUnIndents, 0);
|
SendMsg(2262, bsUnIndents, 0);
|
||||||
}
|
}
|
||||||
@@ -1389,52 +1388,87 @@ bool wxStyledTextCtrl::GetBackSpaceUnIndents() {
|
|||||||
return SendMsg(2263, 0, 0) != 0;
|
return SendMsg(2263, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the time the mouse must sit still to generate a mouse dwell event
|
// Sets the time the mouse must sit still to generate a mouse dwell event.
|
||||||
void wxStyledTextCtrl::SetMouseDwellTime(int periodMilliseconds) {
|
void wxStyledTextCtrl::SetMouseDwellTime(int periodMilliseconds) {
|
||||||
SendMsg(2264, periodMilliseconds, 0);
|
SendMsg(2264, periodMilliseconds, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve the time the mouse must sit still to generate a mouse dwell event
|
// Retrieve the time the mouse must sit still to generate a mouse dwell event.
|
||||||
int wxStyledTextCtrl::GetMouseDwellTime() {
|
int wxStyledTextCtrl::GetMouseDwellTime() {
|
||||||
return SendMsg(2265, 0, 0);
|
return SendMsg(2265, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get position of start of word
|
// Get position of start of word.
|
||||||
int wxStyledTextCtrl::WordStartPosition(int pos, bool onlyWordCharacters) {
|
int wxStyledTextCtrl::WordStartPosition(int pos, bool onlyWordCharacters) {
|
||||||
return SendMsg(2266, pos, onlyWordCharacters);
|
return SendMsg(2266, pos, onlyWordCharacters);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get position of end of word
|
// Get position of end of word.
|
||||||
int wxStyledTextCtrl::WordEndPosition(int pos, bool onlyWordCharacters) {
|
int wxStyledTextCtrl::WordEndPosition(int pos, bool onlyWordCharacters) {
|
||||||
return SendMsg(2267, pos, onlyWordCharacters);
|
return SendMsg(2267, pos, onlyWordCharacters);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets whether text is word wrapped
|
// Sets whether text is word wrapped.
|
||||||
void wxStyledTextCtrl::SetWrapMode(int mode) {
|
void wxStyledTextCtrl::SetWrapMode(int mode) {
|
||||||
SendMsg(2268, mode, 0);
|
SendMsg(2268, mode, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve whether text is word wrapped
|
// Retrieve whether text is word wrapped.
|
||||||
int wxStyledTextCtrl::GetWrapMode() {
|
int wxStyledTextCtrl::GetWrapMode() {
|
||||||
return SendMsg(2269, 0, 0);
|
return SendMsg(2269, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the degree of caching of layout information
|
// Sets the degree of caching of layout information.
|
||||||
void wxStyledTextCtrl::SetLayoutCache(int mode) {
|
void wxStyledTextCtrl::SetLayoutCache(int mode) {
|
||||||
SendMsg(2272, mode, 0);
|
SendMsg(2272, mode, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve the degree of caching of layout information
|
// Retrieve the degree of caching of layout information.
|
||||||
int wxStyledTextCtrl::GetLayoutCache() {
|
int wxStyledTextCtrl::GetLayoutCache() {
|
||||||
return SendMsg(2273, 0, 0);
|
return SendMsg(2273, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move the caret inside current view if it's not there already
|
// Sets the document width assumed for scrolling.
|
||||||
|
void wxStyledTextCtrl::SetScrollWidth(int pixelWidth) {
|
||||||
|
SendMsg(2274, pixelWidth, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve the document width assumed for scrolling.
|
||||||
|
int wxStyledTextCtrl::GetScrollWidth() {
|
||||||
|
return SendMsg(2275, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Measure the pixel width of some text in a particular style.
|
||||||
|
// Nul terminated text argument.
|
||||||
|
// Does not handle tab or control characters.
|
||||||
|
int wxStyledTextCtrl::TextWidth(int style, const wxString& text) {
|
||||||
|
return SendMsg(2276, style, (long)(const char*)wx2stc(text));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sets the scroll range so that maximum scroll position has
|
||||||
|
// the last line at the bottom of the view (default).
|
||||||
|
// Setting this to false allows scrolling one page below the last line.
|
||||||
|
void wxStyledTextCtrl::SetEndAtLastLine(bool endAtLastLine) {
|
||||||
|
SendMsg(2277, endAtLastLine, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve whether the maximum scroll position has the last
|
||||||
|
// line at the bottom of the view.
|
||||||
|
int wxStyledTextCtrl::GetEndAtLastLine() {
|
||||||
|
return SendMsg(2278, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve the height of a particular line of text in pixels.
|
||||||
|
int wxStyledTextCtrl::TextHeight(int line) {
|
||||||
|
return SendMsg(2279, line, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Move the caret inside current view if it's not there already.
|
||||||
void wxStyledTextCtrl::MoveCaretInsideView() {
|
void wxStyledTextCtrl::MoveCaretInsideView() {
|
||||||
SendMsg(2401, 0, 0);
|
SendMsg(2401, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// How many characters are on a line, not including end of line characters.
|
// How many characters are on a line, not including end of line characters?
|
||||||
int wxStyledTextCtrl::LineLength(int line) {
|
int wxStyledTextCtrl::LineLength(int line) {
|
||||||
return SendMsg(2350, line, 0);
|
return SendMsg(2350, line, 0);
|
||||||
}
|
}
|
||||||
@@ -1454,12 +1488,12 @@ int wxStyledTextCtrl::BraceMatch(int pos) {
|
|||||||
return SendMsg(2353, pos, 0);
|
return SendMsg(2353, pos, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Are the end of line characters visible.
|
// Are the end of line characters visible?
|
||||||
bool wxStyledTextCtrl::GetViewEOL() {
|
bool wxStyledTextCtrl::GetViewEOL() {
|
||||||
return SendMsg(2355, 0, 0) != 0;
|
return SendMsg(2355, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make the end of line characters visible or invisible
|
// Make the end of line characters visible or invisible.
|
||||||
void wxStyledTextCtrl::SetViewEOL(bool visible) {
|
void wxStyledTextCtrl::SetViewEOL(bool visible) {
|
||||||
SendMsg(2356, visible, 0);
|
SendMsg(2356, visible, 0);
|
||||||
}
|
}
|
||||||
@@ -1529,11 +1563,6 @@ int wxStyledTextCtrl::SearchPrev(int flags, const wxString& text) {
|
|||||||
return SendMsg(2368, flags, (long)(const char*)wx2stc(text));
|
return SendMsg(2368, flags, (long)(const char*)wx2stc(text));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the way the line the caret is on is kept visible.
|
|
||||||
void wxStyledTextCtrl::SetCaretPolicy(int caretPolicy, int caretSlop) {
|
|
||||||
SendMsg(2369, caretPolicy, caretSlop);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Retrieves the number of lines completely visible.
|
// Retrieves the number of lines completely visible.
|
||||||
int wxStyledTextCtrl::LinesOnScreen() {
|
int wxStyledTextCtrl::LinesOnScreen() {
|
||||||
return SendMsg(2370, 0, 0);
|
return SendMsg(2370, 0, 0);
|
||||||
@@ -1545,7 +1574,7 @@ void wxStyledTextCtrl::UsePopUp(bool allowPopUp) {
|
|||||||
SendMsg(2371, allowPopUp, 0);
|
SendMsg(2371, allowPopUp, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Is the selection a rectangular. The alternative is the more common stream selection.
|
// Is the selection rectangular? The alternative is the more common stream selection.
|
||||||
bool wxStyledTextCtrl::SelectionIsRectangle() {
|
bool wxStyledTextCtrl::SelectionIsRectangle() {
|
||||||
return SendMsg(2372, 0, 0) != 0;
|
return SendMsg(2372, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
@@ -1582,93 +1611,96 @@ int wxStyledTextCtrl::GetModEventMask() {
|
|||||||
return SendMsg(2378, 0, 0);
|
return SendMsg(2378, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change internal focus flag
|
// Change internal focus flag.
|
||||||
void wxStyledTextCtrl::SetSTCFocus(bool focus) {
|
void wxStyledTextCtrl::SetSTCFocus(bool focus) {
|
||||||
SendMsg(2380, focus, 0);
|
SendMsg(2380, focus, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get internal focus flag
|
// Get internal focus flag.
|
||||||
bool wxStyledTextCtrl::GetSTCFocus() {
|
bool wxStyledTextCtrl::GetSTCFocus() {
|
||||||
return SendMsg(2381, 0, 0) != 0;
|
return SendMsg(2381, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change error status - 0 = OK
|
// Change error status - 0 = OK.
|
||||||
void wxStyledTextCtrl::SetStatus(int statusCode) {
|
void wxStyledTextCtrl::SetStatus(int statusCode) {
|
||||||
SendMsg(2382, statusCode, 0);
|
SendMsg(2382, statusCode, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get error status
|
// Get error status.
|
||||||
int wxStyledTextCtrl::GetStatus() {
|
int wxStyledTextCtrl::GetStatus() {
|
||||||
return SendMsg(2383, 0, 0);
|
return SendMsg(2383, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set whether the mouse is captured when its button is pressed
|
// Set whether the mouse is captured when its button is pressed.
|
||||||
void wxStyledTextCtrl::SetMouseDownCaptures(bool captures) {
|
void wxStyledTextCtrl::SetMouseDownCaptures(bool captures) {
|
||||||
SendMsg(2384, captures, 0);
|
SendMsg(2384, captures, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get whether mouse gets captured
|
// Get whether mouse gets captured.
|
||||||
bool wxStyledTextCtrl::GetMouseDownCaptures() {
|
bool wxStyledTextCtrl::GetMouseDownCaptures() {
|
||||||
return SendMsg(2385, 0, 0) != 0;
|
return SendMsg(2385, 0, 0) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the cursor to one of the SC_CURSOR* values
|
// Sets the cursor to one of the SC_CURSOR* values.
|
||||||
void wxStyledTextCtrl::SetCursor(int cursorType) {
|
void wxStyledTextCtrl::SetCursor(int cursorType) {
|
||||||
SendMsg(2386, cursorType, 0);
|
SendMsg(2386, cursorType, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get cursor type
|
// Get cursor type.
|
||||||
int wxStyledTextCtrl::GetCursor() {
|
int wxStyledTextCtrl::GetCursor() {
|
||||||
return SendMsg(2387, 0, 0);
|
return SendMsg(2387, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change the way control characters are displayed:
|
// Change the way control characters are displayed:
|
||||||
// If symbol is < 32, keep the drawn way, else, use the given character
|
// If symbol is < 32, keep the drawn way, else, use the given character.
|
||||||
void wxStyledTextCtrl::SetControlCharSymbol(int symbol) {
|
void wxStyledTextCtrl::SetControlCharSymbol(int symbol) {
|
||||||
SendMsg(2388, symbol, 0);
|
SendMsg(2388, symbol, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the way control characters are displayed
|
// Get the way control characters are displayed.
|
||||||
int wxStyledTextCtrl::GetControlCharSymbol() {
|
int wxStyledTextCtrl::GetControlCharSymbol() {
|
||||||
return SendMsg(2389, 0, 0);
|
return SendMsg(2389, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move to the previous change in capitalistion
|
// Move to the previous change in capitalisation.
|
||||||
void wxStyledTextCtrl::WordPartLeft() {
|
void wxStyledTextCtrl::WordPartLeft() {
|
||||||
SendMsg(2390, 0, 0);
|
SendMsg(2390, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move to the previous change in capitalistion extending selection to new caret position.
|
// Move to the previous change in capitalisation extending selection
|
||||||
|
// to new caret position.
|
||||||
void wxStyledTextCtrl::WordPartLeftExtend() {
|
void wxStyledTextCtrl::WordPartLeftExtend() {
|
||||||
SendMsg(2391, 0, 0);
|
SendMsg(2391, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move to the change next in capitalistion
|
// Move to the change next in capitalisation.
|
||||||
void wxStyledTextCtrl::WordPartRight() {
|
void wxStyledTextCtrl::WordPartRight() {
|
||||||
SendMsg(2392, 0, 0);
|
SendMsg(2392, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move to the next change in capitalistion extending selection to new caret position.
|
// Move to the next change in capitalisation extending selection
|
||||||
|
// to new caret position.
|
||||||
void wxStyledTextCtrl::WordPartRightExtend() {
|
void wxStyledTextCtrl::WordPartRightExtend() {
|
||||||
SendMsg(2393, 0, 0);
|
SendMsg(2393, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the way the display area is determined when a particular line is to be moved to.
|
// Set the way the display area is determined when a particular line
|
||||||
|
// is to be moved to by Find, FindNext, GotoLine, etc.
|
||||||
void wxStyledTextCtrl::SetVisiblePolicy(int visiblePolicy, int visibleSlop) {
|
void wxStyledTextCtrl::SetVisiblePolicy(int visiblePolicy, int visibleSlop) {
|
||||||
SendMsg(2394, visiblePolicy, visibleSlop);
|
SendMsg(2394, visiblePolicy, visibleSlop);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete back from the current position to the start of the line
|
// Delete back from the current position to the start of the line.
|
||||||
void wxStyledTextCtrl::DelLineLeft() {
|
void wxStyledTextCtrl::DelLineLeft() {
|
||||||
SendMsg(2395, 0, 0);
|
SendMsg(2395, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete forwards from the current position to the end of the line
|
// Delete forwards from the current position to the end of the line.
|
||||||
void wxStyledTextCtrl::DelLineRight() {
|
void wxStyledTextCtrl::DelLineRight() {
|
||||||
SendMsg(2396, 0, 0);
|
SendMsg(2396, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get and Set the xOffset (ie, horizonal scroll position)
|
// Get and Set the xOffset (ie, horizonal scroll position).
|
||||||
void wxStyledTextCtrl::SetXOffset(int newOffset) {
|
void wxStyledTextCtrl::SetXOffset(int newOffset) {
|
||||||
SendMsg(2397, newOffset, 0);
|
SendMsg(2397, newOffset, 0);
|
||||||
}
|
}
|
||||||
@@ -1676,6 +1708,18 @@ int wxStyledTextCtrl::GetXOffset() {
|
|||||||
return SendMsg(2398, 0, 0);
|
return SendMsg(2398, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the way the caret is kept visible when going sideway.
|
||||||
|
// The exclusion zone is given in pixels.
|
||||||
|
void wxStyledTextCtrl::SetXCaretPolicy(int caretPolicy, int caretSlop) {
|
||||||
|
SendMsg(2402, caretPolicy, caretSlop);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the way the line the caret is on is kept visible.
|
||||||
|
// The exclusion zone is given in lines.
|
||||||
|
void wxStyledTextCtrl::SetYCaretPolicy(int caretPolicy, int caretSlop) {
|
||||||
|
SendMsg(2403, caretPolicy, caretSlop);
|
||||||
|
}
|
||||||
|
|
||||||
// Start notifying the container of all key presses and commands.
|
// Start notifying the container of all key presses and commands.
|
||||||
void wxStyledTextCtrl::StartRecord() {
|
void wxStyledTextCtrl::StartRecord() {
|
||||||
SendMsg(3001, 0, 0);
|
SendMsg(3001, 0, 0);
|
||||||
@@ -2104,6 +2148,10 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
|
|||||||
evt.SetY(scn.y);
|
evt.SetY(scn.y);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SCN_ZOOM:
|
||||||
|
evt.SetEventType(wxEVT_STC_ZOOM);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -81,6 +81,7 @@ DEFINE_EVENT_TYPE( wxEVT_STC_DWELLEND )
|
|||||||
DEFINE_EVENT_TYPE( wxEVT_STC_START_DRAG )
|
DEFINE_EVENT_TYPE( wxEVT_STC_START_DRAG )
|
||||||
DEFINE_EVENT_TYPE( wxEVT_STC_DRAG_OVER )
|
DEFINE_EVENT_TYPE( wxEVT_STC_DRAG_OVER )
|
||||||
DEFINE_EVENT_TYPE( wxEVT_STC_DO_DROP )
|
DEFINE_EVENT_TYPE( wxEVT_STC_DO_DROP )
|
||||||
|
DEFINE_EVENT_TYPE( wxEVT_STC_ZOOM )
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
|
BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
|
||||||
@@ -117,7 +118,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxStyledTextEvent, wxCommandEvent)
|
|||||||
|
|
||||||
#ifdef LINK_LEXERS
|
#ifdef LINK_LEXERS
|
||||||
// forces the linking of the lexer modules
|
// forces the linking of the lexer modules
|
||||||
int wxForceScintillaLexers();
|
int Scintilla_LinkLexers();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@@ -134,7 +135,7 @@ wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent,
|
|||||||
wxDefaultValidator, name)
|
wxDefaultValidator, name)
|
||||||
{
|
{
|
||||||
#ifdef LINK_LEXERS
|
#ifdef LINK_LEXERS
|
||||||
wxForceScintillaLexers();
|
Scintilla_LinkLexers();
|
||||||
#endif
|
#endif
|
||||||
m_swx = new ScintillaWX(this);
|
m_swx = new ScintillaWX(this);
|
||||||
m_stopWatch.Start();
|
m_stopWatch.Start();
|
||||||
@@ -557,6 +558,10 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
|
|||||||
evt.SetY(scn.y);
|
evt.SetY(scn.y);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SCN_ZOOM:
|
||||||
|
evt.SetEventType(wxEVT_STC_ZOOM);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -338,6 +338,7 @@ BEGIN_DECLARE_EVENT_TYPES()
|
|||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_START_DRAG, 1669)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_START_DRAG, 1669)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DRAG_OVER, 1670)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DRAG_OVER, 1670)
|
||||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DO_DROP, 1671)
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DO_DROP, 1671)
|
||||||
|
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_ZOOM, 1672)
|
||||||
END_DECLARE_EVENT_TYPES()
|
END_DECLARE_EVENT_TYPES()
|
||||||
#else
|
#else
|
||||||
enum {
|
enum {
|
||||||
@@ -363,6 +364,7 @@ END_DECLARE_EVENT_TYPES()
|
|||||||
wxEVT_STC_START_DRAG,
|
wxEVT_STC_START_DRAG,
|
||||||
wxEVT_STC_DRAG_OVER,
|
wxEVT_STC_DRAG_OVER,
|
||||||
wxEVT_STC_DO_DROP,
|
wxEVT_STC_DO_DROP,
|
||||||
|
wxEVT_STC_ZOOM,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -393,6 +395,7 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
|
|||||||
#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
|
#define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@@ -33,7 +33,8 @@ Updated XRCed from Roman Rolinsky
|
|||||||
|
|
||||||
Added wxBufferedDC.
|
Added wxBufferedDC.
|
||||||
|
|
||||||
Upgraded wxSTC from Scintilla 1.40 to Scintilla 1.45
|
Upgraded wxSTC from Scintilla 1.40 to Scintilla 1.45, and then again
|
||||||
|
to version 1.47.
|
||||||
|
|
||||||
UNICODE!
|
UNICODE!
|
||||||
wxWindows/wxPython can be compiled with unicode support enabled or
|
wxWindows/wxPython can be compiled with unicode support enabled or
|
||||||
|
@@ -6947,6 +6947,191 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLayoutCache(PyObject *self, PyObject
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define wxStyledTextCtrl_SetScrollWidth(_swigobj,_swigarg0) (_swigobj->SetScrollWidth(_swigarg0))
|
||||||
|
static PyObject *_wrap_wxStyledTextCtrl_SetScrollWidth(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxStyledTextCtrl * _arg0;
|
||||||
|
int _arg1;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self","pixelWidth", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetScrollWidth",_kwnames,&_argo0,&_arg1))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetScrollWidth. Expected _wxStyledTextCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
wxStyledTextCtrl_SetScrollWidth(_arg0,_arg1);
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxStyledTextCtrl_GetScrollWidth(_swigobj) (_swigobj->GetScrollWidth())
|
||||||
|
static PyObject *_wrap_wxStyledTextCtrl_GetScrollWidth(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
int _result;
|
||||||
|
wxStyledTextCtrl * _arg0;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetScrollWidth",_kwnames,&_argo0))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetScrollWidth. Expected _wxStyledTextCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
_result = (int )wxStyledTextCtrl_GetScrollWidth(_arg0);
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxStyledTextCtrl_TextWidth(_swigobj,_swigarg0,_swigarg1) (_swigobj->TextWidth(_swigarg0,_swigarg1))
|
||||||
|
static PyObject *_wrap_wxStyledTextCtrl_TextWidth(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
int _result;
|
||||||
|
wxStyledTextCtrl * _arg0;
|
||||||
|
int _arg1;
|
||||||
|
wxString * _arg2;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
PyObject * _obj2 = 0;
|
||||||
|
char *_kwnames[] = { "self","style","text", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_TextWidth",_kwnames,&_argo0,&_arg1,&_obj2))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_TextWidth. Expected _wxStyledTextCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
_arg2 = wxString_in_helper(_obj2);
|
||||||
|
if (_arg2 == NULL)
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
_result = (int )wxStyledTextCtrl_TextWidth(_arg0,_arg1,*_arg2);
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
{
|
||||||
|
if (_obj2)
|
||||||
|
delete _arg2;
|
||||||
|
}
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxStyledTextCtrl_SetEndAtLastLine(_swigobj,_swigarg0) (_swigobj->SetEndAtLastLine(_swigarg0))
|
||||||
|
static PyObject *_wrap_wxStyledTextCtrl_SetEndAtLastLine(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxStyledTextCtrl * _arg0;
|
||||||
|
bool _arg1;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
int tempbool1;
|
||||||
|
char *_kwnames[] = { "self","endAtLastLine", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetEndAtLastLine",_kwnames,&_argo0,&tempbool1))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetEndAtLastLine. Expected _wxStyledTextCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_arg1 = (bool ) tempbool1;
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
wxStyledTextCtrl_SetEndAtLastLine(_arg0,_arg1);
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxStyledTextCtrl_GetEndAtLastLine(_swigobj) (_swigobj->GetEndAtLastLine())
|
||||||
|
static PyObject *_wrap_wxStyledTextCtrl_GetEndAtLastLine(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
int _result;
|
||||||
|
wxStyledTextCtrl * _arg0;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetEndAtLastLine",_kwnames,&_argo0))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetEndAtLastLine. Expected _wxStyledTextCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
_result = (int )wxStyledTextCtrl_GetEndAtLastLine(_arg0);
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxStyledTextCtrl_TextHeight(_swigobj,_swigarg0) (_swigobj->TextHeight(_swigarg0))
|
||||||
|
static PyObject *_wrap_wxStyledTextCtrl_TextHeight(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
int _result;
|
||||||
|
wxStyledTextCtrl * _arg0;
|
||||||
|
int _arg1;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self","line", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_TextHeight",_kwnames,&_argo0,&_arg1))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_TextHeight. Expected _wxStyledTextCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
_result = (int )wxStyledTextCtrl_TextHeight(_arg0,_arg1);
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
#define wxStyledTextCtrl_MoveCaretInsideView(_swigobj) (_swigobj->MoveCaretInsideView())
|
#define wxStyledTextCtrl_MoveCaretInsideView(_swigobj) (_swigobj->MoveCaretInsideView())
|
||||||
static PyObject *_wrap_wxStyledTextCtrl_MoveCaretInsideView(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxStyledTextCtrl_MoveCaretInsideView(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
@@ -7540,36 +7725,6 @@ static PyObject *_wrap_wxStyledTextCtrl_SearchPrev(PyObject *self, PyObject *arg
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define wxStyledTextCtrl_SetCaretPolicy(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetCaretPolicy(_swigarg0,_swigarg1))
|
|
||||||
static PyObject *_wrap_wxStyledTextCtrl_SetCaretPolicy(PyObject *self, PyObject *args, PyObject *kwargs) {
|
|
||||||
PyObject * _resultobj;
|
|
||||||
wxStyledTextCtrl * _arg0;
|
|
||||||
int _arg1;
|
|
||||||
int _arg2;
|
|
||||||
PyObject * _argo0 = 0;
|
|
||||||
char *_kwnames[] = { "self","caretPolicy","caretSlop", NULL };
|
|
||||||
|
|
||||||
self = self;
|
|
||||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_SetCaretPolicy",_kwnames,&_argo0,&_arg1,&_arg2))
|
|
||||||
return NULL;
|
|
||||||
if (_argo0) {
|
|
||||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
|
||||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetCaretPolicy. Expected _wxStyledTextCtrl_p.");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{
|
|
||||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
|
||||||
wxStyledTextCtrl_SetCaretPolicy(_arg0,_arg1,_arg2);
|
|
||||||
|
|
||||||
wxPyEndAllowThreads(__tstate);
|
|
||||||
if (PyErr_Occurred()) return NULL;
|
|
||||||
} Py_INCREF(Py_None);
|
|
||||||
_resultobj = Py_None;
|
|
||||||
return _resultobj;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define wxStyledTextCtrl_LinesOnScreen(_swigobj) (_swigobj->LinesOnScreen())
|
#define wxStyledTextCtrl_LinesOnScreen(_swigobj) (_swigobj->LinesOnScreen())
|
||||||
static PyObject *_wrap_wxStyledTextCtrl_LinesOnScreen(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxStyledTextCtrl_LinesOnScreen(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
@@ -8395,6 +8550,66 @@ static PyObject *_wrap_wxStyledTextCtrl_GetXOffset(PyObject *self, PyObject *arg
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define wxStyledTextCtrl_SetXCaretPolicy(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetXCaretPolicy(_swigarg0,_swigarg1))
|
||||||
|
static PyObject *_wrap_wxStyledTextCtrl_SetXCaretPolicy(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxStyledTextCtrl * _arg0;
|
||||||
|
int _arg1;
|
||||||
|
int _arg2;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self","caretPolicy","caretSlop", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_SetXCaretPolicy",_kwnames,&_argo0,&_arg1,&_arg2))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetXCaretPolicy. Expected _wxStyledTextCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
wxStyledTextCtrl_SetXCaretPolicy(_arg0,_arg1,_arg2);
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxStyledTextCtrl_SetYCaretPolicy(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetYCaretPolicy(_swigarg0,_swigarg1))
|
||||||
|
static PyObject *_wrap_wxStyledTextCtrl_SetYCaretPolicy(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxStyledTextCtrl * _arg0;
|
||||||
|
int _arg1;
|
||||||
|
int _arg2;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self","caretPolicy","caretSlop", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_SetYCaretPolicy",_kwnames,&_argo0,&_arg1,&_arg2))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetYCaretPolicy. Expected _wxStyledTextCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
wxStyledTextCtrl_SetYCaretPolicy(_arg0,_arg1,_arg2);
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
#define wxStyledTextCtrl_StartRecord(_swigobj) (_swigobj->StartRecord())
|
#define wxStyledTextCtrl_StartRecord(_swigobj) (_swigobj->StartRecord())
|
||||||
static PyObject *_wrap_wxStyledTextCtrl_StartRecord(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxStyledTextCtrl_StartRecord(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
@@ -10632,6 +10847,8 @@ static PyMethodDef stc_cMethods[] = {
|
|||||||
{ "wxStyledTextCtrl_SetLexer", (PyCFunction) _wrap_wxStyledTextCtrl_SetLexer, METH_VARARGS | METH_KEYWORDS },
|
{ "wxStyledTextCtrl_SetLexer", (PyCFunction) _wrap_wxStyledTextCtrl_SetLexer, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxStyledTextCtrl_StopRecord", (PyCFunction) _wrap_wxStyledTextCtrl_StopRecord, METH_VARARGS | METH_KEYWORDS },
|
{ "wxStyledTextCtrl_StopRecord", (PyCFunction) _wrap_wxStyledTextCtrl_StopRecord, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxStyledTextCtrl_StartRecord", (PyCFunction) _wrap_wxStyledTextCtrl_StartRecord, METH_VARARGS | METH_KEYWORDS },
|
{ "wxStyledTextCtrl_StartRecord", (PyCFunction) _wrap_wxStyledTextCtrl_StartRecord, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxStyledTextCtrl_SetYCaretPolicy", (PyCFunction) _wrap_wxStyledTextCtrl_SetYCaretPolicy, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxStyledTextCtrl_SetXCaretPolicy", (PyCFunction) _wrap_wxStyledTextCtrl_SetXCaretPolicy, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxStyledTextCtrl_GetXOffset", (PyCFunction) _wrap_wxStyledTextCtrl_GetXOffset, METH_VARARGS | METH_KEYWORDS },
|
{ "wxStyledTextCtrl_GetXOffset", (PyCFunction) _wrap_wxStyledTextCtrl_GetXOffset, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxStyledTextCtrl_SetXOffset", (PyCFunction) _wrap_wxStyledTextCtrl_SetXOffset, METH_VARARGS | METH_KEYWORDS },
|
{ "wxStyledTextCtrl_SetXOffset", (PyCFunction) _wrap_wxStyledTextCtrl_SetXOffset, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxStyledTextCtrl_DelLineRight", (PyCFunction) _wrap_wxStyledTextCtrl_DelLineRight, METH_VARARGS | METH_KEYWORDS },
|
{ "wxStyledTextCtrl_DelLineRight", (PyCFunction) _wrap_wxStyledTextCtrl_DelLineRight, METH_VARARGS | METH_KEYWORDS },
|
||||||
@@ -10660,7 +10877,6 @@ static PyMethodDef stc_cMethods[] = {
|
|||||||
{ "wxStyledTextCtrl_SelectionIsRectangle", (PyCFunction) _wrap_wxStyledTextCtrl_SelectionIsRectangle, METH_VARARGS | METH_KEYWORDS },
|
{ "wxStyledTextCtrl_SelectionIsRectangle", (PyCFunction) _wrap_wxStyledTextCtrl_SelectionIsRectangle, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxStyledTextCtrl_UsePopUp", (PyCFunction) _wrap_wxStyledTextCtrl_UsePopUp, METH_VARARGS | METH_KEYWORDS },
|
{ "wxStyledTextCtrl_UsePopUp", (PyCFunction) _wrap_wxStyledTextCtrl_UsePopUp, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxStyledTextCtrl_LinesOnScreen", (PyCFunction) _wrap_wxStyledTextCtrl_LinesOnScreen, METH_VARARGS | METH_KEYWORDS },
|
{ "wxStyledTextCtrl_LinesOnScreen", (PyCFunction) _wrap_wxStyledTextCtrl_LinesOnScreen, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxStyledTextCtrl_SetCaretPolicy", (PyCFunction) _wrap_wxStyledTextCtrl_SetCaretPolicy, METH_VARARGS | METH_KEYWORDS },
|
|
||||||
{ "wxStyledTextCtrl_SearchPrev", (PyCFunction) _wrap_wxStyledTextCtrl_SearchPrev, METH_VARARGS | METH_KEYWORDS },
|
{ "wxStyledTextCtrl_SearchPrev", (PyCFunction) _wrap_wxStyledTextCtrl_SearchPrev, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxStyledTextCtrl_SearchNext", (PyCFunction) _wrap_wxStyledTextCtrl_SearchNext, METH_VARARGS | METH_KEYWORDS },
|
{ "wxStyledTextCtrl_SearchNext", (PyCFunction) _wrap_wxStyledTextCtrl_SearchNext, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxStyledTextCtrl_SearchAnchor", (PyCFunction) _wrap_wxStyledTextCtrl_SearchAnchor, METH_VARARGS | METH_KEYWORDS },
|
{ "wxStyledTextCtrl_SearchAnchor", (PyCFunction) _wrap_wxStyledTextCtrl_SearchAnchor, METH_VARARGS | METH_KEYWORDS },
|
||||||
@@ -10680,6 +10896,12 @@ static PyMethodDef stc_cMethods[] = {
|
|||||||
{ "wxStyledTextCtrl_BraceHighlight", (PyCFunction) _wrap_wxStyledTextCtrl_BraceHighlight, METH_VARARGS | METH_KEYWORDS },
|
{ "wxStyledTextCtrl_BraceHighlight", (PyCFunction) _wrap_wxStyledTextCtrl_BraceHighlight, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxStyledTextCtrl_LineLength", (PyCFunction) _wrap_wxStyledTextCtrl_LineLength, METH_VARARGS | METH_KEYWORDS },
|
{ "wxStyledTextCtrl_LineLength", (PyCFunction) _wrap_wxStyledTextCtrl_LineLength, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxStyledTextCtrl_MoveCaretInsideView", (PyCFunction) _wrap_wxStyledTextCtrl_MoveCaretInsideView, METH_VARARGS | METH_KEYWORDS },
|
{ "wxStyledTextCtrl_MoveCaretInsideView", (PyCFunction) _wrap_wxStyledTextCtrl_MoveCaretInsideView, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxStyledTextCtrl_TextHeight", (PyCFunction) _wrap_wxStyledTextCtrl_TextHeight, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxStyledTextCtrl_GetEndAtLastLine", (PyCFunction) _wrap_wxStyledTextCtrl_GetEndAtLastLine, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxStyledTextCtrl_SetEndAtLastLine", (PyCFunction) _wrap_wxStyledTextCtrl_SetEndAtLastLine, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxStyledTextCtrl_TextWidth", (PyCFunction) _wrap_wxStyledTextCtrl_TextWidth, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxStyledTextCtrl_GetScrollWidth", (PyCFunction) _wrap_wxStyledTextCtrl_GetScrollWidth, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxStyledTextCtrl_SetScrollWidth", (PyCFunction) _wrap_wxStyledTextCtrl_SetScrollWidth, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxStyledTextCtrl_GetLayoutCache", (PyCFunction) _wrap_wxStyledTextCtrl_GetLayoutCache, METH_VARARGS | METH_KEYWORDS },
|
{ "wxStyledTextCtrl_GetLayoutCache", (PyCFunction) _wrap_wxStyledTextCtrl_GetLayoutCache, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxStyledTextCtrl_SetLayoutCache", (PyCFunction) _wrap_wxStyledTextCtrl_SetLayoutCache, METH_VARARGS | METH_KEYWORDS },
|
{ "wxStyledTextCtrl_SetLayoutCache", (PyCFunction) _wrap_wxStyledTextCtrl_SetLayoutCache, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxStyledTextCtrl_GetWrapMode", (PyCFunction) _wrap_wxStyledTextCtrl_GetWrapMode, METH_VARARGS | METH_KEYWORDS },
|
{ "wxStyledTextCtrl_GetWrapMode", (PyCFunction) _wrap_wxStyledTextCtrl_GetWrapMode, METH_VARARGS | METH_KEYWORDS },
|
||||||
@@ -11188,15 +11410,14 @@ SWIGEXPORT(void) initstc_c() {
|
|||||||
PyDict_SetItemString(d,"wxSTC_EDGE_NONE", PyInt_FromLong((long) 0));
|
PyDict_SetItemString(d,"wxSTC_EDGE_NONE", PyInt_FromLong((long) 0));
|
||||||
PyDict_SetItemString(d,"wxSTC_EDGE_LINE", PyInt_FromLong((long) 1));
|
PyDict_SetItemString(d,"wxSTC_EDGE_LINE", PyInt_FromLong((long) 1));
|
||||||
PyDict_SetItemString(d,"wxSTC_EDGE_BACKGROUND", PyInt_FromLong((long) 2));
|
PyDict_SetItemString(d,"wxSTC_EDGE_BACKGROUND", PyInt_FromLong((long) 2));
|
||||||
PyDict_SetItemString(d,"wxSTC_CARET_SLOP", PyInt_FromLong((long) 0x01));
|
|
||||||
PyDict_SetItemString(d,"wxSTC_CARET_CENTER", PyInt_FromLong((long) 0x02));
|
|
||||||
PyDict_SetItemString(d,"wxSTC_CARET_STRICT", PyInt_FromLong((long) 0x04));
|
|
||||||
PyDict_SetItemString(d,"wxSTC_CARET_XEVEN", PyInt_FromLong((long) 0x08));
|
|
||||||
PyDict_SetItemString(d,"wxSTC_CARET_XJUMPS", PyInt_FromLong((long) 0x10));
|
|
||||||
PyDict_SetItemString(d,"wxSTC_CURSORNORMAL", PyInt_FromLong((long) -1));
|
PyDict_SetItemString(d,"wxSTC_CURSORNORMAL", PyInt_FromLong((long) -1));
|
||||||
PyDict_SetItemString(d,"wxSTC_CURSORWAIT", PyInt_FromLong((long) 3));
|
PyDict_SetItemString(d,"wxSTC_CURSORWAIT", PyInt_FromLong((long) 3));
|
||||||
PyDict_SetItemString(d,"wxSTC_VISIBLE_SLOP", PyInt_FromLong((long) 0x01));
|
PyDict_SetItemString(d,"wxSTC_VISIBLE_SLOP", PyInt_FromLong((long) 0x01));
|
||||||
PyDict_SetItemString(d,"wxSTC_VISIBLE_STRICT", PyInt_FromLong((long) 0x04));
|
PyDict_SetItemString(d,"wxSTC_VISIBLE_STRICT", PyInt_FromLong((long) 0x04));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_CARET_SLOP", PyInt_FromLong((long) 0x01));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_CARET_STRICT", PyInt_FromLong((long) 0x04));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_CARET_JUMPS", PyInt_FromLong((long) 0x10));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_CARET_EVEN", PyInt_FromLong((long) 0x08));
|
||||||
PyDict_SetItemString(d,"wxSTC_MOD_INSERTTEXT", PyInt_FromLong((long) 0x1));
|
PyDict_SetItemString(d,"wxSTC_MOD_INSERTTEXT", PyInt_FromLong((long) 0x1));
|
||||||
PyDict_SetItemString(d,"wxSTC_MOD_DELETETEXT", PyInt_FromLong((long) 0x2));
|
PyDict_SetItemString(d,"wxSTC_MOD_DELETETEXT", PyInt_FromLong((long) 0x2));
|
||||||
PyDict_SetItemString(d,"wxSTC_MOD_CHANGESTYLE", PyInt_FromLong((long) 0x4));
|
PyDict_SetItemString(d,"wxSTC_MOD_CHANGESTYLE", PyInt_FromLong((long) 0x4));
|
||||||
@@ -11262,6 +11483,7 @@ SWIGEXPORT(void) initstc_c() {
|
|||||||
PyDict_SetItemString(d,"wxSTC_LEX_PHP", PyInt_FromLong((long) 30));
|
PyDict_SetItemString(d,"wxSTC_LEX_PHP", PyInt_FromLong((long) 30));
|
||||||
PyDict_SetItemString(d,"wxSTC_LEX_BAAN", PyInt_FromLong((long) 31));
|
PyDict_SetItemString(d,"wxSTC_LEX_BAAN", PyInt_FromLong((long) 31));
|
||||||
PyDict_SetItemString(d,"wxSTC_LEX_MATLAB", PyInt_FromLong((long) 32));
|
PyDict_SetItemString(d,"wxSTC_LEX_MATLAB", PyInt_FromLong((long) 32));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_LEX_SCRIPTOL", PyInt_FromLong((long) 33));
|
||||||
PyDict_SetItemString(d,"wxSTC_LEX_AUTOMATIC", PyInt_FromLong((long) 1000));
|
PyDict_SetItemString(d,"wxSTC_LEX_AUTOMATIC", PyInt_FromLong((long) 1000));
|
||||||
PyDict_SetItemString(d,"wxSTC_P_DEFAULT", PyInt_FromLong((long) 0));
|
PyDict_SetItemString(d,"wxSTC_P_DEFAULT", PyInt_FromLong((long) 0));
|
||||||
PyDict_SetItemString(d,"wxSTC_P_COMMENTLINE", PyInt_FromLong((long) 1));
|
PyDict_SetItemString(d,"wxSTC_P_COMMENTLINE", PyInt_FromLong((long) 1));
|
||||||
@@ -11296,15 +11518,6 @@ SWIGEXPORT(void) initstc_c() {
|
|||||||
PyDict_SetItemString(d,"wxSTC_C_WORD2", PyInt_FromLong((long) 16));
|
PyDict_SetItemString(d,"wxSTC_C_WORD2", PyInt_FromLong((long) 16));
|
||||||
PyDict_SetItemString(d,"wxSTC_C_COMMENTDOCKEYWORD", PyInt_FromLong((long) 17));
|
PyDict_SetItemString(d,"wxSTC_C_COMMENTDOCKEYWORD", PyInt_FromLong((long) 17));
|
||||||
PyDict_SetItemString(d,"wxSTC_C_COMMENTDOCKEYWORDERROR", PyInt_FromLong((long) 18));
|
PyDict_SetItemString(d,"wxSTC_C_COMMENTDOCKEYWORDERROR", PyInt_FromLong((long) 18));
|
||||||
PyDict_SetItemString(d,"wxSTC_B_DEFAULT", PyInt_FromLong((long) 0));
|
|
||||||
PyDict_SetItemString(d,"wxSTC_B_COMMENT", PyInt_FromLong((long) 1));
|
|
||||||
PyDict_SetItemString(d,"wxSTC_B_NUMBER", PyInt_FromLong((long) 2));
|
|
||||||
PyDict_SetItemString(d,"wxSTC_B_KEYWORD", PyInt_FromLong((long) 3));
|
|
||||||
PyDict_SetItemString(d,"wxSTC_B_STRING", PyInt_FromLong((long) 4));
|
|
||||||
PyDict_SetItemString(d,"wxSTC_B_PREPROCESSOR", PyInt_FromLong((long) 5));
|
|
||||||
PyDict_SetItemString(d,"wxSTC_B_OPERATOR", PyInt_FromLong((long) 6));
|
|
||||||
PyDict_SetItemString(d,"wxSTC_B_IDENTIFIER", PyInt_FromLong((long) 7));
|
|
||||||
PyDict_SetItemString(d,"wxSTC_B_DATE", PyInt_FromLong((long) 8));
|
|
||||||
PyDict_SetItemString(d,"wxSTC_H_DEFAULT", PyInt_FromLong((long) 0));
|
PyDict_SetItemString(d,"wxSTC_H_DEFAULT", PyInt_FromLong((long) 0));
|
||||||
PyDict_SetItemString(d,"wxSTC_H_TAG", PyInt_FromLong((long) 1));
|
PyDict_SetItemString(d,"wxSTC_H_TAG", PyInt_FromLong((long) 1));
|
||||||
PyDict_SetItemString(d,"wxSTC_H_TAGUNKNOWN", PyInt_FromLong((long) 2));
|
PyDict_SetItemString(d,"wxSTC_H_TAGUNKNOWN", PyInt_FromLong((long) 2));
|
||||||
@@ -11445,6 +11658,20 @@ SWIGEXPORT(void) initstc_c() {
|
|||||||
PyDict_SetItemString(d,"wxSTC_PL_STRING_QX", PyInt_FromLong((long) 28));
|
PyDict_SetItemString(d,"wxSTC_PL_STRING_QX", PyInt_FromLong((long) 28));
|
||||||
PyDict_SetItemString(d,"wxSTC_PL_STRING_QR", PyInt_FromLong((long) 29));
|
PyDict_SetItemString(d,"wxSTC_PL_STRING_QR", PyInt_FromLong((long) 29));
|
||||||
PyDict_SetItemString(d,"wxSTC_PL_STRING_QW", PyInt_FromLong((long) 30));
|
PyDict_SetItemString(d,"wxSTC_PL_STRING_QW", PyInt_FromLong((long) 30));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_B_DEFAULT", PyInt_FromLong((long) 0));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_B_COMMENT", PyInt_FromLong((long) 1));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_B_NUMBER", PyInt_FromLong((long) 2));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_B_KEYWORD", PyInt_FromLong((long) 3));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_B_STRING", PyInt_FromLong((long) 4));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_B_PREPROCESSOR", PyInt_FromLong((long) 5));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_B_OPERATOR", PyInt_FromLong((long) 6));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_B_IDENTIFIER", PyInt_FromLong((long) 7));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_B_DATE", PyInt_FromLong((long) 8));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_PROPS_DEFAULT", PyInt_FromLong((long) 0));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_PROPS_COMMENT", PyInt_FromLong((long) 1));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_PROPS_SECTION", PyInt_FromLong((long) 2));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_PROPS_ASSIGNMENT", PyInt_FromLong((long) 3));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_PROPS_DEFVAL", PyInt_FromLong((long) 4));
|
||||||
PyDict_SetItemString(d,"wxSTC_L_DEFAULT", PyInt_FromLong((long) 0));
|
PyDict_SetItemString(d,"wxSTC_L_DEFAULT", PyInt_FromLong((long) 0));
|
||||||
PyDict_SetItemString(d,"wxSTC_L_COMMAND", PyInt_FromLong((long) 1));
|
PyDict_SetItemString(d,"wxSTC_L_COMMAND", PyInt_FromLong((long) 1));
|
||||||
PyDict_SetItemString(d,"wxSTC_L_TAG", PyInt_FromLong((long) 2));
|
PyDict_SetItemString(d,"wxSTC_L_TAG", PyInt_FromLong((long) 2));
|
||||||
@@ -11477,6 +11704,7 @@ SWIGEXPORT(void) initstc_c() {
|
|||||||
PyDict_SetItemString(d,"wxSTC_ERR_PERL", PyInt_FromLong((long) 6));
|
PyDict_SetItemString(d,"wxSTC_ERR_PERL", PyInt_FromLong((long) 6));
|
||||||
PyDict_SetItemString(d,"wxSTC_ERR_NET", PyInt_FromLong((long) 7));
|
PyDict_SetItemString(d,"wxSTC_ERR_NET", PyInt_FromLong((long) 7));
|
||||||
PyDict_SetItemString(d,"wxSTC_ERR_LUA", PyInt_FromLong((long) 8));
|
PyDict_SetItemString(d,"wxSTC_ERR_LUA", PyInt_FromLong((long) 8));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_ERR_CTAG", PyInt_FromLong((long) 9));
|
||||||
PyDict_SetItemString(d,"wxSTC_ERR_DIFF_CHANGED", PyInt_FromLong((long) 10));
|
PyDict_SetItemString(d,"wxSTC_ERR_DIFF_CHANGED", PyInt_FromLong((long) 10));
|
||||||
PyDict_SetItemString(d,"wxSTC_ERR_DIFF_ADDITION", PyInt_FromLong((long) 11));
|
PyDict_SetItemString(d,"wxSTC_ERR_DIFF_ADDITION", PyInt_FromLong((long) 11));
|
||||||
PyDict_SetItemString(d,"wxSTC_ERR_DIFF_DELETION", PyInt_FromLong((long) 12));
|
PyDict_SetItemString(d,"wxSTC_ERR_DIFF_DELETION", PyInt_FromLong((long) 12));
|
||||||
@@ -11496,6 +11724,13 @@ SWIGEXPORT(void) initstc_c() {
|
|||||||
PyDict_SetItemString(d,"wxSTC_MAKE_OPERATOR", PyInt_FromLong((long) 4));
|
PyDict_SetItemString(d,"wxSTC_MAKE_OPERATOR", PyInt_FromLong((long) 4));
|
||||||
PyDict_SetItemString(d,"wxSTC_MAKE_TARGET", PyInt_FromLong((long) 5));
|
PyDict_SetItemString(d,"wxSTC_MAKE_TARGET", PyInt_FromLong((long) 5));
|
||||||
PyDict_SetItemString(d,"wxSTC_MAKE_IDEOL", PyInt_FromLong((long) 9));
|
PyDict_SetItemString(d,"wxSTC_MAKE_IDEOL", PyInt_FromLong((long) 9));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_DIFF_DEFAULT", PyInt_FromLong((long) 0));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_DIFF_COMMENT", PyInt_FromLong((long) 1));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_DIFF_COMMAND", PyInt_FromLong((long) 2));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_DIFF_HEADER", PyInt_FromLong((long) 3));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_DIFF_POSITION", PyInt_FromLong((long) 4));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_DIFF_DELETED", PyInt_FromLong((long) 5));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_DIFF_ADDED", PyInt_FromLong((long) 6));
|
||||||
PyDict_SetItemString(d,"wxSTC_CONF_DEFAULT", PyInt_FromLong((long) 0));
|
PyDict_SetItemString(d,"wxSTC_CONF_DEFAULT", PyInt_FromLong((long) 0));
|
||||||
PyDict_SetItemString(d,"wxSTC_CONF_COMMENT", PyInt_FromLong((long) 1));
|
PyDict_SetItemString(d,"wxSTC_CONF_COMMENT", PyInt_FromLong((long) 1));
|
||||||
PyDict_SetItemString(d,"wxSTC_CONF_NUMBER", PyInt_FromLong((long) 2));
|
PyDict_SetItemString(d,"wxSTC_CONF_NUMBER", PyInt_FromLong((long) 2));
|
||||||
@@ -11573,6 +11808,26 @@ SWIGEXPORT(void) initstc_c() {
|
|||||||
PyDict_SetItemString(d,"wxSTC_MATLAB_STRING", PyInt_FromLong((long) 5));
|
PyDict_SetItemString(d,"wxSTC_MATLAB_STRING", PyInt_FromLong((long) 5));
|
||||||
PyDict_SetItemString(d,"wxSTC_MATLAB_OPERATOR", PyInt_FromLong((long) 6));
|
PyDict_SetItemString(d,"wxSTC_MATLAB_OPERATOR", PyInt_FromLong((long) 6));
|
||||||
PyDict_SetItemString(d,"wxSTC_MATLAB_IDENTIFIER", PyInt_FromLong((long) 7));
|
PyDict_SetItemString(d,"wxSTC_MATLAB_IDENTIFIER", PyInt_FromLong((long) 7));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_SCRIPTOL_DEFAULT", PyInt_FromLong((long) 0));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_SCRIPTOL_COMMENT", PyInt_FromLong((long) 1));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_SCRIPTOL_COMMENTLINE", PyInt_FromLong((long) 2));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_SCRIPTOL_COMMENTDOC", PyInt_FromLong((long) 3));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_SCRIPTOL_NUMBER", PyInt_FromLong((long) 4));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_SCRIPTOL_WORD", PyInt_FromLong((long) 5));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_SCRIPTOL_STRING", PyInt_FromLong((long) 6));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_SCRIPTOL_CHARACTER", PyInt_FromLong((long) 7));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_SCRIPTOL_UUID", PyInt_FromLong((long) 8));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_SCRIPTOL_PREPROCESSOR", PyInt_FromLong((long) 9));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_SCRIPTOL_OPERATOR", PyInt_FromLong((long) 10));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_SCRIPTOL_IDENTIFIER", PyInt_FromLong((long) 11));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_SCRIPTOL_STRINGEOL", PyInt_FromLong((long) 12));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_SCRIPTOL_VERBATIM", PyInt_FromLong((long) 13));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_SCRIPTOL_REGEX", PyInt_FromLong((long) 14));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_SCRIPTOL_COMMENTLINEDOC", PyInt_FromLong((long) 15));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_SCRIPTOL_WORD2", PyInt_FromLong((long) 16));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_SCRIPTOL_COMMENTDOCKEYWORD", PyInt_FromLong((long) 17));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_SCRIPTOL_COMMENTDOCKEYWORDERROR", PyInt_FromLong((long) 18));
|
||||||
|
PyDict_SetItemString(d,"wxSTC_SCRIPTOL_COMMENTBASIC", PyInt_FromLong((long) 19));
|
||||||
PyDict_SetItemString(d,"wxSTCNameStr", PyString_FromString("wxSTCNameStr"));
|
PyDict_SetItemString(d,"wxSTCNameStr", PyString_FromString("wxSTCNameStr"));
|
||||||
PyDict_SetItemString(d,"STC_USE_DND", PyInt_FromLong((long) 1));
|
PyDict_SetItemString(d,"STC_USE_DND", PyInt_FromLong((long) 1));
|
||||||
PyDict_SetItemString(d,"wxEVT_STC_CHANGE", PyInt_FromLong((long) wxEVT_STC_CHANGE));
|
PyDict_SetItemString(d,"wxEVT_STC_CHANGE", PyInt_FromLong((long) wxEVT_STC_CHANGE));
|
||||||
@@ -11597,6 +11852,7 @@ SWIGEXPORT(void) initstc_c() {
|
|||||||
PyDict_SetItemString(d,"wxEVT_STC_START_DRAG", PyInt_FromLong((long) wxEVT_STC_START_DRAG));
|
PyDict_SetItemString(d,"wxEVT_STC_START_DRAG", PyInt_FromLong((long) wxEVT_STC_START_DRAG));
|
||||||
PyDict_SetItemString(d,"wxEVT_STC_DRAG_OVER", PyInt_FromLong((long) wxEVT_STC_DRAG_OVER));
|
PyDict_SetItemString(d,"wxEVT_STC_DRAG_OVER", PyInt_FromLong((long) wxEVT_STC_DRAG_OVER));
|
||||||
PyDict_SetItemString(d,"wxEVT_STC_DO_DROP", PyInt_FromLong((long) wxEVT_STC_DO_DROP));
|
PyDict_SetItemString(d,"wxEVT_STC_DO_DROP", PyInt_FromLong((long) wxEVT_STC_DO_DROP));
|
||||||
|
PyDict_SetItemString(d,"wxEVT_STC_ZOOM", PyInt_FromLong((long) wxEVT_STC_ZOOM));
|
||||||
|
|
||||||
|
|
||||||
wxClassInfo::CleanUpClasses();
|
wxClassInfo::CleanUpClasses();
|
||||||
|
@@ -109,6 +109,9 @@ def EVT_STC_DRAG_OVER(win, id, func):
|
|||||||
def EVT_STC_DO_DROP(win, id, func):
|
def EVT_STC_DO_DROP(win, id, func):
|
||||||
win.Connect(id, -1, wxEVT_STC_DO_DROP, func)
|
win.Connect(id, -1, wxEVT_STC_DO_DROP, func)
|
||||||
|
|
||||||
|
def EVT_STC_ZOOM(win, id, func):
|
||||||
|
win.Connect(id, -1, wxEVT_STC_ZOOM, func)
|
||||||
|
|
||||||
|
|
||||||
class wxStyledTextCtrlPtr(wxControlPtr):
|
class wxStyledTextCtrlPtr(wxControlPtr):
|
||||||
def __init__(self,this):
|
def __init__(self,this):
|
||||||
@@ -774,6 +777,24 @@ class wxStyledTextCtrlPtr(wxControlPtr):
|
|||||||
def GetLayoutCache(self, *_args, **_kwargs):
|
def GetLayoutCache(self, *_args, **_kwargs):
|
||||||
val = apply(stc_c.wxStyledTextCtrl_GetLayoutCache,(self,) + _args, _kwargs)
|
val = apply(stc_c.wxStyledTextCtrl_GetLayoutCache,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
|
def SetScrollWidth(self, *_args, **_kwargs):
|
||||||
|
val = apply(stc_c.wxStyledTextCtrl_SetScrollWidth,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def GetScrollWidth(self, *_args, **_kwargs):
|
||||||
|
val = apply(stc_c.wxStyledTextCtrl_GetScrollWidth,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def TextWidth(self, *_args, **_kwargs):
|
||||||
|
val = apply(stc_c.wxStyledTextCtrl_TextWidth,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def SetEndAtLastLine(self, *_args, **_kwargs):
|
||||||
|
val = apply(stc_c.wxStyledTextCtrl_SetEndAtLastLine,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def GetEndAtLastLine(self, *_args, **_kwargs):
|
||||||
|
val = apply(stc_c.wxStyledTextCtrl_GetEndAtLastLine,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def TextHeight(self, *_args, **_kwargs):
|
||||||
|
val = apply(stc_c.wxStyledTextCtrl_TextHeight,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
def MoveCaretInsideView(self, *_args, **_kwargs):
|
def MoveCaretInsideView(self, *_args, **_kwargs):
|
||||||
val = apply(stc_c.wxStyledTextCtrl_MoveCaretInsideView,(self,) + _args, _kwargs)
|
val = apply(stc_c.wxStyledTextCtrl_MoveCaretInsideView,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
@@ -832,9 +853,6 @@ class wxStyledTextCtrlPtr(wxControlPtr):
|
|||||||
def SearchPrev(self, *_args, **_kwargs):
|
def SearchPrev(self, *_args, **_kwargs):
|
||||||
val = apply(stc_c.wxStyledTextCtrl_SearchPrev,(self,) + _args, _kwargs)
|
val = apply(stc_c.wxStyledTextCtrl_SearchPrev,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
def SetCaretPolicy(self, *_args, **_kwargs):
|
|
||||||
val = apply(stc_c.wxStyledTextCtrl_SetCaretPolicy,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def LinesOnScreen(self, *_args, **_kwargs):
|
def LinesOnScreen(self, *_args, **_kwargs):
|
||||||
val = apply(stc_c.wxStyledTextCtrl_LinesOnScreen,(self,) + _args, _kwargs)
|
val = apply(stc_c.wxStyledTextCtrl_LinesOnScreen,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
@@ -919,6 +937,12 @@ class wxStyledTextCtrlPtr(wxControlPtr):
|
|||||||
def GetXOffset(self, *_args, **_kwargs):
|
def GetXOffset(self, *_args, **_kwargs):
|
||||||
val = apply(stc_c.wxStyledTextCtrl_GetXOffset,(self,) + _args, _kwargs)
|
val = apply(stc_c.wxStyledTextCtrl_GetXOffset,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
|
def SetXCaretPolicy(self, *_args, **_kwargs):
|
||||||
|
val = apply(stc_c.wxStyledTextCtrl_SetXCaretPolicy,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def SetYCaretPolicy(self, *_args, **_kwargs):
|
||||||
|
val = apply(stc_c.wxStyledTextCtrl_SetYCaretPolicy,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
def StartRecord(self, *_args, **_kwargs):
|
def StartRecord(self, *_args, **_kwargs):
|
||||||
val = apply(stc_c.wxStyledTextCtrl_StartRecord,(self,) + _args, _kwargs)
|
val = apply(stc_c.wxStyledTextCtrl_StartRecord,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
@@ -1319,15 +1343,14 @@ wxSTC_CMD_DELETEBACKNOTLINE = stc_c.wxSTC_CMD_DELETEBACKNOTLINE
|
|||||||
wxSTC_EDGE_NONE = stc_c.wxSTC_EDGE_NONE
|
wxSTC_EDGE_NONE = stc_c.wxSTC_EDGE_NONE
|
||||||
wxSTC_EDGE_LINE = stc_c.wxSTC_EDGE_LINE
|
wxSTC_EDGE_LINE = stc_c.wxSTC_EDGE_LINE
|
||||||
wxSTC_EDGE_BACKGROUND = stc_c.wxSTC_EDGE_BACKGROUND
|
wxSTC_EDGE_BACKGROUND = stc_c.wxSTC_EDGE_BACKGROUND
|
||||||
wxSTC_CARET_SLOP = stc_c.wxSTC_CARET_SLOP
|
|
||||||
wxSTC_CARET_CENTER = stc_c.wxSTC_CARET_CENTER
|
|
||||||
wxSTC_CARET_STRICT = stc_c.wxSTC_CARET_STRICT
|
|
||||||
wxSTC_CARET_XEVEN = stc_c.wxSTC_CARET_XEVEN
|
|
||||||
wxSTC_CARET_XJUMPS = stc_c.wxSTC_CARET_XJUMPS
|
|
||||||
wxSTC_CURSORNORMAL = stc_c.wxSTC_CURSORNORMAL
|
wxSTC_CURSORNORMAL = stc_c.wxSTC_CURSORNORMAL
|
||||||
wxSTC_CURSORWAIT = stc_c.wxSTC_CURSORWAIT
|
wxSTC_CURSORWAIT = stc_c.wxSTC_CURSORWAIT
|
||||||
wxSTC_VISIBLE_SLOP = stc_c.wxSTC_VISIBLE_SLOP
|
wxSTC_VISIBLE_SLOP = stc_c.wxSTC_VISIBLE_SLOP
|
||||||
wxSTC_VISIBLE_STRICT = stc_c.wxSTC_VISIBLE_STRICT
|
wxSTC_VISIBLE_STRICT = stc_c.wxSTC_VISIBLE_STRICT
|
||||||
|
wxSTC_CARET_SLOP = stc_c.wxSTC_CARET_SLOP
|
||||||
|
wxSTC_CARET_STRICT = stc_c.wxSTC_CARET_STRICT
|
||||||
|
wxSTC_CARET_JUMPS = stc_c.wxSTC_CARET_JUMPS
|
||||||
|
wxSTC_CARET_EVEN = stc_c.wxSTC_CARET_EVEN
|
||||||
wxSTC_MOD_INSERTTEXT = stc_c.wxSTC_MOD_INSERTTEXT
|
wxSTC_MOD_INSERTTEXT = stc_c.wxSTC_MOD_INSERTTEXT
|
||||||
wxSTC_MOD_DELETETEXT = stc_c.wxSTC_MOD_DELETETEXT
|
wxSTC_MOD_DELETETEXT = stc_c.wxSTC_MOD_DELETETEXT
|
||||||
wxSTC_MOD_CHANGESTYLE = stc_c.wxSTC_MOD_CHANGESTYLE
|
wxSTC_MOD_CHANGESTYLE = stc_c.wxSTC_MOD_CHANGESTYLE
|
||||||
@@ -1393,6 +1416,7 @@ wxSTC_LEX_ASP = stc_c.wxSTC_LEX_ASP
|
|||||||
wxSTC_LEX_PHP = stc_c.wxSTC_LEX_PHP
|
wxSTC_LEX_PHP = stc_c.wxSTC_LEX_PHP
|
||||||
wxSTC_LEX_BAAN = stc_c.wxSTC_LEX_BAAN
|
wxSTC_LEX_BAAN = stc_c.wxSTC_LEX_BAAN
|
||||||
wxSTC_LEX_MATLAB = stc_c.wxSTC_LEX_MATLAB
|
wxSTC_LEX_MATLAB = stc_c.wxSTC_LEX_MATLAB
|
||||||
|
wxSTC_LEX_SCRIPTOL = stc_c.wxSTC_LEX_SCRIPTOL
|
||||||
wxSTC_LEX_AUTOMATIC = stc_c.wxSTC_LEX_AUTOMATIC
|
wxSTC_LEX_AUTOMATIC = stc_c.wxSTC_LEX_AUTOMATIC
|
||||||
wxSTC_P_DEFAULT = stc_c.wxSTC_P_DEFAULT
|
wxSTC_P_DEFAULT = stc_c.wxSTC_P_DEFAULT
|
||||||
wxSTC_P_COMMENTLINE = stc_c.wxSTC_P_COMMENTLINE
|
wxSTC_P_COMMENTLINE = stc_c.wxSTC_P_COMMENTLINE
|
||||||
@@ -1427,15 +1451,6 @@ wxSTC_C_COMMENTLINEDOC = stc_c.wxSTC_C_COMMENTLINEDOC
|
|||||||
wxSTC_C_WORD2 = stc_c.wxSTC_C_WORD2
|
wxSTC_C_WORD2 = stc_c.wxSTC_C_WORD2
|
||||||
wxSTC_C_COMMENTDOCKEYWORD = stc_c.wxSTC_C_COMMENTDOCKEYWORD
|
wxSTC_C_COMMENTDOCKEYWORD = stc_c.wxSTC_C_COMMENTDOCKEYWORD
|
||||||
wxSTC_C_COMMENTDOCKEYWORDERROR = stc_c.wxSTC_C_COMMENTDOCKEYWORDERROR
|
wxSTC_C_COMMENTDOCKEYWORDERROR = stc_c.wxSTC_C_COMMENTDOCKEYWORDERROR
|
||||||
wxSTC_B_DEFAULT = stc_c.wxSTC_B_DEFAULT
|
|
||||||
wxSTC_B_COMMENT = stc_c.wxSTC_B_COMMENT
|
|
||||||
wxSTC_B_NUMBER = stc_c.wxSTC_B_NUMBER
|
|
||||||
wxSTC_B_KEYWORD = stc_c.wxSTC_B_KEYWORD
|
|
||||||
wxSTC_B_STRING = stc_c.wxSTC_B_STRING
|
|
||||||
wxSTC_B_PREPROCESSOR = stc_c.wxSTC_B_PREPROCESSOR
|
|
||||||
wxSTC_B_OPERATOR = stc_c.wxSTC_B_OPERATOR
|
|
||||||
wxSTC_B_IDENTIFIER = stc_c.wxSTC_B_IDENTIFIER
|
|
||||||
wxSTC_B_DATE = stc_c.wxSTC_B_DATE
|
|
||||||
wxSTC_H_DEFAULT = stc_c.wxSTC_H_DEFAULT
|
wxSTC_H_DEFAULT = stc_c.wxSTC_H_DEFAULT
|
||||||
wxSTC_H_TAG = stc_c.wxSTC_H_TAG
|
wxSTC_H_TAG = stc_c.wxSTC_H_TAG
|
||||||
wxSTC_H_TAGUNKNOWN = stc_c.wxSTC_H_TAGUNKNOWN
|
wxSTC_H_TAGUNKNOWN = stc_c.wxSTC_H_TAGUNKNOWN
|
||||||
@@ -1576,6 +1591,20 @@ wxSTC_PL_STRING_QQ = stc_c.wxSTC_PL_STRING_QQ
|
|||||||
wxSTC_PL_STRING_QX = stc_c.wxSTC_PL_STRING_QX
|
wxSTC_PL_STRING_QX = stc_c.wxSTC_PL_STRING_QX
|
||||||
wxSTC_PL_STRING_QR = stc_c.wxSTC_PL_STRING_QR
|
wxSTC_PL_STRING_QR = stc_c.wxSTC_PL_STRING_QR
|
||||||
wxSTC_PL_STRING_QW = stc_c.wxSTC_PL_STRING_QW
|
wxSTC_PL_STRING_QW = stc_c.wxSTC_PL_STRING_QW
|
||||||
|
wxSTC_B_DEFAULT = stc_c.wxSTC_B_DEFAULT
|
||||||
|
wxSTC_B_COMMENT = stc_c.wxSTC_B_COMMENT
|
||||||
|
wxSTC_B_NUMBER = stc_c.wxSTC_B_NUMBER
|
||||||
|
wxSTC_B_KEYWORD = stc_c.wxSTC_B_KEYWORD
|
||||||
|
wxSTC_B_STRING = stc_c.wxSTC_B_STRING
|
||||||
|
wxSTC_B_PREPROCESSOR = stc_c.wxSTC_B_PREPROCESSOR
|
||||||
|
wxSTC_B_OPERATOR = stc_c.wxSTC_B_OPERATOR
|
||||||
|
wxSTC_B_IDENTIFIER = stc_c.wxSTC_B_IDENTIFIER
|
||||||
|
wxSTC_B_DATE = stc_c.wxSTC_B_DATE
|
||||||
|
wxSTC_PROPS_DEFAULT = stc_c.wxSTC_PROPS_DEFAULT
|
||||||
|
wxSTC_PROPS_COMMENT = stc_c.wxSTC_PROPS_COMMENT
|
||||||
|
wxSTC_PROPS_SECTION = stc_c.wxSTC_PROPS_SECTION
|
||||||
|
wxSTC_PROPS_ASSIGNMENT = stc_c.wxSTC_PROPS_ASSIGNMENT
|
||||||
|
wxSTC_PROPS_DEFVAL = stc_c.wxSTC_PROPS_DEFVAL
|
||||||
wxSTC_L_DEFAULT = stc_c.wxSTC_L_DEFAULT
|
wxSTC_L_DEFAULT = stc_c.wxSTC_L_DEFAULT
|
||||||
wxSTC_L_COMMAND = stc_c.wxSTC_L_COMMAND
|
wxSTC_L_COMMAND = stc_c.wxSTC_L_COMMAND
|
||||||
wxSTC_L_TAG = stc_c.wxSTC_L_TAG
|
wxSTC_L_TAG = stc_c.wxSTC_L_TAG
|
||||||
@@ -1608,6 +1637,7 @@ wxSTC_ERR_BORLAND = stc_c.wxSTC_ERR_BORLAND
|
|||||||
wxSTC_ERR_PERL = stc_c.wxSTC_ERR_PERL
|
wxSTC_ERR_PERL = stc_c.wxSTC_ERR_PERL
|
||||||
wxSTC_ERR_NET = stc_c.wxSTC_ERR_NET
|
wxSTC_ERR_NET = stc_c.wxSTC_ERR_NET
|
||||||
wxSTC_ERR_LUA = stc_c.wxSTC_ERR_LUA
|
wxSTC_ERR_LUA = stc_c.wxSTC_ERR_LUA
|
||||||
|
wxSTC_ERR_CTAG = stc_c.wxSTC_ERR_CTAG
|
||||||
wxSTC_ERR_DIFF_CHANGED = stc_c.wxSTC_ERR_DIFF_CHANGED
|
wxSTC_ERR_DIFF_CHANGED = stc_c.wxSTC_ERR_DIFF_CHANGED
|
||||||
wxSTC_ERR_DIFF_ADDITION = stc_c.wxSTC_ERR_DIFF_ADDITION
|
wxSTC_ERR_DIFF_ADDITION = stc_c.wxSTC_ERR_DIFF_ADDITION
|
||||||
wxSTC_ERR_DIFF_DELETION = stc_c.wxSTC_ERR_DIFF_DELETION
|
wxSTC_ERR_DIFF_DELETION = stc_c.wxSTC_ERR_DIFF_DELETION
|
||||||
@@ -1627,6 +1657,13 @@ wxSTC_MAKE_IDENTIFIER = stc_c.wxSTC_MAKE_IDENTIFIER
|
|||||||
wxSTC_MAKE_OPERATOR = stc_c.wxSTC_MAKE_OPERATOR
|
wxSTC_MAKE_OPERATOR = stc_c.wxSTC_MAKE_OPERATOR
|
||||||
wxSTC_MAKE_TARGET = stc_c.wxSTC_MAKE_TARGET
|
wxSTC_MAKE_TARGET = stc_c.wxSTC_MAKE_TARGET
|
||||||
wxSTC_MAKE_IDEOL = stc_c.wxSTC_MAKE_IDEOL
|
wxSTC_MAKE_IDEOL = stc_c.wxSTC_MAKE_IDEOL
|
||||||
|
wxSTC_DIFF_DEFAULT = stc_c.wxSTC_DIFF_DEFAULT
|
||||||
|
wxSTC_DIFF_COMMENT = stc_c.wxSTC_DIFF_COMMENT
|
||||||
|
wxSTC_DIFF_COMMAND = stc_c.wxSTC_DIFF_COMMAND
|
||||||
|
wxSTC_DIFF_HEADER = stc_c.wxSTC_DIFF_HEADER
|
||||||
|
wxSTC_DIFF_POSITION = stc_c.wxSTC_DIFF_POSITION
|
||||||
|
wxSTC_DIFF_DELETED = stc_c.wxSTC_DIFF_DELETED
|
||||||
|
wxSTC_DIFF_ADDED = stc_c.wxSTC_DIFF_ADDED
|
||||||
wxSTC_CONF_DEFAULT = stc_c.wxSTC_CONF_DEFAULT
|
wxSTC_CONF_DEFAULT = stc_c.wxSTC_CONF_DEFAULT
|
||||||
wxSTC_CONF_COMMENT = stc_c.wxSTC_CONF_COMMENT
|
wxSTC_CONF_COMMENT = stc_c.wxSTC_CONF_COMMENT
|
||||||
wxSTC_CONF_NUMBER = stc_c.wxSTC_CONF_NUMBER
|
wxSTC_CONF_NUMBER = stc_c.wxSTC_CONF_NUMBER
|
||||||
@@ -1704,6 +1741,26 @@ wxSTC_MATLAB_KEYWORD = stc_c.wxSTC_MATLAB_KEYWORD
|
|||||||
wxSTC_MATLAB_STRING = stc_c.wxSTC_MATLAB_STRING
|
wxSTC_MATLAB_STRING = stc_c.wxSTC_MATLAB_STRING
|
||||||
wxSTC_MATLAB_OPERATOR = stc_c.wxSTC_MATLAB_OPERATOR
|
wxSTC_MATLAB_OPERATOR = stc_c.wxSTC_MATLAB_OPERATOR
|
||||||
wxSTC_MATLAB_IDENTIFIER = stc_c.wxSTC_MATLAB_IDENTIFIER
|
wxSTC_MATLAB_IDENTIFIER = stc_c.wxSTC_MATLAB_IDENTIFIER
|
||||||
|
wxSTC_SCRIPTOL_DEFAULT = stc_c.wxSTC_SCRIPTOL_DEFAULT
|
||||||
|
wxSTC_SCRIPTOL_COMMENT = stc_c.wxSTC_SCRIPTOL_COMMENT
|
||||||
|
wxSTC_SCRIPTOL_COMMENTLINE = stc_c.wxSTC_SCRIPTOL_COMMENTLINE
|
||||||
|
wxSTC_SCRIPTOL_COMMENTDOC = stc_c.wxSTC_SCRIPTOL_COMMENTDOC
|
||||||
|
wxSTC_SCRIPTOL_NUMBER = stc_c.wxSTC_SCRIPTOL_NUMBER
|
||||||
|
wxSTC_SCRIPTOL_WORD = stc_c.wxSTC_SCRIPTOL_WORD
|
||||||
|
wxSTC_SCRIPTOL_STRING = stc_c.wxSTC_SCRIPTOL_STRING
|
||||||
|
wxSTC_SCRIPTOL_CHARACTER = stc_c.wxSTC_SCRIPTOL_CHARACTER
|
||||||
|
wxSTC_SCRIPTOL_UUID = stc_c.wxSTC_SCRIPTOL_UUID
|
||||||
|
wxSTC_SCRIPTOL_PREPROCESSOR = stc_c.wxSTC_SCRIPTOL_PREPROCESSOR
|
||||||
|
wxSTC_SCRIPTOL_OPERATOR = stc_c.wxSTC_SCRIPTOL_OPERATOR
|
||||||
|
wxSTC_SCRIPTOL_IDENTIFIER = stc_c.wxSTC_SCRIPTOL_IDENTIFIER
|
||||||
|
wxSTC_SCRIPTOL_STRINGEOL = stc_c.wxSTC_SCRIPTOL_STRINGEOL
|
||||||
|
wxSTC_SCRIPTOL_VERBATIM = stc_c.wxSTC_SCRIPTOL_VERBATIM
|
||||||
|
wxSTC_SCRIPTOL_REGEX = stc_c.wxSTC_SCRIPTOL_REGEX
|
||||||
|
wxSTC_SCRIPTOL_COMMENTLINEDOC = stc_c.wxSTC_SCRIPTOL_COMMENTLINEDOC
|
||||||
|
wxSTC_SCRIPTOL_WORD2 = stc_c.wxSTC_SCRIPTOL_WORD2
|
||||||
|
wxSTC_SCRIPTOL_COMMENTDOCKEYWORD = stc_c.wxSTC_SCRIPTOL_COMMENTDOCKEYWORD
|
||||||
|
wxSTC_SCRIPTOL_COMMENTDOCKEYWORDERROR = stc_c.wxSTC_SCRIPTOL_COMMENTDOCKEYWORDERROR
|
||||||
|
wxSTC_SCRIPTOL_COMMENTBASIC = stc_c.wxSTC_SCRIPTOL_COMMENTBASIC
|
||||||
wxSTCNameStr = stc_c.wxSTCNameStr
|
wxSTCNameStr = stc_c.wxSTCNameStr
|
||||||
STC_USE_DND = stc_c.STC_USE_DND
|
STC_USE_DND = stc_c.STC_USE_DND
|
||||||
wxEVT_STC_CHANGE = stc_c.wxEVT_STC_CHANGE
|
wxEVT_STC_CHANGE = stc_c.wxEVT_STC_CHANGE
|
||||||
@@ -1728,6 +1785,7 @@ wxEVT_STC_DWELLEND = stc_c.wxEVT_STC_DWELLEND
|
|||||||
wxEVT_STC_START_DRAG = stc_c.wxEVT_STC_START_DRAG
|
wxEVT_STC_START_DRAG = stc_c.wxEVT_STC_START_DRAG
|
||||||
wxEVT_STC_DRAG_OVER = stc_c.wxEVT_STC_DRAG_OVER
|
wxEVT_STC_DRAG_OVER = stc_c.wxEVT_STC_DRAG_OVER
|
||||||
wxEVT_STC_DO_DROP = stc_c.wxEVT_STC_DO_DROP
|
wxEVT_STC_DO_DROP = stc_c.wxEVT_STC_DO_DROP
|
||||||
|
wxEVT_STC_ZOOM = stc_c.wxEVT_STC_ZOOM
|
||||||
|
|
||||||
|
|
||||||
#-------------- USER INCLUDE -----------------------
|
#-------------- USER INCLUDE -----------------------
|
||||||
|
@@ -111,6 +111,9 @@ def EVT_STC_DRAG_OVER(win, id, func):
|
|||||||
def EVT_STC_DO_DROP(win, id, func):
|
def EVT_STC_DO_DROP(win, id, func):
|
||||||
win.Connect(id, -1, wxEVT_STC_DO_DROP, func)
|
win.Connect(id, -1, wxEVT_STC_DO_DROP, func)
|
||||||
|
|
||||||
|
def EVT_STC_ZOOM(win, id, func):
|
||||||
|
win.Connect(id, -1, wxEVT_STC_ZOOM, func)
|
||||||
|
|
||||||
"
|
"
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@@ -18,7 +18,7 @@ class TestView(wxStyledTextCtrl):
|
|||||||
wxFont(10, wxMODERN, wxNORMAL, wxNORMAL))
|
wxFont(10, wxMODERN, wxNORMAL, wxNORMAL))
|
||||||
EVT_DYNAMIC_SASH_SPLIT(self, -1, self.OnSplit)
|
EVT_DYNAMIC_SASH_SPLIT(self, -1, self.OnSplit)
|
||||||
EVT_DYNAMIC_SASH_UNIFY(self, -1, self.OnUnify)
|
EVT_DYNAMIC_SASH_UNIFY(self, -1, self.OnUnify)
|
||||||
|
#self.SetScrollWidth(500)
|
||||||
|
|
||||||
def SetupScrollBars(self):
|
def SetupScrollBars(self):
|
||||||
# hook the scrollbars provided by the wxDynamicSashWindow
|
# hook the scrollbars provided by the wxDynamicSashWindow
|
||||||
|
@@ -162,8 +162,11 @@ def runTest(frame, nb, log):
|
|||||||
p.SetAutoLayout(true)
|
p.SetAutoLayout(true)
|
||||||
|
|
||||||
|
|
||||||
## ed.SetBufferedDraw(false)
|
#ed.SetBufferedDraw(false)
|
||||||
## ed.StyleClearAll()
|
#ed.StyleClearAll()
|
||||||
|
#ed.SetScrollWidth(800)
|
||||||
|
#ed.SetWrapMode(true)
|
||||||
|
|
||||||
ed.SetText(demoText)
|
ed.SetText(demoText)
|
||||||
if wxUSE_UNICODE:
|
if wxUSE_UNICODE:
|
||||||
import codecs
|
import codecs
|
||||||
|
Reference in New Issue
Block a user