// Created: 2006-04-13
// Id: $Id$
// Copyright: (c) Julian Smart, Robert Roebling, Vadim Zeitlin,
-// SciTech Software, Inc.
+// SciTech Software, Inc.
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#define _WX_BUTTONBAR_H_
#include "wx/bmpbuttn.h"
+#include "wx/toolbar.h"
-class WXDLLEXPORT wxButtonToolBarTool;
+class WXDLLIMPEXP_FWD_CORE wxButtonToolBarTool;
// ----------------------------------------------------------------------------
// wxButtonToolBar
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxButtonToolBar : public wxToolBarBase
-{
+{
public:
// construction/destruction
wxButtonToolBar() { Init(); }
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxToolBarNameStr );
-
+
virtual ~wxButtonToolBar();
virtual bool Realize();
wxObject *clientData,
const wxString& shortHelp,
const wxString& longHelp);
- virtual wxToolBarToolBase *CreateTool(wxControl *control);
+ virtual wxToolBarToolBase *CreateTool(wxControl *control,
+ const wxString& label);
virtual wxSize DoGetBestClientSize() const;
// receives button commands
void OnCommand(wxCommandEvent& event);
+ // paints a border
+ void OnPaint(wxPaintEvent& event);
+
+ // detects mouse clicks outside buttons
+ void OnLeftUp(wxMouseEvent& event);
+
private:
// have we calculated the positions of our tools?
bool m_needsLayout;
wxCoord m_maxWidth,
m_maxHeight;
+ // the height of a label
+ int m_labelHeight;
+
+ // the space above the label
+ int m_labelMargin;
+
private:
DECLARE_DYNAMIC_CLASS(wxButtonToolBar)
DECLARE_EVENT_TABLE()