// Author: Benjamin I. Williams
// Modified by:
// Created: 2005-05-17
-// RCS-ID: $Id: dockart.cpp 48848 2007-09-21 10:19:53Z SC $
+// RCS-ID: $Id$
// Copyright: (C) Copyright 2005-2006, Kirix Corporation, All Rights Reserved
// Licence: wxWindows Library Licence, Version 3.1
///////////////////////////////////////////////////////////////////////////////
-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,
}
-void wxAuiToolBar::AddTool(int tool_id,
+wxAuiToolBarItem* wxAuiToolBar::AddTool(int tool_id,
const wxString& label,
const wxBitmap& bitmap,
const wxBitmap& disabled_bitmap,
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;
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)
{
item.sticky = false;
m_items.Add(item);
+ return &m_items.Last();
}
-void wxAuiToolBar::AddSeparator()
+wxAuiToolBarItem* wxAuiToolBar::AddSeparator()
{
wxAuiToolBarItem item;
item.window = NULL;
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;
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;
item.sticky = false;
m_items.Add(item);
+ return &m_items.Last();
}
void wxAuiToolBar::Clear()