]> git.saurik.com Git - wxWidgets.git/blobdiff - src/qt/icon.cpp
Fixed remaining int vs. long warnings.
[wxWidgets.git] / src / qt / icon.cpp
index 7ab44845375870a4f734f40d79b1ff40c85d8da0..cc5b28500e090b734458e365379ff8e94c3a5434 100644 (file)
@@ -1,10 +1,11 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        icon.cpp
-// Purpose:
-// Author:      Robert Roebling
-// Created:     01/02/97
-// Id:
-// Copyright:   (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
+// Purpose:     wxIcon class
+// Author:      AUTHOR
+// Modified by:
+// Created:     ??/??/98
+// RCS-ID:      $Id$
+// Copyright:   (c) AUTHOR
 // Licence:    wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 
 #include "wx/icon.h"
 
-//-----------------------------------------------------------------------------
-// wxIcon
-//-----------------------------------------------------------------------------
+IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap)
 
-IMPLEMENT_DYNAMIC_CLASS(wxIcon,wxBitmap)
+/*
+ * Icons
+ */
 
-wxIcon::wxIcon( char **bits, int WXUNUSED(width), int WXUNUSED(height) ) :
-    wxBitmap( bits ) 
+
+wxIconRefData::wxIconRefData()
+{
+    // TODO: init icon handle
+}
+
+wxIconRefData::~wxIconRefData()
+{
+    // TODO: destroy icon handle
+}
+
+wxIcon::wxIcon()
+{
+}
+
+wxIcon::wxIcon(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSED(height))
+{
+}
+
+wxIcon::wxIcon(const wxString& icon_file, long flags,
+    int desiredWidth, int desiredHeight)
+
+{
+    LoadFile(icon_file, flags, desiredWidth, desiredHeight);
+}
+
+wxIcon::~wxIcon()
+{
+}
+
+bool wxIcon::LoadFile(const wxString& filename, long type,
+    int desiredWidth, int desiredHeight)
 {
-};
-    
+  UnRef();
+
+  m_refData = new wxIconRefData;
+
+  wxBitmapHandler *handler = FindHandler(type);
+
+  if ( handler )
+       return handler->LoadFile(this, filename, type, desiredWidth, desiredHeight);
+  else
+       return FALSE;
+}
+