\membersection{wxFileType::GetIcon}\label{wxfiletypegeticon}
-\func{bool}{GetIcon}{\param{wxIcon*}{ icon}}
+\func{bool}{GetIcon}{\param{wxIcon*}{ icon}, \param{wxString*}{ iconFile = NULL}, \param{int*}{ iconIndex = NULL}, \param{int}{ iconSize = wxICON\_LARGE}}
-If the function returns {\tt true}, the icon associated with this file type will be
-created and assigned to the {\it icon} parameter.
+If the function returns {\tt TRUE}, the icon associated with this file type will be
+created and assigned to the {\it icon} parameter. {\it iconFile} is assigned the file name
+that contains the icon and {\it iconIndex} is assigned the index of the icon
+(windows and unix only). A 32x32 icon is assigned if {\it iconSize} is wxICON\_LARGE
+and a 16x16 icon is assigned if {\it iconSize} is wxICON\_SMALL (windows only).
{\bf Unix:} MIME manager gathers information about icons from GNOME
and KDE settings and thus GetIcon's success depends on availability
new revision: 1.170; previous revision: 1.169
done
+
+22. patch [ 619705 ] Fixes wxApp::GetComCtl32Version
+
+Checking in wxWindows/src/msw/app.cpp;
+/pack/cvsroots/wxwindows/wxWindows/src/msw/app.cpp,v <-- app.cpp
+new revision: 1.186; previous revision: 1.185
+done
+
(extend editor API) to work around bad checkbox
behaviour (click, click, click, click away...) and
reduce checkbox size on non-Windows platforms.
+- Add wxNotebook::HitTest for non-Windows platforms.
Version: $Id$
wxMAILCAP_ALL = 15
};
+#define wxICON_LARGE 0
+#define wxICON_SMALL 1
+
/*
TODO: would it be more convenient to have this class?
// in this file (Win-only) is in iconIndex
bool GetIcon(wxIcon *icon,
wxString *iconFile = NULL,
- int *iconIndex = NULL) const;
+ int *iconIndex = NULL,
+ int iconSize = wxICON_LARGE) const;
// get a brief file type description ("*.txt" => "text document")
bool GetDescription(wxString *desc) const;
bool GetExtensions(wxArrayString& extensions);
bool GetMimeType(wxString *mimeType) const;
bool GetMimeTypes(wxArrayString& mimeTypes) const;
- bool GetIcon(wxIcon *icon, wxString *sCommand = NULL, int *iIndex = NULL) const;
+ bool GetIcon(wxIcon *icon, wxString *sCommand = NULL, int *iIndex = NULL,
+ int iconSize = wxICON_LARGE) const;
bool GetDescription(wxString *desc) const;
bool GetOpenCommand(wxString *openCmd,
const wxFileType::MessageParameters& params) const;
bool wxFileType::GetIcon(wxIcon *icon,
wxString *iconFile,
- int *iconIndex) const
+ int *iconIndex,
+ int iconSize) const
{
if ( m_info )
{
return TRUE;
}
-#if defined(__WXMSW__) || defined(__UNIX__)
+#if defined(__WXMSW__)
+ return m_impl->GetIcon(icon, iconFile, iconIndex, iconSize);
+#elif defined(__UNIX__)
return m_impl->GetIcon(icon, iconFile, iconIndex);
#else
return m_impl->GetIcon(icon);
bool wxFileTypeImpl::GetIcon(wxIcon *icon,
wxString *iconFile,
- int *iconIndex) const
+ int *iconIndex,
+ int iconSize) const
{
#if wxUSE_GUI
wxString strIconKey;
// here we need C based counting!
int nIndex = wxAtoi(strIndex);
- HICON hIcon = ExtractIcon(GetModuleHandle(NULL), strExpPath, nIndex);
+ HICON hIcon, hIconLarge, hIconSmall;
+ ExtractIconEx(strExpPath, nIndex, &hIconLarge, &hIconSmall, 1);
+
+ hIcon = (iconSize == wxICON_LARGE) ? hIconLarge : hIconSmall;
+
switch ( (int)hIcon ) {
case 0: // means no icons were found