applied patch from ticket 10015; wxToolBar compatibility

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Benjamin Williams 2008-10-01 10:42:50 +00:00
parent be42eeb0c3
commit 7bce84396e
2 changed files with 24 additions and 19 deletions

View File

@ -424,7 +424,7 @@ public:
const wxPoint& position = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxAUI_TB_DEFAULT_STYLE);
~wxAuiToolBar();
virtual ~wxAuiToolBar();
void SetWindowStyleFlag(long style);
@ -434,13 +434,13 @@ public:
bool SetFont(const wxFont& font);
void AddTool(int tool_id,
wxAuiToolBarItem* AddTool(int tool_id,
const wxString& label,
const wxBitmap& bitmap,
const wxString& short_help_string = wxEmptyString,
wxItemKind kind = wxITEM_NORMAL);
void AddTool(int tool_id,
wxAuiToolBarItem* AddTool(int tool_id,
const wxString& label,
const wxBitmap& bitmap,
const wxBitmap& disabled_bitmap,
@ -449,7 +449,7 @@ public:
const wxString& long_help_string,
wxObject* client_data);
void AddTool(int tool_id,
wxAuiToolBarItem* AddTool(int tool_id,
const wxBitmap& bitmap,
const wxBitmap& disabled_bitmap,
bool toggle = false,
@ -457,7 +457,7 @@ public:
const wxString& short_help_string = wxEmptyString,
const wxString& long_help_string = wxEmptyString)
{
AddTool(tool_id,
return AddTool(tool_id,
wxEmptyString,
bitmap,
disabled_bitmap,
@ -467,14 +467,14 @@ public:
client_data);
}
void AddLabel(int tool_id,
wxAuiToolBarItem* AddLabel(int tool_id,
const wxString& label = wxEmptyString,
const int width = -1);
void AddControl(wxControl* control,
wxAuiToolBarItem* AddControl(wxControl* control,
const wxString& label = wxEmptyString);
void AddSeparator();
void AddSpacer(int pixels);
void AddStretchSpacer(int proportion = 1);
wxAuiToolBarItem* AddSeparator();
wxAuiToolBarItem* AddSpacer(int pixels);
wxAuiToolBarItem* AddStretchSpacer(int proportion = 1);
bool Realize();

View File

@ -887,13 +887,13 @@ wxAuiToolBarArt* wxAuiToolBar::GetArtProvider() const
void wxAuiToolBar::AddTool(int tool_id,
wxAuiToolBarItem* wxAuiToolBar::AddTool(int tool_id,
const wxString& label,
const wxBitmap& bitmap,
const wxString& short_help_string,
wxItemKind kind)
{
AddTool(tool_id,
return AddTool(tool_id,
label,
bitmap,
wxNullBitmap,
@ -904,7 +904,7 @@ void wxAuiToolBar::AddTool(int tool_id,
}
void wxAuiToolBar::AddTool(int tool_id,
wxAuiToolBarItem* wxAuiToolBar::AddTool(int tool_id,
const wxString& label,
const wxBitmap& bitmap,
const wxBitmap& disabled_bitmap,
@ -943,11 +943,11 @@ void wxAuiToolBar::AddTool(int tool_id,
item.disabled_bitmap = MakeDisabledBitmap(item.bitmap);
}
}
m_items.Add(item);
return &m_items.Last();
}
void wxAuiToolBar::AddControl(wxControl* control,
wxAuiToolBarItem* wxAuiToolBar::AddControl(wxControl* control,
const wxString& label)
{
wxAuiToolBarItem item;
@ -968,9 +968,10 @@ void wxAuiToolBar::AddControl(wxControl* control,
item.sticky = false;
m_items.Add(item);
return &m_items.Last();
}
void wxAuiToolBar::AddLabel(int tool_id,
wxAuiToolBarItem* wxAuiToolBar::AddLabel(int tool_id,
const wxString& label,
const int width)
{
@ -996,9 +997,10 @@ void wxAuiToolBar::AddLabel(int tool_id,
item.sticky = false;
m_items.Add(item);
return &m_items.Last();
}
void wxAuiToolBar::AddSeparator()
wxAuiToolBarItem* wxAuiToolBar::AddSeparator()
{
wxAuiToolBarItem item;
item.window = NULL;
@ -1017,9 +1019,10 @@ void wxAuiToolBar::AddSeparator()
item.sticky = false;
m_items.Add(item);
return &m_items.Last();
}
void wxAuiToolBar::AddSpacer(int pixels)
wxAuiToolBarItem* wxAuiToolBar::AddSpacer(int pixels)
{
wxAuiToolBarItem item;
item.window = NULL;
@ -1039,9 +1042,10 @@ void wxAuiToolBar::AddSpacer(int pixels)
item.sticky = false;
m_items.Add(item);
return &m_items.Last();
}
void wxAuiToolBar::AddStretchSpacer(int proportion)
wxAuiToolBarItem* wxAuiToolBar::AddStretchSpacer(int proportion)
{
wxAuiToolBarItem item;
item.window = NULL;
@ -1061,6 +1065,7 @@ void wxAuiToolBar::AddStretchSpacer(int proportion)
item.sticky = false;
m_items.Add(item);
return &m_items.Last();
}
void wxAuiToolBar::Clear()