Add first version of wxBitmapBundle and use it in wxToolBar
This first version provides only a generic implementation of wxBitmapBundle using a collection of bitmaps and only supports using it in wxToolBar in wxMSW and wxGTK. More methods of creating wxBitmapBundle will be provided later and more functions taking wxBitmap will be changed to take wxBitmapBundle later too and, of course, all the other ports will be updated to use the new API too.
This commit is contained in:
@@ -28,8 +28,8 @@ class wxQtToolButton;
|
||||
class wxToolBarTool : public wxToolBarToolBase
|
||||
{
|
||||
public:
|
||||
wxToolBarTool(wxToolBar *tbar, int id, const wxString& label, const wxBitmap& bitmap1,
|
||||
const wxBitmap& bitmap2, wxItemKind kind, wxObject *clientData,
|
||||
wxToolBarTool(wxToolBar *tbar, int id, const wxString& label, const wxBitmapBundle& bitmap1,
|
||||
const wxBitmapBundle& bitmap2, wxItemKind kind, wxObject *clientData,
|
||||
const wxString& shortHelpString, const wxString& longHelpString)
|
||||
: wxToolBarToolBase(tbar, id, label, bitmap1, bitmap2, kind,
|
||||
clientData, shortHelpString, longHelpString)
|
||||
@@ -194,7 +194,7 @@ void wxToolBar::SetToolShortHelp( int id, const wxString& helpString )
|
||||
}
|
||||
}
|
||||
|
||||
void wxToolBar::SetToolNormalBitmap( int id, const wxBitmap& bitmap )
|
||||
void wxToolBar::SetToolNormalBitmap( int id, const wxBitmapBundle& bitmap )
|
||||
{
|
||||
wxToolBarTool* tool = static_cast<wxToolBarTool*>(FindById(id));
|
||||
if ( tool )
|
||||
@@ -206,7 +206,7 @@ void wxToolBar::SetToolNormalBitmap( int id, const wxBitmap& bitmap )
|
||||
}
|
||||
}
|
||||
|
||||
void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap )
|
||||
void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmapBundle& bitmap )
|
||||
{
|
||||
wxToolBarTool* tool = static_cast<wxToolBarTool*>(FindById(id));
|
||||
if ( tool )
|
||||
@@ -364,8 +364,8 @@ void wxToolBar::DoSetToggle(wxToolBarToolBase * WXUNUSED(tool),
|
||||
wxFAIL_MSG( wxT("not implemented") );
|
||||
}
|
||||
|
||||
wxToolBarToolBase *wxToolBar::CreateTool(int id, const wxString& label, const wxBitmap& bmpNormal,
|
||||
const wxBitmap& bmpDisabled, wxItemKind kind, wxObject *clientData,
|
||||
wxToolBarToolBase *wxToolBar::CreateTool(int id, const wxString& label, const wxBitmapBundle& bmpNormal,
|
||||
const wxBitmapBundle& bmpDisabled, wxItemKind kind, wxObject *clientData,
|
||||
const wxString& shortHelp, const wxString& longHelp)
|
||||
{
|
||||
return new wxToolBarTool(this, id, label, bmpNormal, bmpDisabled, kind,
|
||||
|
||||
Reference in New Issue
Block a user