X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cc26010927f5bb12825a32487949d063e6c605fc..add051eb7c86704a4f648111d38670c920b3e92e:/src/common/tbarbase.cpp diff --git a/src/common/tbarbase.cpp b/src/common/tbarbase.cpp index 40a01e7b2a..13fbbc0269 100644 --- a/src/common/tbarbase.cpp +++ b/src/common/tbarbase.cpp @@ -38,6 +38,8 @@ #include "wx/menu.h" #endif +extern WXDLLEXPORT_DATA(const char) wxToolBarNameStr[] = "toolbar"; + // ---------------------------------------------------------------------------- // wxWidgets macros // ---------------------------------------------------------------------------- @@ -61,7 +63,10 @@ IMPLEMENT_DYNAMIC_CLASS(wxToolBarToolBase, wxObject) wxToolBarToolBase::~wxToolBarToolBase() { +#if wxUSE_MENUS delete m_dropdownMenu; +#endif + if ( IsControl() ) GetControl()->Destroy(); } @@ -121,11 +126,13 @@ bool wxToolBarToolBase::SetLongHelp(const wxString& help) } +#if wxUSE_MENUS void wxToolBarToolBase::SetDropdownMenu(wxMenu* menu) { delete m_dropdownMenu; m_dropdownMenu = menu; } +#endif // ---------------------------------------------------------------------------- @@ -454,8 +461,7 @@ bool wxToolBarBase::Realize() if ( m_tools.empty() ) return false; - // make sure tool size is larger enough for all all bitmaps to fit in - // (this is consistent with what other ports do): + // make sure tool size is large enough for all bitmaps to fit in AdjustToolBitmapSize(); return true; @@ -730,6 +736,7 @@ void wxToolBarBase::UpdateWindowUI(long flags) } } +#if wxUSE_MENUS bool wxToolBarBase::SetDropdownMenu(int toolid, wxMenu* menu) { wxToolBarToolBase * const tool = FindById(toolid); @@ -742,6 +749,7 @@ bool wxToolBarBase::SetDropdownMenu(int toolid, wxMenu* menu) return true; } +#endif #if WXWIN_COMPATIBILITY_2_8