Fix build with wxNO_RTTI
wxWidgets RTTI can be used instead
This commit is contained in:
@@ -93,7 +93,7 @@ extern wxWindowMSW *wxWindowBeingErased; // From src/msw/window.cpp
|
|||||||
|
|
||||||
// we use different data classes for owner drawn buttons and for themed XP ones
|
// we use different data classes for owner drawn buttons and for themed XP ones
|
||||||
|
|
||||||
class wxButtonImageData
|
class wxButtonImageData: public wxObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxButtonImageData() { }
|
wxButtonImageData() { }
|
||||||
@@ -177,8 +177,11 @@ private:
|
|||||||
wxDirection m_dir;
|
wxDirection m_dir;
|
||||||
|
|
||||||
wxDECLARE_NO_COPY_CLASS(wxODButtonImageData);
|
wxDECLARE_NO_COPY_CLASS(wxODButtonImageData);
|
||||||
|
wxDECLARE_ABSTRACT_CLASS(wxODButtonImageData);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
wxIMPLEMENT_ABSTRACT_CLASS(wxODButtonImageData, wxButtonImageData);
|
||||||
|
|
||||||
#if wxUSE_UXTHEME
|
#if wxUSE_UXTHEME
|
||||||
|
|
||||||
// somehow the margin is one pixel greater than the value returned by
|
// somehow the margin is one pixel greater than the value returned by
|
||||||
@@ -337,8 +340,11 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
wxDECLARE_NO_COPY_CLASS(wxXPButtonImageData);
|
wxDECLARE_NO_COPY_CLASS(wxXPButtonImageData);
|
||||||
|
wxDECLARE_ABSTRACT_CLASS(wxXPButtonImageData);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
wxIMPLEMENT_ABSTRACT_CLASS(wxXPButtonImageData, wxButtonImageData);
|
||||||
|
|
||||||
#endif // wxUSE_UXTHEME
|
#endif // wxUSE_UXTHEME
|
||||||
|
|
||||||
// Right- and bottom-aligned images stored in the image list
|
// Right- and bottom-aligned images stored in the image list
|
||||||
@@ -683,7 +689,7 @@ void wxAnyButton::DoSetBitmap(const wxBitmap& bitmap, State which)
|
|||||||
// We can't change the size of the images stored in wxImageList
|
// We can't change the size of the images stored in wxImageList
|
||||||
// in wxXPButtonImageData::m_iml so force recreating it below but
|
// in wxXPButtonImageData::m_iml so force recreating it below but
|
||||||
// keep the current data to copy its values into the new one.
|
// keep the current data to copy its values into the new one.
|
||||||
oldData = dynamic_cast<wxXPButtonImageData*>(m_imageData);
|
oldData = wxDynamicCast(m_imageData, wxXPButtonImageData);
|
||||||
if ( oldData )
|
if ( oldData )
|
||||||
{
|
{
|
||||||
m_imageData = NULL;
|
m_imageData = NULL;
|
||||||
@@ -1184,7 +1190,7 @@ void wxAnyButton::MakeOwnerDrawn()
|
|||||||
// We need to use owner-drawn specific data structure so we have
|
// We need to use owner-drawn specific data structure so we have
|
||||||
// to create it and copy the data from native data structure,
|
// to create it and copy the data from native data structure,
|
||||||
// if necessary.
|
// if necessary.
|
||||||
if ( m_imageData && dynamic_cast<wxODButtonImageData*>(m_imageData) == NULL )
|
if ( m_imageData && wxDynamicCast(m_imageData, wxODButtonImageData) == NULL )
|
||||||
{
|
{
|
||||||
wxODButtonImageData* newData = new wxODButtonImageData(this, m_imageData->GetBitmap(State_Normal));
|
wxODButtonImageData* newData = new wxODButtonImageData(this, m_imageData->GetBitmap(State_Normal));
|
||||||
for ( int n = 0; n < State_Max; n++ )
|
for ( int n = 0; n < State_Max; n++ )
|
||||||
|
Reference in New Issue
Block a user