// Name: wx/aui/toolbar.h
// Purpose: Documentation of wxAuiToolBar and related classes.
// Created: 2011-01-17
-// RCS-ID: $Id$
// Copyright: (c) 2011 wxWidgets development team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
*/
wxAUI_TB_HORIZONTAL = 1 << 7,
+
+ /**
+ Draw a plain background (based on parent) instead of the default gradient background.
+
+ @since 2.9.5
+ */
+ wxAUI_TB_PLAIN_BACKGROUND = 1 << 8,
+
/**
Shows the text alongside the icons, not vertically stacked.
*/
bool IsActive() const;
/**
+ Set whether this tool has a drop down button.
+ This is only valid for wxITEM_NORMAL tools.
*/
void SetHasDropDown(bool b);
/**
-
+ Returns whether the toolbar item has an associated drop down button.
*/
bool HasDropDown() const;
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,
@style{wxAUI_TB_HORIZONTAL}
analogous to wxAUI_TB_VERTICAL, but forces the toolbar
to be horizontal
+ @style{wxAUI_TB_PLAIN_BACKGROUND}
+ Draw a plain background (based on parent) instead of the
+ default gradient background.
@style{wxAUI_TB_HORZ_TEXT}
Equivalent to wxAUI_TB_HORZ_LAYOUT | wxAUI_TB_TEXT
@style{wxAUI_TB_DEFAULT_STYLE}
@beginEventEmissionTable{wxAuiToolBarEvent}
@event{EVT_AUITOOLBAR_TOOL_DROPDOWN(id, func)}
- Process a wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN event
+ Process a wxEVT_AUITOOLBAR_TOOL_DROPDOWN event
@event{EVT_AUITOOLBAR_OVERFLOW_CLICK(id, func)}
- Process a wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK event
+ Process a wxEVT_AUITOOLBAR_OVERFLOW_CLICK event
@event{EVT_AUITOOLBAR_RIGHT_CLICK(id, func)}
- Process a wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK event
+ Process a wxEVT_AUITOOLBAR_RIGHT_CLICK event
@event{EVT_AUITOOLBAR_MIDDLE_CLICK(id, func)}
- Process a wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK event
+ Process a wxEVT_AUITOOLBAR_MIDDLE_CLICK event
@event{EVT_AUITOOLBAR_BEGIN_DRAG(id, func)}
- Process a wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG event
+ Process a wxEVT_AUITOOLBAR_BEGIN_DRAG event
@endEventTable
@library{wxaui}
class wxAuiToolBar : public wxControl
{
public:
+ /**
+ Default constructor, use Create() later.
+
+ @since 2.9.5
+ */
+ wxAuiToolBar();
+
+ /**
+ Constructor creating and initializing the object.
+ */
wxAuiToolBar(wxWindow* parent,
- wxWindowID id = -1,
+ wxWindowID id = wxID_ANY,
const wxPoint& position = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxAUI_TB_DEFAULT_STYLE);
+
+ /**
+ Really create wxAuiToolBar created using default constructor.
+
+ @since 2.9.5
+ */
+ bool Create(wxWindow* parent,
+ wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxAUI_TB_DEFAULT_STYLE);
virtual ~wxAuiToolBar();
void SetWindowStyleFlag(long style);
void EnableTool(int tool_id, bool state);
bool GetToolEnabled(int tool_id) const;
+ /**
+ Set whether the specified toolbar item has a drop down button.
+
+ This is only valid for wxITEM_NORMAL tools.
+
+ @see wxAuiToolBarItem::SetHasDropDown()
+ */
void SetToolDropDown(int tool_id, bool dropdown);
+
+ /**
+ Returns whether the specified toolbar item has an associated drop down
+ button.
+
+ @see wxAuiToolBarItem::HasDropDown()
+ */
bool GetToolDropDown(int tool_id) const;
void SetToolBorderPadding(int padding);