X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5879b22eeb0cfaae9ce36d24655ebde84c80e235..6dbf7a375093d1e94aadb61f8d6759e820a9256d:/include/wx/aui/auibar.h?ds=sidebyside diff --git a/include/wx/aui/auibar.h b/include/wx/aui/auibar.h index ebec881a71..4c4bd21641 100644 --- a/include/wx/aui/auibar.h +++ b/include/wx/aui/auibar.h @@ -4,7 +4,7 @@ // Author: Benjamin I. Williams // Modified by: // Created: 2008-08-04 -// RCS-ID: $Id: framemanager.h 53135 2008-04-12 02:31:04Z VZ $ +// RCS-ID: $Id$ // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. // Licence: wxWindows Library Licence, Version 3.1 /////////////////////////////////////////////////////////////////////////////// @@ -95,10 +95,8 @@ private: wxRect rect; int tool_id; -#ifndef SWIG private: DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiToolBarEvent) -#endif }; @@ -426,7 +424,7 @@ public: const wxPoint& position = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxAUI_TB_DEFAULT_STYLE); - ~wxAuiToolBar(); + virtual ~wxAuiToolBar(); void SetWindowStyleFlag(long style); @@ -436,13 +434,13 @@ public: bool SetFont(const wxFont& font); - void AddTool(int tool_id, + wxAuiToolBarItem* AddTool(int tool_id, const wxString& label, const wxBitmap& bitmap, const wxString& short_help_string = wxEmptyString, wxItemKind kind = wxITEM_NORMAL); - void AddTool(int tool_id, + wxAuiToolBarItem* AddTool(int tool_id, const wxString& label, const wxBitmap& bitmap, const wxBitmap& disabled_bitmap, @@ -451,7 +449,7 @@ public: const wxString& long_help_string, wxObject* client_data); - void AddTool(int tool_id, + wxAuiToolBarItem* AddTool(int tool_id, const wxBitmap& bitmap, const wxBitmap& disabled_bitmap, bool toggle = false, @@ -459,7 +457,7 @@ public: const wxString& short_help_string = wxEmptyString, const wxString& long_help_string = wxEmptyString) { - AddTool(tool_id, + return AddTool(tool_id, wxEmptyString, bitmap, disabled_bitmap, @@ -469,14 +467,14 @@ public: client_data); } - void AddLabel(int tool_id, + wxAuiToolBarItem* AddLabel(int tool_id, const wxString& label = wxEmptyString, const int width = -1); - void AddControl(wxControl* control, + wxAuiToolBarItem* AddControl(wxControl* control, const wxString& label = wxEmptyString); - void AddSeparator(); - void AddSpacer(int pixels); - void AddStretchSpacer(int proportion = 1); + wxAuiToolBarItem* AddSeparator(); + wxAuiToolBarItem* AddSpacer(int pixels); + wxAuiToolBarItem* AddStretchSpacer(int proportion = 1); bool Realize(); @@ -625,10 +623,8 @@ protected: bool m_overflow_visible; long m_style; -#ifndef SWIG DECLARE_EVENT_TABLE() DECLARE_CLASS(wxAuiToolBar) -#endif }; @@ -638,18 +634,16 @@ protected: #ifndef SWIG -BEGIN_DECLARE_EVENT_TYPES() - DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, 0) - DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, 0) - DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, 0) - DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, 0) - DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, 0) -END_DECLARE_EVENT_TYPES() +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEvent ) +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, wxAuiToolBarEvent ) +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, wxAuiToolBarEvent ) +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, wxAuiToolBarEvent ) +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, wxAuiToolBarEvent ) typedef void (wxEvtHandler::*wxAuiToolBarEventFunction)(wxAuiToolBarEvent&); #define wxAuiToolBarEventHandler(func) \ - (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxAuiToolBarEventFunction, &func) + wxEVENT_HANDLER_CAST(wxAuiToolBarEventFunction, func) #define EVT_AUITOOLBAR_TOOL_DROPDOWN(winid, fn) \ wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, winid, wxAuiToolBarEventHandler(fn))