wxUniv toolbar compilation fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-03-26 11:30:45 +00:00
parent fcb35b5f05
commit d448aec3f3
2 changed files with 27 additions and 24 deletions

View File

@@ -80,12 +80,13 @@ protected:
virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle); virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
virtual wxToolBarToolBase *CreateTool(int id, virtual wxToolBarToolBase *CreateTool(int id,
const wxBitmap& bitmap1, const wxString& label,
const wxBitmap& bitmap2, const wxBitmap& bmpNormal,
bool toggle, const wxBitmap& bmpDisabled,
wxItemKind kind,
wxObject *clientData, wxObject *clientData,
const wxString& shortHelpString, const wxString& shortHelp,
const wxString& longHelpString); const wxString& longHelp);
virtual wxToolBarToolBase *CreateTool(wxControl *control); virtual wxToolBarToolBase *CreateTool(wxControl *control);
// implement wxUniversal methods // implement wxUniversal methods

View File

@@ -55,16 +55,17 @@ static const wxCoord INVALID_WIDTH = -1;
class WXDLLEXPORT wxToolBarTool : public wxToolBarToolBase class WXDLLEXPORT wxToolBarTool : public wxToolBarToolBase
{ {
public: public:
wxToolBarTool( wxToolBarBase *tbar = (wxToolBarBase *)NULL, wxToolBarTool(wxToolBar *tbar,
int id = wxID_SEPARATOR, int id,
const wxBitmap& bitmap1 = wxNullBitmap, const wxString& label,
const wxBitmap& bitmap2 = wxNullBitmap, const wxBitmap& bmpNormal,
bool toggle = FALSE, const wxBitmap& bmpDisabled,
wxObject *clientData = (wxObject *) NULL, wxItemKind kind,
const wxString& shortHelpString = wxEmptyString, wxObject *clientData,
const wxString& longHelpString = wxEmptyString ) const wxString& shortHelp,
: wxToolBarToolBase(tbar, id, bitmap1, bitmap2, toggle, clientData, const wxString& longHelp)
shortHelpString, longHelpString) : wxToolBarToolBase(tbar, id, label, bmpNormal, bmpDisabled, kind,
clientData, shortHelp, longHelp)
{ {
// no position yet // no position yet
m_x = m_x =
@@ -230,7 +231,7 @@ void wxToolBar::DoEnableTool(wxToolBarToolBase *tool, bool enable)
// created disabled-state bitmap on demand // created disabled-state bitmap on demand
if ( !enable && !tool->GetDisabledBitmap().Ok() ) if ( !enable && !tool->GetDisabledBitmap().Ok() )
{ {
wxImage image( tool->GetNormalBitmap() ); wxImage image( tool->GetNormalBitmap().ConvertToImage() );
// TODO: don't hardcode 180 // TODO: don't hardcode 180
unsigned char bg_red = 180; unsigned char bg_red = 180;
@@ -278,7 +279,7 @@ void wxToolBar::DoEnableTool(wxToolBarToolBase *tool, bool enable)
} }
} }
tool->SetDisabledBitmap( image.ConvertToBitmap() ); tool->SetDisabledBitmap(image);
} }
RefreshTool(tool); RefreshTool(tool);
@@ -297,15 +298,16 @@ void wxToolBar::DoSetToggle(wxToolBarToolBase *tool, bool WXUNUSED(toggle))
} }
wxToolBarToolBase *wxToolBar::CreateTool(int id, wxToolBarToolBase *wxToolBar::CreateTool(int id,
const wxBitmap& bitmap1, const wxString& label,
const wxBitmap& bitmap2, const wxBitmap& bmpNormal,
bool toggle, const wxBitmap& bmpDisabled,
wxItemKind kind,
wxObject *clientData, wxObject *clientData,
const wxString& shortHelpString, const wxString& shortHelp,
const wxString& longHelpString) const wxString& longHelp)
{ {
return new wxToolBarTool( this, id, bitmap1, bitmap2, toggle, return new wxToolBarTool(this, id, label, bmpNormal, bmpDisabled, kind,
clientData, shortHelpString, longHelpString); clientData, shortHelp, longHelp);
} }
wxToolBarToolBase *wxToolBar::CreateTool(wxControl *control) wxToolBarToolBase *wxToolBar::CreateTool(wxControl *control)