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
) :
140 wxControl(parent
, id
, pos
, size
,
141 style
| wxVSCROLL
| wxHSCROLL
| wxWANTS_CHARS
| wxCLIP_CHILDREN
,
142 wxDefaultValidator
, name
)
145 Scintilla_LinkLexers();
147 m_swx
= new ScintillaWX(this);
149 m_lastKeyDownConsumed
= FALSE
;
153 // Put Scintilla into unicode (UTF-8) mode
154 SetCodePage(wxSTC_CP_UTF8
);
159 wxStyledTextCtrl::~wxStyledTextCtrl() {
164 //----------------------------------------------------------------------
166 long wxStyledTextCtrl::SendMsg(int msg
, long wp
, long lp
) {
168 return m_swx
->WndProc(msg
, wp
, lp
);
173 //----------------------------------------------------------------------
174 // BEGIN generated section. The following code is automatically generated
175 // by gen_iface.py from the contents of Scintilla.iface. Do not edit
176 // this file. Edit stc.cpp.in or gen_iface.py instead and regenerate.
180 // END of generated section
181 //----------------------------------------------------------------------
184 // Returns the line number of the line with the caret.
185 int wxStyledTextCtrl::GetCurrentLine() {
186 int line
= LineFromPosition(GetCurrentPos());
191 // Extract style settings from a spec-string which is composed of one or
192 // more of the following comma separated elements:
194 // bold turns on bold
195 // italic turns on italics
196 // fore:#RRGGBB sets the foreground colour
197 // back:#RRGGBB sets the background colour
198 // face:[facename] sets the font face name to use
199 // size:[num] sets the font size in points
200 // eol turns on eol filling
201 // underline turns on underlining
203 void wxStyledTextCtrl::StyleSetSpec(int styleNum
, const wxString
& spec
) {
205 wxStringTokenizer
tkz(spec
, wxT(","));
206 while (tkz
.HasMoreTokens()) {
207 wxString token
= tkz
.GetNextToken();
209 wxString option
= token
.BeforeFirst(':');
210 wxString val
= token
.AfterFirst(':');
212 if (option
== wxT("bold"))
213 StyleSetBold(styleNum
, true);
215 else if (option
== wxT("italic"))
216 StyleSetItalic(styleNum
, true);
218 else if (option
== wxT("underline"))
219 StyleSetUnderline(styleNum
, true);
221 else if (option
== wxT("eol"))
222 StyleSetEOLFilled(styleNum
, true);
224 else if (option
== wxT("size")) {
226 if (val
.ToLong(&points
))
227 StyleSetSize(styleNum
, points
);
230 else if (option
== wxT("face"))
231 StyleSetFaceName(styleNum
, val
);
233 else if (option
== wxT("fore"))
234 StyleSetForeground(styleNum
, wxColourFromSpec(val
));
236 else if (option
== wxT("back"))
237 StyleSetBackground(styleNum
, wxColourFromSpec(val
));
242 // Set style size, face, bold, italic, and underline attributes from
243 // a wxFont's attributes.
244 void wxStyledTextCtrl::StyleSetFont(int styleNum
, wxFont
& font
) {
246 // Ensure that the native font is initialized
248 GetTextExtent(wxT("X"), &x
, &y
, NULL
, NULL
, &font
);
250 int size
= font
.GetPointSize();
251 wxString faceName
= font
.GetFaceName();
252 bool bold
= font
.GetWeight() == wxBOLD
;
253 bool italic
= font
.GetStyle() != wxNORMAL
;
254 bool under
= font
.GetUnderlined();
256 // TODO: add encoding/charset mapping
257 StyleSetFontAttr(styleNum
, size
, faceName
, bold
, italic
, under
);
260 // Set all font style attributes at once.
261 void wxStyledTextCtrl::StyleSetFontAttr(int styleNum
, int size
,
262 const wxString
& faceName
,
263 bool bold
, bool italic
,
265 StyleSetSize(styleNum
, size
);
266 StyleSetFaceName(styleNum
, faceName
);
267 StyleSetBold(styleNum
, bold
);
268 StyleSetItalic(styleNum
, italic
);
269 StyleSetUnderline(styleNum
, underline
);
271 // TODO: add encoding/charset mapping
275 // Perform one of the operations defined by the wxSTC_CMD_* constants.
276 void wxStyledTextCtrl::CmdKeyExecute(int cmd
) {
281 // Set the left and right margin in the edit area, measured in pixels.
282 void wxStyledTextCtrl::SetMargins(int left
, int right
) {
284 SetMarginRight(right
);
288 // Retrieve the start and end positions of the current selection.
289 void wxStyledTextCtrl::GetSelection(int* startPos
, int* endPos
) {
290 if (startPos
!= NULL
)
291 *startPos
= SendMsg(SCI_GETSELECTIONSTART
);
293 *endPos
= SendMsg(SCI_GETSELECTIONEND
);
297 // Retrieve the point in the window where a position is displayed.
298 wxPoint
wxStyledTextCtrl::PointFromPosition(int pos
) {
299 int x
= SendMsg(SCI_POINTXFROMPOSITION
, 0, pos
);
300 int y
= SendMsg(SCI_POINTYFROMPOSITION
, 0, pos
);
301 return wxPoint(x
, y
);
304 // Scroll enough to make the given line visible
305 void wxStyledTextCtrl::ScrollToLine(int line
) {
306 m_swx
->DoScrollToLine(line
);
310 // Scroll enough to make the given column visible
311 void wxStyledTextCtrl::ScrollToColumn(int column
) {
312 m_swx
->DoScrollToColumn(column
);
316 bool wxStyledTextCtrl::SaveFile(const wxString
& filename
)
318 wxFile
file(filename
, wxFile::write
);
320 if (!file
.IsOpened())
323 bool success
= file
.Write(GetText(), *wxConvCurrent
);
331 bool wxStyledTextCtrl::LoadFile(const wxString
& filename
)
333 bool success
= false;
334 wxFile
file(filename
, wxFile::read
);
340 wxMemoryBuffer buffer
;
344 off_t len
= file
.Length();
347 void *bufptr
= buffer
.GetWriteBuf(len
);
348 success
= (file
.Read(bufptr
, len
) == len
);
349 buffer
.UngetWriteBuf(len
);
351 contents
= wxString(buffer
, *wxConvCurrent
);
357 success
= true; // empty file is ok
371 wxDragResult
wxStyledTextCtrl::DoDragOver(wxCoord x
, wxCoord y
, wxDragResult def
) {
372 return m_swx
->DoDragOver(x
, y
, def
);
376 bool wxStyledTextCtrl::DoDropText(long x
, long y
, const wxString
& data
) {
377 return m_swx
->DoDropText(x
, y
, data
);
381 //----------------------------------------------------------------------
384 void wxStyledTextCtrl::OnPaint(wxPaintEvent
& WXUNUSED(evt
)) {
386 m_swx
->DoPaint(&dc
, GetUpdateRegion().GetBox());
389 void wxStyledTextCtrl::OnScrollWin(wxScrollWinEvent
& evt
) {
390 if (evt
.GetOrientation() == wxHORIZONTAL
)
391 m_swx
->DoHScroll(evt
.GetEventType(), evt
.GetPosition());
393 m_swx
->DoVScroll(evt
.GetEventType(), evt
.GetPosition());
396 void wxStyledTextCtrl::OnScroll(wxScrollEvent
& evt
) {
397 wxScrollBar
* sb
= wxDynamicCast(evt
.GetEventObject(), wxScrollBar
);
399 if (sb
->IsVertical())
400 m_swx
->DoVScroll(evt
.GetEventType(), evt
.GetPosition());
402 m_swx
->DoHScroll(evt
.GetEventType(), evt
.GetPosition());
406 void wxStyledTextCtrl::OnSize(wxSizeEvent
& WXUNUSED(evt
)) {
407 wxSize sz
= GetClientSize();
408 m_swx
->DoSize(sz
.x
, sz
.y
);
411 void wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent
& evt
) {
413 wxPoint pt
= evt
.GetPosition();
414 m_swx
->DoLeftButtonDown(Point(pt
.x
, pt
.y
), m_stopWatch
.Time(),
415 evt
.ShiftDown(), evt
.ControlDown(), evt
.AltDown());
418 void wxStyledTextCtrl::OnMouseMove(wxMouseEvent
& evt
) {
419 wxPoint pt
= evt
.GetPosition();
420 m_swx
->DoLeftButtonMove(Point(pt
.x
, pt
.y
));
423 void wxStyledTextCtrl::OnMouseLeftUp(wxMouseEvent
& evt
) {
424 wxPoint pt
= evt
.GetPosition();
425 m_swx
->DoLeftButtonUp(Point(pt
.x
, pt
.y
), m_stopWatch
.Time(),
430 void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent
& evt
) {
431 wxPoint pt
= evt
.GetPosition();
432 m_swx
->DoContextMenu(Point(pt
.x
, pt
.y
));
436 void wxStyledTextCtrl::OnMouseMiddleUp(wxMouseEvent
& evt
) {
437 wxPoint pt
= evt
.GetPosition();
438 m_swx
->DoMiddleButtonUp(Point(pt
.x
, pt
.y
));
441 void wxStyledTextCtrl::OnContextMenu(wxContextMenuEvent
& evt
) {
442 wxPoint pt
= evt
.GetPosition();
443 ScreenToClient(&pt
.x
, &pt
.y
);
444 m_swx
->DoContextMenu(Point(pt
.x
, pt
.y
));
448 void wxStyledTextCtrl::OnMouseWheel(wxMouseEvent
& evt
) {
449 m_swx
->DoMouseWheel(evt
.GetWheelRotation(),
451 evt
.GetLinesPerAction(),
457 void wxStyledTextCtrl::OnChar(wxKeyEvent
& evt
) {
458 // On (some?) non-US keyboards the AltGr key is required to enter some
459 // common characters. It comes to us as both Alt and Ctrl down so we need
460 // to let the char through in that case, otherwise if only ctrl or only
461 // alt let's skip it.
462 bool ctrl
= evt
.ControlDown();
463 bool alt
= evt
.AltDown();
464 bool skip
= ((ctrl
|| alt
) && ! (ctrl
&& alt
));
466 int key
= evt
.GetKeyCode();
468 // printf("OnChar key:%%d consumed:%%d ctrl:%%d alt:%%d skip:%%d\n",
469 // key, m_lastKeyDownConsumed, ctrl, alt, skip);
471 if ( (key
<= WXK_START
|| key
> WXK_NUMPAD_DIVIDE
) &&
472 !m_lastKeyDownConsumed
&& !skip
) {
473 m_swx
->DoAddChar(key
);
480 void wxStyledTextCtrl::OnKeyDown(wxKeyEvent
& evt
) {
481 int key
= evt
.GetKeyCode();
482 bool shift
= evt
.ShiftDown(),
483 ctrl
= evt
.ControlDown(),
485 meta
= evt
.MetaDown();
487 int processed
= m_swx
->DoKeyDown(key
, shift
, ctrl
, alt
, meta
, &m_lastKeyDownConsumed
);
489 // printf("KeyDn key:%%d shift:%%d ctrl:%%d alt:%%d processed:%%d consumed:%%d\n",
490 // key, shift, ctrl, alt, processed, m_lastKeyDownConsumed);
492 if (!processed
&& !m_lastKeyDownConsumed
)
497 void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent
& WXUNUSED(evt
)) {
498 m_swx
->DoLoseFocus();
502 void wxStyledTextCtrl::OnGainFocus(wxFocusEvent
& WXUNUSED(evt
)) {
503 m_swx
->DoGainFocus();
507 void wxStyledTextCtrl::OnSysColourChanged(wxSysColourChangedEvent
& WXUNUSED(evt
)) {
508 m_swx
->DoSysColourChange();
512 void wxStyledTextCtrl::OnEraseBackground(wxEraseEvent
& WXUNUSED(evt
)) {
513 // do nothing to help avoid flashing
518 void wxStyledTextCtrl::OnMenu(wxCommandEvent
& evt
) {
519 m_swx
->DoCommand(evt
.GetId());
523 void wxStyledTextCtrl::OnListBox(wxCommandEvent
& WXUNUSED(evt
)) {
524 m_swx
->DoOnListBox();
528 //----------------------------------------------------------------------
529 // Turn notifications from Scintilla into events
532 void wxStyledTextCtrl::NotifyChange() {
533 wxStyledTextEvent
evt(wxEVT_STC_CHANGE
, GetId());
534 evt
.SetEventObject(this);
535 GetEventHandler()->ProcessEvent(evt
);
539 static void SetEventText(wxStyledTextEvent
& evt
, const char* text
,
543 // The unicode conversion MUST have a null byte to terminate the
544 // string so move it into a buffer first and give it one.
545 wxMemoryBuffer
buf(length
+1);
546 buf
.AppendData((void*)text
, length
);
548 evt
.SetText(stc2wx(buf
));
552 void wxStyledTextCtrl::NotifyParent(SCNotification
* _scn
) {
553 SCNotification
& scn
= *_scn
;
554 wxStyledTextEvent
evt(0, GetId());
556 evt
.SetEventObject(this);
557 evt
.SetPosition(scn
.position
);
559 evt
.SetModifiers(scn
.modifiers
);
561 switch (scn
.nmhdr
.code
) {
562 case SCN_STYLENEEDED
:
563 evt
.SetEventType(wxEVT_STC_STYLENEEDED
);
567 evt
.SetEventType(wxEVT_STC_CHARADDED
);
570 case SCN_SAVEPOINTREACHED
:
571 evt
.SetEventType(wxEVT_STC_SAVEPOINTREACHED
);
574 case SCN_SAVEPOINTLEFT
:
575 evt
.SetEventType(wxEVT_STC_SAVEPOINTLEFT
);
578 case SCN_MODIFYATTEMPTRO
:
579 evt
.SetEventType(wxEVT_STC_ROMODIFYATTEMPT
);
583 evt
.SetEventType(wxEVT_STC_KEY
);
586 case SCN_DOUBLECLICK
:
587 evt
.SetEventType(wxEVT_STC_DOUBLECLICK
);
591 evt
.SetEventType(wxEVT_STC_UPDATEUI
);
595 evt
.SetEventType(wxEVT_STC_MODIFIED
);
596 evt
.SetModificationType(scn
.modificationType
);
597 SetEventText(evt
, scn
.text
, scn
.length
);
598 evt
.SetLength(scn
.length
);
599 evt
.SetLinesAdded(scn
.linesAdded
);
600 evt
.SetLine(scn
.line
);
601 evt
.SetFoldLevelNow(scn
.foldLevelNow
);
602 evt
.SetFoldLevelPrev(scn
.foldLevelPrev
);
605 case SCN_MACRORECORD
:
606 evt
.SetEventType(wxEVT_STC_MACRORECORD
);
607 evt
.SetMessage(scn
.message
);
608 evt
.SetWParam(scn
.wParam
);
609 evt
.SetLParam(scn
.lParam
);
612 case SCN_MARGINCLICK
:
613 evt
.SetEventType(wxEVT_STC_MARGINCLICK
);
614 evt
.SetMargin(scn
.margin
);
618 evt
.SetEventType(wxEVT_STC_NEEDSHOWN
);
619 evt
.SetLength(scn
.length
);
623 evt
.SetEventType(wxEVT_STC_PAINTED
);
626 case SCN_USERLISTSELECTION
:
627 evt
.SetEventType(wxEVT_STC_USERLISTSELECTION
);
628 evt
.SetListType(scn
.listType
);
629 SetEventText(evt
, scn
.text
, strlen(scn
.text
));
633 evt
.SetEventType(wxEVT_STC_URIDROPPED
);
634 SetEventText(evt
, scn
.text
, strlen(scn
.text
));
638 evt
.SetEventType(wxEVT_STC_DWELLSTART
);
644 evt
.SetEventType(wxEVT_STC_DWELLEND
);
650 evt
.SetEventType(wxEVT_STC_ZOOM
);
653 case SCN_HOTSPOTCLICK
:
654 evt
.SetEventType(wxEVT_STC_HOTSPOT_CLICK
);
657 case SCN_HOTSPOTDOUBLECLICK
:
658 evt
.SetEventType(wxEVT_STC_HOTSPOT_DCLICK
);
661 case SCN_CALLTIPCLICK
:
662 evt
.SetEventType(wxEVT_STC_CALLTIP_CLICK
);
669 GetEventHandler()->ProcessEvent(evt
);
673 //----------------------------------------------------------------------
674 //----------------------------------------------------------------------
675 //----------------------------------------------------------------------
677 wxStyledTextEvent::wxStyledTextEvent(wxEventType commandType
, int id
)
678 : wxCommandEvent(commandType
, id
)
683 m_modificationType
= 0;
696 m_dragAllowMove
= FALSE
;
697 #if wxUSE_DRAG_AND_DROP
698 m_dragResult
= wxDragNone
;
702 bool wxStyledTextEvent::GetShift() const { return (m_modifiers
& SCI_SHIFT
) != 0; }
703 bool wxStyledTextEvent::GetControl() const { return (m_modifiers
& SCI_CTRL
) != 0; }
704 bool wxStyledTextEvent::GetAlt() const { return (m_modifiers
& SCI_ALT
) != 0; }
707 wxStyledTextEvent::wxStyledTextEvent(const wxStyledTextEvent
& event
):
708 wxCommandEvent(event
)
710 m_position
= event
.m_position
;
712 m_modifiers
= event
.m_modifiers
;
713 m_modificationType
= event
.m_modificationType
;
714 m_text
= event
.m_text
;
715 m_length
= event
.m_length
;
716 m_linesAdded
= event
.m_linesAdded
;
717 m_line
= event
.m_line
;
718 m_foldLevelNow
= event
.m_foldLevelNow
;
719 m_foldLevelPrev
= event
.m_foldLevelPrev
;
721 m_margin
= event
.m_margin
;
723 m_message
= event
.m_message
;
724 m_wParam
= event
.m_wParam
;
725 m_lParam
= event
.m_lParam
;
727 m_listType
= event
.m_listType
;
731 m_dragText
= event
.m_dragText
;
732 m_dragAllowMove
=event
.m_dragAllowMove
;
733 #if wxUSE_DRAG_AND_DROP
734 m_dragResult
= event
.m_dragResult
;
738 //----------------------------------------------------------------------
739 //----------------------------------------------------------------------