// analogous to wxAUI_TB_VERTICAL, but forces the toolbar
// to be horizontal
wxAUI_TB_HORIZONTAL = 1 << 7,
+ wxAUI_TB_PLAIN_BACKGROUND = 1 << 8,
wxAUI_TB_HORZ_TEXT = (wxAUI_TB_HORZ_LAYOUT | wxAUI_TB_TEXT),
wxAUI_ORIENTATION_MASK = (wxAUI_TB_VERTICAL | wxAUI_TB_HORIZONTAL),
wxAUI_TB_DEFAULT_STYLE = 0
void SetActive(bool b) { m_active = b; }
bool IsActive() const { return m_active; }
- void SetHasDropDown(bool b) { m_dropDown = b; }
+ void SetHasDropDown(bool b)
+ {
+ wxCHECK_RET( !b || m_kind == wxITEM_NORMAL,
+ wxS("Only normal tools can have drop downs") );
+
+ m_dropDown = b;
+ }
+
bool HasDropDown() const { return m_dropDown; }
void SetSticky(bool b) { m_sticky = b; }
wxWindow* wnd,
const wxRect& rect) = 0;
+ virtual void DrawPlainBackground(
+ wxDC& dc,
+ wxWindow* wnd,
+ const wxRect& rect) = 0;
+
virtual void DrawLabel(
wxDC& dc,
wxWindow* wnd,
wxWindow* wnd,
const wxRect& rect);
+ virtual void DrawPlainBackground(wxDC& dc,
+ wxWindow* wnd,
+ const wxRect& rect);
+
virtual void DrawLabel(
wxDC& dc,
wxWindow* wnd,
class WXDLLIMPEXP_AUI wxAuiToolBar : public wxControl
{
public:
+ wxAuiToolBar() { Init(); }
wxAuiToolBar(wxWindow* parent,
- wxWindowID id = -1,
- const wxPoint& position = wxDefaultPosition,
+ wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxAUI_TB_DEFAULT_STYLE);
+ long style = wxAUI_TB_DEFAULT_STYLE)
+ {
+ Init();
+ Create(parent, id, pos, size, style);
+ }
+
virtual ~wxAuiToolBar();
- void SetWindowStyleFlag(long style);
- long GetWindowStyleFlag() const;
+ bool Create(wxWindow* parent,
+ wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxAUI_TB_DEFAULT_STYLE);
+
+ virtual void SetWindowStyleFlag(long style);
void SetArtProvider(wxAuiToolBarArt* art);
wxAuiToolBarArt* GetArtProvider() const;
virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE);
protected:
+ void Init();
virtual void OnCustomRender(wxDC& WXUNUSED(dc),
const wxAuiToolBarItem& WXUNUSED(item),
bool m_dragging;
bool m_gripperVisible;
bool m_overflowVisible;
- long m_style;
bool RealizeHelper(wxClientDC& dc, bool horizontal);
static bool IsPaneValid(long style, const wxAuiPaneInfo& pane);