Added method for mimietype implementation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
2000-01-24 22:50:28 +00:00
parent 006713a260
commit 2a6b16e36b
2 changed files with 16 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/mimetype.h // Name: wx/mimetype.h
// Purpose: classes and functions to manage MIME types // Purpose: classes and functions to manage MIME types
// Author: David Webster // Author: David Webster
// Modified by: // Modified by:
// Created: 01.21.99 // Created: 01.21.99
// RCS-ID: $Id$ // RCS-ID: $Id$
@@ -39,6 +39,7 @@ public:
// implement accessor functions // implement accessor functions
bool GetExtensions(wxArrayString& extensions); bool GetExtensions(wxArrayString& extensions);
bool GetMimeType(wxString *mimeType) const; bool GetMimeType(wxString *mimeType) const;
bool GetMimeTypes(wxArrayString& mimeTypes) const;
bool GetIcon(wxIcon *icon) const; bool GetIcon(wxIcon *icon) const;
bool GetDescription(wxString *desc) const; bool GetDescription(wxString *desc) const;
bool GetOpenCommand(wxString *openCmd, bool GetOpenCommand(wxString *openCmd,

View File

@@ -229,6 +229,20 @@ bool wxFileTypeImpl::GetMimeType(wxString *mimeType) const
return FALSE; return FALSE;
} }
bool wxFileTypeImpl::GetMimeTypes(wxArrayString& mimeTypes) const
{
wxString s;
if (GetMimeType(&s))
{
mimeTypes.Clear();
mimeTypes.Add(s);
return TRUE;
}
else
return FALSE;
}
bool wxFileTypeImpl::GetIcon(wxIcon *icon) const bool wxFileTypeImpl::GetIcon(wxIcon *icon) const
{ {
#if wxUSE_GUI #if wxUSE_GUI