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