+// ----------------------------------------------------------------------------
+// wxHeaderCtrl dragging
+// ----------------------------------------------------------------------------
+
+void wxHeaderCtrl::UpdateResizingMarker(int xPhysical)
+{
+ // unfortunately drawing the marker over the parent window doesn't work as
+ // it's usually covered by another window (the main control view) so just
+ // draw the marker over the header itself, even if it makes it not very
+ // useful
+ wxClientDC dc(this);
+
+ wxDCOverlay dcover(m_overlay, &dc);
+ dcover.Clear();
+
+ if ( xPhysical != -1 )
+ {
+ dc.SetPen(*wxLIGHT_GREY_PEN);
+ dc.DrawLine(xPhysical, 0, xPhysical, GetClientSize().y);
+ }
+}
+
+void wxHeaderCtrl::EndDragging()
+{
+ UpdateResizingMarker(-1);
+
+ m_overlay.Reset();
+}
+
+void wxHeaderCtrl::EndResizing(int width)
+{
+ wxASSERT_MSG( m_colBeingResized != COL_NONE,
+ "shouldn't be called if we're not resizing" );
+
+ EndDragging();
+
+ wxHeaderCtrlEvent event(wxEVT_COMMAND_HEADER_END_DRAG, GetId());
+ event.SetEventObject(this);
+ event.SetColumn(m_colBeingResized);
+ if ( width == -1 )
+ event.SetCancelled();
+ else
+ event.SetWidth(width);
+
+ GetEventHandler()->ProcessEvent(event);
+
+ m_colBeingResized = COL_NONE;
+}
+