]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/doxygen/overviews/bitmap.h
Fix broken and missing DataView interface items for Phoenix
[wxWidgets.git] / docs / doxygen / overviews / bitmap.h
index 0b9f20d5b9c9ba183915edf6c62d9d72fc3b8867..6b22d1a051877252e6b5b7623ffe26b9d13b9da4 100644 (file)
@@ -3,18 +3,14 @@
 // Purpose:     topic overview
 // Author:      wxWidgets team
 // RCS-ID:      $Id$
 // Purpose:     topic overview
 // Author:      wxWidgets team
 // RCS-ID:      $Id$
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 /**
 
 @page overview_bitmap Bitmaps and Icons
 
 /////////////////////////////////////////////////////////////////////////////
 
 /**
 
 @page overview_bitmap Bitmaps and Icons
 
-Classes:
-@li wxBitmap
-@li wxBitmapHandler
-@li wxIcon
-@li wxCursor
+@tableofcontents
 
 The wxBitmap class encapsulates the concept of a platform-dependent bitmap,
 either monochrome or colour. Platform-specific methods for creating a wxBitmap
 
 The wxBitmap class encapsulates the concept of a platform-dependent bitmap,
 either monochrome or colour. Platform-specific methods for creating a wxBitmap
@@ -33,7 +29,7 @@ include the XPM inline as below, since it's C code, or you can load it at
 run-time.
 
 @code
 run-time.
 
 @code
-#include "mondrian.xpm"
+#include "sample.xpm"
 @endcode
 
 Sometimes you wish to use a .ico resource on Windows, and XPMs on other
 @endcode
 
 Sometimes you wish to use a .ico resource on Windows, and XPMs on other
@@ -44,16 +40,16 @@ A macro, wxICON(), is available which creates an icon using an XPM on the
 appropriate platform, or an icon resource on Windows:
 
 @code
 appropriate platform, or an icon resource on Windows:
 
 @code
-wxIcon icon(wxICON(mondrian));
+wxIcon icon(wxICON(sample));
 
 // The above line is equivalent to this:
 
 #if defined(__WXGTK__) || defined(__WXMOTIF__)
 
 // The above line is equivalent to this:
 
 #if defined(__WXGTK__) || defined(__WXMOTIF__)
-    wxIcon icon(mondrian_xpm);
+    wxIcon icon(sample_xpm);
 #endif
 
 #if defined(__WXMSW__)
 #endif
 
 #if defined(__WXMSW__)
-    wxIcon icon("mondrian");
+    wxIcon icon("sample");
 #endif
 @endcode
 
 #endif
 @endcode
 
@@ -70,7 +66,7 @@ wxBitmap bmp(wxBITMAP(bmpname));
 
 // which is roughly equivalent to the following
 #if defined(__WXMSW__) || defined(__WXPM__)
 
 // which is roughly equivalent to the following
 #if defined(__WXMSW__) || defined(__WXPM__)
-    wxBitmap bmp("bmpname", wxBITMAP_TYPE_RESOURCE);
+    wxBitmap bmp("bmpname", wxBITMAP_TYPE_BMP_RESOURCE);
 #else // Unix
     wxBitmap bmp(bmpname_xpm, wxBITMAP_TYPE_XPM);
 #endif
 #else // Unix
     wxBitmap bmp(bmpname_xpm, wxBITMAP_TYPE_XPM);
 #endif
@@ -78,14 +74,20 @@ wxBitmap bmp(wxBITMAP(bmpname));
 
 You should always use wxICON() and wxBITMAP() macros because they work for any
 platform (unlike the code above which doesn't deal with wxMac, wxX11, ...) and
 
 You should always use wxICON() and wxBITMAP() macros because they work for any
 platform (unlike the code above which doesn't deal with wxMac, wxX11, ...) and
-are shorter and more clear than versions with many @ifdef_ blocks. Even better,
-use the same XPMs on all platforms.
+are shorter and more clear than versions with many @ifdef_ blocks.
+Alternatively, you could use the same XPMs on all platforms and avoid dealing
+with Windows resource files.
 
 
-@li @ref overview_bitmap_supportedformats
-@li @ref overview_bitmap_handlers
+If you'd like to embed bitmaps with alpha transparency in your program, neither
+XPM nor BMP formats are appropriate as they don't have support for alpha and
+another format, typically PNG, should be used. wxWidgets provides a similar
+helper for PNG bitmaps called wxBITMAP_PNG() that can be used to either load
+PNG files embedded in resources (meaning either Windows resource section of the
+executable file or OS X "Resource" subdirectory of the application bundle) or
+arrays containing PNG data included into the program code itself.
 
 
+@see @ref group_class_gdi
 
 
-<hr>
 
 
 @section overview_bitmap_supportedformats Supported Bitmap File Formats
 
 
 @section overview_bitmap_supportedformats Supported Bitmap File Formats