]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/gdiimage.cpp
cleaning up, adding support for Quartz / Themeing before 10.3
[wxWidgets.git] / src / os2 / gdiimage.cpp
index 24c76a3dabbb030449499afb52b007b173fbd16b..1c134658804378a8fbe37f1af246a694b4b6c3a0 100644 (file)
@@ -227,12 +227,6 @@ private:
     IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler, wxObject)
 #endif
 
-// ----------------------------------------------------------------------------
-// private functions
-// ----------------------------------------------------------------------------
-
-static wxSize GetHiconSize(WXHICON hicon);
-
 // ============================================================================
 // implementation
 // ============================================================================
@@ -298,17 +292,17 @@ wxGDIImageHandler* wxGDIImage::FindHandler(
   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(
@@ -316,49 +310,50 @@ 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
 )
 {
-    wxGDIImageHandlerList::compatibility_iterator node = ms_handlers.GetFirst();
-    while ( node )
+    wxGDIImageHandlerList::compatibility_iterator   pNode = ms_handlers.GetFirst();
+
+    while ( pNode )
     {
-        wxGDIImageHandler *handler = node->GetData();
-        if ( handler->GetType() == type )
-            return handler;
+        wxGDIImageHandler*          pHandler = pNode->GetData();
 
-        node = node->GetNext();
+        if ( pHandler->GetType() == lType )
+            return pHandler;
+        pNode = pNode->GetNext();
     }
-
     return((wxGDIImageHandler*)NULL);
 }
 
 void wxGDIImage::CleanUpHandlers()
 {
-    wxGDIImageHandlerList::compatibility_iterator node = ms_handlers.GetFirst();
-    while ( node )
+    wxGDIImageHandlerList::compatibility_iterator   pNode = ms_handlers.GetFirst();
+
+    while ( pNode )
     {
-        wxGDIImageHandler *handler = node->GetData();
-        wxGDIImageHandlerList::compatibility_iterator next = node->GetNext();
-        delete handler;
-        ms_handlers.Erase( node );
-        node = next;
+        wxGDIImageHandler*                              pHandler = pNode->GetData();
+        wxGDIImageHandlerList::compatibility_iterator   pNext = pNode->GetNext();
+
+        delete pHandler;
+        ms_handlers.Erase( pNode );
+        pNode = pNext;
     }
 }
 
@@ -510,17 +505,3 @@ bool wxICOResourceHandler::LoadIcon(
     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);
-}
-