]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/headerctrlg.cpp
missing commit
[wxWidgets.git] / src / generic / headerctrlg.cpp
index ac50c2e17355fec287acf83a95bbc7e50213fec2..5ce9bcf83ca50772525ef80378a3eeb02b23022b 100644 (file)
@@ -39,8 +39,6 @@
 namespace
 {
 
-const unsigned NO_SORT = (unsigned)-1;
-
 const unsigned COL_NONE = (unsigned)-1;
 
 } // anonymous namespace
@@ -182,7 +180,7 @@ unsigned int wxHeaderCtrl::FindColumnAtPoint(int x, bool *onSeparator) const
 
         pos += col.GetWidth();
 
-        // if the column is resizeable, check if we're approximatively over the
+        // if the column is resizable, check if we're approximatively over the
         // line separating it from the next column
         //
         // TODO: don't hardcode sensitivity
@@ -280,7 +278,7 @@ void wxHeaderCtrl::CancelDragging()
 
     unsigned int& col = IsResizing() ? m_colBeingResized : m_colBeingReordered;
 
-    wxHeaderCtrlEvent event(wxEVT_COMMAND_HEADER_DRAGGING_CANCELLED, GetId());
+    wxHeaderCtrlEvent event(wxEVT_HEADER_DRAGGING_CANCELLED, GetId());
     event.SetEventObject(this);
     event.SetColumn(col);
 
@@ -305,8 +303,8 @@ int wxHeaderCtrl::ConstrainByMinWidth(unsigned int col, int& xPhysical)
 
 void wxHeaderCtrl::StartOrContinueResizing(unsigned int col, int xPhysical)
 {
-    wxHeaderCtrlEvent event(IsResizing() ? wxEVT_COMMAND_HEADER_RESIZING
-                                         : wxEVT_COMMAND_HEADER_BEGIN_RESIZE,
+    wxHeaderCtrlEvent event(IsResizing() ? wxEVT_HEADER_RESIZING
+                                         : wxEVT_HEADER_BEGIN_RESIZE,
                             GetId());
     event.SetEventObject(this);
     event.SetColumn(col);
@@ -343,7 +341,7 @@ void wxHeaderCtrl::EndResizing(int xPhysical)
 
     ReleaseMouse();
 
-    wxHeaderCtrlEvent event(wxEVT_COMMAND_HEADER_END_RESIZE, GetId());
+    wxHeaderCtrlEvent event(wxEVT_HEADER_END_RESIZE, GetId());
     event.SetEventObject(this);
     event.SetColumn(m_colBeingResized);
     event.SetWidth(ConstrainByMinWidth(m_colBeingResized, xPhysical));
@@ -384,7 +382,7 @@ void wxHeaderCtrl::UpdateReorderingMarker(int xPhysical)
 
 void wxHeaderCtrl::StartReordering(unsigned int col, int xPhysical)
 {
-    wxHeaderCtrlEvent event(wxEVT_COMMAND_HEADER_BEGIN_REORDER, GetId());
+    wxHeaderCtrlEvent event(wxEVT_HEADER_BEGIN_REORDER, GetId());
     event.SetEventObject(this);
     event.SetColumn(col);
 
@@ -423,7 +421,7 @@ bool wxHeaderCtrl::EndReordering(int xPhysical)
 
     if ( colNew != colOld )
     {
-        wxHeaderCtrlEvent event(wxEVT_COMMAND_HEADER_END_REORDER, GetId());
+        wxHeaderCtrlEvent event(wxEVT_HEADER_END_REORDER, GetId());
         event.SetEventObject(this);
         event.SetColumn(colOld);
 
@@ -482,7 +480,7 @@ void wxHeaderCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
 {
     int w, h;
     GetClientSize(&w, &h);
-    
+
 #ifdef __WXGTK__
 //    int vw;
 //    GetVirtualSize(&vw, NULL);
@@ -528,7 +526,7 @@ void wxHeaderCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
         {
             state = wxCONTROL_DISABLED;
         }
-        
+
         if (i == 0)
            state |= wxCONTROL_SPECIAL;
 
@@ -536,7 +534,7 @@ void wxHeaderCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
         params.m_labelText = col.GetTitle();
         params.m_labelBitmap = col.GetBitmap();
         params.m_labelAlignment = col.GetAlignment();
-        
+
 #ifdef __WXGTK__
         if (i == count-1)
         {
@@ -682,23 +680,23 @@ void wxHeaderCtrl::OnMouse(wxMouseEvent& mevent)
                 // treat left double clicks on separator specially
                 if ( onSeparator && dblclk )
                 {
-                    evtType = wxEVT_COMMAND_HEADER_SEPARATOR_DCLICK;
+                    evtType = wxEVT_HEADER_SEPARATOR_DCLICK;
                 }
                 else // not double click on separator
                 {
-                    evtType = click ? wxEVT_COMMAND_HEADER_CLICK
-                                    : wxEVT_COMMAND_HEADER_DCLICK;
+                    evtType = click ? wxEVT_HEADER_CLICK
+                                    : wxEVT_HEADER_DCLICK;
                 }
                 break;
 
             case wxMOUSE_BTN_RIGHT:
-                evtType = click ? wxEVT_COMMAND_HEADER_RIGHT_CLICK
-                                : wxEVT_COMMAND_HEADER_RIGHT_DCLICK;
+                evtType = click ? wxEVT_HEADER_RIGHT_CLICK
+                                : wxEVT_HEADER_RIGHT_DCLICK;
                 break;
 
             case wxMOUSE_BTN_MIDDLE:
-                evtType = click ? wxEVT_COMMAND_HEADER_MIDDLE_CLICK
-                                : wxEVT_COMMAND_HEADER_MIDDLE_DCLICK;
+                evtType = click ? wxEVT_HEADER_MIDDLE_CLICK
+                                : wxEVT_HEADER_MIDDLE_DCLICK;
                 break;
 
             default: