X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8a2e3f80f67b0716b3d1854418b187943dcff11a..c564ca3c975aba89f8b911ace0f240c0aaf4cf73:/include/wx/headerctrl.h?ds=sidebyside diff --git a/include/wx/headerctrl.h b/include/wx/headerctrl.h index 8c6b7c143b..08940d5b21 100644 --- a/include/wx/headerctrl.h +++ b/include/wx/headerctrl.h @@ -154,6 +154,8 @@ public: // specified) and if the control has wxHD_ALLOW_REORDER style as well bool ShowCustomizeDialog(); + // compute column title width + int GetColumnTitleWidth(const wxHeaderColumn& col); // implementation only from now on // ------------------------------- @@ -350,7 +352,10 @@ private: void Init(); // bring the column count in sync with the number of columns we store - void UpdateColumnCount() { SetColumnCount(m_cols.size()); } + void UpdateColumnCount() + { + SetColumnCount(static_cast(m_cols.size())); + } // all our current columns @@ -361,7 +366,7 @@ private: unsigned int m_sortKey; - DECLARE_NO_COPY_CLASS(wxHeaderCtrlSimple) + wxDECLARE_NO_COPY_CLASS(wxHeaderCtrlSimple); }; // ---------------------------------------------------------------------------- @@ -416,30 +421,29 @@ private: }; -extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_HEADER_CLICK; -extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_HEADER_RIGHT_CLICK; -extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_HEADER_MIDDLE_CLICK; +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_CLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_RIGHT_CLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_MIDDLE_CLICK, wxHeaderCtrlEvent ); -extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_HEADER_DCLICK; -extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_HEADER_RIGHT_DCLICK; -extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_HEADER_MIDDLE_DCLICK; +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_DCLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_RIGHT_DCLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_MIDDLE_DCLICK, wxHeaderCtrlEvent ); -extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_HEADER_SEPARATOR_DCLICK; +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_SEPARATOR_DCLICK, wxHeaderCtrlEvent ); -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; +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_BEGIN_RESIZE, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_RESIZING, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_END_RESIZE, wxHeaderCtrlEvent ); -extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_HEADER_BEGIN_REORDER; -extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_HEADER_END_REORDER; +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_BEGIN_REORDER, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_END_REORDER, wxHeaderCtrlEvent ); -extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_HEADER_DRAGGING_CANCELLED; +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_DRAGGING_CANCELLED, wxHeaderCtrlEvent ); typedef void (wxEvtHandler::*wxHeaderCtrlEventFunction)(wxHeaderCtrlEvent&); #define wxHeaderCtrlEventHandler(func) \ - (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent( \ - wxHeaderCtrlEventFunction, &func) + wxEVENT_HANDLER_CAST(wxHeaderCtrlEventFunction, func) #define wx__DECLARE_HEADER_EVT(evt, id, fn) \ wx__DECLARE_EVT1(wxEVT_COMMAND_HEADER_ ## evt, id, wxHeaderCtrlEventHandler(fn))