// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma interface "tbarbase.h"
-#endif
-
#include "wx/defs.h"
#if wxUSE_TOOLBAR
// constants
// ----------------------------------------------------------------------------
-WXDLLEXPORT_DATA(extern const wxChar*) wxToolBarNameStr;
-WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize;
-WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition;
+extern WXDLLEXPORT_DATA(const wxChar) wxToolBarNameStr[];
+extern WXDLLEXPORT_DATA(const wxSize) wxDefaultSize;
+extern WXDLLEXPORT_DATA(const wxPoint) wxDefaultPosition;
enum wxToolBarToolStyle
{
m_toolStyle = wxTOOL_STYLE_CONTROL;
}
- ~wxToolBarToolBase();
+ virtual ~wxToolBarToolBase(){}
// accessors
// ---------
const wxBitmap& GetBitmap() const
{ return IsEnabled() ? GetNormalBitmap() : GetDisabledBitmap(); }
- wxString GetLabel() const { return m_label; }
+ const wxString& GetLabel() const { return m_label; }
- wxString GetShortHelp() const { return m_shortHelpString; }
- wxString GetLongHelp() const { return m_longHelpString; }
+ const wxString& GetShortHelp() const { return m_shortHelpString; }
+ const wxString& GetLongHelp() const { return m_longHelpString; }
wxObject *GetClientData() const
{
virtual void Detach() { m_tbar = (wxToolBarBase *)NULL; }
virtual void Attach(wxToolBarBase *tbar) { m_tbar = tbar; }
- // compatibility only, don't use
-#if WXWIN_COMPATIBILITY_2_2
- const wxBitmap& GetBitmap1() const { return GetNormalBitmap(); }
- const wxBitmap& GetBitmap2() const { return GetDisabledBitmap(); }
-
- void SetBitmap1(const wxBitmap& bmp) { SetNormalBitmap(bmp); }
- void SetBitmap2(const wxBitmap& bmp) { SetDisabledBitmap(bmp); }
-#endif // WXWIN_COMPATIBILITY_2_2
-
protected:
wxToolBarBase *m_tbar; // the toolbar to which we belong (may be NULL)