X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6327cdd57cd324afc284c4ef04a1a8eb6eab6e55..acebfdf0528fd9c091357d8bac962910a901c025:/include/wx/generic/headerctrlg.h diff --git a/include/wx/generic/headerctrlg.h b/include/wx/generic/headerctrlg.h index 3550f179ca..d2eceb2bfc 100644 --- a/include/wx/generic/headerctrlg.h +++ b/include/wx/generic/headerctrlg.h @@ -3,7 +3,6 @@ // Purpose: Generic wxHeaderCtrl implementation // Author: Vadim Zeitlin // Created: 2008-12-01 -// RCS-ID: $Id$ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -48,6 +47,10 @@ public: virtual ~wxHeaderCtrl(); +protected: + virtual wxSize DoGetBestSize() const; + + private: // implement base class pure virtuals virtual void DoSetCount(unsigned int count); @@ -59,9 +62,6 @@ private: virtual void DoSetColumnsOrder(const wxArrayInt& order); virtual wxArrayInt DoGetColumnsOrder() const; - // override wxWindow methods which must be implemented by a new control - virtual wxSize DoGetBestSize() const; - // common part of all ctors void Init(); @@ -116,7 +116,7 @@ private: // start (if m_colBeingResized is -1) or continue resizing the column // - // this generates wxEVT_COMMAND_HEADER_BEGIN_RESIZE/RESIZING events and can + // this generates wxEVT_HEADER_BEGIN_RESIZE/RESIZING events and can // cancel the operation if the user handler decides so void StartOrContinueResizing(unsigned int col, int xPhysical); @@ -127,15 +127,16 @@ private: // same functions as above but for column moving/reordering instead of // resizing void StartReordering(unsigned int col, int xPhysical); - void EndReordering(int xPhysical); + + // returns true if we did drag the column somewhere else or false if we + // didn't really move it -- in this case we consider that no reordering + // took place and that a normal column click event should be generated + bool EndReordering(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 - void UpdateResizingMarker(int xPhysical); - // update the information displayed while a column is being moved around void UpdateReorderingMarker(int xPhysical); @@ -173,7 +174,7 @@ private: DECLARE_EVENT_TABLE() - DECLARE_NO_COPY_CLASS(wxHeaderCtrl) + wxDECLARE_NO_COPY_CLASS(wxHeaderCtrl); }; #endif // _WX_GENERIC_HEADERCTRLG_H_