X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8fad69b019ba90717b44824874192609cb7ef2a1..0dd9646ea8b9e6f3a5fa8c42b6a4954cf8e3a48d:/include/wx/generic/headerctrlg.h diff --git a/include/wx/generic/headerctrlg.h b/include/wx/generic/headerctrlg.h index f7f9e89254..127f798c40 100644 --- a/include/wx/generic/headerctrlg.h +++ b/include/wx/generic/headerctrlg.h @@ -65,6 +65,7 @@ private: // event handlers void OnPaint(wxPaintEvent& event); void OnMouse(wxMouseEvent& event); + void OnKeyDown(wxKeyEvent& event); void OnCaptureLost(wxMouseCaptureLostEvent& event); // return the horizontal start position of the given column in physical @@ -87,12 +88,25 @@ private: // column 1 but close enough to the divider separating it from column 0) int FindColumnAtPos(int x, bool& onSeparator) const; + // return true if a drag resizing operation is currently in progress + bool IsResizing() const; + // end any drag operation currently in progress (resizing or reordering) void EndDragging(); - // and the resizing operation currently in progress and generate an event - // about it with its cancelled flag set if width is -1 - void EndResizing(int width); + // start (if m_colBeingResized is -1) or continue resizing the column + // + // this generates wxEVT_COMMAND_HEADER_BEGIN_RESIZE/RESIZING events and can + // cancel the operation if the user handler decides so + void StartOrContinueResizing(unsigned int col, int xPhysical); + + // end the resizing operation currently in progress and generate an event + // about it with its cancelled flag set if xPhysical is -1 + void EndResizing(int xPhysical); + + // constrain the given position to be larger than the start position of the + // given column plus its minimal width and return the effective width + int ConstrainByMinWidth(unsigned int col, int& xPhysical); // update the current position of the resizing marker if xPhysical is a // valid physical coordinate value or remove it entirely if it is -1