]> git.saurik.com Git - wxWidgets.git/blob - src/stc/stc.cpp.in
added default return and escape/command-period handling for dialogs
[wxWidgets.git] / src / stc / stc.cpp.in
1 ////////////////////////////////////////////////////////////////////////////
2 // Name: stc.cpp
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.
9 //
10 // Author: Robin Dunn
11 //
12 // Created: 13-Jan-2000
13 // RCS-ID: $Id$
14 // Copyright: (c) 2000 by Total Control Software
15 // Licence: wxWindows license
16 /////////////////////////////////////////////////////////////////////////////
17
18 #include <ctype.h>
19
20 #include "wx/stc/stc.h"
21 #include "ScintillaWX.h"
22
23 #include <wx/tokenzr.h>
24
25 // The following code forces a reference to all of the Scintilla lexers.
26 // If we don't do something like this, then the linker tends to "optimize"
27 // them away. (eric@sourcegear.com)
28
29 int wxForceScintillaLexers(void)
30 {
31 extern LexerModule lmAda;
32 extern LexerModule lmAVE;
33 extern LexerModule lmConf;
34 extern LexerModule lmCPP;
35 extern LexerModule lmNncrontab;
36 extern LexerModule lmEiffel;
37 extern LexerModule lmHTML;
38 extern LexerModule lmLISP;
39 extern LexerModule lmLua;
40 extern LexerModule lmBatch; // In LexOthers.cxx
41 extern LexerModule lmPascal;
42 extern LexerModule lmPerl;
43 extern LexerModule lmPython;
44 extern LexerModule lmRuby;
45 extern LexerModule lmSQL;
46 extern LexerModule lmVB;
47
48 if ( &lmAda
49 && &lmAVE
50 && &lmConf
51 && &lmCPP
52 && &lmNncrontab
53 && &lmEiffel
54 && &lmHTML
55 && &lmLISP
56 && &lmLua
57 && &lmBatch
58 && &lmPascal
59 && &lmPerl
60 && &lmPython
61 && &lmRuby
62 && &lmSQL
63 && &lmVB )
64 {
65 return 1;
66 }
67 else
68 {
69 return 0;
70 }
71 }
72
73 //----------------------------------------------------------------------
74
75 const wxChar* wxSTCNameStr = "stcwindow";
76
77 DEFINE_EVENT_TYPE( wxEVT_STC_CHANGE )
78 DEFINE_EVENT_TYPE( wxEVT_STC_STYLENEEDED )
79 DEFINE_EVENT_TYPE( wxEVT_STC_CHARADDED )
80 DEFINE_EVENT_TYPE( wxEVT_STC_SAVEPOINTREACHED )
81 DEFINE_EVENT_TYPE( wxEVT_STC_SAVEPOINTLEFT )
82 DEFINE_EVENT_TYPE( wxEVT_STC_ROMODIFYATTEMPT )
83 DEFINE_EVENT_TYPE( wxEVT_STC_KEY )
84 DEFINE_EVENT_TYPE( wxEVT_STC_DOUBLECLICK )
85 DEFINE_EVENT_TYPE( wxEVT_STC_UPDATEUI )
86 DEFINE_EVENT_TYPE( wxEVT_STC_MODIFIED )
87 DEFINE_EVENT_TYPE( wxEVT_STC_MACRORECORD )
88 DEFINE_EVENT_TYPE( wxEVT_STC_MARGINCLICK )
89 DEFINE_EVENT_TYPE( wxEVT_STC_NEEDSHOWN )
90 DEFINE_EVENT_TYPE( wxEVT_STC_POSCHANGED )
91 DEFINE_EVENT_TYPE( wxEVT_STC_PAINTED )
92 DEFINE_EVENT_TYPE( wxEVT_STC_USERLISTSELECTION )
93 DEFINE_EVENT_TYPE( wxEVT_STC_URIDROPPED )
94 DEFINE_EVENT_TYPE( wxEVT_STC_DWELLSTART )
95 DEFINE_EVENT_TYPE( wxEVT_STC_DWELLEND )
96 #if wxUSE_DRAG_AND_DROP
97 DEFINE_EVENT_TYPE( wxEVT_STC_START_DRAG )
98 DEFINE_EVENT_TYPE( wxEVT_STC_DRAG_OVER )
99 DEFINE_EVENT_TYPE( wxEVT_STC_DO_DROP )
100 #endif
101
102
103 BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
104 EVT_PAINT (wxStyledTextCtrl::OnPaint)
105 EVT_SCROLLWIN (wxStyledTextCtrl::OnScrollWin)
106 EVT_SCROLL (wxStyledTextCtrl::OnScroll)
107 EVT_SIZE (wxStyledTextCtrl::OnSize)
108 EVT_LEFT_DOWN (wxStyledTextCtrl::OnMouseLeftDown)
109 #ifdef __WXMSW__
110 // Let Scintilla see the double click as a second click
111 EVT_LEFT_DCLICK (wxStyledTextCtrl::OnMouseLeftDown)
112 #endif
113 EVT_MOTION (wxStyledTextCtrl::OnMouseMove)
114 EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp)
115 #ifdef __WXGTK__
116 EVT_RIGHT_UP (wxStyledTextCtrl::OnMouseRightUp)
117 #else
118 EVT_CONTEXT_MENU (wxStyledTextCtrl::OnContextMenu)
119 #endif
120 EVT_MOUSEWHEEL (wxStyledTextCtrl::OnMouseWheel)
121 EVT_CHAR (wxStyledTextCtrl::OnChar)
122 EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown)
123 EVT_KILL_FOCUS (wxStyledTextCtrl::OnLoseFocus)
124 EVT_SET_FOCUS (wxStyledTextCtrl::OnGainFocus)
125 EVT_SYS_COLOUR_CHANGED (wxStyledTextCtrl::OnSysColourChanged)
126 EVT_ERASE_BACKGROUND (wxStyledTextCtrl::OnEraseBackground)
127 EVT_MENU_RANGE (-1, -1, wxStyledTextCtrl::OnMenu)
128 EVT_LISTBOX_DCLICK (-1, wxStyledTextCtrl::OnListBox)
129 END_EVENT_TABLE()
130
131
132 IMPLEMENT_CLASS(wxStyledTextCtrl, wxControl)
133 IMPLEMENT_DYNAMIC_CLASS(wxStyledTextEvent, wxCommandEvent)
134
135 //----------------------------------------------------------------------
136 // Constructor and Destructor
137
138 wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent,
139 wxWindowID id,
140 const wxPoint& pos,
141 const wxSize& size,
142 long style,
143 const wxString& name) :
144 wxControl(parent, id, pos, size,
145 style | wxVSCROLL | wxHSCROLL | wxWANTS_CHARS | wxCLIP_CHILDREN,
146 wxDefaultValidator, name)
147 {
148 m_swx = new ScintillaWX(this);
149 m_stopWatch.Start();
150 m_lastKeyDownConsumed = FALSE;
151 m_vScrollBar = NULL;
152 m_hScrollBar = NULL;
153 }
154
155
156 wxStyledTextCtrl::~wxStyledTextCtrl() {
157 delete m_swx;
158 }
159
160
161 //----------------------------------------------------------------------
162
163 long wxStyledTextCtrl::SendMsg(int msg, long wp, long lp) {
164
165 return m_swx->WndProc(msg, wp, lp);
166 }
167
168
169 #ifdef MAKELONG
170 #undef MAKELONG
171 #endif
172
173 #define MAKELONG(a, b) ((a) | ((b) << 16))
174
175
176 static long wxColourAsLong(const wxColour& co) {
177 return (((long)co.Blue() << 16) |
178 ((long)co.Green() << 8) |
179 ((long)co.Red()));
180 }
181
182 static wxColour wxColourFromLong(long c) {
183 wxColour clr;
184 clr.Set(c & 0xff, (c >> 8) & 0xff, (c >> 16) & 0xff);
185 return clr;
186 }
187
188
189 static wxColour wxColourFromSpec(const wxString& spec) {
190 // spec should be #RRGGBB
191 char* junk;
192 int red = strtol(spec.Mid(1,2), &junk, 16);
193 int green = strtol(spec.Mid(3,2), &junk, 16);
194 int blue = strtol(spec.Mid(5,2), &junk, 16);
195 return wxColour(red, green, blue);
196 }
197
198
199 //----------------------------------------------------------------------
200 // BEGIN generated section. The following code is automatically generated
201 // by gen_iface.py from the contents of Scintilla.iface. Do not edit
202 // this file. Edit stc.cpp.in or gen_iface.py instead and regenerate.
203
204 %(METHOD_IMPS)s
205
206 // END of generated section
207 //----------------------------------------------------------------------
208
209
210 // Returns the line number of the line with the caret.
211 int wxStyledTextCtrl::GetCurrentLine() {
212 int line = LineFromPosition(GetCurrentPos());
213 return line;
214 }
215
216
217 // Extract style settings from a spec-string which is composed of one or
218 // more of the following comma separated elements:
219 //
220 // bold turns on bold
221 // italic turns on italics
222 // fore:#RRGGBB sets the foreground colour
223 // back:#RRGGBB sets the background colour
224 // face:[facename] sets the font face name to use
225 // size:[num] sets the font size in points
226 // eol turns on eol filling
227 // underline turns on underlining
228 //
229 void wxStyledTextCtrl::StyleSetSpec(int styleNum, const wxString& spec) {
230
231 wxStringTokenizer tkz(spec, ",");
232 while (tkz.HasMoreTokens()) {
233 wxString token = tkz.GetNextToken();
234
235 wxString option = token.BeforeFirst(':');
236 wxString val = token.AfterFirst(':');
237
238 if (option == "bold")
239 StyleSetBold(styleNum, true);
240
241 else if (option == "italic")
242 StyleSetItalic(styleNum, true);
243
244 else if (option == "underline")
245 StyleSetUnderline(styleNum, true);
246
247 else if (option == "eol")
248 StyleSetEOLFilled(styleNum, true);
249
250 else if (option == "size") {
251 long points;
252 if (val.ToLong(&points))
253 StyleSetSize(styleNum, points);
254 }
255
256 else if (option == "face")
257 StyleSetFaceName(styleNum, val);
258
259 else if (option == "fore")
260 StyleSetForeground(styleNum, wxColourFromSpec(val));
261
262 else if (option == "back")
263 StyleSetBackground(styleNum, wxColourFromSpec(val));
264 }
265 }
266
267
268 // Set style size, face, bold, italic, and underline attributes from
269 // a wxFont's attributes.
270 void wxStyledTextCtrl::StyleSetFont(int styleNum, wxFont& font) {
271 int size = font.GetPointSize();
272 wxString faceName = font.GetFaceName();
273 bool bold = font.GetWeight() == wxBOLD;
274 bool italic = font.GetStyle() != wxNORMAL;
275 bool under = font.GetUnderlined();
276
277 // TODO: add encoding/charset mapping
278 StyleSetFontAttr(styleNum, size, faceName, bold, italic, under);
279 }
280
281 // Set all font style attributes at once.
282 void wxStyledTextCtrl::StyleSetFontAttr(int styleNum, int size,
283 const wxString& faceName,
284 bool bold, bool italic,
285 bool underline) {
286 StyleSetSize(styleNum, size);
287 StyleSetFaceName(styleNum, faceName);
288 StyleSetBold(styleNum, bold);
289 StyleSetItalic(styleNum, italic);
290 StyleSetUnderline(styleNum, underline);
291
292 // TODO: add encoding/charset mapping
293 }
294
295
296 // Perform one of the operations defined by the wxSTC_CMD_* constants.
297 void wxStyledTextCtrl::CmdKeyExecute(int cmd) {
298 SendMsg(cmd);
299 }
300
301
302 // Set the left and right margin in the edit area, measured in pixels.
303 void wxStyledTextCtrl::SetMargins(int left, int right) {
304 SetMarginLeft(left);
305 SetMarginRight(right);
306 }
307
308
309 // Retrieve the start and end positions of the current selection.
310 void wxStyledTextCtrl::GetSelection(int* startPos, int* endPos) {
311 if (startPos != NULL)
312 *startPos = SendMsg(SCI_GETSELECTIONSTART);
313 if (endPos != NULL)
314 *endPos = SendMsg(SCI_GETSELECTIONEND);
315 }
316
317
318 // Retrieve the point in the window where a position is displayed.
319 wxPoint wxStyledTextCtrl::PointFromPosition(int pos) {
320 int x = SendMsg(SCI_POINTXFROMPOSITION, 0, pos);
321 int y = SendMsg(SCI_POINTYFROMPOSITION, 0, pos);
322 return wxPoint(x, y);
323 }
324
325 // Scroll enough to make the given line visible
326 void wxStyledTextCtrl::ScrollToLine(int line) {
327 m_swx->DoScrollToLine(line);
328 }
329
330
331 // Scroll enough to make the given column visible
332 void wxStyledTextCtrl::ScrollToColumn(int column) {
333 m_swx->DoScrollToColumn(column);
334 }
335
336
337
338 //----------------------------------------------------------------------
339 // Event handlers
340
341 void wxStyledTextCtrl::OnPaint(wxPaintEvent& evt) {
342 wxPaintDC dc(this);
343 wxRegion region = GetUpdateRegion();
344
345 m_swx->DoPaint(&dc, region.GetBox());
346 }
347
348 void wxStyledTextCtrl::OnScrollWin(wxScrollWinEvent& evt) {
349 if (evt.GetOrientation() == wxHORIZONTAL)
350 m_swx->DoHScroll(evt.GetEventType(), evt.GetPosition());
351 else
352 m_swx->DoVScroll(evt.GetEventType(), evt.GetPosition());
353 }
354
355 void wxStyledTextCtrl::OnScroll(wxScrollEvent& evt) {
356 wxScrollBar* sb = wxDynamicCast(evt.GetEventObject(), wxScrollBar);
357 if (sb) {
358 if (sb->IsVertical())
359 m_swx->DoVScroll(evt.GetEventType(), evt.GetPosition());
360 else
361 m_swx->DoHScroll(evt.GetEventType(), evt.GetPosition());
362 }
363 }
364
365 void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) {
366 wxSize sz = GetClientSize();
367 m_swx->DoSize(sz.x, sz.y);
368 }
369
370 void wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent& evt) {
371 wxPoint pt = evt.GetPosition();
372 m_swx->DoButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(),
373 evt.ShiftDown(), evt.ControlDown(), evt.AltDown());
374 }
375
376 void wxStyledTextCtrl::OnMouseMove(wxMouseEvent& evt) {
377 wxPoint pt = evt.GetPosition();
378 m_swx->DoButtonMove(Point(pt.x, pt.y));
379 }
380
381 void wxStyledTextCtrl::OnMouseLeftUp(wxMouseEvent& evt) {
382 wxPoint pt = evt.GetPosition();
383 m_swx->DoButtonUp(Point(pt.x, pt.y), m_stopWatch.Time(),
384 evt.ControlDown());
385 }
386
387
388 void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) {
389 wxPoint pt = evt.GetPosition();
390 m_swx->DoContextMenu(Point(pt.x, pt.y));
391 }
392
393
394 void wxStyledTextCtrl::OnContextMenu(wxContextMenuEvent& evt) {
395 wxPoint pt = evt.GetPosition();
396 ScreenToClient(&pt.x, &pt.y);
397 m_swx->DoContextMenu(Point(pt.x, pt.y));
398 }
399
400
401 void wxStyledTextCtrl::OnMouseWheel(wxMouseEvent& evt) {
402 m_swx->DoMouseWheel(evt.GetWheelRotation(),
403 evt.GetWheelDelta(),
404 evt.GetLinesPerAction(),
405 evt.ControlDown());
406 }
407
408
409 void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
410 long key = evt.KeyCode();
411
412 // printf("OnChar key:%%d consumed:%%d ctrl:%%d alt:%%d\n",
413 // key, m_lastKeyDownConsumed, evt.ControlDown(), evt.AltDown());
414
415 // AltGr keys???
416 // \|@#¬[]{}?£$~ ã,õ,Ã,Õ, ñ, Ñ
417
418 // On (some?) non-US keyboards the AltGr key is required to enter some
419 // common characters. It comes to us as both Alt and Ctrl down so we need
420 // to let the char through in that case, otherwise if only ctrl or only
421 // alt let's skip it.
422 bool ctrl = evt.ControlDown();
423 bool alt = evt.AltDown();
424 bool skip = ((ctrl || alt) && ! (ctrl && alt));
425
426 if (key <= 0xff && key >= 32 && !m_lastKeyDownConsumed && !skip) {
427 m_swx->DoAddChar(key);
428 return;
429 }
430 evt.Skip();
431 }
432
433
434 void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) {
435 long key = evt.KeyCode();
436 bool shift = evt.ShiftDown(),
437 ctrl = evt.ControlDown(),
438 alt = evt.AltDown();
439
440 int processed = m_swx->DoKeyDown(key, shift, ctrl, alt, &m_lastKeyDownConsumed);
441
442 // printf("key: %%d shift: %%d ctrl: %%d alt: %%d processed: %%d consumed: %%d\n",
443 // key, shift, ctrl, alt, processed, m_lastKeyDownConsumed);
444
445 if (!processed && !m_lastKeyDownConsumed)
446 evt.Skip();
447 }
448
449
450 void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& evt) {
451 m_swx->DoLoseFocus();
452 }
453
454
455 void wxStyledTextCtrl::OnGainFocus(wxFocusEvent& evt) {
456 m_swx->DoGainFocus();
457 }
458
459
460 void wxStyledTextCtrl::OnSysColourChanged(wxSysColourChangedEvent& evt) {
461 m_swx->DoSysColourChange();
462 }
463
464
465 void wxStyledTextCtrl::OnEraseBackground(wxEraseEvent& evt) {
466 // do nothing to help avoid flashing
467 }
468
469
470
471 void wxStyledTextCtrl::OnMenu(wxCommandEvent& evt) {
472 m_swx->DoCommand(evt.GetId());
473 }
474
475
476 void wxStyledTextCtrl::OnListBox(wxCommandEvent& evt) {
477 m_swx->DoOnListBox();
478 }
479
480
481 //----------------------------------------------------------------------
482 // Turn notifications from Scintilla into events
483
484
485 void wxStyledTextCtrl::NotifyChange() {
486 wxStyledTextEvent evt(wxEVT_STC_CHANGE, GetId());
487 evt.SetEventObject(this);
488 GetEventHandler()->ProcessEvent(evt);
489 }
490
491 void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
492 SCNotification& scn = *_scn;
493 wxStyledTextEvent evt(0, GetId());
494
495 evt.SetEventObject(this);
496 evt.SetPosition(scn.position);
497 evt.SetKey(scn.ch);
498 evt.SetModifiers(scn.modifiers);
499
500 switch (scn.nmhdr.code) {
501 case SCN_STYLENEEDED:
502 evt.SetEventType(wxEVT_STC_STYLENEEDED);
503 break;
504
505 case SCN_CHARADDED:
506 evt.SetEventType(wxEVT_STC_CHARADDED);
507 break;
508
509 case SCN_SAVEPOINTREACHED:
510 evt.SetEventType(wxEVT_STC_SAVEPOINTREACHED);
511 break;
512
513 case SCN_SAVEPOINTLEFT:
514 evt.SetEventType(wxEVT_STC_SAVEPOINTLEFT);
515 break;
516
517 case SCN_MODIFYATTEMPTRO:
518 evt.SetEventType(wxEVT_STC_ROMODIFYATTEMPT);
519 break;
520
521 case SCN_KEY:
522 evt.SetEventType(wxEVT_STC_KEY);
523 break;
524
525 case SCN_DOUBLECLICK:
526 evt.SetEventType(wxEVT_STC_DOUBLECLICK);
527 break;
528
529 case SCN_UPDATEUI:
530 evt.SetEventType(wxEVT_STC_UPDATEUI);
531 break;
532
533 case SCN_MODIFIED:
534 evt.SetEventType(wxEVT_STC_MODIFIED);
535 evt.SetModificationType(scn.modificationType);
536 if (scn.text)
537 evt.SetText(wxString(scn.text, scn.length));
538 evt.SetLength(scn.length);
539 evt.SetLinesAdded(scn.linesAdded);
540 evt.SetLine(scn.line);
541 evt.SetFoldLevelNow(scn.foldLevelNow);
542 evt.SetFoldLevelPrev(scn.foldLevelPrev);
543 break;
544
545 case SCN_MACRORECORD:
546 evt.SetEventType(wxEVT_STC_MACRORECORD);
547 evt.SetMessage(scn.message);
548 evt.SetWParam(scn.wParam);
549 evt.SetLParam(scn.lParam);
550 break;
551
552 case SCN_MARGINCLICK:
553 evt.SetEventType(wxEVT_STC_MARGINCLICK);
554 evt.SetMargin(scn.margin);
555 break;
556
557 case SCN_NEEDSHOWN:
558 evt.SetEventType(wxEVT_STC_NEEDSHOWN);
559 evt.SetLength(scn.length);
560 break;
561
562 case SCN_POSCHANGED:
563 evt.SetEventType(wxEVT_STC_POSCHANGED);
564 break;
565
566 case SCN_PAINTED:
567 evt.SetEventType(wxEVT_STC_PAINTED);
568 break;
569
570 case SCN_USERLISTSELECTION:
571 evt.SetEventType(wxEVT_STC_USERLISTSELECTION);
572 evt.SetListType(scn.listType);
573 evt.SetText(scn.text);
574 break;
575
576 case SCN_URIDROPPED:
577 evt.SetEventType(wxEVT_STC_URIDROPPED);
578 evt.SetText(scn.text);
579 break;
580
581 case SCN_DWELLSTART:
582 evt.SetEventType(wxEVT_STC_DWELLSTART);
583 evt.SetX(scn.x);
584 evt.SetY(scn.y);
585 break;
586
587 case SCN_DWELLEND:
588 evt.SetEventType(wxEVT_STC_DWELLEND);
589 evt.SetX(scn.x);
590 evt.SetY(scn.y);
591 break;
592
593 default:
594 return;
595 }
596
597 GetEventHandler()->ProcessEvent(evt);
598 }
599
600
601 //----------------------------------------------------------------------
602 //----------------------------------------------------------------------
603 //----------------------------------------------------------------------
604
605 wxStyledTextEvent::wxStyledTextEvent(wxEventType commandType, int id)
606 : wxCommandEvent(commandType, id)
607 {
608 m_position = 0;
609 m_key = 0;
610 m_modifiers = 0;
611 m_modificationType = 0;
612 m_length = 0;
613 m_linesAdded = 0;
614 m_line = 0;
615 m_foldLevelNow = 0;
616 m_foldLevelPrev = 0;
617 m_margin = 0;
618 m_message = 0;
619 m_wParam = 0;
620 m_lParam = 0;
621 m_listType = 0;
622 m_x = 0;
623 m_y = 0;
624 #if wxUSE_DRAG_AND_DROP
625 m_dragAllowMove = FALSE;
626 m_dragResult = wxDragNone;
627 #endif
628 }
629
630 bool wxStyledTextEvent::GetShift() const { return (m_modifiers & SCI_SHIFT) != 0; }
631 bool wxStyledTextEvent::GetControl() const { return (m_modifiers & SCI_CTRL) != 0; }
632 bool wxStyledTextEvent::GetAlt() const { return (m_modifiers & SCI_ALT) != 0; }
633
634
635 wxStyledTextEvent::wxStyledTextEvent(const wxStyledTextEvent& event):
636 wxCommandEvent(event)
637 {
638 m_position = event.m_position;
639 m_key = event.m_key;
640 m_modifiers = event.m_modifiers;
641 m_modificationType = event.m_modificationType;
642 m_text = event.m_text;
643 m_length = event.m_length;
644 m_linesAdded = event.m_linesAdded;
645 m_line = event.m_line;
646 m_foldLevelNow = event.m_foldLevelNow;
647 m_foldLevelPrev = event.m_foldLevelPrev;
648
649 m_margin = event.m_margin;
650
651 m_message = event.m_message;
652 m_wParam = event.m_wParam;
653 m_lParam = event.m_lParam;
654
655 m_listType = event.m_listType;
656 m_x = event.m_x;
657 m_y = event.m_y;
658
659 #if wxUSE_DRAG_AND_DROP
660 m_dragText = event.m_dragText;
661 m_dragAllowMove =event.m_dragAllowMove;
662 m_dragResult = event.m_dragResult;
663 #endif
664 }
665
666 //----------------------------------------------------------------------
667 //----------------------------------------------------------------------
668
669
670
671
672
673
674
675
676