introduced wxICON_DEFAULT_TYPE and wxBITMAP_DEFAULT_TYPE; documented these default argument values; matched the wxBitmap and wxIcon interfaces to their real implementations; revised icon.h interface header

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2008-09-21 20:03:14 +00:00
parent af27647706
commit cbea3ec6ae
18 changed files with 253 additions and 244 deletions

View File

@@ -18,10 +18,6 @@
// wxIcon
//-----------------------------------------------------------------------------
#ifndef wxICON_DEFAULT_BITMAP_TYPE
#define wxICON_DEFAULT_BITMAP_TYPE wxBITMAP_TYPE_XPM
#endif
class WXDLLIMPEXP_CORE wxIcon: public wxBitmap
{
public:
@@ -35,7 +31,7 @@ public:
// For compatibility with wxMSW where desired size is sometimes required to
// distinguish between multiple icons in a resource.
wxIcon( const wxString& filename,
wxBitmapType type = wxICON_DEFAULT_BITMAP_TYPE,
wxBitmapType type = wxICON_DEFAULT_TYPE,
int WXUNUSED(desiredWidth)=-1, int WXUNUSED(desiredHeight)=-1 ) :
wxBitmap(filename, type)
{
@@ -46,6 +42,10 @@ public:
{
}
bool LoadFile(const wxString& name, wxBitmapType flags = wxICON_DEFAULT_TYPE,
int WXUNUSED(desiredWidth)=-1, int WXUNUSED(desiredHeight)=-1)
{ return LoadFile(name, flags); }
// create from bitmap (which should have a mask unless it's monochrome):
// there shouldn't be any implicit bitmap -> icon conversion (i.e. no
// ctors, assignment operators...), but it's ok to have such function