#include "wx/app.h"
#include "wx/os2/gdiimage.h"
+#include "wx/listimpl.cpp"
+WX_DEFINE_LIST(wxGDIImageHandlerList);
+
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler, wxObject)
#endif
-// ----------------------------------------------------------------------------
-// private functions
-// ----------------------------------------------------------------------------
-
-static wxSize GetHiconSize(WXHICON hicon);
-
// ============================================================================
// implementation
// ============================================================================
-wxList wxGDIImage::ms_handlers;
+wxGDIImageHandlerList wxGDIImage::ms_handlers;
// ----------------------------------------------------------------------------
// wxGDIImage functions forwarded to wxGDIImageRefData
const wxString& rName
)
{
- wxNode* pNode = ms_handlers.First();
+ wxGDIImageHandlerList::compatibility_iterator pNode = ms_handlers.GetFirst();
- while (pNode)
+ while ( pNode )
{
- wxGDIImageHandler* pHandler = (wxGDIImageHandler *)pNode->Data();
+ wxGDIImageHandler* pHandler = pNode->GetData();
- if (pHandler->GetName() == rName)
- return(pHandler);
- pNode = pNode->Next();
+ if ( pHandler->GetName() == rName )
+ return pHandler;
+ pNode = pNode->GetNext();
}
- return(NULL);
+ return((wxGDIImageHandler*)NULL);
}
wxGDIImageHandler* wxGDIImage::FindHandler(
, long lType
)
{
- wxNode* pNode = ms_handlers.First();
-
- while (pNode)
+ wxGDIImageHandlerList::compatibility_iterator pNode = ms_handlers.GetFirst();
+ while ( pNode )
{
- wxGDIImageHandler* pHandler = (wxGDIImageHandler *)pNode->Data();
+ wxGDIImageHandler* pHandler = pNode->GetData();
- if ((pHandler->GetExtension() = rExtension) &&
- (lType == -1 || pHandler->GetType() == lType))
+ if ( (pHandler->GetExtension() = rExtension) &&
+ (lType == -1 || pHandler->GetType() == lType) )
{
- return(pHandler);
+ return pHandler;
}
- pNode = pNode->Next();
+ pNode = pNode->GetNext();
}
- return(NULL);
+ return((wxGDIImageHandler*)NULL);
}
wxGDIImageHandler* wxGDIImage::FindHandler(
long lType
)
{
- wxNode* pNode = ms_handlers.First();
+ wxGDIImageHandlerList::compatibility_iterator pNode = ms_handlers.GetFirst();
- while (pNode)
+ while ( pNode )
{
- wxGDIImageHandler* pHandler = (wxGDIImageHandler *)pNode->Data();
+ wxGDIImageHandler* pHandler = pNode->GetData();
- if (pHandler->GetType() == lType)
+ if ( pHandler->GetType() == lType )
return pHandler;
- pNode = pNode->Next();
+ pNode = pNode->GetNext();
}
- return(NULL);
+ return((wxGDIImageHandler*)NULL);
}
void wxGDIImage::CleanUpHandlers()
{
- wxNode* pNode = ms_handlers.First();
+ wxGDIImageHandlerList::compatibility_iterator pNode = ms_handlers.GetFirst();
- while (pNode)
+ while ( pNode )
{
- wxGDIImageHandler* pHandler = (wxGDIImageHandler *)pNode->Data();
- wxNode* pNext = pNode->Next();
+ wxGDIImageHandler* pHandler = pNode->GetData();
+ wxGDIImageHandlerList::compatibility_iterator pNext = pNode->GetNext();
delete pHandler;
-#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )))
- delete pNode;
-#endif
+ ms_handlers.Erase( pNode );
pNode = pNext;
}
}
return pIcon->Ok();
} // end of wxICOResourceHandler::LoadIcon
-// ----------------------------------------------------------------------------
-// private functions
-// ----------------------------------------------------------------------------
-
-static wxSize GetHiconSize(
- WXHICON hicon
-)
-{
- wxSize vSize(32, 32); // default
-
- // all OS/2 icons are 32x32
- return(vSize);
-}
-