]> git.saurik.com Git - wxWidgets.git/commitdiff
rename wxHeaderCtrl DRAG events into RESIZE ones as we're also going to have column...
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 8 Dec 2008 16:38:56 +0000 (16:38 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 8 Dec 2008 16:38:56 +0000 (16:38 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/headerctrl.h
interface/wx/headerctrl.h
src/common/headerctrlcmn.cpp
src/generic/datavgen.cpp
src/generic/headerctrlg.cpp
src/msw/headerctrl.cpp

index 51481efb67020999048219ac7c0f126d51d43869..bfb1ece3ad48679746d140b82718fd5d6763a143 100644 (file)
@@ -323,9 +323,9 @@ extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_HEADER_MIDDLE_DCLICK;
 
 extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_HEADER_SEPARATOR_DCLICK;
 
-extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_HEADER_BEGIN_DRAG;
-extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_HEADER_DRAGGING;
-extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_HEADER_END_DRAG;
+extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_HEADER_BEGIN_RESIZE;
+extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_HEADER_RESIZING;
+extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_HEADER_END_RESIZE;
 
 typedef void (wxEvtHandler::*wxHeaderCtrlEventFunction)(wxHeaderCtrlEvent&);
 
@@ -346,8 +346,8 @@ typedef void (wxEvtHandler::*wxHeaderCtrlEventFunction)(wxHeaderCtrlEvent&);
 
 #define EVT_HEADER_SEPARATOR_DCLICK(id, fn) wx__DECLARE_HEADER_EVT(SEPARATOR_DCLICK, id, fn)
 
-#define EVT_HEADER_BEGIN_DRAG(id, fn) wx__DECLARE_HEADER_EVT(BEGIN_DRAG, id, fn)
-#define EVT_HEADER_DRAGGING(id, fn) wx__DECLARE_HEADER_EVT(DRAGGING, id, fn)
-#define EVT_HEADER_END_DRAG(id, fn) wx__DECLARE_HEADER_EVT(END_DRAG, id, fn)
+#define EVT_HEADER_BEGIN_RESIZE(id, fn) wx__DECLARE_HEADER_EVT(BEGIN_RESIZE, id, fn)
+#define EVT_HEADER_RESIZING(id, fn) wx__DECLARE_HEADER_EVT(RESIZING, id, fn)
+#define EVT_HEADER_END_RESIZE(id, fn) wx__DECLARE_HEADER_EVT(END_RESIZE, id, fn)
 
 #endif // _WX_HEADERCTRL_H_
index 8bb10c924d2043ab6d260a2cd433b72e7d3c1be7..d7fbc1af95eb7ce9a9b9ddeec203aee83f1a146a 100644 (file)
             contents width and the control provides UpdateColumnWidthToFit() method
             to make implementing this easier).
 
-        @event{EVT_HEADER_BEGIN_DRAG(id, func)}
-            The user started to drag the column with the specified index (this
-            can only happen if wxHeaderColumn::IsResizeable() returned true for
-            this column). The event can be vetoed to prevent the control from
-            being resized, if it isn't, the dragging and end drag events will
-            be generated later.
-        @event{EVT_HEADER_DRAGGING(id, func)}
-            The user is dragging the column with the specified index and its
-            current width is wxHeaderCtrlEvent::GetWidth(). The event can be
-            vetoed to stop the dragging operation completely at any time.
-        @event{EVT_HEADER_END_DRAG(id, func)}
-            The user stopped dragging the column. If
-            wxHeaderCtrlEvent::IsCancelled() returns @true, nothing should
-            be done, otherwise the column should normally be resized to the
-            value of wxHeaderCtrlEvent::GetWidth().
+        @event{EVT_HEADER_BEGIN_RESIZE(id, func)}
+            The user started to drag the separator to the right of the column
+            with the specified index (this can only happen for the columns for
+            which wxHeaderColumn::IsResizeable() returns true). The event can
+            be vetoed to prevent the column from being resized. If it isn't,
+            the resizing and end resize events will be generated later.
+        @event{EVT_HEADER_RESIZING(id, func)}
+            The user is dragging the column with the specified index resizing
+            it and its current width is wxHeaderCtrlEvent::GetWidth(). The
+            event can be vetoed to stop the dragging operation completely at
+            any time.
+        @event{EVT_HEADER_END_RESIZE(id, func)}
+            Either the user stopped dragging the column by releasing the mouse
+            or the resizing was cancelled. If wxHeaderCtrlEvent::IsCancelled()
+            returns @true, nothing should be done, otherwise the column should
+            normally be resized to the value of wxHeaderCtrlEvent::GetWidth().
     @endEventTable
 
     @library{wxcore}
index f17c3f8d71092b264bb40ce9ec685f954da70236..883e8c7c9c159abd15344123af7912ad3d94ff05 100644 (file)
@@ -178,6 +178,6 @@ const wxEventType wxEVT_COMMAND_HEADER_MIDDLE_DCLICK = wxNewEventType();
 
 const wxEventType wxEVT_COMMAND_HEADER_SEPARATOR_DCLICK = wxNewEventType();
 
-const wxEventType wxEVT_COMMAND_HEADER_BEGIN_DRAG = wxNewEventType();
-const wxEventType wxEVT_COMMAND_HEADER_DRAGGING = wxNewEventType();
-const wxEventType wxEVT_COMMAND_HEADER_END_DRAG = wxNewEventType();
+const wxEventType wxEVT_COMMAND_HEADER_BEGIN_RESIZE = wxNewEventType();
+const wxEventType wxEVT_COMMAND_HEADER_RESIZING = wxNewEventType();
+const wxEventType wxEVT_COMMAND_HEADER_END_RESIZE = wxNewEventType();
index af1c5ee2752886466fa3eb4a77225b7a0fb6e2d7..7112252982747fee84a87527625893adffc052ef 100644 (file)
@@ -137,13 +137,13 @@ private:
             event.Skip();
     }
 
-    void OnBeginDrag(wxHeaderCtrlEvent& event)
+    void OnBeginResize(wxHeaderCtrlEvent& event)
     {
         if ( !GetColumn(event.GetColumn()).IsResizeable() )
             event.Veto();
     }
 
-    void OnDragging(wxHeaderCtrlEvent& event)
+    void OnResizing(wxHeaderCtrlEvent& event)
     {
         const wxHeaderColumnBase& col = GetColumn(event.GetColumn());
 
@@ -152,7 +152,7 @@ private:
             event.Veto();
     }
 
-    void OnEndDrag(wxHeaderCtrlEvent& event)
+    void OnEndResize(wxHeaderCtrlEvent& event)
     {
         if ( !event.IsCancelled() )
         {
@@ -170,9 +170,9 @@ BEGIN_EVENT_TABLE(wxDataViewHeaderWindow, wxHeaderCtrl)
     EVT_HEADER_CLICK(wxID_ANY, wxDataViewHeaderWindow::OnClick)
     EVT_HEADER_RIGHT_CLICK(wxID_ANY, wxDataViewHeaderWindow::OnRClick)
 
-    EVT_HEADER_BEGIN_DRAG(wxID_ANY, wxDataViewHeaderWindow::OnBeginDrag)
-    EVT_HEADER_DRAGGING(wxID_ANY, wxDataViewHeaderWindow::OnDragging)
-    EVT_HEADER_END_DRAG(wxID_ANY, wxDataViewHeaderWindow::OnEndDrag)
+    EVT_HEADER_BEGIN_RESIZE(wxID_ANY, wxDataViewHeaderWindow::OnBeginResize)
+    EVT_HEADER_RESIZING(wxID_ANY, wxDataViewHeaderWindow::OnResizing)
+    EVT_HEADER_END_RESIZE(wxID_ANY, wxDataViewHeaderWindow::OnEndResize)
 END_EVENT_TABLE()
 
 //-----------------------------------------------------------------------------
index 08765fde178b889184825538fadfa01bc22b1a1d..37cc6039a9e966facfa7f120867550b875d106a5 100644 (file)
@@ -258,7 +258,7 @@ void wxHeaderCtrl::EndResizing(int width)
     if ( width != -1 )
         ReleaseMouse();
 
-    wxHeaderCtrlEvent event(wxEVT_COMMAND_HEADER_END_DRAG, GetId());
+    wxHeaderCtrlEvent event(wxEVT_COMMAND_HEADER_END_RESIZE, GetId());
     event.SetEventObject(this);
     event.SetColumn(m_colBeingResized);
     if ( width == -1 )
index d351d6ca62fe6dbb912cccf6fd66e9b7d82b8e5f..39a0beaa01a3fad8010ea31c4aa586757769a0ad 100644 (file)
@@ -332,19 +332,19 @@ bool wxHeaderCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
         // ASCII and Unicode versions of this message
         case HDN_BEGINTRACKA:
         case HDN_BEGINTRACKW:
-            evtType = wxEVT_COMMAND_HEADER_BEGIN_DRAG;
+            evtType = wxEVT_COMMAND_HEADER_BEGIN_RESIZE;
             // fall through
 
         case HDN_TRACKA:
         case HDN_TRACKW:
             if ( evtType == wxEVT_NULL )
-                evtType = wxEVT_COMMAND_HEADER_DRAGGING;
+                evtType = wxEVT_COMMAND_HEADER_RESIZING;
             // fall through
 
         case HDN_ENDTRACKA:
         case HDN_ENDTRACKW:
             if ( evtType == wxEVT_NULL )
-                evtType = wxEVT_COMMAND_HEADER_END_DRAG;
+                evtType = wxEVT_COMMAND_HEADER_END_RESIZE;
 
             width = nmhdr->pitem->cxy;
             break;