LoadFile( icon_file, (wxBitmapType) flags, desiredWidth, desiredHeight );
}
+wxIcon::wxIcon(WXHICON icon, const wxSize& size)
+ : wxGDIObject()
+{
+ // as the icon owns that ref, we have to acquire it as well
+ if (icon)
+ AcquireIconRef( (IconRef) icon ) ;
+
+ m_refData = new wxIconRefData( icon ) ;
+ M_ICONDATA->SetWidth( size.x ) ;
+ M_ICONDATA->SetHeight( size.y ) ;
+}
+
wxIcon::~wxIcon()
{
}
return 32;
}
-void wxIcon::SetDepth( int depth )
+void wxIcon::SetDepth( int WXUNUSED(depth) )
{
}
-void wxIcon::SetWidth( int width )
+void wxIcon::SetWidth( int WXUNUSED(width) )
{
}
-void wxIcon::SetHeight( int height )
+void wxIcon::SetHeight( int WXUNUSED(height) )
{
}
-bool wxIcon::Ok() const
+bool wxIcon::IsOk() const
{
return m_refData != NULL ;
}
{
theId = kAlertStopIcon ;
}
+ else if ( filename == wxT("wxICON_FOLDER") )
+ {
+ theId = kGenericFolderIcon ;
+ }
+ else if ( filename == wxT("wxICON_FOLDER_OPEN") )
+ {
+ theId = kOpenFolderIcon ;
+ }
+ else if ( filename == wxT("wxICON_NORMAL_FILE") )
+ {
+ theId = kGenericDocumentIcon ;
+ }
else
{
#if 0
IMPLEMENT_DYNAMIC_CLASS(wxICONResourceHandler, wxBitmapHandler)
bool wxICONResourceHandler::LoadFile(
- wxBitmap *bitmap, const wxString& name, long flags,
+ wxBitmap *bitmap, const wxString& name, long WXUNUSED(flags),
int desiredWidth, int desiredHeight )
{
wxIcon icon ;