Use wxCLASSINFO() instead of deprecated CLASSINFO().

No real changes, just use the version of the macro with a "wx" prefix.

Closes #14356.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-06-01 11:01:24 +00:00
parent 345c78ca5f
commit 80a4659776
17 changed files with 33 additions and 33 deletions

View File

@@ -94,7 +94,7 @@ private:
#define wxHANDLER(name,eventClassType) \ #define wxHANDLER(name,eventClassType) \
static wxHandlerInfo _handlerInfo##name( first, class_t::GetClassInfoStatic(), \ static wxHandlerInfo _handlerInfo##name( first, class_t::GetClassInfoStatic(), \
wxT(#name), (wxObjectEventFunction) (wxEventFunction) &name, \ wxT(#name), (wxObjectEventFunction) (wxEventFunction) &name, \
CLASSINFO( eventClassType ) ); wxCLASSINFO( eventClassType ) );
#define wxBEGIN_HANDLERS_TABLE(theClass) \ #define wxBEGIN_HANDLERS_TABLE(theClass) \
wxHandlerInfo *theClass::GetHandlersStatic() \ wxHandlerInfo *theClass::GetHandlersStatic() \

View File

@@ -536,13 +536,13 @@ class WXDLLIMPEXP_FWD_BASE wxStringToAnyHashMap : public wxStringToAnyHashMapBas
&_accessor##pname, flags, help, group ); &_accessor##pname, flags, help, group );
#define wxEVENT_PROPERTY( name, eventType, eventClass ) \ #define wxEVENT_PROPERTY( name, eventType, eventClass ) \
static wxEventSourceTypeInfo _typeInfo##name( eventType, CLASSINFO( eventClass ) ); \ static wxEventSourceTypeInfo _typeInfo##name( eventType, wxCLASSINFO( eventClass ) ); \
static wxPropertyInfo _propertyInfo##name( first,class_t::GetClassInfoStatic(), \ static wxPropertyInfo _propertyInfo##name( first,class_t::GetClassInfoStatic(), \
wxT(#name), &_typeInfo##name, NULL, wxAny() ); wxT(#name), &_typeInfo##name, NULL, wxAny() );
#define wxEVENT_RANGE_PROPERTY( name, eventType, lastEventType, eventClass ) \ #define wxEVENT_RANGE_PROPERTY( name, eventType, lastEventType, eventClass ) \
static wxEventSourceTypeInfo _typeInfo##name( eventType, lastEventType, \ static wxEventSourceTypeInfo _typeInfo##name( eventType, lastEventType, \
CLASSINFO( eventClass ) ); \ wxCLASSINFO( eventClass ) ); \
static wxPropertyInfo _propertyInfo##name( first, class_t::GetClassInfoStatic(), \ static wxPropertyInfo _propertyInfo##name( first, class_t::GetClassInfoStatic(), \
wxT(#name), &_typeInfo##name, NULL, wxAny() ); wxT(#name), &_typeInfo##name, NULL, wxAny() );

View File

@@ -205,7 +205,7 @@ void wxPluginLibrary::RegisterModules()
{ {
for ( const wxClassInfo *info = m_ourFirst; ; info = info->GetNext() ) for ( const wxClassInfo *info = m_ourFirst; ; info = info->GetNext() )
{ {
if( info->IsKindOf(CLASSINFO(wxModule)) ) if( info->IsKindOf(wxCLASSINFO(wxModule)) )
{ {
wxModule *m = wxDynamicCast(info->CreateObject(), wxModule); wxModule *m = wxDynamicCast(info->CreateObject(), wxModule);

View File

@@ -248,8 +248,8 @@ const wxClassInfo* wxMediaCtrl::NextBackend(wxClassInfo::const_iterator* it)
*it != end; ++(*it) ) *it != end; ++(*it) )
{ {
const wxClassInfo* classInfo = **it; const wxClassInfo* classInfo = **it;
if ( classInfo->IsKindOf(CLASSINFO(wxMediaBackend)) && if ( classInfo->IsKindOf(wxCLASSINFO(wxMediaBackend)) &&
classInfo != CLASSINFO(wxMediaBackend) ) classInfo != wxCLASSINFO(wxMediaBackend) )
{ {
++(*it); ++(*it);
return classInfo; return classInfo;

View File

@@ -56,7 +56,7 @@ void wxModule::RegisterModules()
{ {
const wxClassInfo* classInfo = *it; const wxClassInfo* classInfo = *it;
if ( classInfo->IsKindOf(CLASSINFO(wxModule)) && if ( classInfo->IsKindOf(wxCLASSINFO(wxModule)) &&
(classInfo != (& (wxModule::ms_classInfo))) ) (classInfo != (& (wxModule::ms_classInfo))) )
{ {
wxLogTrace(TRACE_MODULE, wxT("Registering module %s"), wxLogTrace(TRACE_MODULE, wxT("Registering module %s"),

View File

@@ -68,7 +68,7 @@ int wxGenericImageList::Add( const wxBitmap &bitmap )
const int index = int(m_images.GetCount()); const int index = int(m_images.GetCount());
if (bitmap.IsKindOf(CLASSINFO(wxIcon))) if (bitmap.IsKindOf(wxCLASSINFO(wxIcon)))
{ {
m_images.Append( new wxIcon( (const wxIcon&) bitmap ) ); m_images.Append( new wxIcon( (const wxIcon&) bitmap ) );
} }
@@ -155,7 +155,7 @@ bool wxGenericImageList::Replace( int index, const wxBitmap &bitmap )
wxCHECK_MSG( node, false, wxT("wrong index in image list") ); wxCHECK_MSG( node, false, wxT("wrong index in image list") );
wxBitmap* newBitmap = (bitmap.IsKindOf(CLASSINFO(wxIcon))) ? wxBitmap* newBitmap = (bitmap.IsKindOf(wxCLASSINFO(wxIcon))) ?
#if defined(__VISAGECPP__) #if defined(__VISAGECPP__)
//just can't do this in VisualAge now, with all this new Bitmap-Icon stuff //just can't do this in VisualAge now, with all this new Bitmap-Icon stuff
//so construct it from a bitmap object until I can figure this nonsense out. (DW) //so construct it from a bitmap object until I can figure this nonsense out. (DW)
@@ -188,7 +188,7 @@ bool wxGenericImageList::Replace( int index, const wxBitmap &bitmap, const wxBit
wxCHECK_MSG( node, false, wxT("wrong index in image list") ); wxCHECK_MSG( node, false, wxT("wrong index in image list") );
wxBitmap* newBitmap = (bitmap.IsKindOf(CLASSINFO(wxIcon))) ? wxBitmap* newBitmap = (bitmap.IsKindOf(wxCLASSINFO(wxIcon))) ?
#if defined(__VISAGECPP__) #if defined(__VISAGECPP__)
//just can't do this in VisualAge now, with all this new Bitmap-Icon stuff //just can't do this in VisualAge now, with all this new Bitmap-Icon stuff
//so construct it from a bitmap object until I can figure this nonsense out. (DW) //so construct it from a bitmap object until I can figure this nonsense out. (DW)
@@ -263,7 +263,7 @@ bool wxGenericImageList::Draw( int index, wxDC &dc, int x, int y,
wxBitmap *bm = (wxBitmap*)node->GetData(); wxBitmap *bm = (wxBitmap*)node->GetData();
if (bm->IsKindOf(CLASSINFO(wxIcon))) if (bm->IsKindOf(wxCLASSINFO(wxIcon)))
dc.DrawIcon( * ((wxIcon*) bm), x, y); dc.DrawIcon( * ((wxIcon*) bm), x, y);
else else
dc.DrawBitmap( *bm, x, y, (flags & wxIMAGELIST_DRAW_TRANSPARENT) > 0 ); dc.DrawBitmap( *bm, x, y, (flags & wxIMAGELIST_DRAW_TRANSPARENT) > 0 );

View File

@@ -2208,7 +2208,7 @@ wxTextCtrl *wxListMainWindow::EditLabel(long item, wxClassInfo* textControlClass
wxCHECK_MSG( (item >= 0) && ((size_t)item < GetItemCount()), NULL, wxCHECK_MSG( (item >= 0) && ((size_t)item < GetItemCount()), NULL,
wxT("wrong index in wxGenericListCtrl::EditLabel()") ); wxT("wrong index in wxGenericListCtrl::EditLabel()") );
wxASSERT_MSG( textControlClass->IsKindOf(CLASSINFO(wxTextCtrl)), wxASSERT_MSG( textControlClass->IsKindOf(wxCLASSINFO(wxTextCtrl)),
wxT("EditLabel() needs a text control") ); wxT("EditLabel() needs a text control") );
size_t itemEdit = (size_t)item; size_t itemEdit = (size_t)item;

View File

@@ -1225,9 +1225,9 @@ wxPanelTabView::wxPanelTabView(wxPanel *pan, long style)
m_panel = pan; m_panel = pan;
m_currentWindow = NULL; m_currentWindow = NULL;
if (m_panel->IsKindOf(CLASSINFO(wxTabbedDialog))) if (m_panel->IsKindOf(wxCLASSINFO(wxTabbedDialog)))
((wxTabbedDialog *)m_panel)->SetTabView(this); ((wxTabbedDialog *)m_panel)->SetTabView(this);
else if (m_panel->IsKindOf(CLASSINFO(wxTabbedPanel))) else if (m_panel->IsKindOf(wxCLASSINFO(wxTabbedPanel)))
((wxTabbedPanel *)m_panel)->SetTabView(this); ((wxTabbedPanel *)m_panel)->SetTabView(this);
SetWindow(m_panel); SetWindow(m_panel);

View File

@@ -74,7 +74,7 @@ public:
{ {
#if wxUSE_LIBGNOMEPRINT #if wxUSE_LIBGNOMEPRINT
// This module must be initialized AFTER gnomeprint's one // This module must be initialized AFTER gnomeprint's one
AddDependency(CLASSINFO(wxGnomePrintModule)); AddDependency(wxCLASSINFO(wxGnomePrintModule));
#endif #endif
} }
bool OnInit(); bool OnInit();

View File

@@ -61,7 +61,7 @@
static wxGDIImage* ConvertImage( const wxGDIImage& bitmap ) static wxGDIImage* ConvertImage( const wxGDIImage& bitmap )
{ {
bool isIcon = bitmap.IsKindOf( CLASSINFO(wxIcon) ); bool isIcon = bitmap.IsKindOf( wxCLASSINFO(wxIcon) );
if( !isIcon ) if( !isIcon )
{ {
@@ -99,10 +99,10 @@ bool wxStaticBitmap::Create(wxWindow *parent,
// we may have either bitmap or icon: if a bitmap with mask is passed, we // we may have either bitmap or icon: if a bitmap with mask is passed, we
// will transform it to an icon ourselves because otherwise the mask will // will transform it to an icon ourselves because otherwise the mask will
// be ignored by Windows // be ignored by Windows
m_isIcon = bitmap.IsKindOf(CLASSINFO(wxIcon)); m_isIcon = bitmap.IsKindOf(wxCLASSINFO(wxIcon));
wxGDIImage *image = ConvertImage( bitmap ); wxGDIImage *image = ConvertImage( bitmap );
m_isIcon = image->IsKindOf( CLASSINFO(wxIcon) ); m_isIcon = image->IsKindOf( wxCLASSINFO(wxIcon) );
// create the native control // create the native control
if ( !MSWCreateControl(wxT("STATIC"), wxEmptyString, pos, size) ) if ( !MSWCreateControl(wxT("STATIC"), wxEmptyString, pos, size) )
@@ -243,7 +243,7 @@ void wxStaticBitmap::SetImageNoCopy( wxGDIImage* image)
Free(); Free();
InvalidateBestSize(); InvalidateBestSize();
m_isIcon = image->IsKindOf( CLASSINFO(wxIcon) ); m_isIcon = image->IsKindOf( wxCLASSINFO(wxIcon) );
// the image has already been copied // the image has already been copied
m_image = image; m_image = image;

View File

@@ -1996,7 +1996,7 @@ void wxTreeCtrl::DeleteTextCtrl()
wxTextCtrl *wxTreeCtrl::EditLabel(const wxTreeItemId& item, wxTextCtrl *wxTreeCtrl::EditLabel(const wxTreeItemId& item,
wxClassInfo *textControlClass) wxClassInfo *textControlClass)
{ {
wxASSERT( textControlClass->IsKindOf(CLASSINFO(wxTextCtrl)) ); wxASSERT( textControlClass->IsKindOf(wxCLASSINFO(wxTextCtrl)) );
DeleteTextCtrl(); DeleteTextCtrl();
@@ -2156,7 +2156,7 @@ void wxTreeCtrl::SortChildren(const wxTreeItemId& item)
// may be why as if you don't use the DECLARE_CLASS/IMPLEMENT_CLASS // may be why as if you don't use the DECLARE_CLASS/IMPLEMENT_CLASS
// combo for your derived wxTreeCtrl if will sort without // combo for your derived wxTreeCtrl if will sort without
// OnCompareItems // OnCompareItems
if ( GetClassInfo() == CLASSINFO(wxTreeCtrl) ) if ( GetClassInfo() == wxCLASSINFO(wxTreeCtrl) )
{ {
TreeView_SortChildren(GetHwnd(), HITEM(item), 0); TreeView_SortChildren(GetHwnd(), HITEM(item), 0);
} }

View File

@@ -346,7 +346,7 @@ private:
virtual bool ProcessEvent( wxEvent& event ) virtual bool ProcessEvent( wxEvent& event )
{ {
if ( event.IsKindOf(CLASSINFO(wxHeaderCtrlEvent)) ) if ( event.IsKindOf(wxCLASSINFO(wxHeaderCtrlEvent)) )
{ {
wxHeaderCtrlEvent& hcEvent = wxHeaderCtrlEvent& hcEvent =
static_cast<wxHeaderCtrlEvent&>(event); static_cast<wxHeaderCtrlEvent&>(event);

View File

@@ -500,7 +500,7 @@ void wxPGProperty::InitAfterAdded( wxPropertyGridPageState* pageState,
// (so propgrid can be NULL, too). // (so propgrid can be NULL, too).
wxPGProperty* parent = m_parent; wxPGProperty* parent = m_parent;
bool parentIsRoot = parent->IsKindOf(CLASSINFO(wxPGRootProperty)); bool parentIsRoot = parent->IsKindOf(wxCLASSINFO(wxPGRootProperty));
// //
// Convert invalid cells to default ones in this grid // Convert invalid cells to default ones in this grid
@@ -2021,11 +2021,11 @@ const wxPGEditor* wxPGProperty::GetEditorClass() const
if ( GetDisplayedCommonValueCount() ) if ( GetDisplayedCommonValueCount() )
{ {
// TextCtrlAndButton -> ComboBoxAndButton // TextCtrlAndButton -> ComboBoxAndButton
if ( editor->IsKindOf(CLASSINFO(wxPGTextCtrlAndButtonEditor)) ) if ( wxDynamicCast(editor, wxPGTextCtrlAndButtonEditor) )
editor = wxPGEditor_ChoiceAndButton; editor = wxPGEditor_ChoiceAndButton;
// TextCtrl -> ComboBox // TextCtrl -> ComboBox
else if ( editor->IsKindOf(CLASSINFO(wxPGTextCtrlEditor)) ) else if ( wxDynamicCast(editor, wxPGTextCtrlEditor) )
editor = wxPGEditor_ComboBox; editor = wxPGEditor_ComboBox;
} }

View File

@@ -6342,7 +6342,7 @@ wxPGProperty* wxPropertyGridPopulator::Add( const wxString& propClass,
return NULL; return NULL;
} }
if ( !classInfo || !classInfo->IsKindOf(CLASSINFO(wxPGProperty)) ) if ( !classInfo || !classInfo->IsKindOf(wxCLASSINFO(wxPGProperty)) )
{ {
ProcessError(wxString::Format(wxT("'%s' is not valid property class"),propClass.c_str())); ProcessError(wxString::Format(wxT("'%s' is not valid property class"),propClass.c_str()));
return NULL; return NULL;

View File

@@ -1127,7 +1127,7 @@ bool wxEnumProperty::ValueFromString_( wxVariant& value, const wxString& text, i
bool asText = false; bool asText = false;
bool isEdit = this->IsKindOf(CLASSINFO(wxEditEnumProperty)); bool isEdit = this->IsKindOf(wxCLASSINFO(wxEditEnumProperty));
// If text not any of the choices, store as text instead // If text not any of the choices, store as text instead
// (but only if we are wxEditEnumProperty) // (but only if we are wxEditEnumProperty)

View File

@@ -6825,7 +6825,7 @@ wxString wxRichTextPlainText::GetTextForRange(const wxRichTextRange& range) cons
/// Returns true if this object can merge itself with the given one. /// Returns true if this object can merge itself with the given one.
bool wxRichTextPlainText::CanMerge(wxRichTextObject* object) const bool wxRichTextPlainText::CanMerge(wxRichTextObject* object) const
{ {
return object->GetClassInfo() == CLASSINFO(wxRichTextPlainText) && return object->GetClassInfo() == wxCLASSINFO(wxRichTextPlainText) &&
(m_text.empty() || (wxTextAttrEq(GetAttributes(), object->GetAttributes()) && m_properties == object->GetProperties())); (m_text.empty() || (wxTextAttrEq(GetAttributes(), object->GetAttributes()) && m_properties == object->GetProperties()));
} }
@@ -8817,7 +8817,7 @@ bool wxRichTextCell::EditProperties(wxWindow* parent, wxRichTextBuffer* buffer)
wxRichTextObjectPropertiesDialog cellDlg(this, wxGetTopLevelParent(parent), wxID_ANY, caption); wxRichTextObjectPropertiesDialog cellDlg(this, wxGetTopLevelParent(parent), wxID_ANY, caption);
cellDlg.SetAttributes(attr); cellDlg.SetAttributes(attr);
wxRichTextSizePage* sizePage = wxDynamicCast(cellDlg.FindPage(CLASSINFO(wxRichTextSizePage)), wxRichTextSizePage); wxRichTextSizePage* sizePage = wxDynamicCast(cellDlg.FindPage(wxCLASSINFO(wxRichTextSizePage)), wxRichTextSizePage);
if (sizePage) if (sizePage)
{ {
// We don't want position and floating controls for a cell. // We don't want position and floating controls for a cell.

View File

@@ -61,10 +61,10 @@ wxRichTextAttr wxRichTextStyleDefinition::GetStyleMergedWithBase(const wxRichTex
if (m_baseStyle.IsEmpty()) if (m_baseStyle.IsEmpty())
return m_style; return m_style;
bool isParaStyle = IsKindOf(CLASSINFO(wxRichTextParagraphStyleDefinition)); bool isParaStyle = IsKindOf(wxCLASSINFO(wxRichTextParagraphStyleDefinition));
bool isCharStyle = IsKindOf(CLASSINFO(wxRichTextCharacterStyleDefinition)); bool isCharStyle = IsKindOf(wxCLASSINFO(wxRichTextCharacterStyleDefinition));
bool isListStyle = IsKindOf(CLASSINFO(wxRichTextListStyleDefinition)); bool isListStyle = IsKindOf(wxCLASSINFO(wxRichTextListStyleDefinition));
bool isBoxStyle = IsKindOf(CLASSINFO(wxRichTextBoxStyleDefinition)); bool isBoxStyle = IsKindOf(wxCLASSINFO(wxRichTextBoxStyleDefinition));
// Collect the styles, detecting loops // Collect the styles, detecting loops
wxArrayString styleNames; wxArrayString styleNames;