Finished the changes necessary to use the new event system.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9601 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2001-03-28 18:16:58 +00:00
parent 5527476f67
commit d25f5fbb88
10 changed files with 362 additions and 260 deletions

View File

@@ -29,6 +29,9 @@
// and regenerate // and regenerate
#define wxSTC_INVALID_POSITION -1 #define wxSTC_INVALID_POSITION -1
// Define start of Scintilla messages to be greater than all edit (EM_*) messages
// as many EM_ messages can be used although that use is deprecated.
#define wxSTC_START 2000 #define wxSTC_START 2000
#define wxSTC_OPTIONAL_START 3000 #define wxSTC_OPTIONAL_START 3000
#define wxSTC_LEXER_START 4000 #define wxSTC_LEXER_START 4000
@@ -96,7 +99,7 @@
#define wxSTC_INDIC0_MASK 32 #define wxSTC_INDIC0_MASK 32
#define wxSTC_INDIC1_MASK 64 #define wxSTC_INDIC1_MASK 64
#define wxSTC_INDIC2_MASK 128 #define wxSTC_INDIC2_MASK 128
#define wxSTC_INDICS_MASK 32 | 64 | 128 #define wxSTC_INDICS_MASK 224
// PrintColourMode - use same colours as screen. // PrintColourMode - use same colours as screen.
#define wxSTC_PRINT_NORMAL 0 #define wxSTC_PRINT_NORMAL 0
@@ -1349,43 +1352,61 @@ private:
#endif #endif
}; };
#ifndef SWIG
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHANGE, 1650)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_STYLENEEDED, 1651)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHARADDED, 1652)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_UPDATEUI, 1653)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTREACHED, 1654)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTLEFT, 1655)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_ROMODIFYATTEMPT, 1656)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DOUBLECLICK, 1657)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MODIFIED, 1658)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_KEY, 1659)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MACRORECORD, 1660)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MARGINCLICK, 1661)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_NEEDSHOWN, 1662)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_POSCHANGED, 1663)
END_DECLARE_EVENT_TYPES()
#else
enum {
wxEVT_STC_CHANGE,
wxEVT_STC_STYLENEEDED,
wxEVT_STC_CHARADDED,
wxEVT_STC_UPDATEUI,
wxEVT_STC_SAVEPOINTREACHED,
wxEVT_STC_SAVEPOINTLEFT,
wxEVT_STC_ROMODIFYATTEMPT,
wxEVT_STC_DOUBLECLICK,
wxEVT_STC_MODIFIED,
wxEVT_STC_KEY,
wxEVT_STC_MACRORECORD,
wxEVT_STC_MARGINCLICK,
wxEVT_STC_NEEDSHOWN,
wxEVT_STC_POSCHANGED
};
#endif
// Event types
enum {
wxEVT_STC_CHANGE = 1650,
wxEVT_STC_STYLENEEDED,
wxEVT_STC_CHARADDED,
wxEVT_STC_UPDATEUI,
wxEVT_STC_SAVEPOINTREACHED,
wxEVT_STC_SAVEPOINTLEFT,
wxEVT_STC_ROMODIFYATTEMPT,
wxEVT_STC_DOUBLECLICK,
wxEVT_STC_MODIFIED,
wxEVT_STC_KEY,
wxEVT_STC_MACRORECORD,
wxEVT_STC_MARGINCLICK,
wxEVT_STC_NEEDSHOWN,
wxEVT_STC_POSCHANGED
};
#ifndef SWIG #ifndef SWIG
typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
#define EVT_STC_CHANGE(id, fn) { wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_STYLENEEDED(id, fn) { wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_CHARADDED(id, fn) { wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_UPDATEUI(id, fn) { wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_SAVEPOINTREACHED(id, fn) { wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_SAVEPOINTLEFT(id, fn) { wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_ROMODIFYATTEMPT(id, fn) { wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_DOUBLECLICK(id, fn) { wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_MODIFIED(id, fn) { wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_KEY(id, fn) { wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_MACRORECORD(id, fn) { wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_MARGINCLICK(id, fn) { wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_NEEDSHOWN(id, fn) { wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_POSCHANGED(id, fn) { wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_POSCHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#endif #endif

View File

@@ -4,7 +4,7 @@
## A line starting with ## is a pure comment and should be stripped by readers. ## A line starting with ## is a pure comment and should be stripped by readers.
## A line starting with #! is for future shbang use ## A line starting with #! is for future shbang use
## A line starting with # followed by a space is a documentation comment and refers ## A line starting with # followed by a space is a documentation comment and refers
## to the next feature definition. ## to the next feature definition.
## Each feature is defined by a line starting with fun, get, set, val or evt. ## Each feature is defined by a line starting with fun, get, set, val or evt.
@@ -46,10 +46,10 @@
## point -> x,y ## point -> x,y
## pointresult -> like point, but output param ## pointresult -> like point, but output param
## rectangle -> left,top,right,bottom ## rectangle -> left,top,right,bottom
## Client code should ignore definitions containing types it does not understand, except ## Client code should ignore definitions containing types it does not understand, except
## for possibly #defining the constants ## for possibly #defining the constants
cat Basics cat Basics
################################################ ################################################
## For Scintilla.h ## For Scintilla.h
@@ -93,14 +93,14 @@ 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
# history and discarding them. # history and discarding them.
set void SetUndoCollection=2012(bool collectUndo,) set void SetUndoCollection=2012(bool collectUndo,)
# Select all the text in the document. # Select all the text in the document.
fun void SelectAll=2013(,) fun void SelectAll=2013(,)
# Remember the current position in the undo history as the position # Remember the current position in the undo history as the position
# at which the document was saved. # at which the document was saved.
fun void SetSavePoint=2014(,) fun void SetSavePoint=2014(,)
@@ -165,7 +165,7 @@ 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)
@@ -180,11 +180,11 @@ get bool GetBufferedDraw=2034(,)
# 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.
get int GetTabWidth=2121(,) get int GetTabWidth=2121(,)
# The SC_CP_UTF8 value can be used to enter Unicode mode. # The SC_CP_UTF8 value can be used to enter Unicode mode.
@@ -354,13 +354,13 @@ fun void SetStylingEx=2073(int length, string styles)
# Set a style to be visible or not. # Set a style to be visible or not.
set void StyleSetVisible=2074(int style, bool visible) set void StyleSetVisible=2074(int style, bool visible)
# Get the time in milliseconds that the caret is on and off. # Get the time in milliseconds that the caret is on and off.
get int GetCaretPeriod=2075(,) 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)
@@ -380,7 +380,8 @@ val INDIC_STRIKE=4
val INDIC0_MASK=32 val INDIC0_MASK=32
val INDIC1_MASK=64 val INDIC1_MASK=64
val INDIC2_MASK=128 val INDIC2_MASK=128
val INDICS_MASK=INDIC0_MASK | INDIC1_MASK | INDIC2_MASK val INDICS_MASK=224
##INDIC0_MASK | INDIC1_MASK | INDIC2_MASK
# Set an indicator to plain, squiggle or TT. # Set an indicator to plain, squiggle or TT.
set void IndicSetStyle=2080(int indic, int style) set void IndicSetStyle=2080(int indic, int style)
@@ -408,7 +409,7 @@ set void SetLineState=2092(int line, int state)
# Retrieve the extra styling information for a line. # Retrieve the extra styling information for a line.
get int GetLineState=2093(int line,) get int GetLineState=2093(int line,)
# Retrieve the last line number that has line state. # Retrieve the last line number that has line state.
get int GetMaxLineState=2094(,) get int GetMaxLineState=2094(,)
# Display a auto-completion list. # Display a auto-completion list.
@@ -422,7 +423,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(,)
@@ -432,7 +433,7 @@ 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. Default is space but can be changed if items contain space. # list. Default is space but can be changed if items contain space.
set void AutoCSetSeparator=2106(int separatorCharacter,) set void AutoCSetSeparator=2106(int separatorCharacter,)
@@ -442,8 +443,8 @@ get int AutoCGetSeparator=2107(,)
# Select the item in the auto-completion list that starts with a string. # Select the item in the auto-completion list that starts with a string.
fun void AutoCSelect=2108(, string text) fun void AutoCSelect=2108(, string text)
# Should the auto-completion list be cancelled if the user backspaces to a # Should the auto-completion list be cancelled if the user backspaces to a
# position before where the box was created. # position before where the box was created.
set void AutoCSetCancelAtStart=2110(bool cancel,) set void AutoCSetCancelAtStart=2110(bool cancel,)
# Retrieve whether auto-completion cancelled by backspacing before start. # Retrieve whether auto-completion cancelled by backspacing before start.
@@ -452,16 +453,16 @@ get bool AutoCGetCancelAtStart=2111(,)
# Define a set of character that when typed fills up the selected word. # Define a set of character that when typed fills up the selected word.
set void AutoCSetFillUps=2112(, string characterSet) set void AutoCSetFillUps=2112(, string characterSet)
# Should a single item auto-completion list automatically choose the item. # Should a single item auto-completion list automatically choose the item.
set void AutoCSetChooseSingle=2113(bool chooseSingle,) set void AutoCSetChooseSingle=2113(bool chooseSingle,)
# Retrieve whether a single item auto-completion list automatically choose the item. # Retrieve whether a single item auto-completion list automatically choose the item.
get bool AutoCGetChooseSingle=2114(,) get bool AutoCGetChooseSingle=2114(,)
# Set whether case is significant when performing auto-completion searches. # Set whether case is significant when performing auto-completion searches.
set void AutoCSetIgnoreCase=2115(bool ignoreCase,) set void AutoCSetIgnoreCase=2115(bool ignoreCase,)
# Retrieve state of ignore case flag. # Retrieve state of ignore case flag.
get bool AutoCGetIgnoreCase=2116(,) get bool AutoCGetIgnoreCase=2116(,)
# Set the number of spaces used for one level of indentation. # Set the number of spaces used for one level of indentation.
@@ -832,7 +833,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(,)
@@ -846,7 +847,7 @@ fun void NewLine=2329(,)
# Insert a Form Feed character. # Insert a Form Feed character.
fun void FormFeed=2330(,) fun void FormFeed=2330(,)
# Move caret to before first visible character on line. # Move caret to before first visible character on line.
# If already there move to first character on line. # If already there move to first character on line.
fun void VCHome=2331(,) fun void VCHome=2331(,)
@@ -920,8 +921,8 @@ val EDGE_BACKGROUND=2
# Retrieve the column number which text should be kept within. # Retrieve the column number which text should be kept within.
get int GetEdgeColumn=2360(,) get int GetEdgeColumn=2360(,)
# Set the column number of the edge. # Set the column number of the edge.
# If text goes past the edge then it is highlighted. # If text goes past the edge then it is highlighted.
set void SetEdgeColumn=2361(int column,) set void SetEdgeColumn=2361(int column,)
# Retrieve the edge highlight mode. # Retrieve the edge highlight mode.
@@ -966,13 +967,13 @@ fun void UsePopUp=2371(bool allowPopUp,)
# Is the selection a rectangular. The alternative is the more common stream selection. # Is the selection a 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.
# It may be positive to magnify or negative to reduce. # It may be positive to magnify or negative to reduce.
set void SetZoom=2373(int zoom,) set void SetZoom=2373(int zoom,)
# Retrieve the zoom level. # Retrieve the zoom level.
get int GetZoom=2374(,) get int GetZoom=2374(,)
# Create a new document object. # Create a new document object.
# Starts with reference count of 1 and not selected into editor. # Starts with reference count of 1 and not selected into editor.
fun int CreateDocument=2375(,) fun int CreateDocument=2375(,)
# Extend life of document. # Extend life of document.
@@ -993,10 +994,10 @@ fun void StartRecord=3001(,)
# Stop notifying the container of all key presses and commands. # Stop notifying the container of all key presses and commands.
fun void StopRecord=3002(,) fun void StopRecord=3002(,)
# Set the lexing language of the document. # Set the lexing language of the document.
set void SetLexer=4001(int lexer,) set void SetLexer=4001(int lexer,)
# Retrieve the lexing language of the document. # Retrieve the lexing language of the document.
get int GetLexer=4002(,) get int GetLexer=4002(,)
# Colourise a segment of the document using the current lexing language. # Colourise a segment of the document using the current lexing language.
@@ -1282,7 +1283,7 @@ evt void MarginClick=2010(int modifiers, int position, int margin)
evt void NeedShown=2011(int position, int length) evt void NeedShown=2011(int position, int length)
evt void PosChanged=2012(int position) evt void PosChanged=2012(int position)
cat Deprecated cat Deprecated
################################################ ################################################
# From WinDefs.h # From WinDefs.h
@@ -1424,9 +1425,9 @@ fun void WM_SetText=12(, string text)
fun void WM_Undo=772(,) fun void WM_Undo=772(,)
# Notification codes # Notification codes
val EN_CHANGE=768 val EN_CHANGE=768
val EN_KILLFOCUS=512 val EN_KILLFOCUS=512
val EN_SETFOCUS=256 val EN_SETFOCUS=256
# Flags for setting margins. # Flags for setting margins.
val EC_LEFTMARGIN=1 val EC_LEFTMARGIN=1
@@ -1434,13 +1435,13 @@ val EC_RIGHTMARGIN=2
val EC_USEFONTINFO=0xffff val EC_USEFONTINFO=0xffff
# Selection type. # Selection type.
val SEL_EMPTY=0 val SEL_EMPTY=0
val SEL_TEXT=1 val SEL_TEXT=1
# Find replace mask constants # Find replace mask constants
val FR_MATCHCASE=0x4 val FR_MATCHCASE=0x4
val FR_WHOLEWORD=0x2 val FR_WHOLEWORD=0x2
val FR_DOWN=0x1 val FR_DOWN=0x1
# Key modifier flag. # Key modifier flag.
val SHIFT_PRESSED=1 val SHIFT_PRESSED=1

View File

@@ -66,6 +66,23 @@ int wxForceScintillaLexers(void)
const wxChar* wxSTCNameStr = "stcwindow"; const wxChar* wxSTCNameStr = "stcwindow";
DEFINE_EVENT_TYPE( wxEVT_STC_CHANGE )
DEFINE_EVENT_TYPE( wxEVT_STC_STYLENEEDED )
DEFINE_EVENT_TYPE( wxEVT_STC_CHARADDED )
DEFINE_EVENT_TYPE( wxEVT_STC_UPDATEUI )
DEFINE_EVENT_TYPE( wxEVT_STC_SAVEPOINTREACHED )
DEFINE_EVENT_TYPE( wxEVT_STC_SAVEPOINTLEFT )
DEFINE_EVENT_TYPE( wxEVT_STC_ROMODIFYATTEMPT )
DEFINE_EVENT_TYPE( wxEVT_STC_DOUBLECLICK )
DEFINE_EVENT_TYPE( wxEVT_STC_MODIFIED )
DEFINE_EVENT_TYPE( wxEVT_STC_KEY )
DEFINE_EVENT_TYPE( wxEVT_STC_MACRORECORD )
DEFINE_EVENT_TYPE( wxEVT_STC_MARGINCLICK )
DEFINE_EVENT_TYPE( wxEVT_STC_NEEDSHOWN )
DEFINE_EVENT_TYPE( wxEVT_STC_POSCHANGED )
BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl) BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
EVT_PAINT (wxStyledTextCtrl::OnPaint) EVT_PAINT (wxStyledTextCtrl::OnPaint)
EVT_SCROLLWIN (wxStyledTextCtrl::OnScrollWin) EVT_SCROLLWIN (wxStyledTextCtrl::OnScrollWin)
@@ -1481,7 +1498,6 @@ wxPoint wxStyledTextCtrl::PointFromPosition(int pos) {
return wxPoint(x, y); return wxPoint(x, y);
} }
// Scroll enough to make the given line visible // Scroll enough to make the given line visible
void wxStyledTextCtrl::ScrollToLine(int line) { void wxStyledTextCtrl::ScrollToLine(int line) {
m_swx->DoScrollToLine(line); m_swx->DoScrollToLine(line);
@@ -1494,6 +1510,7 @@ void wxStyledTextCtrl::ScrollToColumn(int column) {
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// Event handlers // Event handlers
@@ -1539,38 +1556,16 @@ void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) {
m_swx->DoContextMenu(Point(pt.x, pt.y)); m_swx->DoContextMenu(Point(pt.x, pt.y));
} }
void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) { void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
long key = evt.KeyCode(); long key = evt.KeyCode();
switch (key) { if ((key > WXK_ESCAPE) &&
// Special handling for charcters that must be typed with AltGr down on (key != WXK_DELETE) && (key < 255) &&
// foreign keyboards. (Comes to us as Ctrl+Alt, and so would get !evt.ControlDown() && !evt.AltDown()) {
// filtered out by the default case below.)
//
// There should be a better way to do this...
//
case '\\':
case '|':
case '@':
case '#':
case '<EFBFBD>':
case '[':
case ']':
case '{':
case '}':
case '?':
m_swx->DoAddChar(key);
break;
default: m_swx->DoAddChar(key);
if ((key > WXK_ESCAPE) && (key != WXK_DELETE) && (key < 255) && }
!evt.ControlDown() && !evt.AltDown()) { else {
evt.Skip();
m_swx->DoAddChar(key);
}
else {
evt.Skip();
}
} }
} }
@@ -1583,7 +1578,6 @@ void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) {
evt.Skip(); evt.Skip();
} }
void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& evt) { void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& evt) {
m_swx->DoLoseFocus(); m_swx->DoLoseFocus();
} }

View File

@@ -66,6 +66,23 @@ int wxForceScintillaLexers(void)
const wxChar* wxSTCNameStr = "stcwindow"; const wxChar* wxSTCNameStr = "stcwindow";
DEFINE_EVENT_TYPE( wxEVT_STC_CHANGE )
DEFINE_EVENT_TYPE( wxEVT_STC_STYLENEEDED )
DEFINE_EVENT_TYPE( wxEVT_STC_CHARADDED )
DEFINE_EVENT_TYPE( wxEVT_STC_UPDATEUI )
DEFINE_EVENT_TYPE( wxEVT_STC_SAVEPOINTREACHED )
DEFINE_EVENT_TYPE( wxEVT_STC_SAVEPOINTLEFT )
DEFINE_EVENT_TYPE( wxEVT_STC_ROMODIFYATTEMPT )
DEFINE_EVENT_TYPE( wxEVT_STC_DOUBLECLICK )
DEFINE_EVENT_TYPE( wxEVT_STC_MODIFIED )
DEFINE_EVENT_TYPE( wxEVT_STC_KEY )
DEFINE_EVENT_TYPE( wxEVT_STC_MACRORECORD )
DEFINE_EVENT_TYPE( wxEVT_STC_MARGINCLICK )
DEFINE_EVENT_TYPE( wxEVT_STC_NEEDSHOWN )
DEFINE_EVENT_TYPE( wxEVT_STC_POSCHANGED )
BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl) BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
EVT_PAINT (wxStyledTextCtrl::OnPaint) EVT_PAINT (wxStyledTextCtrl::OnPaint)
EVT_SCROLLWIN (wxStyledTextCtrl::OnScrollWin) EVT_SCROLLWIN (wxStyledTextCtrl::OnScrollWin)

View File

@@ -250,43 +250,61 @@ private:
#endif #endif
}; };
#ifndef SWIG
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHANGE, 1650)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_STYLENEEDED, 1651)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHARADDED, 1652)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_UPDATEUI, 1653)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTREACHED, 1654)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTLEFT, 1655)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_ROMODIFYATTEMPT, 1656)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DOUBLECLICK, 1657)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MODIFIED, 1658)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_KEY, 1659)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MACRORECORD, 1660)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MARGINCLICK, 1661)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_NEEDSHOWN, 1662)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_POSCHANGED, 1663)
END_DECLARE_EVENT_TYPES()
#else
enum {
wxEVT_STC_CHANGE,
wxEVT_STC_STYLENEEDED,
wxEVT_STC_CHARADDED,
wxEVT_STC_UPDATEUI,
wxEVT_STC_SAVEPOINTREACHED,
wxEVT_STC_SAVEPOINTLEFT,
wxEVT_STC_ROMODIFYATTEMPT,
wxEVT_STC_DOUBLECLICK,
wxEVT_STC_MODIFIED,
wxEVT_STC_KEY,
wxEVT_STC_MACRORECORD,
wxEVT_STC_MARGINCLICK,
wxEVT_STC_NEEDSHOWN,
wxEVT_STC_POSCHANGED
};
#endif
// Event types
enum {
wxEVT_STC_CHANGE = 1650,
wxEVT_STC_STYLENEEDED,
wxEVT_STC_CHARADDED,
wxEVT_STC_UPDATEUI,
wxEVT_STC_SAVEPOINTREACHED,
wxEVT_STC_SAVEPOINTLEFT,
wxEVT_STC_ROMODIFYATTEMPT,
wxEVT_STC_DOUBLECLICK,
wxEVT_STC_MODIFIED,
wxEVT_STC_KEY,
wxEVT_STC_MACRORECORD,
wxEVT_STC_MARGINCLICK,
wxEVT_STC_NEEDSHOWN,
wxEVT_STC_POSCHANGED
};
#ifndef SWIG #ifndef SWIG
typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
#define EVT_STC_CHANGE(id, fn) { wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_STYLENEEDED(id, fn) { wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_CHARADDED(id, fn) { wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_UPDATEUI(id, fn) { wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_SAVEPOINTREACHED(id, fn) { wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_SAVEPOINTLEFT(id, fn) { wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_ROMODIFYATTEMPT(id, fn) { wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_DOUBLECLICK(id, fn) { wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_MODIFIED(id, fn) { wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_KEY(id, fn) { wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_MACRORECORD(id, fn) { wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_MARGINCLICK(id, fn) { wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_NEEDSHOWN(id, fn) { wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_POSCHANGED(id, fn) { wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_POSCHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#endif #endif

View File

@@ -29,6 +29,9 @@
// and regenerate // and regenerate
#define wxSTC_INVALID_POSITION -1 #define wxSTC_INVALID_POSITION -1
// Define start of Scintilla messages to be greater than all edit (EM_*) messages
// as many EM_ messages can be used although that use is deprecated.
#define wxSTC_START 2000 #define wxSTC_START 2000
#define wxSTC_OPTIONAL_START 3000 #define wxSTC_OPTIONAL_START 3000
#define wxSTC_LEXER_START 4000 #define wxSTC_LEXER_START 4000
@@ -96,7 +99,7 @@
#define wxSTC_INDIC0_MASK 32 #define wxSTC_INDIC0_MASK 32
#define wxSTC_INDIC1_MASK 64 #define wxSTC_INDIC1_MASK 64
#define wxSTC_INDIC2_MASK 128 #define wxSTC_INDIC2_MASK 128
#define wxSTC_INDICS_MASK 32 | 64 | 128 #define wxSTC_INDICS_MASK 224
// PrintColourMode - use same colours as screen. // PrintColourMode - use same colours as screen.
#define wxSTC_PRINT_NORMAL 0 #define wxSTC_PRINT_NORMAL 0
@@ -1349,43 +1352,61 @@ private:
#endif #endif
}; };
#ifndef SWIG
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHANGE, 1650)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_STYLENEEDED, 1651)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHARADDED, 1652)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_UPDATEUI, 1653)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTREACHED, 1654)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTLEFT, 1655)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_ROMODIFYATTEMPT, 1656)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DOUBLECLICK, 1657)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MODIFIED, 1658)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_KEY, 1659)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MACRORECORD, 1660)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MARGINCLICK, 1661)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_NEEDSHOWN, 1662)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_POSCHANGED, 1663)
END_DECLARE_EVENT_TYPES()
#else
enum {
wxEVT_STC_CHANGE,
wxEVT_STC_STYLENEEDED,
wxEVT_STC_CHARADDED,
wxEVT_STC_UPDATEUI,
wxEVT_STC_SAVEPOINTREACHED,
wxEVT_STC_SAVEPOINTLEFT,
wxEVT_STC_ROMODIFYATTEMPT,
wxEVT_STC_DOUBLECLICK,
wxEVT_STC_MODIFIED,
wxEVT_STC_KEY,
wxEVT_STC_MACRORECORD,
wxEVT_STC_MARGINCLICK,
wxEVT_STC_NEEDSHOWN,
wxEVT_STC_POSCHANGED
};
#endif
// Event types
enum {
wxEVT_STC_CHANGE = 1650,
wxEVT_STC_STYLENEEDED,
wxEVT_STC_CHARADDED,
wxEVT_STC_UPDATEUI,
wxEVT_STC_SAVEPOINTREACHED,
wxEVT_STC_SAVEPOINTLEFT,
wxEVT_STC_ROMODIFYATTEMPT,
wxEVT_STC_DOUBLECLICK,
wxEVT_STC_MODIFIED,
wxEVT_STC_KEY,
wxEVT_STC_MACRORECORD,
wxEVT_STC_MARGINCLICK,
wxEVT_STC_NEEDSHOWN,
wxEVT_STC_POSCHANGED
};
#ifndef SWIG #ifndef SWIG
typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
#define EVT_STC_CHANGE(id, fn) { wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_STYLENEEDED(id, fn) { wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_CHARADDED(id, fn) { wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_UPDATEUI(id, fn) { wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_SAVEPOINTREACHED(id, fn) { wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_SAVEPOINTLEFT(id, fn) { wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_ROMODIFYATTEMPT(id, fn) { wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_DOUBLECLICK(id, fn) { wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_MODIFIED(id, fn) { wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_KEY(id, fn) { wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_MACRORECORD(id, fn) { wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_MARGINCLICK(id, fn) { wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_NEEDSHOWN(id, fn) { wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_POSCHANGED(id, fn) { wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_POSCHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#endif #endif

View File

@@ -4,7 +4,7 @@
## A line starting with ## is a pure comment and should be stripped by readers. ## A line starting with ## is a pure comment and should be stripped by readers.
## A line starting with #! is for future shbang use ## A line starting with #! is for future shbang use
## A line starting with # followed by a space is a documentation comment and refers ## A line starting with # followed by a space is a documentation comment and refers
## to the next feature definition. ## to the next feature definition.
## Each feature is defined by a line starting with fun, get, set, val or evt. ## Each feature is defined by a line starting with fun, get, set, val or evt.
@@ -46,10 +46,10 @@
## point -> x,y ## point -> x,y
## pointresult -> like point, but output param ## pointresult -> like point, but output param
## rectangle -> left,top,right,bottom ## rectangle -> left,top,right,bottom
## Client code should ignore definitions containing types it does not understand, except ## Client code should ignore definitions containing types it does not understand, except
## for possibly #defining the constants ## for possibly #defining the constants
cat Basics cat Basics
################################################ ################################################
## For Scintilla.h ## For Scintilla.h
@@ -93,14 +93,14 @@ 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
# history and discarding them. # history and discarding them.
set void SetUndoCollection=2012(bool collectUndo,) set void SetUndoCollection=2012(bool collectUndo,)
# Select all the text in the document. # Select all the text in the document.
fun void SelectAll=2013(,) fun void SelectAll=2013(,)
# Remember the current position in the undo history as the position # Remember the current position in the undo history as the position
# at which the document was saved. # at which the document was saved.
fun void SetSavePoint=2014(,) fun void SetSavePoint=2014(,)
@@ -165,7 +165,7 @@ 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)
@@ -180,11 +180,11 @@ get bool GetBufferedDraw=2034(,)
# 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.
get int GetTabWidth=2121(,) get int GetTabWidth=2121(,)
# The SC_CP_UTF8 value can be used to enter Unicode mode. # The SC_CP_UTF8 value can be used to enter Unicode mode.
@@ -354,13 +354,13 @@ fun void SetStylingEx=2073(int length, string styles)
# Set a style to be visible or not. # Set a style to be visible or not.
set void StyleSetVisible=2074(int style, bool visible) set void StyleSetVisible=2074(int style, bool visible)
# Get the time in milliseconds that the caret is on and off. # Get the time in milliseconds that the caret is on and off.
get int GetCaretPeriod=2075(,) 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)
@@ -380,7 +380,8 @@ val INDIC_STRIKE=4
val INDIC0_MASK=32 val INDIC0_MASK=32
val INDIC1_MASK=64 val INDIC1_MASK=64
val INDIC2_MASK=128 val INDIC2_MASK=128
val INDICS_MASK=INDIC0_MASK | INDIC1_MASK | INDIC2_MASK val INDICS_MASK=224
##INDIC0_MASK | INDIC1_MASK | INDIC2_MASK
# Set an indicator to plain, squiggle or TT. # Set an indicator to plain, squiggle or TT.
set void IndicSetStyle=2080(int indic, int style) set void IndicSetStyle=2080(int indic, int style)
@@ -408,7 +409,7 @@ set void SetLineState=2092(int line, int state)
# Retrieve the extra styling information for a line. # Retrieve the extra styling information for a line.
get int GetLineState=2093(int line,) get int GetLineState=2093(int line,)
# Retrieve the last line number that has line state. # Retrieve the last line number that has line state.
get int GetMaxLineState=2094(,) get int GetMaxLineState=2094(,)
# Display a auto-completion list. # Display a auto-completion list.
@@ -422,7 +423,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(,)
@@ -432,7 +433,7 @@ 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. Default is space but can be changed if items contain space. # list. Default is space but can be changed if items contain space.
set void AutoCSetSeparator=2106(int separatorCharacter,) set void AutoCSetSeparator=2106(int separatorCharacter,)
@@ -442,8 +443,8 @@ get int AutoCGetSeparator=2107(,)
# Select the item in the auto-completion list that starts with a string. # Select the item in the auto-completion list that starts with a string.
fun void AutoCSelect=2108(, string text) fun void AutoCSelect=2108(, string text)
# Should the auto-completion list be cancelled if the user backspaces to a # Should the auto-completion list be cancelled if the user backspaces to a
# position before where the box was created. # position before where the box was created.
set void AutoCSetCancelAtStart=2110(bool cancel,) set void AutoCSetCancelAtStart=2110(bool cancel,)
# Retrieve whether auto-completion cancelled by backspacing before start. # Retrieve whether auto-completion cancelled by backspacing before start.
@@ -452,16 +453,16 @@ get bool AutoCGetCancelAtStart=2111(,)
# Define a set of character that when typed fills up the selected word. # Define a set of character that when typed fills up the selected word.
set void AutoCSetFillUps=2112(, string characterSet) set void AutoCSetFillUps=2112(, string characterSet)
# Should a single item auto-completion list automatically choose the item. # Should a single item auto-completion list automatically choose the item.
set void AutoCSetChooseSingle=2113(bool chooseSingle,) set void AutoCSetChooseSingle=2113(bool chooseSingle,)
# Retrieve whether a single item auto-completion list automatically choose the item. # Retrieve whether a single item auto-completion list automatically choose the item.
get bool AutoCGetChooseSingle=2114(,) get bool AutoCGetChooseSingle=2114(,)
# Set whether case is significant when performing auto-completion searches. # Set whether case is significant when performing auto-completion searches.
set void AutoCSetIgnoreCase=2115(bool ignoreCase,) set void AutoCSetIgnoreCase=2115(bool ignoreCase,)
# Retrieve state of ignore case flag. # Retrieve state of ignore case flag.
get bool AutoCGetIgnoreCase=2116(,) get bool AutoCGetIgnoreCase=2116(,)
# Set the number of spaces used for one level of indentation. # Set the number of spaces used for one level of indentation.
@@ -832,7 +833,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(,)
@@ -846,7 +847,7 @@ fun void NewLine=2329(,)
# Insert a Form Feed character. # Insert a Form Feed character.
fun void FormFeed=2330(,) fun void FormFeed=2330(,)
# Move caret to before first visible character on line. # Move caret to before first visible character on line.
# If already there move to first character on line. # If already there move to first character on line.
fun void VCHome=2331(,) fun void VCHome=2331(,)
@@ -920,8 +921,8 @@ val EDGE_BACKGROUND=2
# Retrieve the column number which text should be kept within. # Retrieve the column number which text should be kept within.
get int GetEdgeColumn=2360(,) get int GetEdgeColumn=2360(,)
# Set the column number of the edge. # Set the column number of the edge.
# If text goes past the edge then it is highlighted. # If text goes past the edge then it is highlighted.
set void SetEdgeColumn=2361(int column,) set void SetEdgeColumn=2361(int column,)
# Retrieve the edge highlight mode. # Retrieve the edge highlight mode.
@@ -966,13 +967,13 @@ fun void UsePopUp=2371(bool allowPopUp,)
# Is the selection a rectangular. The alternative is the more common stream selection. # Is the selection a 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.
# It may be positive to magnify or negative to reduce. # It may be positive to magnify or negative to reduce.
set void SetZoom=2373(int zoom,) set void SetZoom=2373(int zoom,)
# Retrieve the zoom level. # Retrieve the zoom level.
get int GetZoom=2374(,) get int GetZoom=2374(,)
# Create a new document object. # Create a new document object.
# Starts with reference count of 1 and not selected into editor. # Starts with reference count of 1 and not selected into editor.
fun int CreateDocument=2375(,) fun int CreateDocument=2375(,)
# Extend life of document. # Extend life of document.
@@ -993,10 +994,10 @@ fun void StartRecord=3001(,)
# Stop notifying the container of all key presses and commands. # Stop notifying the container of all key presses and commands.
fun void StopRecord=3002(,) fun void StopRecord=3002(,)
# Set the lexing language of the document. # Set the lexing language of the document.
set void SetLexer=4001(int lexer,) set void SetLexer=4001(int lexer,)
# Retrieve the lexing language of the document. # Retrieve the lexing language of the document.
get int GetLexer=4002(,) get int GetLexer=4002(,)
# Colourise a segment of the document using the current lexing language. # Colourise a segment of the document using the current lexing language.
@@ -1282,7 +1283,7 @@ evt void MarginClick=2010(int modifiers, int position, int margin)
evt void NeedShown=2011(int position, int length) evt void NeedShown=2011(int position, int length)
evt void PosChanged=2012(int position) evt void PosChanged=2012(int position)
cat Deprecated cat Deprecated
################################################ ################################################
# From WinDefs.h # From WinDefs.h
@@ -1424,9 +1425,9 @@ fun void WM_SetText=12(, string text)
fun void WM_Undo=772(,) fun void WM_Undo=772(,)
# Notification codes # Notification codes
val EN_CHANGE=768 val EN_CHANGE=768
val EN_KILLFOCUS=512 val EN_KILLFOCUS=512
val EN_SETFOCUS=256 val EN_SETFOCUS=256
# Flags for setting margins. # Flags for setting margins.
val EC_LEFTMARGIN=1 val EC_LEFTMARGIN=1
@@ -1434,13 +1435,13 @@ val EC_RIGHTMARGIN=2
val EC_USEFONTINFO=0xffff val EC_USEFONTINFO=0xffff
# Selection type. # Selection type.
val SEL_EMPTY=0 val SEL_EMPTY=0
val SEL_TEXT=1 val SEL_TEXT=1
# Find replace mask constants # Find replace mask constants
val FR_MATCHCASE=0x4 val FR_MATCHCASE=0x4
val FR_WHOLEWORD=0x2 val FR_WHOLEWORD=0x2
val FR_DOWN=0x1 val FR_DOWN=0x1
# Key modifier flag. # Key modifier flag.
val SHIFT_PRESSED=1 val SHIFT_PRESSED=1

View File

@@ -66,6 +66,23 @@ int wxForceScintillaLexers(void)
const wxChar* wxSTCNameStr = "stcwindow"; const wxChar* wxSTCNameStr = "stcwindow";
DEFINE_EVENT_TYPE( wxEVT_STC_CHANGE )
DEFINE_EVENT_TYPE( wxEVT_STC_STYLENEEDED )
DEFINE_EVENT_TYPE( wxEVT_STC_CHARADDED )
DEFINE_EVENT_TYPE( wxEVT_STC_UPDATEUI )
DEFINE_EVENT_TYPE( wxEVT_STC_SAVEPOINTREACHED )
DEFINE_EVENT_TYPE( wxEVT_STC_SAVEPOINTLEFT )
DEFINE_EVENT_TYPE( wxEVT_STC_ROMODIFYATTEMPT )
DEFINE_EVENT_TYPE( wxEVT_STC_DOUBLECLICK )
DEFINE_EVENT_TYPE( wxEVT_STC_MODIFIED )
DEFINE_EVENT_TYPE( wxEVT_STC_KEY )
DEFINE_EVENT_TYPE( wxEVT_STC_MACRORECORD )
DEFINE_EVENT_TYPE( wxEVT_STC_MARGINCLICK )
DEFINE_EVENT_TYPE( wxEVT_STC_NEEDSHOWN )
DEFINE_EVENT_TYPE( wxEVT_STC_POSCHANGED )
BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl) BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
EVT_PAINT (wxStyledTextCtrl::OnPaint) EVT_PAINT (wxStyledTextCtrl::OnPaint)
EVT_SCROLLWIN (wxStyledTextCtrl::OnScrollWin) EVT_SCROLLWIN (wxStyledTextCtrl::OnScrollWin)
@@ -1481,7 +1498,6 @@ wxPoint wxStyledTextCtrl::PointFromPosition(int pos) {
return wxPoint(x, y); return wxPoint(x, y);
} }
// Scroll enough to make the given line visible // Scroll enough to make the given line visible
void wxStyledTextCtrl::ScrollToLine(int line) { void wxStyledTextCtrl::ScrollToLine(int line) {
m_swx->DoScrollToLine(line); m_swx->DoScrollToLine(line);
@@ -1494,6 +1510,7 @@ void wxStyledTextCtrl::ScrollToColumn(int column) {
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// Event handlers // Event handlers
@@ -1539,38 +1556,16 @@ void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) {
m_swx->DoContextMenu(Point(pt.x, pt.y)); m_swx->DoContextMenu(Point(pt.x, pt.y));
} }
void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) { void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
long key = evt.KeyCode(); long key = evt.KeyCode();
switch (key) { if ((key > WXK_ESCAPE) &&
// Special handling for charcters that must be typed with AltGr down on (key != WXK_DELETE) && (key < 255) &&
// foreign keyboards. (Comes to us as Ctrl+Alt, and so would get !evt.ControlDown() && !evt.AltDown()) {
// filtered out by the default case below.)
//
// There should be a better way to do this...
//
case '\\':
case '|':
case '@':
case '#':
case '<EFBFBD>':
case '[':
case ']':
case '{':
case '}':
case '?':
m_swx->DoAddChar(key);
break;
default: m_swx->DoAddChar(key);
if ((key > WXK_ESCAPE) && (key != WXK_DELETE) && (key < 255) && }
!evt.ControlDown() && !evt.AltDown()) { else {
evt.Skip();
m_swx->DoAddChar(key);
}
else {
evt.Skip();
}
} }
} }
@@ -1583,7 +1578,6 @@ void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) {
evt.Skip(); evt.Skip();
} }
void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& evt) { void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& evt) {
m_swx->DoLoseFocus(); m_swx->DoLoseFocus();
} }

View File

@@ -66,6 +66,23 @@ int wxForceScintillaLexers(void)
const wxChar* wxSTCNameStr = "stcwindow"; const wxChar* wxSTCNameStr = "stcwindow";
DEFINE_EVENT_TYPE( wxEVT_STC_CHANGE )
DEFINE_EVENT_TYPE( wxEVT_STC_STYLENEEDED )
DEFINE_EVENT_TYPE( wxEVT_STC_CHARADDED )
DEFINE_EVENT_TYPE( wxEVT_STC_UPDATEUI )
DEFINE_EVENT_TYPE( wxEVT_STC_SAVEPOINTREACHED )
DEFINE_EVENT_TYPE( wxEVT_STC_SAVEPOINTLEFT )
DEFINE_EVENT_TYPE( wxEVT_STC_ROMODIFYATTEMPT )
DEFINE_EVENT_TYPE( wxEVT_STC_DOUBLECLICK )
DEFINE_EVENT_TYPE( wxEVT_STC_MODIFIED )
DEFINE_EVENT_TYPE( wxEVT_STC_KEY )
DEFINE_EVENT_TYPE( wxEVT_STC_MACRORECORD )
DEFINE_EVENT_TYPE( wxEVT_STC_MARGINCLICK )
DEFINE_EVENT_TYPE( wxEVT_STC_NEEDSHOWN )
DEFINE_EVENT_TYPE( wxEVT_STC_POSCHANGED )
BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl) BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
EVT_PAINT (wxStyledTextCtrl::OnPaint) EVT_PAINT (wxStyledTextCtrl::OnPaint)
EVT_SCROLLWIN (wxStyledTextCtrl::OnScrollWin) EVT_SCROLLWIN (wxStyledTextCtrl::OnScrollWin)

View File

@@ -250,43 +250,61 @@ private:
#endif #endif
}; };
#ifndef SWIG
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHANGE, 1650)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_STYLENEEDED, 1651)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHARADDED, 1652)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_UPDATEUI, 1653)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTREACHED, 1654)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTLEFT, 1655)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_ROMODIFYATTEMPT, 1656)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DOUBLECLICK, 1657)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MODIFIED, 1658)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_KEY, 1659)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MACRORECORD, 1660)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MARGINCLICK, 1661)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_NEEDSHOWN, 1662)
DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_POSCHANGED, 1663)
END_DECLARE_EVENT_TYPES()
#else
enum {
wxEVT_STC_CHANGE,
wxEVT_STC_STYLENEEDED,
wxEVT_STC_CHARADDED,
wxEVT_STC_UPDATEUI,
wxEVT_STC_SAVEPOINTREACHED,
wxEVT_STC_SAVEPOINTLEFT,
wxEVT_STC_ROMODIFYATTEMPT,
wxEVT_STC_DOUBLECLICK,
wxEVT_STC_MODIFIED,
wxEVT_STC_KEY,
wxEVT_STC_MACRORECORD,
wxEVT_STC_MARGINCLICK,
wxEVT_STC_NEEDSHOWN,
wxEVT_STC_POSCHANGED
};
#endif
// Event types
enum {
wxEVT_STC_CHANGE = 1650,
wxEVT_STC_STYLENEEDED,
wxEVT_STC_CHARADDED,
wxEVT_STC_UPDATEUI,
wxEVT_STC_SAVEPOINTREACHED,
wxEVT_STC_SAVEPOINTLEFT,
wxEVT_STC_ROMODIFYATTEMPT,
wxEVT_STC_DOUBLECLICK,
wxEVT_STC_MODIFIED,
wxEVT_STC_KEY,
wxEVT_STC_MACRORECORD,
wxEVT_STC_MARGINCLICK,
wxEVT_STC_NEEDSHOWN,
wxEVT_STC_POSCHANGED
};
#ifndef SWIG #ifndef SWIG
typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
#define EVT_STC_CHANGE(id, fn) { wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_STYLENEEDED(id, fn) { wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_CHARADDED(id, fn) { wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_UPDATEUI(id, fn) { wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_SAVEPOINTREACHED(id, fn) { wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_SAVEPOINTLEFT(id, fn) { wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_ROMODIFYATTEMPT(id, fn) { wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_DOUBLECLICK(id, fn) { wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_MODIFIED(id, fn) { wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_KEY(id, fn) { wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_MACRORECORD(id, fn) { wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_MARGINCLICK(id, fn) { wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_NEEDSHOWN(id, fn) { wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#define EVT_STC_POSCHANGED(id, fn) { wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_POSCHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
#endif #endif