fixed bug for garbage text in NotifyParent
Added method to set modification event mask git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -487,6 +487,10 @@ public:
|
||||
void SetKeywords(int keywordSet, const wxString& keywordList);
|
||||
|
||||
|
||||
// Event mask for Modified Event
|
||||
void SetModEventMask(int mask);
|
||||
//int GetModEventMask();
|
||||
|
||||
#ifndef SWIG
|
||||
private:
|
||||
// Event handlers
|
||||
|
@@ -1397,6 +1397,18 @@ void wxStyledTextCtrl::SetKeywords(int keywordSet, const wxString& keywordLi
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Event mask for Modified Event
|
||||
|
||||
void wxStyledTextCtrl::SetModEventMask(int mask) {
|
||||
SendMsg(SCI_SETMODEVENTMASK, mask);
|
||||
}
|
||||
|
||||
|
||||
//int wxStyledTextCtrl::GetModEventMask() {
|
||||
// return SendMsg(SCI_GETMODEVENTMASK);
|
||||
//}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Event handlers
|
||||
|
||||
@@ -1549,7 +1561,8 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
|
||||
evt.SetModifiers(scn.modifiers);
|
||||
if (eventType == wxEVT_STC_MODIFIED) {
|
||||
evt.SetModificationType(scn.modificationType);
|
||||
evt.SetText(scn.text);
|
||||
if (scn.text)
|
||||
evt.SetText(wxString(scn.text, scn.length));
|
||||
evt.SetLength(scn.length);
|
||||
evt.SetLinesAdded(scn.linesAdded);
|
||||
evt.SetLine(scn.line);
|
||||
|
@@ -487,6 +487,10 @@ public:
|
||||
void SetKeywords(int keywordSet, const wxString& keywordList);
|
||||
|
||||
|
||||
// Event mask for Modified Event
|
||||
void SetModEventMask(int mask);
|
||||
//int GetModEventMask();
|
||||
|
||||
#ifndef SWIG
|
||||
private:
|
||||
// Event handlers
|
||||
|
@@ -1397,6 +1397,18 @@ void wxStyledTextCtrl::SetKeywords(int keywordSet, const wxString& keywordLi
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Event mask for Modified Event
|
||||
|
||||
void wxStyledTextCtrl::SetModEventMask(int mask) {
|
||||
SendMsg(SCI_SETMODEVENTMASK, mask);
|
||||
}
|
||||
|
||||
|
||||
//int wxStyledTextCtrl::GetModEventMask() {
|
||||
// return SendMsg(SCI_GETMODEVENTMASK);
|
||||
//}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Event handlers
|
||||
|
||||
@@ -1549,7 +1561,8 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
|
||||
evt.SetModifiers(scn.modifiers);
|
||||
if (eventType == wxEVT_STC_MODIFIED) {
|
||||
evt.SetModificationType(scn.modificationType);
|
||||
evt.SetText(scn.text);
|
||||
if (scn.text)
|
||||
evt.SetText(wxString(scn.text, scn.length));
|
||||
evt.SetLength(scn.length);
|
||||
evt.SetLinesAdded(scn.linesAdded);
|
||||
evt.SetLine(scn.line);
|
||||
|
Reference in New Issue
Block a user