1. fixes for DrawRotatedText(), drawing sample extended to show it

2. implemented colour/font support for wxTreeCtrl items
3. corrected a bug in wxListCtrl colour/font support code, the items should
   now be deleted ok
4. SetProcessAffinityMask() correction, wxThread::SetConcurrency() kind of
   works (difficult to test on a UP machine)
5. wxMimeType::EnumAllFileTypes() added, works (somewhat) under MSW
6. made default fonts under MSW 10 points and not 12 - this is the standard
   size


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-12-07 00:09:40 +00:00
parent c8ce6bccc3
commit 696e1ea0b7
11 changed files with 348 additions and 79 deletions

View File

@@ -31,8 +31,9 @@
//#define TEST_ARRAYS
//#define TEST_LOG
#define TEST_MIME
//#define TEST_STRINGS
#define TEST_THREADS
//#define TEST_THREADS
//#define TEST_TIME
//#define TEST_LONGLONG
@@ -40,6 +41,48 @@
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// MIME types
// ----------------------------------------------------------------------------
#ifdef TEST_MIME
#include <wx/mimetype.h>
static void TestMimeEnum()
{
wxMimeTypesManager mimeTM;
wxArrayString mimetypes;
size_t count = mimeTM.EnumAllFileTypes(mimetypes);
printf("*** All %u known filetypes: ***\n", count);
wxArrayString exts;
wxString desc;
for ( size_t n = 0; n < count; n++ )
{
wxFileType *filetype = mimeTM.GetFileTypeFromMimeType(mimetypes[n]);
if ( !filetype )
continue;
filetype->GetDescription(&desc);
filetype->GetExtensions(exts);
wxString extsAll;
for ( size_t e = 0; e < exts.GetCount(); e++ )
{
if ( e > 0 )
extsAll << _T(", ");
extsAll += exts[e];
}
printf("\t%s: %s (%s)\n", mimetypes[n], desc, extsAll);
}
}
#endif // TEST_MIME
// ----------------------------------------------------------------------------
// long long
// ----------------------------------------------------------------------------
@@ -647,7 +690,10 @@ int main(int argc, char **argv)
#endif // TEST_LOG
#ifdef TEST_THREADS
printf("This system has %d CPUs\n", wxThread::GetCPUCount());
int nCPUs = wxThread::GetCPUCount();
printf("This system has %d CPUs\n", nCPUs);
if ( nCPUs != -1 )
wxThread::SetConcurrency(nCPUs);
if ( argc > 1 && argv[1][0] == 't' )
wxLog::AddTraceMask("thread");
@@ -670,6 +716,10 @@ int main(int argc, char **argv)
TestDivision();
#endif // TEST_LONGLONG
#ifdef TEST_MIME
TestMimeEnum();
#endif // TEST_MIME
#ifdef TEST_TIME
TestTimeStatic();
TestTimeSet();