1 ////////////////////////////////////////////////////////////////////////////
3 // Purpose: A wxWindows implementation of Scintilla. This class is the
4 // one meant to be used directly by wx applications. It does not
5 // derive directly from the Scintilla classes, but instead
6 // delegates most things to the real Scintilla class.
7 // This allows the use of Scintilla without polluting the
8 // namespace with all the classes and identifiers from Scintilla.
12 // Created: 13-Jan-2000
14 // Copyright: (c) 2000 by Total Control Software
15 // Licence: wxWindows license
16 /////////////////////////////////////////////////////////////////////////////
20 #include "wx/stc/stc.h"
21 #include "ScintillaWX.h"
24 #include <wx/tokenzr.h>
25 #include <wx/mstream.h>
30 //----------------------------------------------------------------------
32 const wxChar
* wxSTCNameStr
= wxT("stcwindow");
38 #define MAKELONG(a, b) ((a) | ((b) << 16))
41 static long wxColourAsLong(const wxColour
& co
) {
42 return (((long)co
.Blue() << 16) |
43 ((long)co
.Green() << 8) |
47 static wxColour
wxColourFromLong(long c
) {
49 clr
.Set(c
& 0xff, (c
>> 8) & 0xff, (c
>> 16) & 0xff);
54 static wxColour
wxColourFromSpec(const wxString
& spec
) {
55 // spec should be "#RRGGBB"
56 long red
, green
, blue
;
57 red
= green
= blue
= 0;
58 spec
.Mid(1,2).ToLong(&red
, 16);
59 spec
.Mid(3,2).ToLong(&green
, 16);
60 spec
.Mid(5,2).ToLong(&blue
, 16);
61 return wxColour(red
, green
, blue
);
64 //----------------------------------------------------------------------
66 DEFINE_EVENT_TYPE( wxEVT_STC_CHANGE
)
67 DEFINE_EVENT_TYPE( wxEVT_STC_STYLENEEDED
)
68 DEFINE_EVENT_TYPE( wxEVT_STC_CHARADDED
)
69 DEFINE_EVENT_TYPE( wxEVT_STC_SAVEPOINTREACHED
)
70 DEFINE_EVENT_TYPE( wxEVT_STC_SAVEPOINTLEFT
)
71 DEFINE_EVENT_TYPE( wxEVT_STC_ROMODIFYATTEMPT
)
72 DEFINE_EVENT_TYPE( wxEVT_STC_KEY
)
73 DEFINE_EVENT_TYPE( wxEVT_STC_DOUBLECLICK
)
74 DEFINE_EVENT_TYPE( wxEVT_STC_UPDATEUI
)
75 DEFINE_EVENT_TYPE( wxEVT_STC_MODIFIED
)
76 DEFINE_EVENT_TYPE( wxEVT_STC_MACRORECORD
)
77 DEFINE_EVENT_TYPE( wxEVT_STC_MARGINCLICK
)
78 DEFINE_EVENT_TYPE( wxEVT_STC_NEEDSHOWN
)
79 DEFINE_EVENT_TYPE( wxEVT_STC_POSCHANGED
)
80 DEFINE_EVENT_TYPE( wxEVT_STC_PAINTED
)
81 DEFINE_EVENT_TYPE( wxEVT_STC_USERLISTSELECTION
)
82 DEFINE_EVENT_TYPE( wxEVT_STC_URIDROPPED
)
83 DEFINE_EVENT_TYPE( wxEVT_STC_DWELLSTART
)
84 DEFINE_EVENT_TYPE( wxEVT_STC_DWELLEND
)
85 DEFINE_EVENT_TYPE( wxEVT_STC_START_DRAG
)
86 DEFINE_EVENT_TYPE( wxEVT_STC_DRAG_OVER
)
87 DEFINE_EVENT_TYPE( wxEVT_STC_DO_DROP
)
88 DEFINE_EVENT_TYPE( wxEVT_STC_ZOOM
)
89 DEFINE_EVENT_TYPE( wxEVT_STC_HOTSPOT_CLICK
)
90 DEFINE_EVENT_TYPE( wxEVT_STC_HOTSPOT_DCLICK
)
91 DEFINE_EVENT_TYPE( wxEVT_STC_CALLTIP_CLICK
)
95 BEGIN_EVENT_TABLE(wxStyledTextCtrl
, wxControl
)
96 EVT_PAINT (wxStyledTextCtrl::OnPaint
)
97 EVT_SCROLLWIN (wxStyledTextCtrl::OnScrollWin
)
98 EVT_SCROLL (wxStyledTextCtrl::OnScroll
)
99 EVT_SIZE (wxStyledTextCtrl::OnSize
)
100 EVT_LEFT_DOWN (wxStyledTextCtrl::OnMouseLeftDown
)
101 // Let Scintilla see the double click as a second click
102 EVT_LEFT_DCLICK (wxStyledTextCtrl::OnMouseLeftDown
)
103 EVT_MOTION (wxStyledTextCtrl::OnMouseMove
)
104 EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp
)
105 #if defined(__WXGTK__) || defined(__WXMAC__)
106 EVT_RIGHT_UP (wxStyledTextCtrl::OnMouseRightUp
)
108 EVT_CONTEXT_MENU (wxStyledTextCtrl::OnContextMenu
)
110 EVT_MOUSEWHEEL (wxStyledTextCtrl::OnMouseWheel
)
111 EVT_MIDDLE_UP (wxStyledTextCtrl::OnMouseMiddleUp
)
112 EVT_CHAR (wxStyledTextCtrl::OnChar
)
113 EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown
)
114 EVT_KILL_FOCUS (wxStyledTextCtrl::OnLoseFocus
)
115 EVT_SET_FOCUS (wxStyledTextCtrl::OnGainFocus
)
116 EVT_SYS_COLOUR_CHANGED (wxStyledTextCtrl::OnSysColourChanged
)
117 EVT_ERASE_BACKGROUND (wxStyledTextCtrl::OnEraseBackground
)
118 EVT_MENU_RANGE (10, 16, wxStyledTextCtrl::OnMenu
)
119 EVT_LISTBOX_DCLICK (-1, wxStyledTextCtrl::OnListBox
)
123 IMPLEMENT_CLASS(wxStyledTextCtrl
, wxControl
)
124 IMPLEMENT_DYNAMIC_CLASS(wxStyledTextEvent
, wxCommandEvent
)
127 // forces the linking of the lexer modules
128 int Scintilla_LinkLexers();
131 //----------------------------------------------------------------------
132 // Constructor and Destructor
134 wxStyledTextCtrl::wxStyledTextCtrl(wxWindow
*parent
,
139 const wxString
& name
)
142 Create(parent
, id
, pos
, size
, style
, name
);
146 void wxStyledTextCtrl::Create(wxWindow
*parent
,
151 const wxString
& name
)
154 style
|= wxVSCROLL
| wxHSCROLL
;
156 wxControl::Create(parent
, id
, pos
, size
,
157 style
| wxWANTS_CHARS
| wxCLIP_CHILDREN
,
158 wxDefaultValidator
, name
);
161 Scintilla_LinkLexers();
163 m_swx
= new ScintillaWX(this);
165 m_lastKeyDownConsumed
= FALSE
;
169 // Put Scintilla into unicode (UTF-8) mode
170 SetCodePage(wxSTC_CP_UTF8
);
175 wxStyledTextCtrl::~wxStyledTextCtrl() {
180 //----------------------------------------------------------------------
182 long wxStyledTextCtrl::SendMsg(int msg
, long wp
, long lp
) {
184 return m_swx
->WndProc(msg
, wp
, lp
);
189 //----------------------------------------------------------------------
190 // BEGIN generated section. The following code is automatically generated
191 // by gen_iface.py from the contents of Scintilla.iface. Do not edit
192 // this file. Edit stc.cpp.in or gen_iface.py instead and regenerate.
196 // END of generated section
197 //----------------------------------------------------------------------
200 // Returns the line number of the line with the caret.
201 int wxStyledTextCtrl::GetCurrentLine() {
202 int line
= LineFromPosition(GetCurrentPos());
207 // Extract style settings from a spec-string which is composed of one or
208 // more of the following comma separated elements:
210 // bold turns on bold
211 // italic turns on italics
212 // fore:#RRGGBB sets the foreground colour
213 // back:#RRGGBB sets the background colour
214 // face:[facename] sets the font face name to use
215 // size:[num] sets the font size in points
216 // eol turns on eol filling
217 // underline turns on underlining
219 void wxStyledTextCtrl::StyleSetSpec(int styleNum
, const wxString
& spec
) {
221 wxStringTokenizer
tkz(spec
, wxT(","));
222 while (tkz
.HasMoreTokens()) {
223 wxString token
= tkz
.GetNextToken();
225 wxString option
= token
.BeforeFirst(':');
226 wxString val
= token
.AfterFirst(':');
228 if (option
== wxT("bold"))
229 StyleSetBold(styleNum
, true);
231 else if (option
== wxT("italic"))
232 StyleSetItalic(styleNum
, true);
234 else if (option
== wxT("underline"))
235 StyleSetUnderline(styleNum
, true);
237 else if (option
== wxT("eol"))
238 StyleSetEOLFilled(styleNum
, true);
240 else if (option
== wxT("size")) {
242 if (val
.ToLong(&points
))
243 StyleSetSize(styleNum
, points
);
246 else if (option
== wxT("face"))
247 StyleSetFaceName(styleNum
, val
);
249 else if (option
== wxT("fore"))
250 StyleSetForeground(styleNum
, wxColourFromSpec(val
));
252 else if (option
== wxT("back"))
253 StyleSetBackground(styleNum
, wxColourFromSpec(val
));
258 // Set style size, face, bold, italic, and underline attributes from
259 // a wxFont's attributes.
260 void wxStyledTextCtrl::StyleSetFont(int styleNum
, wxFont
& font
) {
262 // Ensure that the native font is initialized
264 GetTextExtent(wxT("X"), &x
, &y
, NULL
, NULL
, &font
);
266 int size
= font
.GetPointSize();
267 wxString faceName
= font
.GetFaceName();
268 bool bold
= font
.GetWeight() == wxBOLD
;
269 bool italic
= font
.GetStyle() != wxNORMAL
;
270 bool under
= font
.GetUnderlined();
272 // TODO: add encoding/charset mapping
273 StyleSetFontAttr(styleNum
, size
, faceName
, bold
, italic
, under
);
276 // Set all font style attributes at once.
277 void wxStyledTextCtrl::StyleSetFontAttr(int styleNum
, int size
,
278 const wxString
& faceName
,
279 bool bold
, bool italic
,
281 StyleSetSize(styleNum
, size
);
282 StyleSetFaceName(styleNum
, faceName
);
283 StyleSetBold(styleNum
, bold
);
284 StyleSetItalic(styleNum
, italic
);
285 StyleSetUnderline(styleNum
, underline
);
287 // TODO: add encoding/charset mapping
291 // Perform one of the operations defined by the wxSTC_CMD_* constants.
292 void wxStyledTextCtrl::CmdKeyExecute(int cmd
) {
297 // Set the left and right margin in the edit area, measured in pixels.
298 void wxStyledTextCtrl::SetMargins(int left
, int right
) {
300 SetMarginRight(right
);
304 // Retrieve the start and end positions of the current selection.
305 void wxStyledTextCtrl::GetSelection(int* startPos
, int* endPos
) {
306 if (startPos
!= NULL
)
307 *startPos
= SendMsg(SCI_GETSELECTIONSTART
);
309 *endPos
= SendMsg(SCI_GETSELECTIONEND
);
313 // Retrieve the point in the window where a position is displayed.
314 wxPoint
wxStyledTextCtrl::PointFromPosition(int pos
) {
315 int x
= SendMsg(SCI_POINTXFROMPOSITION
, 0, pos
);
316 int y
= SendMsg(SCI_POINTYFROMPOSITION
, 0, pos
);
317 return wxPoint(x
, y
);
320 // Scroll enough to make the given line visible
321 void wxStyledTextCtrl::ScrollToLine(int line
) {
322 m_swx
->DoScrollToLine(line
);
326 // Scroll enough to make the given column visible
327 void wxStyledTextCtrl::ScrollToColumn(int column
) {
328 m_swx
->DoScrollToColumn(column
);
332 bool wxStyledTextCtrl::SaveFile(const wxString
& filename
)
334 wxFile
file(filename
, wxFile::write
);
336 if (!file
.IsOpened())
339 bool success
= file
.Write(GetText(), *wxConvCurrent
);
347 bool wxStyledTextCtrl::LoadFile(const wxString
& filename
)
349 bool success
= false;
350 wxFile
file(filename
, wxFile::read
);
355 off_t len
= file
.Length();
359 wxMemoryBuffer
buffer(len
+1);
360 success
= (file
.Read(buffer
.GetData(), len
) == len
);
362 ((char*)buffer
.GetData())[len
] = 0;
363 contents
= wxString(buffer
, *wxConvCurrent
, len
);
367 success
= (file
.Read(wxStringBuffer(buffer
, len
), len
) == len
);
372 success
= true; // empty file is ok
386 #if wxUSE_DRAG_AND_DROP
387 wxDragResult
wxStyledTextCtrl::DoDragOver(wxCoord x
, wxCoord y
, wxDragResult def
) {
388 return m_swx
->DoDragOver(x
, y
, def
);
392 bool wxStyledTextCtrl::DoDropText(long x
, long y
, const wxString
& data
) {
393 return m_swx
->DoDropText(x
, y
, data
);
398 void wxStyledTextCtrl::SetUseAntiAliasing(bool useAA
) {
399 m_swx
->SetUseAntiAliasing(useAA
);
402 bool wxStyledTextCtrl::GetUseAntiAliasing() {
403 return m_swx
->GetUseAntiAliasing();
406 //----------------------------------------------------------------------
409 void wxStyledTextCtrl::OnPaint(wxPaintEvent
& WXUNUSED(evt
)) {
411 m_swx
->DoPaint(&dc
, GetUpdateRegion().GetBox());
414 void wxStyledTextCtrl::OnScrollWin(wxScrollWinEvent
& evt
) {
415 if (evt
.GetOrientation() == wxHORIZONTAL
)
416 m_swx
->DoHScroll(evt
.GetEventType(), evt
.GetPosition());
418 m_swx
->DoVScroll(evt
.GetEventType(), evt
.GetPosition());
421 void wxStyledTextCtrl::OnScroll(wxScrollEvent
& evt
) {
422 wxScrollBar
* sb
= wxDynamicCast(evt
.GetEventObject(), wxScrollBar
);
424 if (sb
->IsVertical())
425 m_swx
->DoVScroll(evt
.GetEventType(), evt
.GetPosition());
427 m_swx
->DoHScroll(evt
.GetEventType(), evt
.GetPosition());
431 void wxStyledTextCtrl::OnSize(wxSizeEvent
& WXUNUSED(evt
)) {
433 wxSize sz
= GetClientSize();
434 m_swx
->DoSize(sz
.x
, sz
.y
);
438 void wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent
& evt
) {
440 wxPoint pt
= evt
.GetPosition();
441 m_swx
->DoLeftButtonDown(Point(pt
.x
, pt
.y
), m_stopWatch
.Time(),
442 evt
.ShiftDown(), evt
.ControlDown(), evt
.AltDown());
445 void wxStyledTextCtrl::OnMouseMove(wxMouseEvent
& evt
) {
446 wxPoint pt
= evt
.GetPosition();
447 m_swx
->DoLeftButtonMove(Point(pt
.x
, pt
.y
));
450 void wxStyledTextCtrl::OnMouseLeftUp(wxMouseEvent
& evt
) {
451 wxPoint pt
= evt
.GetPosition();
452 m_swx
->DoLeftButtonUp(Point(pt
.x
, pt
.y
), m_stopWatch
.Time(),
457 void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent
& evt
) {
458 wxPoint pt
= evt
.GetPosition();
459 m_swx
->DoContextMenu(Point(pt
.x
, pt
.y
));
463 void wxStyledTextCtrl::OnMouseMiddleUp(wxMouseEvent
& evt
) {
464 wxPoint pt
= evt
.GetPosition();
465 m_swx
->DoMiddleButtonUp(Point(pt
.x
, pt
.y
));
468 void wxStyledTextCtrl::OnContextMenu(wxContextMenuEvent
& evt
) {
469 wxPoint pt
= evt
.GetPosition();
470 ScreenToClient(&pt
.x
, &pt
.y
);
472 Show context menu at event point if it's within the window,
473 or at caret location if not
475 wxHitTest ht
= this->HitTest(pt
);
476 if (ht
!= wxHT_WINDOW_INSIDE
) {
477 pt
= this->PointFromPosition(this->GetCurrentPos());
479 m_swx
->DoContextMenu(Point(pt
.x
, pt
.y
));
483 void wxStyledTextCtrl::OnMouseWheel(wxMouseEvent
& evt
) {
484 m_swx
->DoMouseWheel(evt
.GetWheelRotation(),
486 evt
.GetLinesPerAction(),
492 void wxStyledTextCtrl::OnChar(wxKeyEvent
& evt
) {
493 // On (some?) non-US keyboards the AltGr key is required to enter some
494 // common characters. It comes to us as both Alt and Ctrl down so we need
495 // to let the char through in that case, otherwise if only ctrl or only
496 // alt let's skip it.
497 bool ctrl
= evt
.ControlDown();
498 bool alt
= evt
.AltDown();
499 bool skip
= ((ctrl
|| alt
) && ! (ctrl
&& alt
));
501 int key
= evt
.GetKeyCode();
503 // printf("OnChar key:%%d consumed:%%d ctrl:%%d alt:%%d skip:%%d\n",
504 // key, m_lastKeyDownConsumed, ctrl, alt, skip);
506 if ( (key
<= WXK_START
|| key
> WXK_COMMAND
) &&
507 !m_lastKeyDownConsumed
&& !skip
) {
508 m_swx
->DoAddChar(key
);
515 void wxStyledTextCtrl::OnKeyDown(wxKeyEvent
& evt
) {
516 int key
= evt
.GetKeyCode();
517 bool shift
= evt
.ShiftDown(),
518 ctrl
= evt
.ControlDown(),
520 meta
= evt
.MetaDown();
522 int processed
= m_swx
->DoKeyDown(key
, shift
, ctrl
, alt
, meta
, &m_lastKeyDownConsumed
);
524 // printf("KeyDn key:%%d shift:%%d ctrl:%%d alt:%%d processed:%%d consumed:%%d\n",
525 // key, shift, ctrl, alt, processed, m_lastKeyDownConsumed);
527 if (!processed
&& !m_lastKeyDownConsumed
)
532 void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent
& evt
) {
533 m_swx
->DoLoseFocus();
538 void wxStyledTextCtrl::OnGainFocus(wxFocusEvent
& evt
) {
539 m_swx
->DoGainFocus();
544 void wxStyledTextCtrl::OnSysColourChanged(wxSysColourChangedEvent
& WXUNUSED(evt
)) {
545 m_swx
->DoSysColourChange();
549 void wxStyledTextCtrl::OnEraseBackground(wxEraseEvent
& WXUNUSED(evt
)) {
550 // do nothing to help avoid flashing
555 void wxStyledTextCtrl::OnMenu(wxCommandEvent
& evt
) {
556 m_swx
->DoCommand(evt
.GetId());
560 void wxStyledTextCtrl::OnListBox(wxCommandEvent
& WXUNUSED(evt
)) {
561 m_swx
->DoOnListBox();
565 void wxStyledTextCtrl::OnIdle(wxIdleEvent
& evt
) {
566 m_swx
->DoOnIdle(evt
);
570 //----------------------------------------------------------------------
571 // Turn notifications from Scintilla into events
574 void wxStyledTextCtrl::NotifyChange() {
575 wxStyledTextEvent
evt(wxEVT_STC_CHANGE
, GetId());
576 evt
.SetEventObject(this);
577 GetEventHandler()->ProcessEvent(evt
);
581 static void SetEventText(wxStyledTextEvent
& evt
, const char* text
,
585 // The unicode conversion MUST have a null byte to terminate the
586 // string so move it into a buffer first and give it one.
587 wxMemoryBuffer
buf(length
+1);
588 buf
.AppendData((void*)text
, length
);
590 evt
.SetText(stc2wx(buf
));
594 void wxStyledTextCtrl::NotifyParent(SCNotification
* _scn
) {
595 SCNotification
& scn
= *_scn
;
596 wxStyledTextEvent
evt(0, GetId());
598 evt
.SetEventObject(this);
599 evt
.SetPosition(scn
.position
);
601 evt
.SetModifiers(scn
.modifiers
);
603 switch (scn
.nmhdr
.code
) {
604 case SCN_STYLENEEDED
:
605 evt
.SetEventType(wxEVT_STC_STYLENEEDED
);
609 evt
.SetEventType(wxEVT_STC_CHARADDED
);
612 case SCN_SAVEPOINTREACHED
:
613 evt
.SetEventType(wxEVT_STC_SAVEPOINTREACHED
);
616 case SCN_SAVEPOINTLEFT
:
617 evt
.SetEventType(wxEVT_STC_SAVEPOINTLEFT
);
620 case SCN_MODIFYATTEMPTRO
:
621 evt
.SetEventType(wxEVT_STC_ROMODIFYATTEMPT
);
625 evt
.SetEventType(wxEVT_STC_KEY
);
628 case SCN_DOUBLECLICK
:
629 evt
.SetEventType(wxEVT_STC_DOUBLECLICK
);
633 evt
.SetEventType(wxEVT_STC_UPDATEUI
);
637 evt
.SetEventType(wxEVT_STC_MODIFIED
);
638 evt
.SetModificationType(scn
.modificationType
);
639 SetEventText(evt
, scn
.text
, scn
.length
);
640 evt
.SetLength(scn
.length
);
641 evt
.SetLinesAdded(scn
.linesAdded
);
642 evt
.SetLine(scn
.line
);
643 evt
.SetFoldLevelNow(scn
.foldLevelNow
);
644 evt
.SetFoldLevelPrev(scn
.foldLevelPrev
);
647 case SCN_MACRORECORD
:
648 evt
.SetEventType(wxEVT_STC_MACRORECORD
);
649 evt
.SetMessage(scn
.message
);
650 evt
.SetWParam(scn
.wParam
);
651 evt
.SetLParam(scn
.lParam
);
654 case SCN_MARGINCLICK
:
655 evt
.SetEventType(wxEVT_STC_MARGINCLICK
);
656 evt
.SetMargin(scn
.margin
);
660 evt
.SetEventType(wxEVT_STC_NEEDSHOWN
);
661 evt
.SetLength(scn
.length
);
665 evt
.SetEventType(wxEVT_STC_PAINTED
);
668 case SCN_USERLISTSELECTION
:
669 evt
.SetEventType(wxEVT_STC_USERLISTSELECTION
);
670 evt
.SetListType(scn
.listType
);
671 SetEventText(evt
, scn
.text
, strlen(scn
.text
));
675 evt
.SetEventType(wxEVT_STC_URIDROPPED
);
676 SetEventText(evt
, scn
.text
, strlen(scn
.text
));
680 evt
.SetEventType(wxEVT_STC_DWELLSTART
);
686 evt
.SetEventType(wxEVT_STC_DWELLEND
);
692 evt
.SetEventType(wxEVT_STC_ZOOM
);
695 case SCN_HOTSPOTCLICK
:
696 evt
.SetEventType(wxEVT_STC_HOTSPOT_CLICK
);
699 case SCN_HOTSPOTDOUBLECLICK
:
700 evt
.SetEventType(wxEVT_STC_HOTSPOT_DCLICK
);
703 case SCN_CALLTIPCLICK
:
704 evt
.SetEventType(wxEVT_STC_CALLTIP_CLICK
);
711 GetEventHandler()->ProcessEvent(evt
);
715 //----------------------------------------------------------------------
716 //----------------------------------------------------------------------
717 //----------------------------------------------------------------------
719 wxStyledTextEvent::wxStyledTextEvent(wxEventType commandType
, int id
)
720 : wxCommandEvent(commandType
, id
)
725 m_modificationType
= 0;
738 m_dragAllowMove
= FALSE
;
739 #if wxUSE_DRAG_AND_DROP
740 m_dragResult
= wxDragNone
;
744 bool wxStyledTextEvent::GetShift() const { return (m_modifiers
& SCI_SHIFT
) != 0; }
745 bool wxStyledTextEvent::GetControl() const { return (m_modifiers
& SCI_CTRL
) != 0; }
746 bool wxStyledTextEvent::GetAlt() const { return (m_modifiers
& SCI_ALT
) != 0; }
749 wxStyledTextEvent::wxStyledTextEvent(const wxStyledTextEvent
& event
):
750 wxCommandEvent(event
)
752 m_position
= event
.m_position
;
754 m_modifiers
= event
.m_modifiers
;
755 m_modificationType
= event
.m_modificationType
;
756 m_text
= event
.m_text
;
757 m_length
= event
.m_length
;
758 m_linesAdded
= event
.m_linesAdded
;
759 m_line
= event
.m_line
;
760 m_foldLevelNow
= event
.m_foldLevelNow
;
761 m_foldLevelPrev
= event
.m_foldLevelPrev
;
763 m_margin
= event
.m_margin
;
765 m_message
= event
.m_message
;
766 m_wParam
= event
.m_wParam
;
767 m_lParam
= event
.m_lParam
;
769 m_listType
= event
.m_listType
;
773 m_dragText
= event
.m_dragText
;
774 m_dragAllowMove
=event
.m_dragAllowMove
;
775 #if wxUSE_DRAG_AND_DROP
776 m_dragResult
= event
.m_dragResult
;
780 //----------------------------------------------------------------------
781 //----------------------------------------------------------------------