Include wx/intl.h according to precompiled headers of wx/wx.h (with other minor cleaning).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-04-25 14:38:19 +00:00
parent ee19674c9f
commit 88a7a4e10e
106 changed files with 763 additions and 564 deletions

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: config.cpp // Name: src/common/config.cpp
// Purpose: implementation of wxConfigBase class // Purpose: implementation of wxConfigBase class
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
@@ -16,8 +16,8 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif //__BORLANDC__ #endif //__BORLANDC__
#ifndef wxUSE_CONFIG_NATIVE #ifndef wxUSE_CONFIG_NATIVE
@@ -25,7 +25,11 @@
#endif #endif
#include "wx/config.h" #include "wx/config.h"
#include "wx/intl.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif //WX_PRECOMP
#include "wx/log.h" #include "wx/log.h"
#include "wx/arrstr.h" #include "wx/arrstr.h"
@@ -447,5 +451,3 @@ void wxSplitPath(wxArrayString& aParts, const wxChar *sz)
pc++; pc++;
} }
} }

View File

@@ -68,9 +68,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/string.h" #include "wx/string.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h"
#endif // WX_PRECOMP #endif // WX_PRECOMP
#include "wx/intl.h"
#include "wx/thread.h" #include "wx/thread.h"
#include "wx/tokenzr.h" #include "wx/tokenzr.h"
#include "wx/module.h" #include "wx/module.h"
@@ -2403,40 +2403,42 @@ wxString wxDateTime::Format(const wxChar *format, const TimeZone& tz) const
{ {
nLostWeekDays += year++ % 4 ? 1 : 2; nLostWeekDays += year++ % 4 ? 1 : 2;
} }
// Keep year below 2000 so the 2digit year number // Keep year below 2000 so the 2digit year number
// can never match the month or day of the month // can never match the month or day of the month
if (year>=2000) year-=28; if (year>=2000) year-=28;
// at any rate, we couldn't go further than 1988 + 9 + 28! // at any rate, we couldn't go further than 1988 + 9 + 28!
wxASSERT_MSG( year < 2030, wxASSERT_MSG( year < 2030,
_T("logic error in wxDateTime::Format") ); _T("logic error in wxDateTime::Format") );
wxString strYear, strYear2; wxString strYear, strYear2;
strYear.Printf(_T("%d"), year); strYear.Printf(_T("%d"), year);
strYear2.Printf(_T("%d"), year % 100); strYear2.Printf(_T("%d"), year % 100);
// find four strings not occurring in format (this is surely // find four strings not occurring in format (this is surely
// not the optimal way of doing it... improvements welcome!) // not the optimal way of doing it... improvements welcome!)
wxString fmt2 = format; wxString fmt2 = format;
wxString replacement,replacement2,replacement3,replacement4; wxString replacement,replacement2,replacement3,replacement4;
for (int rnr=1; rnr<5 ; rnr++) { for (int rnr=1; rnr<5 ; rnr++)
wxString r = (wxChar)-rnr; {
while ( fmt2.Find(r) != wxNOT_FOUND ) wxString r = (wxChar)-rnr;
{ while ( fmt2.Find(r) != wxNOT_FOUND )
r << (wxChar)-rnr; {
} r << (wxChar)-rnr;
}
switch (rnr) { switch (rnr)
case 1: replacement=r; break; {
case 2: replacement2=r; break; case 1: replacement=r; break;
case 3: replacement3=r; break; case 2: replacement2=r; break;
case 4: replacement4=r; break; case 3: replacement3=r; break;
} case 4: replacement4=r; break;
} }
}
// replace all occurrences of year with it // replace all occurrences of year with it
bool wasReplaced = fmt2.Replace(strYear, replacement) > 0; bool wasReplaced = fmt2.Replace(strYear, replacement) > 0;
// evaluation order ensures we always attempt the replacement. // evaluation order ensures we always attempt the replacement.
wasReplaced = (fmt2.Replace(strYear2, replacement2) > 0) | wasReplaced ; wasReplaced = (fmt2.Replace(strYear2, replacement2) > 0) | wasReplaced ;
// use strftime() to format the same date but in supported // use strftime() to format the same date but in supported
// year // year
@@ -2461,10 +2463,10 @@ wxString wxDateTime::Format(const wxChar *format, const TimeZone& tz) const
&tmAdjusted); &tmAdjusted);
// now replace the occurrence of 1999 with the real year // now replace the occurrence of 1999 with the real year
// we do this in two stages to stop the 2 digit year // we do this in two stages to stop the 2 digit year
// matching any substring of the 4 digit year. // matching any substring of the 4 digit year.
// Any day,month hours and minutes components should be safe due // Any day,month hours and minutes components should be safe due
// to ensuring the range of the years. // to ensuring the range of the years.
wxString strYearReal, strYearReal2; wxString strYearReal, strYearReal2;
strYearReal.Printf(_T("%04d"), yearReal); strYearReal.Printf(_T("%04d"), yearReal);
strYearReal2.Printf(_T("%02d"), yearReal % 100); strYearReal2.Printf(_T("%02d"), yearReal % 100);

View File

@@ -22,10 +22,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/intl.h"
#endif //WX_PRECOMP #endif //WX_PRECOMP
#include "wx/intl.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> // for memmove #include <string.h> // for memmove

View File

@@ -11,17 +11,19 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_IMAGE && wxUSE_LIBJPEG #if wxUSE_IMAGE && wxUSE_LIBJPEG
#include "wx/imagjpeg.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/log.h" #include "wx/log.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/intl.h"
#endif #endif
#include "wx/imagjpeg.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/debug.h" #include "wx/debug.h"
@@ -45,7 +47,6 @@ extern "C"
#include "wx/filefn.h" #include "wx/filefn.h"
#include "wx/wfstream.h" #include "wx/wfstream.h"
#include "wx/intl.h"
#include "wx/module.h" #include "wx/module.h"
// For memcpy // For memcpy

View File

@@ -11,17 +11,18 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif
#ifndef WX_PRECOMP
#endif #endif
#if wxUSE_IMAGE && wxUSE_PNM #if wxUSE_IMAGE && wxUSE_PNM
#include "wx/imagpnm.h" #include "wx/imagpnm.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h"
#include "wx/txtstrm.h" #include "wx/txtstrm.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@@ -16,12 +16,14 @@
#if wxUSE_IMAGE && wxUSE_LIBTIFF #if wxUSE_IMAGE && wxUSE_LIBTIFF
#include "wx/imagtiff.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/log.h" #include "wx/log.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/intl.h"
#endif #endif
#include "wx/imagtiff.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/debug.h" #include "wx/debug.h"
extern "C" extern "C"
@@ -31,7 +33,6 @@ extern "C"
} }
#include "wx/filefn.h" #include "wx/filefn.h"
#include "wx/wfstream.h" #include "wx/wfstream.h"
#include "wx/intl.h"
#include "wx/module.h" #include "wx/module.h"
#ifndef TIFFLINKAGEMODE #ifndef TIFFLINKAGEMODE

View File

@@ -27,20 +27,20 @@
#if wxUSE_MIMETYPE #if wxUSE_MIMETYPE
#include "wx/mimetype.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h"
#endif //WX_PRECOMP #endif //WX_PRECOMP
#include "wx/module.h" #include "wx/module.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/file.h" #include "wx/file.h"
#include "wx/iconloc.h" #include "wx/iconloc.h"
#include "wx/intl.h"
#include "wx/confbase.h" #include "wx/confbase.h"
#include "wx/mimetype.h"
// other standard headers // other standard headers
#include <ctype.h> #include <ctype.h>

View File

@@ -16,12 +16,13 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#include "wx/module.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/hash.h" #include "wx/hash.h"
#include "wx/intl.h"
#endif #endif
#include "wx/module.h"
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/listimpl.cpp" #include "wx/listimpl.cpp"

View File

@@ -28,7 +28,7 @@
#include "wx/statbox.h" #include "wx/statbox.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/listimpl.cpp" #include "wx/listimpl.cpp"
#include "wx/intl.h"
#if WXWIN_COMPATIBILITY_2_4 #if WXWIN_COMPATIBILITY_2_4
#include "wx/notebook.h" #include "wx/notebook.h"
#endif #endif

View File

@@ -27,6 +27,7 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/object.h" #include "wx/object.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h"
#endif #endif
#include "wx/app.h" #include "wx/app.h"
@@ -35,7 +36,6 @@
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/module.h" #include "wx/module.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h"
#include "wx/event.h" #include "wx/event.h"
#include "wx/sckaddr.h" #include "wx/sckaddr.h"

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: common/stockitem.cpp // Name: src/common/stockitem.cpp
// Purpose: Stock buttons, menu and toolbar items labels // Purpose: Stock buttons, menu and toolbar items labels
// Author: Vaclav Slavik // Author: Vaclav Slavik
// Modified by: // Modified by:
@@ -25,7 +25,11 @@
#endif #endif
#include "wx/stockitem.h" #include "wx/stockitem.h"
#include "wx/intl.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/utils.h" // for wxStripMenuCodes() #include "wx/utils.h" // for wxStripMenuCodes()
bool wxIsStockID(wxWindowID id) bool wxIsStockID(wxWindowID id)

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// Name: zstream.cpp // Name: src/common/zstream.cpp
// Purpose: Compressed stream classes // Purpose: Compressed stream classes
// Author: Guilhem Lavaux // Author: Guilhem Lavaux
// Modified by: Mike Wetherell // Modified by: Mike Wetherell
@@ -13,14 +13,18 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_ZLIB && wxUSE_STREAMS #if wxUSE_ZLIB && wxUSE_STREAMS
#include "wx/zstream.h" #include "wx/zstream.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
// normally, the compiler options should contain -I../zlib, but it is // normally, the compiler options should contain -I../zlib, but it is
@@ -331,4 +335,3 @@ size_t wxZlibOutputStream::OnSysWrite(const void *buffer, size_t size)
#endif #endif
// wxUSE_ZLIB && wxUSE_STREAMS // wxUSE_ZLIB && wxUSE_STREAMS

View File

@@ -23,17 +23,17 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#ifndef WX_PRECOMP
#include "wx/sizer.h"
#include "wx/checklst.h"
#include "wx/textctrl.h"
#endif // WX_PRECOMP
#if wxUSE_DEBUGREPORT && wxUSE_XML #if wxUSE_DEBUGREPORT && wxUSE_XML
#include "wx/debugrpt.h" #include "wx/debugrpt.h"
#include "wx/intl.h" #ifndef WX_PRECOMP
#include "wx/sizer.h"
#include "wx/checklst.h"
#include "wx/textctrl.h"
#include "wx/intl.h"
#endif // WX_PRECOMP
#include "wx/filename.h" #include "wx/filename.h"
#include "wx/ffile.h" #include "wx/ffile.h"
#include "wx/mimetype.h" #include "wx/mimetype.h"
@@ -512,4 +512,4 @@ bool wxDebugReportPreviewStd::Show(wxDebugReport& dbgrpt) const
return dlg.ShowModal() == wxID_OK && dbgrpt.GetFilesCount() != 0; return dlg.ShowModal() == wxID_OK && dbgrpt.GetFilesCount() != 0;
} }
#endif // wxUSE_DEBUGREPORT #endif // wxUSE_DEBUGREPORT && wxUSE_XML

View File

@@ -15,20 +15,19 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_PRINTING_ARCHITECTURE && wxUSE_POSTSCRIPT
#include "wx/generic/dcpsg.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h"
#endif // WX_PRECOMP #endif // WX_PRECOMP
#if wxUSE_PRINTING_ARCHITECTURE
#if wxUSE_POSTSCRIPT
#include "wx/dcmemory.h" #include "wx/dcmemory.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/intl.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/generic/dcpsg.h"
#include "wx/prntbase.h" #include "wx/prntbase.h"
#include "wx/generic/prntdlgg.h" #include "wx/generic/prntdlgg.h"
#include "wx/paper.h" #include "wx/paper.h"
@@ -1048,8 +1047,8 @@ void wxPostScriptDC::SetPen( const wxPen& pen )
PsPrint( buffer ); PsPrint( buffer );
} }
PsPrint ("] 0 setdash\n"); PsPrint ("] 0 setdash\n");
psdash = 0; psdash = 0;
} }
break; break;
case wxSOLID: case wxSOLID:
case wxTRANSPARENT: case wxTRANSPARENT:
@@ -1258,7 +1257,7 @@ void wxPostScriptDC::DoDrawText( const wxString& text, wxCoord x, wxCoord y )
} }
CalcBoundingBox( x, y ); CalcBoundingBox( x, y );
CalcBoundingBox( x + size * text.Length() * 2/3 , y ); CalcBoundingBox( x + size * text.length() * 2/3 , y );
} }
void wxPostScriptDC::DoDrawRotatedText( const wxString& text, wxCoord x, wxCoord y, double angle ) void wxPostScriptDC::DoDrawRotatedText( const wxString& text, wxCoord x, wxCoord y, double angle )
@@ -1383,7 +1382,7 @@ void wxPostScriptDC::DoDrawRotatedText( const wxString& text, wxCoord x, wxCoord
} }
CalcBoundingBox( x, y ); CalcBoundingBox( x, y );
CalcBoundingBox( x + size * text.Length() * 2/3 , y ); CalcBoundingBox( x + size * text.length() * 2/3 , y );
} }
void wxPostScriptDC::SetBackground (const wxBrush& brush) void wxPostScriptDC::SetBackground (const wxBrush& brush)
@@ -2258,11 +2257,6 @@ void wxPostScriptDC::PsPrint( int ch )
} }
} }
#endif #endif // wxUSE_PRINTING_ARCHITECTURE && wxUSE_POSTSCRIPT
// wxUSE_POSTSCRIPT
#endif
// wxUSE_PRINTING_ARCHITECTURE
// vi:sts=4:sw=4:et // vi:sts=4:sw=4:et

View File

@@ -18,11 +18,13 @@
#if wxUSE_DIRDLG || wxUSE_FILEDLG #if wxUSE_DIRDLG || wxUSE_FILEDLG
#include "wx/generic/dirctrlg.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/hash.h" #include "wx/hash.h"
#include "wx/intl.h"
#endif #endif
#include "wx/generic/dirctrlg.h"
#include "wx/module.h" #include "wx/module.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/button.h" #include "wx/button.h"
@@ -33,7 +35,6 @@
#include "wx/filefn.h" #include "wx/filefn.h"
#include "wx/cmndata.h" #include "wx/cmndata.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/intl.h"
#include "wx/imaglist.h" #include "wx/imaglist.h"
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/log.h" #include "wx/log.h"

View File

@@ -21,23 +21,23 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_DRAGIMAGE #if wxUSE_DRAGIMAGE
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include <stdio.h> #include <stdio.h>
#include "wx/window.h" #include "wx/window.h"
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/dcclient.h" #include "wx/dcclient.h"
#include "wx/dcscreen.h" #include "wx/dcscreen.h"
#include "wx/dcmemory.h" #include "wx/dcmemory.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/intl.h"
#endif #endif
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h"
#define wxUSE_IMAGE_IN_DRAGIMAGE 1 #define wxUSE_IMAGE_IN_DRAGIMAGE 1

View File

@@ -23,6 +23,13 @@
#error wxGenericFileDialog currently only supports Unix, win32 and DOS #error wxGenericFileDialog currently only supports Unix, win32 and DOS
#endif #endif
#include "wx/generic/filedlgg.h"
#ifndef WX_PRECOMP
#include "wx/hash.h"
#include "wx/intl.h"
#endif
#include "wx/checkbox.h" #include "wx/checkbox.h"
#include "wx/textctrl.h" #include "wx/textctrl.h"
#include "wx/choice.h" #include "wx/choice.h"
@@ -31,7 +38,6 @@
#include "wx/debug.h" #include "wx/debug.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/longlong.h" #include "wx/longlong.h"
#include "wx/intl.h"
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
#include "wx/sizer.h" #include "wx/sizer.h"
#include "wx/bmpbuttn.h" #include "wx/bmpbuttn.h"
@@ -44,7 +50,6 @@
#include "wx/filefn.h" #include "wx/filefn.h"
#include "wx/file.h" // for wxS_IXXX constants only #include "wx/file.h" // for wxS_IXXX constants only
#include "wx/filedlg.h" // wxOPEN, wxSAVE... #include "wx/filedlg.h" // wxOPEN, wxSAVE...
#include "wx/generic/filedlgg.h"
#include "wx/generic/dirctrlg.h" // for wxFileIconsTable #include "wx/generic/dirctrlg.h" // for wxFileIconsTable
#if wxUSE_TOOLTIPS #if wxUSE_TOOLTIPS

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: app.cpp // Name: src/gtk/app.cpp
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -17,9 +17,13 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/app.h" #include "wx/app.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/memory.h" #include "wx/memory.h"
#include "wx/font.h" #include "wx/font.h"
@@ -33,7 +37,7 @@
#include "wx/thread.h" #include "wx/thread.h"
#ifdef __WXGPE__ #ifdef __WXGPE__
#include <gpe/init.h> #include <gpe/init.h>
#endif #endif
#ifdef __WXUNIVERSAL__ #ifdef __WXUNIVERSAL__
@@ -113,7 +117,7 @@ static wxMutex gs_idleTagsMutex;
// not static because used by textctrl.cpp // not static because used by textctrl.cpp
// //
// MT-FIXME // MT-FIXME
bool wxIsInsideYield = FALSE; bool wxIsInsideYield = false;
bool wxApp::Yield(bool onlyIfNeeded) bool wxApp::Yield(bool onlyIfNeeded)
{ {
@@ -124,18 +128,18 @@ bool wxApp::Yield(bool onlyIfNeeded)
wxFAIL_MSG( wxT("wxYield called recursively" ) ); wxFAIL_MSG( wxT("wxYield called recursively" ) );
} }
return FALSE; return false;
} }
#if wxUSE_THREADS #if wxUSE_THREADS
if ( !wxThread::IsMain() ) if ( !wxThread::IsMain() )
{ {
// can't call gtk_main_iteration() from other threads like this // can't call gtk_main_iteration() from other threads like this
return TRUE; return true;
} }
#endif // wxUSE_THREADS #endif // wxUSE_THREADS
wxIsInsideYield = TRUE; wxIsInsideYield = true;
// We need to remove idle callbacks or the loop will // We need to remove idle callbacks or the loop will
// never finish. // never finish.
@@ -163,9 +167,9 @@ bool wxApp::Yield(bool onlyIfNeeded)
wxLog::Resume(); wxLog::Resume();
#endif #endif
wxIsInsideYield = FALSE; wxIsInsideYield = false;
return TRUE; return true;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -483,7 +487,7 @@ bool wxApp::OnInitGui()
} }
// Nothing to do for 15, 16, 24, 32 bit displays // Nothing to do for 15, 16, 24, 32 bit displays
if (visual->depth > 8) return TRUE; if (visual->depth > 8) return true;
// initialize color cube for 8-bit color reduction dithering // initialize color cube for 8-bit color reduction dithering
@@ -533,7 +537,7 @@ bool wxApp::OnInitGui()
} }
} }
return TRUE; return true;
} }
GdkVisual *wxApp::GetGdkVisual() GdkVisual *wxApp::GetGdkVisual()
@@ -680,7 +684,7 @@ void wxApp::CleanUp()
void wxApp::OnAssert(const wxChar *file, int line, const wxChar* cond, const wxChar *msg) void wxApp::OnAssert(const wxChar *file, int line, const wxChar* cond, const wxChar *msg)
{ {
m_isInAssert = TRUE; m_isInAssert = true;
wxAppBase::OnAssert(file, line, cond, msg); wxAppBase::OnAssert(file, line, cond, msg);

View File

@@ -14,9 +14,12 @@
#include "wx/combobox.h" #include "wx/combobox.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/arrstr.h" #include "wx/arrstr.h"
#include "wx/intl.h"
#include "wx/textctrl.h" // for wxEVT_COMMAND_TEXT_UPDATED #include "wx/textctrl.h" // for wxEVT_COMMAND_TEXT_UPDATED

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: dnd.cpp // Name: src/gtk/dnd.cpp
// Purpose: wxDropTarget class // Purpose: wxDropTarget class
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -10,16 +10,18 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/dnd.h"
#include "wx/log.h"
#if wxUSE_DRAG_AND_DROP #if wxUSE_DRAG_AND_DROP
#include "wx/dnd.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/window.h" #include "wx/window.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/intl.h" #include "wx/log.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/gtk/private.h" #include "wx/gtk/private.h"

View File

@@ -14,6 +14,10 @@
#include "wx/filedlg.h" #include "wx/filedlg.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#ifdef __WXGTK24__ #ifdef __WXGTK24__
#include <gtk/gtk.h> #include <gtk/gtk.h>
@@ -21,7 +25,6 @@
#include <unistd.h> // chdir #include <unistd.h> // chdir
#include "wx/intl.h"
#include "wx/filename.h" // wxFilename #include "wx/filename.h" // wxFilename
#include "wx/tokenzr.h" // wxStringTokenizer #include "wx/tokenzr.h" // wxStringTokenizer
#include "wx/filefn.h" // ::wxGetCwd #include "wx/filefn.h" // ::wxGetCwd

View File

@@ -10,14 +10,16 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_FONTDLG #if wxUSE_FONTDLG && !defined(__WXGPE__)
#ifndef __WXGPE__
#include "wx/fontdlg.h" #include "wx/fontdlg.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/fontutil.h" #include "wx/fontutil.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/intl.h"
#include "wx/debug.h" #include "wx/debug.h"
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
@@ -154,6 +156,4 @@ void wxFontDialog::SetChosenFont(const char *fontname)
m_fontData.SetChosenFont(wxFont( wxString::FromAscii(fontname) )); m_fontData.SetChosenFont(wxFont( wxString::FromAscii(fontname) ));
} }
#endif // wxUSE_FONTDLG #endif // wxUSE_FONTDLG && !__WXGPE__
#endif // GPE

View File

@@ -13,14 +13,15 @@
#if wxUSE_LISTBOX #if wxUSE_LISTBOX
#include "wx/listbox.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/intl.h"
#endif #endif
#include "wx/listbox.h"
#include "wx/arrstr.h" #include "wx/arrstr.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/intl.h"
#include "wx/checklst.h" #include "wx/checklst.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/log.h" #include "wx/log.h"

View File

@@ -10,14 +10,17 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/mdi.h"
#include "wx/notebook.h"
#if wxUSE_MDI #if wxUSE_MDI
#include "wx/mdi.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/notebook.h"
#include "wx/dialog.h" #include "wx/dialog.h"
#include "wx/menu.h" #include "wx/menu.h"
#include "wx/intl.h"
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include <glib.h> #include <glib.h>

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: menu.cpp // Name: src/gtk/menu.cpp
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -11,8 +11,12 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/menu.h" #include "wx/menu.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
@@ -1514,4 +1518,3 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y )
} }
#endif // wxUSE_MENUS_NATIVE #endif // wxUSE_MENUS_NATIVE

View File

@@ -13,17 +13,20 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_MSGDLG && defined(__WXGTK20__) && !defined(__WXGPE__) #if wxUSE_MSGDLG && defined(__WXGTK20__) && !defined(__WXGPE__)
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "wx/intl.h"
IMPLEMENT_CLASS(wxMessageDialog, wxDialog) IMPLEMENT_CLASS(wxMessageDialog, wxDialog)
wxMessageDialog::wxMessageDialog(wxWindow *parent, wxMessageDialog::wxMessageDialog(wxWindow *parent,
@@ -126,5 +129,4 @@ int wxMessageDialog::ShowModal()
} }
#endif // wxUSE_MSGDLG && defined(__WXGTK20__) #endif // wxUSE_MSGDLG && defined(__WXGTK20__) && !defined(__WXGPE__)

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: notebook.cpp // Name: src/gtk/notebook.cpp
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -10,14 +10,17 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_NOTEBOOK
#include "wx/notebook.h" #include "wx/notebook.h"
#if wxUSE_NOTEBOOK #ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/panel.h" #include "wx/panel.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/imaglist.h" #include "wx/imaglist.h"
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"
@@ -383,13 +386,13 @@ int wxNotebook::GetSelection() const
wxString wxNotebook::GetPageText( size_t page ) const wxString wxNotebook::GetPageText( size_t page ) const
{ {
wxCHECK_MSG( m_widget != NULL, wxT(""), wxT("invalid notebook") ); wxCHECK_MSG( m_widget != NULL, wxEmptyString, wxT("invalid notebook") );
wxGtkNotebookPage* nb_page = GetNotebookPage(page); wxGtkNotebookPage* nb_page = GetNotebookPage(page);
if (nb_page) if (nb_page)
return nb_page->m_text; return nb_page->m_text;
else else
return wxT(""); return wxEmptyString;
} }
int wxNotebook::GetPageImage( size_t page ) const int wxNotebook::GetPageImage( size_t page ) const
@@ -691,7 +694,7 @@ bool wxNotebook::InsertPage( size_t position,
/* set the label text */ /* set the label text */
nb_page->m_text = text; nb_page->m_text = text;
if (nb_page->m_text.IsEmpty()) nb_page->m_text = wxT(""); if (nb_page->m_text.empty()) nb_page->m_text = wxT("");
nb_page->m_label = GTK_LABEL( gtk_label_new(wxGTK_CONV(nb_page->m_text)) ); nb_page->m_label = GTK_LABEL( gtk_label_new(wxGTK_CONV(nb_page->m_text)) );
gtk_box_pack_end( GTK_BOX(nb_page->m_box), GTK_WIDGET(nb_page->m_label), FALSE, FALSE, m_padding ); gtk_box_pack_end( GTK_BOX(nb_page->m_box), GTK_WIDGET(nb_page->m_label), FALSE, FALSE, m_padding );

View File

@@ -11,8 +11,12 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/textctrl.h" #include "wx/textctrl.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/math.h" #include "wx/math.h"
#include "wx/settings.h" #include "wx/settings.h"

View File

@@ -14,10 +14,10 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h"
#endif #endif
#include "wx/apptrait.h" #include "wx/apptrait.h"
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/process.h" #include "wx/process.h"

View File

@@ -15,6 +15,11 @@
#endif #endif
#include "wx/window.h" #include "wx/window.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/dcclient.h" #include "wx/dcclient.h"
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/app.h" #include "wx/app.h"
@@ -46,7 +51,6 @@
#include "wx/menu.h" #include "wx/menu.h"
#include "wx/statusbr.h" #include "wx/statusbr.h"
#include "wx/intl.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"
@@ -4281,12 +4285,12 @@ void wxWindowGTK::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) )
void wxWindowGTK::GtkScrolledWindowSetBorder(GtkWidget* w, int wxstyle) void wxWindowGTK::GtkScrolledWindowSetBorder(GtkWidget* w, int wxstyle)
{ {
//RN: Note that static controls usually have no border on gtk, so maybe //RN: Note that static controls usually have no border on gtk, so maybe
//it makes sense to treat that as simply no border at the wx level //it makes sense to treat that as simply no border at the wx level
//as well... //as well...
if (!(wxstyle & wxNO_BORDER) && !(wxstyle & wxBORDER_STATIC)) if (!(wxstyle & wxNO_BORDER) && !(wxstyle & wxBORDER_STATIC))
{ {
GtkShadowType gtkstyle; GtkShadowType gtkstyle;
if(wxstyle & wxBORDER_RAISED) if(wxstyle & wxBORDER_RAISED)
gtkstyle = GTK_SHADOW_OUT; gtkstyle = GTK_SHADOW_OUT;
else if (wxstyle & wxBORDER_SUNKEN) else if (wxstyle & wxBORDER_SUNKEN)
@@ -4296,7 +4300,7 @@ void wxWindowGTK::GtkScrolledWindowSetBorder(GtkWidget* w, int wxstyle)
else //default else //default
gtkstyle = GTK_SHADOW_IN; gtkstyle = GTK_SHADOW_IN;
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW(w), gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW(w),
gtkstyle ); gtkstyle );
} }
} }

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: app.cpp // Name: src/gtk1/app.cpp
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -17,9 +17,13 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/app.h" #include "wx/app.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/memory.h" #include "wx/memory.h"
#include "wx/font.h" #include "wx/font.h"

View File

@@ -14,9 +14,12 @@
#include "wx/combobox.h" #include "wx/combobox.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/arrstr.h" #include "wx/arrstr.h"
#include "wx/intl.h"
#include "wx/textctrl.h" // for wxEVT_COMMAND_TEXT_UPDATED #include "wx/textctrl.h" // for wxEVT_COMMAND_TEXT_UPDATED

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: dnd.cpp // Name: src/gtk1/dnd.cpp
// Purpose: wxDropTarget class // Purpose: wxDropTarget class
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -10,16 +10,18 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/dnd.h"
#include "wx/log.h"
#if wxUSE_DRAG_AND_DROP #if wxUSE_DRAG_AND_DROP
#include "wx/dnd.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/log.h"
#include "wx/window.h" #include "wx/window.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/intl.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/gtk1/private.h" #include "wx/gtk1/private.h"

View File

@@ -10,14 +10,16 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_FONTDLG #if wxUSE_FONTDLG && !defined(__WXGPE__)
#ifndef __WXGPE__
#include "wx/fontdlg.h" #include "wx/fontdlg.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/fontutil.h" #include "wx/fontutil.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/intl.h"
#include "wx/debug.h" #include "wx/debug.h"
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
@@ -179,6 +181,4 @@ void wxFontDialog::SetChosenFont(const char *fontname)
m_fontData.SetChosenFont(wxFont( wxString::FromAscii(fontname) )); m_fontData.SetChosenFont(wxFont( wxString::FromAscii(fontname) ));
} }
#endif // wxUSE_FONTDLG #endif // wxUSE_FONTDLG && !defined(__WXGPE__)
#endif // GPE

View File

@@ -12,20 +12,21 @@
#if wxUSE_LISTBOX #if wxUSE_LISTBOX
#include "wx/listbox.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/intl.h"
#endif #endif
#include "wx/listbox.h"
#include "wx/arrstr.h" #include "wx/arrstr.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/intl.h"
#include "wx/checklst.h" #include "wx/checklst.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/gtk1/private.h" #include "wx/gtk1/private.h"
#if wxUSE_TOOLTIPS #if wxUSE_TOOLTIPS
#include "wx/tooltip.h" #include "wx/tooltip.h"
#endif #endif
#include <gdk/gdk.h> #include <gdk/gdk.h>

View File

@@ -10,14 +10,17 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/mdi.h"
#include "wx/notebook.h"
#if wxUSE_MDI #if wxUSE_MDI
#include "wx/mdi.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/notebook.h"
#include "wx/dialog.h" #include "wx/dialog.h"
#include "wx/menu.h" #include "wx/menu.h"
#include "wx/intl.h"
#include "wx/gtk1/private.h" #include "wx/gtk1/private.h"
#include <glib.h> #include <glib.h>

View File

@@ -11,8 +11,12 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/menu.h" #include "wx/menu.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
@@ -984,7 +988,7 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem, int pos)
text = mitem->GetText(); text = mitem->GetText();
const wxBitmap *bitmap = &mitem->GetBitmap(); const wxBitmap *bitmap = &mitem->GetBitmap();
// TODO // TODO
wxUnusedVar(bitmap); wxUnusedVar(bitmap);
menuItem = gtk_menu_item_new_with_label( wxGTK_CONV( text ) ); menuItem = gtk_menu_item_new_with_label( wxGTK_CONV( text ) );
label = GTK_LABEL( GTK_BIN(menuItem)->child ); label = GTK_LABEL( GTK_BIN(menuItem)->child );

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: notebook.cpp // Name: src/gtk1/notebook.cpp
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -10,14 +10,17 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_NOTEBOOK
#include "wx/notebook.h" #include "wx/notebook.h"
#if wxUSE_NOTEBOOK #ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/panel.h" #include "wx/panel.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/imaglist.h" #include "wx/imaglist.h"
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"
@@ -383,13 +386,13 @@ int wxNotebook::GetSelection() const
wxString wxNotebook::GetPageText( size_t page ) const wxString wxNotebook::GetPageText( size_t page ) const
{ {
wxCHECK_MSG( m_widget != NULL, wxT(""), wxT("invalid notebook") ); wxCHECK_MSG( m_widget != NULL, wxEmptyString, wxT("invalid notebook") );
wxGtkNotebookPage* nb_page = GetNotebookPage(page); wxGtkNotebookPage* nb_page = GetNotebookPage(page);
if (nb_page) if (nb_page)
return nb_page->m_text; return nb_page->m_text;
else else
return wxT(""); return wxEmptyString;
} }
int wxNotebook::GetPageImage( size_t page ) const int wxNotebook::GetPageImage( size_t page ) const
@@ -689,7 +692,7 @@ bool wxNotebook::InsertPage( size_t position,
/* set the label text */ /* set the label text */
nb_page->m_text = text; nb_page->m_text = text;
if (nb_page->m_text.IsEmpty()) nb_page->m_text = wxT(""); if (nb_page->m_text.empty()) nb_page->m_text = wxT("");
nb_page->m_label = GTK_LABEL( gtk_label_new(wxGTK_CONV(nb_page->m_text)) ); nb_page->m_label = GTK_LABEL( gtk_label_new(wxGTK_CONV(nb_page->m_text)) );
gtk_box_pack_end( GTK_BOX(nb_page->m_box), GTK_WIDGET(nb_page->m_label), FALSE, FALSE, m_padding ); gtk_box_pack_end( GTK_BOX(nb_page->m_box), GTK_WIDGET(nb_page->m_label), FALSE, FALSE, m_padding );

View File

@@ -11,8 +11,12 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/textctrl.h" #include "wx/textctrl.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/math.h" #include "wx/math.h"
#include "wx/settings.h" #include "wx/settings.h"

View File

@@ -14,10 +14,10 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h"
#endif #endif
#include "wx/apptrait.h" #include "wx/apptrait.h"
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/process.h" #include "wx/process.h"

View File

@@ -15,6 +15,11 @@
#endif #endif
#include "wx/window.h" #include "wx/window.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/dcclient.h" #include "wx/dcclient.h"
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/app.h" #include "wx/app.h"
@@ -43,7 +48,6 @@
#include "wx/menu.h" #include "wx/menu.h"
#include "wx/statusbr.h" #include "wx/statusbr.h"
#include "wx/intl.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: app.cpp // Name: src/mac/carbon/app.cpp
// Purpose: wxApp // Purpose: wxApp
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
@@ -11,16 +11,20 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/app.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/window.h" #include "wx/window.h"
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/button.h" #include "wx/button.h"
#include "wx/app.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/pen.h" #include "wx/pen.h"
#include "wx/brush.h" #include "wx/brush.h"
#include "wx/cursor.h" #include "wx/cursor.h"
#include "wx/intl.h"
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/palette.h" #include "wx/palette.h"
#include "wx/dc.h" #include "wx/dc.h"
@@ -359,7 +363,7 @@ struct IdPair
int wxId ; int wxId ;
} ; } ;
IdPair gCommandIds [] = IdPair gCommandIds [] =
{ {
{ kHICommandCut , wxID_CUT } , { kHICommandCut , wxID_CUT } ,
{ kHICommandCopy , wxID_COPY } , { kHICommandCopy , wxID_COPY } ,
@@ -370,10 +374,10 @@ IdPair gCommandIds [] =
{ kHICommandRedo , wxID_REDO } , { kHICommandRedo , wxID_REDO } ,
} ; } ;
int wxMacCommandToId( UInt32 macCommandId ) int wxMacCommandToId( UInt32 macCommandId )
{ {
int wxid = 0 ; int wxid = 0 ;
switch ( macCommandId ) switch ( macCommandId )
{ {
case kHICommandPreferences : case kHICommandPreferences :
@@ -408,10 +412,10 @@ int wxMacCommandToId( UInt32 macCommandId )
return wxid ; return wxid ;
} }
UInt32 wxIdToMacCommand( int wxId ) UInt32 wxIdToMacCommand( int wxId )
{ {
UInt32 macId = 0 ; UInt32 macId = 0 ;
if ( wxId == wxApp::s_macPreferencesMenuItemId ) if ( wxId == wxApp::s_macPreferencesMenuItemId )
macId = kHICommandPreferences ; macId = kHICommandPreferences ;
else if (wxId == wxApp::s_macExitMenuItemId) else if (wxId == wxApp::s_macExitMenuItemId)
@@ -436,7 +440,7 @@ UInt32 wxIdToMacCommand( int wxId )
return macId ; return macId ;
} }
wxMenu* wxFindMenuFromMacCommand( const HICommand &command , wxMenuItem* &item ) wxMenu* wxFindMenuFromMacCommand( const HICommand &command , wxMenuItem* &item )
{ {
wxMenu* itemMenu = NULL ; wxMenu* itemMenu = NULL ;
int id = 0 ; int id = 0 ;
@@ -581,7 +585,7 @@ static pascal OSStatus wxMacAppCommandEventHandler( EventHandlerCallRef handler
if ( item ) if ( item )
{ {
wxASSERT( itemMenu != NULL ) ; wxASSERT( itemMenu != NULL ) ;
switch ( cEvent.GetKind() ) switch ( cEvent.GetKind() )
{ {
case kEventProcessCommand : case kEventProcessCommand :
@@ -598,16 +602,16 @@ static pascal OSStatus wxMacAppCommandEventHandler( EventHandlerCallRef handler
{ {
wxUpdateUIEvent event(id); wxUpdateUIEvent event(id);
event.SetEventObject( itemMenu ); event.SetEventObject( itemMenu );
bool processed = false; bool processed = false;
// Try the menu's event handler // Try the menu's event handler
{ {
wxEvtHandler *handler = itemMenu->GetEventHandler(); wxEvtHandler *handler = itemMenu->GetEventHandler();
if ( handler ) if ( handler )
processed = handler->ProcessEvent(event); processed = handler->ProcessEvent(event);
} }
// Try the window the menu was popped up from // Try the window the menu was popped up from
// (and up through the hierarchy) // (and up through the hierarchy)
if ( !processed ) if ( !processed )
@@ -621,11 +625,11 @@ static pascal OSStatus wxMacAppCommandEventHandler( EventHandlerCallRef handler
processed = win->GetEventHandler()->ProcessEvent(event); processed = win->GetEventHandler()->ProcessEvent(event);
break; break;
} }
menu = menu->GetParent(); menu = menu->GetParent();
} }
} }
if ( processed ) if ( processed )
{ {
// if anything changed, update the changed attribute // if anything changed, update the changed attribute
@@ -1473,10 +1477,10 @@ bool wxApp::MacSendKeyDownEvent( wxWindow* focus , long keymessage , long modifi
if ( !focus ) if ( !focus )
return false ; return false ;
bool handled; bool handled;
wxKeyEvent event(wxEVT_KEY_DOWN) ; wxKeyEvent event(wxEVT_KEY_DOWN) ;
MacCreateKeyEvent( event, focus , keymessage , modifiers , when , wherex , wherey , uniChar ) ; MacCreateKeyEvent( event, focus , keymessage , modifiers , when , wherex , wherey , uniChar ) ;
handled = focus->GetEventHandler()->ProcessEvent( event ) ; handled = focus->GetEventHandler()->ProcessEvent( event ) ;
if ( handled && event.GetSkipped() ) if ( handled && event.GetSkipped() )
handled = false ; handled = false ;
@@ -1515,7 +1519,7 @@ bool wxApp::MacSendKeyUpEvent( wxWindow* focus , long keymessage , long modifier
wxKeyEvent event( wxEVT_KEY_UP ) ; wxKeyEvent event( wxEVT_KEY_UP ) ;
MacCreateKeyEvent( event, focus , keymessage , modifiers , when , wherex , wherey , uniChar ) ; MacCreateKeyEvent( event, focus , keymessage , modifiers , when , wherex , wherey , uniChar ) ;
handled = focus->GetEventHandler()->ProcessEvent( event ) ; handled = focus->GetEventHandler()->ProcessEvent( event ) ;
return handled ; return handled ;
} }
@@ -1523,7 +1527,7 @@ bool wxApp::MacSendCharEvent( wxWindow* focus , long keymessage , long modifiers
{ {
if ( !focus ) if ( !focus )
return false ; return false ;
wxKeyEvent event(wxEVT_CHAR) ; wxKeyEvent event(wxEVT_CHAR) ;
MacCreateKeyEvent( event, focus , keymessage , modifiers , when , wherex , wherey , uniChar ) ; MacCreateKeyEvent( event, focus , keymessage , modifiers , when , wherex , wherey , uniChar ) ;
long keyval = event.m_keyCode ; long keyval = event.m_keyCode ;
@@ -1531,7 +1535,7 @@ bool wxApp::MacSendCharEvent( wxWindow* focus , long keymessage , long modifiers
bool handled = false ; bool handled = false ;
wxTopLevelWindowMac *tlw = focus->MacGetTopLevelWindow() ; wxTopLevelWindowMac *tlw = focus->MacGetTopLevelWindow() ;
if (tlw) if (tlw)
{ {
event.SetEventType( wxEVT_CHAR_HOOK ); event.SetEventType( wxEVT_CHAR_HOOK );
@@ -1546,7 +1550,7 @@ bool wxApp::MacSendCharEvent( wxWindow* focus , long keymessage , long modifiers
event.Skip( false ) ; event.Skip( false ) ;
handled = focus->GetEventHandler()->ProcessEvent( event ) ; handled = focus->GetEventHandler()->ProcessEvent( event ) ;
} }
if ( !handled && (keyval == WXK_TAB) ) if ( !handled && (keyval == WXK_TAB) )
{ {
wxWindow* iter = focus->GetParent() ; wxWindow* iter = focus->GetParent() ;
@@ -1601,7 +1605,7 @@ bool wxApp::MacSendCharEvent( wxWindow* focus , long keymessage , long modifiers
return handled ; return handled ;
} }
// This method handles common code for SendKeyDown, SendKeyUp, and SendChar events. // This method handles common code for SendKeyDown, SendKeyUp, and SendChar events.
void wxApp::MacCreateKeyEvent( wxKeyEvent& event, wxWindow* focus , long keymessage , long modifiers , long when , short wherex , short wherey , wxChar uniChar ) void wxApp::MacCreateKeyEvent( wxKeyEvent& event, wxWindow* focus , long keymessage , long modifiers , long when , short wherex , short wherey , wxChar uniChar )
{ {
short keycode, keychar ; short keycode, keychar ;

View File

@@ -22,6 +22,7 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/object.h" #include "wx/object.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h"
#endif #endif
#include "wx/app.h" #include "wx/app.h"
@@ -30,7 +31,6 @@
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/module.h" #include "wx/module.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h"
#include "wx/event.h" #include "wx/event.h"
#include "wx/sckaddr.h" #include "wx/sckaddr.h"

View File

@@ -14,13 +14,17 @@
#if wxUSE_CLIPBOARD #if wxUSE_CLIPBOARD
#include "wx/clipbrd.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/app.h" #include "wx/app.h"
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/metafile.h" #include "wx/metafile.h"
#include "wx/clipbrd.h"
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
#ifndef __DARWIN__ #ifndef __DARWIN__

View File

@@ -14,12 +14,13 @@
#if wxUSE_DATAOBJ #if wxUSE_DATAOBJ
#include "wx/dataobj.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#endif #endif
#include "wx/log.h" #include "wx/log.h"
#include "wx/dataobj.h"
#include "wx/dcmemory.h" #include "wx/dcmemory.h"
#include "wx/mstream.h" #include "wx/mstream.h"
#include "wx/image.h" #include "wx/image.h"

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: filedlg.cpp // Name: src/mac/carbon/filedlg.cpp
// Purpose: wxFileDialog // Purpose: wxFileDialog
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
@@ -11,11 +11,15 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/filedlg.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/app.h" #include "wx/app.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/dialog.h" #include "wx/dialog.h"
#include "wx/filedlg.h"
#include "wx/intl.h"
#include "wx/tokenzr.h" #include "wx/tokenzr.h"
#include "wx/filename.h" #include "wx/filename.h"
@@ -157,7 +161,7 @@ void MakeUserDataRec(OpenUserDataRec *myData , const wxString& filter )
// an explanatory text, in that case the first part is name and extension at the same time // an explanatory text, in that case the first part is name and extension at the same time
wxASSERT_MSG( filterIndex == 0 || !isName , wxT("incorrect format of format string") ) ; wxASSERT_MSG( filterIndex == 0 || !isName , wxT("incorrect format of format string") ) ;
if ( current.IsEmpty() ) if ( current.empty() )
myData->extensions.Add( myData->name[filterIndex] ) ; myData->extensions.Add( myData->name[filterIndex] ) ;
else else
myData->extensions.Add( current.MakeUpper() ) ; myData->extensions.Add( current.MakeUpper() ) ;
@@ -179,7 +183,7 @@ void MakeUserDataRec(OpenUserDataRec *myData , const wxString& filter )
// Remove leading '.' // Remove leading '.'
if (extension.length() && (extension.GetChar(0) == '.')) if (extension.length() && (extension.GetChar(0) == '.'))
extension = extension.Mid( 1 ); extension = extension.Mid( 1 );
if (wxFileName::MacFindDefaultTypeAndCreator( extension, &fileType, &creator )) if (wxFileName::MacFindDefaultTypeAndCreator( extension, &fileType, &creator ))
myData->filtermactypes.Add( (OSType)fileType ); myData->filtermactypes.Add( (OSType)fileType );
else else
@@ -364,7 +368,7 @@ int wxFileDialog::ShowModal()
{ {
// let the user select bundles/programs in dialogs // let the user select bundles/programs in dialogs
dialogCreateOptions.optionFlags |= kNavSupportPackages; dialogCreateOptions.optionFlags |= kNavSupportPackages;
navFilterUPP = NewNavObjectFilterUPP(CrossPlatformFilterCallback); navFilterUPP = NewNavObjectFilterUPP(CrossPlatformFilterCallback);
err = ::NavCreateGetFileDialog( err = ::NavCreateGetFileDialog(
&dialogCreateOptions, &dialogCreateOptions,
@@ -413,7 +417,7 @@ int wxFileDialog::ShowModal()
thePath = wxMacFSRefToPath( &theFSRef, navReply.saveFileName ); thePath = wxMacFSRefToPath( &theFSRef, navReply.saveFileName );
else else
thePath = wxMacFSRefToPath( &theFSRef ); thePath = wxMacFSRefToPath( &theFSRef );
if (!thePath) if (!thePath)
{ {
::NavDisposeReply(&navReply); ::NavDisposeReply(&navReply);
@@ -436,4 +440,3 @@ int wxFileDialog::ShowModal()
return (err == noErr) ? wxID_OK : wxID_CANCEL; return (err == noErr) ? wxID_OK : wxID_CANCEL;
} }

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: fontdlg.cpp // Name: src/mac/carbon/fontdlgosx.cpp
// Purpose: wxFontDialog class. // Purpose: wxFontDialog class.
// Author: Ryan Norton // Author: Ryan Norton
// Modified by: // Modified by:
@@ -9,6 +9,8 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
// =========================================================================== // ===========================================================================
// declarations // declarations
// =========================================================================== // ===========================================================================
@@ -17,11 +19,16 @@
// headers // headers
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
#include "wx/cmndata.h"
#include "wx/fontdlg.h" #include "wx/fontdlg.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/cmndata.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"
#include "wx/log.h" #include "wx/log.h"
// ============================================================================ // ============================================================================
// implementation // implementation
// ============================================================================ // ============================================================================
@@ -36,10 +43,9 @@
#import <AppKit/AppKit.h> #import <AppKit/AppKit.h>
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
#include "wx/intl.h"
@interface wxMacFontPanelAccView : NSView @interface wxMacFontPanelAccView : NSView
{ {
BOOL m_okPressed ; BOOL m_okPressed ;
BOOL m_shouldClose ; BOOL m_shouldClose ;
NSButton* m_cancelButton ; NSButton* m_cancelButton ;
@@ -58,13 +64,13 @@
- (id)initWithFrame:(NSRect)rectBox - (id)initWithFrame:(NSRect)rectBox
{ {
[super initWithFrame:rectBox]; [super initWithFrame:rectBox];
wxMacCFStringHolder cfOkString( wxT("OK"), wxLocale::GetSystemEncoding() ); wxMacCFStringHolder cfOkString( wxT("OK"), wxLocale::GetSystemEncoding() );
wxMacCFStringHolder cfCancelString( wxT("Cancel"), wxLocale::GetSystemEncoding() ); wxMacCFStringHolder cfCancelString( wxT("Cancel"), wxLocale::GetSystemEncoding() );
NSRect rectCancel = NSMakeRect( 10.0 , 10.0 , 82 , 24 ); NSRect rectCancel = NSMakeRect( 10.0 , 10.0 , 82 , 24 );
NSRect rectOK = NSMakeRect( 100.0 , 10.0 , 82 , 24 ); NSRect rectOK = NSMakeRect( 100.0 , 10.0 , 82 , 24 );
NSButton* cancelButton = [[NSButton alloc] initWithFrame:rectCancel]; NSButton* cancelButton = [[NSButton alloc] initWithFrame:rectCancel];
[cancelButton setTitle:(NSString*)cfCancelString.Detach()]; [cancelButton setTitle:(NSString*)cfCancelString.Detach()];
[cancelButton setBezelStyle:NSRoundedBezelStyle]; [cancelButton setBezelStyle:NSRoundedBezelStyle];
@@ -72,7 +78,7 @@
[cancelButton setAction:@selector(cancelPressed:)]; [cancelButton setAction:@selector(cancelPressed:)];
[cancelButton setTarget:self]; [cancelButton setTarget:self];
m_cancelButton = cancelButton ; m_cancelButton = cancelButton ;
NSButton* okButton = [[NSButton alloc] initWithFrame:rectOK]; NSButton* okButton = [[NSButton alloc] initWithFrame:rectOK];
[okButton setTitle:(NSString*)cfOkString.Detach()]; [okButton setTitle:(NSString*)cfOkString.Detach()];
[okButton setBezelStyle:NSRoundedBezelStyle]; [okButton setBezelStyle:NSRoundedBezelStyle];
@@ -86,7 +92,7 @@
[self addSubview:cancelButton]; [self addSubview:cancelButton];
[self addSubview:okButton]; [self addSubview:okButton];
[self resetFlags]; [self resetFlags];
return self; return self;
} }
@@ -94,7 +100,7 @@
- (void)resetFlags - (void)resetFlags
{ {
m_okPressed = NO ; m_okPressed = NO ;
m_shouldClose = NO ; m_shouldClose = NO ;
} }
- (IBAction)cancelPressed:(id)sender - (IBAction)cancelPressed:(id)sender
@@ -145,22 +151,22 @@ int RunMixedFontDialog(wxFontDialog* dialog)
WindowRef carbonWindowRef = (WindowRef)[fontPanel windowRef] ; WindowRef carbonWindowRef = (WindowRef)[fontPanel windowRef] ;
SetWindowModality(carbonWindowRef, kWindowModalityAppModal , 0) ; SetWindowModality(carbonWindowRef, kWindowModalityAppModal , 0) ;
SetWindowGroup(carbonWindowRef , GetWindowGroupOfClass(kMovableModalWindowClass)); SetWindowGroup(carbonWindowRef , GetWindowGroupOfClass(kMovableModalWindowClass));
[fontPanel setFloatingPanel:NO] ; [fontPanel setFloatingPanel:NO] ;
[[fontPanel standardWindowButton:NSWindowCloseButton] setEnabled:NO] ; [[fontPanel standardWindowButton:NSWindowCloseButton] setEnabled:NO] ;
wxMacFontPanelAccView* accessoryView = (wxMacFontPanelAccView*) [fontPanel accessoryView] ; wxMacFontPanelAccView* accessoryView = (wxMacFontPanelAccView*) [fontPanel accessoryView] ;
if ( accessoryView == nil) if ( accessoryView == nil)
{ {
NSRect rectBox = NSMakeRect( 0 , 0 , 192 , 40 ); NSRect rectBox = NSMakeRect( 0 , 0 , 192 , 40 );
accessoryView = [[wxMacFontPanelAccView alloc] initWithFrame:rectBox]; accessoryView = [[wxMacFontPanelAccView alloc] initWithFrame:rectBox];
[fontPanel setAccessoryView:accessoryView]; [fontPanel setAccessoryView:accessoryView];
[fontPanel setDefaultButtonCell:[[accessoryView okButton] cell]] ; [fontPanel setDefaultButtonCell:[[accessoryView okButton] cell]] ;
} }
[accessoryView resetFlags]; [accessoryView resetFlags];
NSModalSession session = [NSApp beginModalSessionForWindow:fontPanel]; NSModalSession session = [NSApp beginModalSessionForWindow:fontPanel];
[NSApp runModalSession:session]; [NSApp runModalSession:session];
@@ -171,7 +177,7 @@ int RunMixedFontDialog(wxFontDialog* dialog)
[[fontPanel standardWindowButton:NSWindowCloseButton] setEnabled:YES] ; [[fontPanel standardWindowButton:NSWindowCloseButton] setEnabled:YES] ;
if( FPIsFontPanelVisible()) if( FPIsFontPanelVisible())
FPShowHideFontPanel() ; FPShowHideFontPanel() ;
if ( [accessoryView closedWithOk]) if ( [accessoryView closedWithOk])
{ {
retval = wxID_OK ; retval = wxID_OK ;
@@ -223,7 +229,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog)
- (BOOL)windowShouldClose:(id)sender - (BOOL)windowShouldClose:(id)sender
{ {
m_bIsClosed = true; m_bIsClosed = true;
[NSApp abortModal]; [NSApp abortModal];
[NSApp stopModal]; [NSApp stopModal];
return YES; return YES;
@@ -269,7 +275,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog)
{ {
m_bIsClosed = true; m_bIsClosed = true;
m_bIsOpen = false; m_bIsOpen = false;
[NSApp abortModal]; [NSApp abortModal];
[NSApp stopModal]; [NSApp stopModal];
return YES; return YES;
@@ -321,14 +327,14 @@ bool wxFontDialog::Create(wxWindow *parent, const wxFontData& data)
m_fontData = data; m_fontData = data;
// //
// This is the key call - this initializes // This is the key call - this initializes
// events and window stuff for cocoa for carbon // events and window stuff for cocoa for carbon
// applications. // applications.
// //
// This is also the only call here that is // This is also the only call here that is
// 10.2+ specific (the rest is OSX only), // 10.2+ specific (the rest is OSX only),
// which, ironically, the carbon font // which, ironically, the carbon font
// panel requires. // panel requires.
// //
bool bOK = NSApplicationLoad(); bool bOK = NSApplicationLoad();
@@ -338,20 +344,20 @@ bool wxFontDialog::Create(wxWindow *parent, const wxFontData& data)
//Get the initial wx font //Get the initial wx font
wxFont& thewxfont = m_fontData.m_initialFont; wxFont& thewxfont = m_fontData.m_initialFont;
//if the font is valid set the default (selected) font of the //if the font is valid set the default (selected) font of the
//NSFontDialog to that font //NSFontDialog to that font
if (thewxfont.Ok()) if (thewxfont.Ok())
{ {
NSFontTraitMask theMask = 0; NSFontTraitMask theMask = 0;
if(thewxfont.GetStyle() == wxFONTSTYLE_ITALIC) if(thewxfont.GetStyle() == wxFONTSTYLE_ITALIC)
theMask |= NSItalicFontMask; theMask |= NSItalicFontMask;
if(thewxfont.IsFixedWidth()) if(thewxfont.IsFixedWidth())
theMask |= NSFixedPitchFontMask; theMask |= NSFixedPitchFontMask;
NSFont* theDefaultFont = NSFont* theDefaultFont =
[[NSFontManager sharedFontManager] fontWithFamily: [[NSFontManager sharedFontManager] fontWithFamily:
wxNSStringWithWxString(thewxfont.GetFaceName()) wxNSStringWithWxString(thewxfont.GetFaceName())
traits:theMask traits:theMask
@@ -359,7 +365,7 @@ bool wxFontDialog::Create(wxWindow *parent, const wxFontData& data)
thewxfont.GetWeight() == wxLIGHT ? 0 : 5 thewxfont.GetWeight() == wxLIGHT ? 0 : 5
size: (float)(thewxfont.GetPointSize()) size: (float)(thewxfont.GetPointSize())
]; ];
wxASSERT_MSG(theDefaultFont, wxT("Invalid default font for wxCocoaFontDialog!")); wxASSERT_MSG(theDefaultFont, wxT("Invalid default font for wxCocoaFontDialog!"));
//Apple docs say to call NSFontManager::setSelectedFont //Apple docs say to call NSFontManager::setSelectedFont
@@ -377,17 +383,17 @@ bool wxFontDialog::Create(wxWindow *parent, const wxFontData& data)
alpha:1.0] alpha:1.0]
]; ];
else else
[[NSColorPanel sharedColorPanel] setColor:[NSColor blackColor]]; [[NSColorPanel sharedColorPanel] setColor:[NSColor blackColor]];
//We're done - free up the pool //We're done - free up the pool
[thePool release]; [thePool release];
return bOK; return bOK;
} }
int wxFontDialog::ShowModal() int wxFontDialog::ShowModal()
{ {
//Start the pool. Required for carbon interaction //Start the pool. Required for carbon interaction
//(For those curious, the only thing that happens //(For those curious, the only thing that happens
//if you don't do this is a bunch of error //if you don't do this is a bunch of error
//messages about leaks on the console, //messages about leaks on the console,
@@ -396,7 +402,7 @@ int wxFontDialog::ShowModal()
thePool = [[NSAutoreleasePool alloc] init]; thePool = [[NSAutoreleasePool alloc] init];
//Get the shared color and font panel //Get the shared color and font panel
NSFontPanel* theFontPanel = [NSFontPanel sharedFontPanel]; NSFontPanel* theFontPanel = [NSFontPanel sharedFontPanel];
NSColorPanel* theColorPanel = [NSColorPanel sharedColorPanel]; NSColorPanel* theColorPanel = [NSColorPanel sharedColorPanel];
//Create and assign the delegates (cocoa event handlers) so //Create and assign the delegates (cocoa event handlers) so
@@ -406,17 +412,17 @@ int wxFontDialog::ShowModal()
wxWCODelegate* theCPDelegate = [[wxWCODelegate alloc] init]; wxWCODelegate* theCPDelegate = [[wxWCODelegate alloc] init];
[theColorPanel setDelegate:theCPDelegate]; [theColorPanel setDelegate:theCPDelegate];
// //
// Begin the modal loop for the font and color panels // Begin the modal loop for the font and color panels
// //
// The idea is that we first make the font panel modal, // The idea is that we first make the font panel modal,
// but if the color panel is opened, unless we stop the // but if the color panel is opened, unless we stop the
// modal loop the color panel opens behind the font panel // modal loop the color panel opens behind the font panel
// with no input acceptable to it - which makes it useless. // with no input acceptable to it - which makes it useless.
// //
// So we set up delegates for both the color and font panels, // So we set up delegates for both the color and font panels,
// and the if the font panel opens the color panel, we // and the if the font panel opens the color panel, we
// stop the modal loop, and start a separate modal loop for // stop the modal loop, and start a separate modal loop for
// the color panel until the color panel closes, switching // the color panel until the color panel closes, switching
// back to the font panel modal loop once it does close. // back to the font panel modal loop once it does close.
@@ -424,31 +430,31 @@ int wxFontDialog::ShowModal()
do do
{ {
// //
// Start the font panel modal loop // Start the font panel modal loop
// //
NSModalSession session = [NSApp beginModalSessionForWindow:theFontPanel]; NSModalSession session = [NSApp beginModalSessionForWindow:theFontPanel];
for (;;) for (;;)
{ {
[NSApp runModalSession:session]; [NSApp runModalSession:session];
//If the font panel is closed or the font panel //If the font panel is closed or the font panel
//opened the color panel, break //opened the color panel, break
if ([theFPDelegate isClosed] || [theCPDelegate isOpen]) if ([theFPDelegate isClosed] || [theCPDelegate isOpen])
break; break;
} }
[NSApp endModalSession:session]; [NSApp endModalSession:session];
//is the color panel open? //is the color panel open?
if ([theCPDelegate isOpen]) if ([theCPDelegate isOpen])
{ {
// //
// Start the color panel modal loop // Start the color panel modal loop
// //
NSModalSession session = [NSApp beginModalSessionForWindow:theColorPanel]; NSModalSession session = [NSApp beginModalSessionForWindow:theColorPanel];
for (;;) for (;;)
{ {
[NSApp runModalSession:session]; [NSApp runModalSession:session];
//If the color panel is closed, return the font panel modal loop //If the color panel is closed, return the font panel modal loop
if ([theCPDelegate isClosed]) if ([theCPDelegate isClosed])
break; break;
@@ -459,50 +465,50 @@ int wxFontDialog::ShowModal()
//out of its modal loop because the color panel was //out of its modal loop because the color panel was
//opened) return the font panel modal loop //opened) return the font panel modal loop
}while([theFPDelegate isClosed] == NO); }while([theFPDelegate isClosed] == NO);
//free up the memory for the delegates - we don't need them anymore //free up the memory for the delegates - we don't need them anymore
[theFPDelegate release]; [theFPDelegate release];
[theCPDelegate release]; [theCPDelegate release];
//Get the font the user selected //Get the font the user selected
NSFont* theFont = [theFontPanel panelConvertFont:[NSFont userFontOfSize:0]]; NSFont* theFont = [theFontPanel panelConvertFont:[NSFont userFontOfSize:0]];
//Get more information about the user's chosen font //Get more information about the user's chosen font
NSFontTraitMask theTraits = [[NSFontManager sharedFontManager] traitsOfFont:theFont]; NSFontTraitMask theTraits = [[NSFontManager sharedFontManager] traitsOfFont:theFont];
int theFontWeight = [[NSFontManager sharedFontManager] weightOfFont:theFont]; int theFontWeight = [[NSFontManager sharedFontManager] weightOfFont:theFont];
int theFontSize = (int) [theFont pointSize]; int theFontSize = (int) [theFont pointSize];
//Set the wx font to the appropriate data //Set the wx font to the appropriate data
if(theTraits & NSFixedPitchFontMask) if(theTraits & NSFixedPitchFontMask)
m_fontData.m_chosenFont.SetFamily(wxTELETYPE); m_fontData.m_chosenFont.SetFamily(wxTELETYPE);
m_fontData.m_chosenFont.SetFaceName(wxStringWithNSString([theFont familyName])); m_fontData.m_chosenFont.SetFaceName(wxStringWithNSString([theFont familyName]));
m_fontData.m_chosenFont.SetPointSize(theFontSize); m_fontData.m_chosenFont.SetPointSize(theFontSize);
m_fontData.m_chosenFont.SetStyle(theTraits & NSItalicFontMask ? wxFONTSTYLE_ITALIC : 0); m_fontData.m_chosenFont.SetStyle(theTraits & NSItalicFontMask ? wxFONTSTYLE_ITALIC : 0);
m_fontData.m_chosenFont.SetWeight(theFontWeight < 5 ? wxLIGHT : m_fontData.m_chosenFont.SetWeight(theFontWeight < 5 ? wxLIGHT :
theFontWeight >= 9 ? wxBOLD : wxNORMAL); theFontWeight >= 9 ? wxBOLD : wxNORMAL);
//Get the shared color panel along with the chosen color and set the chosen color //Get the shared color panel along with the chosen color and set the chosen color
NSColor* theColor = [[theColorPanel color] colorUsingColorSpaceName:NSCalibratedRGBColorSpace]; NSColor* theColor = [[theColorPanel color] colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
m_fontData.m_fontColour.Set((unsigned char) ([theColor redComponent] * 255.0), m_fontData.m_fontColour.Set((unsigned char) ([theColor redComponent] * 255.0),
(unsigned char) ([theColor greenComponent] * 255.0), (unsigned char) ([theColor greenComponent] * 255.0),
(unsigned char) ([theColor blueComponent] * 255.0)); (unsigned char) ([theColor blueComponent] * 255.0));
//Friendly debug stuff //Friendly debug stuff
#ifdef FONTDLGDEBUG #ifdef FONTDLGDEBUG
wxPrintf(wxT("---Font Panel---\n--NS--\nSize:%f\nWeight:%i\nTraits:%i\n--WX--\nFaceName:%s\nPointSize:%i\nStyle:%i\nWeight:%i\nColor:%i,%i,%i\n---END Font Panel---\n"), wxPrintf(wxT("---Font Panel---\n--NS--\nSize:%f\nWeight:%i\nTraits:%i\n--WX--\nFaceName:%s\nPointSize:%i\nStyle:%i\nWeight:%i\nColor:%i,%i,%i\n---END Font Panel---\n"),
(float) theFontSize, (float) theFontSize,
theFontWeight, theFontWeight,
theTraits, theTraits,
m_fontData.m_chosenFont.GetFaceName().c_str(), m_fontData.m_chosenFont.GetFaceName().c_str(),
m_fontData.m_chosenFont.GetPointSize(), m_fontData.m_chosenFont.GetPointSize(),
m_fontData.m_chosenFont.GetStyle(), m_fontData.m_chosenFont.GetStyle(),
m_fontData.m_chosenFont.GetWeight(), m_fontData.m_chosenFont.GetWeight(),
m_fontData.m_fontColour.Red(), m_fontData.m_fontColour.Red(),
m_fontData.m_fontColour.Green(), m_fontData.m_fontColour.Green(),
m_fontData.m_fontColour.Blue() ); m_fontData.m_fontColour.Blue() );
#endif #endif

View File

@@ -14,16 +14,17 @@
#if wxUSE_FONTMAP #if wxUSE_FONTMAP
#include "wx/fontenum.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/font.h" #include "wx/font.h"
#include "wx/intl.h"
#endif #endif
#include "wx/fontenum.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"
#include "wx/fontmap.h" #include "wx/fontmap.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"
#include "wx/encinfo.h" #include "wx/encinfo.h"
#include "wx/intl.h"
#include "wx/mac/private.h" #include "wx/mac/private.h"
@@ -161,4 +162,4 @@ bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
return true; return true;
} }
#endif #endif // wxUSE_FONTMAP

View File

@@ -32,9 +32,12 @@
#if wxUSE_MIMETYPE #if wxUSE_MIMETYPE
#include "wx/mac/mimetype.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h"
#if wxUSE_GUI #if wxUSE_GUI
#include "wx/icon.h" #include "wx/icon.h"
@@ -43,10 +46,8 @@
#include "wx/log.h" #include "wx/log.h"
#include "wx/file.h" #include "wx/file.h"
#include "wx/intl.h"
#include "wx/confbase.h" #include "wx/confbase.h"
#include "wx/mac/mimetype.h"
#include "wx/mac/private.h" #include "wx/mac/private.h"
// other standard headers // other standard headers
@@ -818,7 +819,6 @@ pascal OSStatus MoreProcGetProcessTypeSignature(
// //
#include "wx/mac/corefoundation/cfstring.h" #include "wx/mac/corefoundation/cfstring.h"
#include "wx/intl.h" //wxLocale for wxCFString
#define wxCF_RELEASE true #define wxCF_RELEASE true
#define wxCF_RETAIN false #define wxCF_RETAIN false

View File

@@ -11,9 +11,13 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/app.h"
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
#include "wx/intl.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/app.h"
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
@@ -294,4 +298,3 @@ int wxMessageDialog::ShowModal()
return resultbutton; return resultbutton;
} }

View File

@@ -19,12 +19,12 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/object.h" #include "wx/object.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h"
#endif #endif
#include "wx/log.h" #include "wx/log.h"
#include "wx/file.h" #include "wx/file.h"
#include "wx/timer.h" #include "wx/timer.h"
#include "wx/intl.h"
// Carbon QT Implementation Details - // Carbon QT Implementation Details -
// //

View File

@@ -13,12 +13,17 @@
#if wxUSE_TEXTCTRL #if wxUSE_TEXTCTRL
#include "wx/textctrl.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#ifdef __DARWIN__ #ifdef __DARWIN__
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#else #else
#include <stat.h> #include <stat.h>
#endif #endif
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
@@ -35,13 +40,11 @@
#include "wx/dc.h" #include "wx/dc.h"
#include "wx/button.h" #include "wx/button.h"
#include "wx/toplevel.h" #include "wx/toplevel.h"
#include "wx/textctrl.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/filefn.h" #include "wx/filefn.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/sysopt.h" #include "wx/sysopt.h"
#include "wx/menu.h" #include "wx/menu.h"
#include "wx/intl.h"
#if defined(__BORLANDC__) && !defined(__WIN32__) #if defined(__BORLANDC__) && !defined(__WIN32__)
#include <alloc.h> #include <alloc.h>
@@ -882,8 +885,8 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
if ( key == 'a' && event.MetaDown() ) if ( key == 'a' && event.MetaDown() )
{ {
SelectAll() ; SelectAll() ;
return ; return ;
} }
@@ -1574,11 +1577,11 @@ wxString wxMacMLTEControl::GetStringValue() const
(((UniChar*)*theText)[actualSize]) = 0 ; (((UniChar*)*theText)[actualSize]) = 0 ;
wxMBConvUTF16 converter ; wxMBConvUTF16 converter ;
size_t noChars = converter.MB2WC( NULL , (const char*)*theText , 0 ) ; size_t noChars = converter.MB2WC( NULL , (const char*)*theText , 0 ) ;
wxASSERT_MSG( noChars != wxCONV_FAILED, _T("Unable to count the number of characters in this string!") ); wxASSERT_MSG( noChars != wxCONV_FAILED, _T("Unable to count the number of characters in this string!") );
ptr = new wxChar[noChars + 1] ; ptr = new wxChar[noChars + 1] ;
noChars = converter.MB2WC( ptr , (const char*)*theText , noChars + 1 ) ; noChars = converter.MB2WC( ptr , (const char*)*theText , noChars + 1 ) ;
wxASSERT_MSG( noChars != wxCONV_FAILED, _T("Conversion of string failed!") ); wxASSERT_MSG( noChars != wxCONV_FAILED, _T("Conversion of string failed!") );
ptr[noChars] = 0 ; ptr[noChars] = 0 ;
HUnlock( theText ) ; HUnlock( theText ) ;
#endif #endif

View File

@@ -6,12 +6,17 @@
// Created: 1998-01-01 // Created: 1998-01-01
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Stefan Csomor // Copyright: (c) Stefan Csomor
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/utils.h" #include "wx/utils.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/app.h" #include "wx/app.h"
#include "wx/apptrait.h" #include "wx/apptrait.h"
@@ -19,8 +24,6 @@
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
#include "wx/font.h" #include "wx/font.h"
#include "wx/toplevel.h" #include "wx/toplevel.h"
#else
#include "wx/intl.h"
#endif #endif
#include <ctype.h> #include <ctype.h>
@@ -174,7 +177,7 @@ Boolean IsMetroNubInstalled()
kMetroNubUserAPIVersion <= block->apiHiVersion) kMetroNubUserAPIVersion <= block->apiHiVersion)
{ {
// success! // success!
gMetroNubEntry = block; gMetroNubEntry = block;
} }
} }
} }
@@ -744,7 +747,7 @@ void wxMacWakeUp()
} }
if ( err == noErr ) if ( err == noErr )
{ {
if ( IsEventInQueue( GetMainEventQueue() , s_wakeupEvent ) ) if ( IsEventInQueue( GetMainEventQueue() , s_wakeupEvent ) )
return; return;
s_wakeupEvent.SetCurrentTime(); s_wakeupEvent.SetCurrentTime();
@@ -1425,14 +1428,14 @@ void wxMacControl::ScrollRect( wxRect *r , int dx , int dy )
OSType wxMacCreator = 'WXMC'; OSType wxMacCreator = 'WXMC';
OSType wxMacControlProperty = 'MCCT'; OSType wxMacControlProperty = 'MCCT';
void wxMacControl::SetReferenceInNativeControl() void wxMacControl::SetReferenceInNativeControl()
{ {
void * data = this; void * data = this;
verify_noerr( SetControlProperty ( m_controlRef , verify_noerr( SetControlProperty ( m_controlRef ,
wxMacCreator,wxMacControlProperty, sizeof(data), &data ) ); wxMacCreator,wxMacControlProperty, sizeof(data), &data ) );
} }
wxMacControl* wxMacControl::GetReferenceFromNativeControl(ControlRef control) wxMacControl* wxMacControl::GetReferenceFromNativeControl(ControlRef control)
{ {
wxMacControl* ctl = NULL; wxMacControl* ctl = NULL;
UInt32 actualSize; UInt32 actualSize;
@@ -1482,10 +1485,10 @@ pascal OSStatus wxMacDataBrowserControl::DataBrowserGetSetItemDataProc(
} }
pascal Boolean wxMacDataBrowserControl::DataBrowserCompareProc( pascal Boolean wxMacDataBrowserControl::DataBrowserCompareProc(
ControlRef browser, ControlRef browser,
DataBrowserItemID itemOneID, DataBrowserItemID itemOneID,
DataBrowserItemID itemTwoID, DataBrowserItemID itemTwoID,
DataBrowserPropertyID sortProperty) DataBrowserPropertyID sortProperty)
{ {
wxMacDataBrowserControl* ctl = dynamic_cast<wxMacDataBrowserControl*>( wxMacControl::GetReferenceFromNativeControl( browser ) ); wxMacDataBrowserControl* ctl = dynamic_cast<wxMacDataBrowserControl*>( wxMacControl::GetReferenceFromNativeControl( browser ) );
if ( ctl != 0 ) if ( ctl != 0 )
@@ -1500,7 +1503,7 @@ DataBrowserItemNotificationUPP gDataBrowserItemNotificationUPP = NULL;
DataBrowserItemCompareUPP gDataBrowserItemCompareUPP = NULL; DataBrowserItemCompareUPP gDataBrowserItemCompareUPP = NULL;
wxMacDataBrowserControl::wxMacDataBrowserControl( wxWindow* peer, const wxPoint& pos, const wxSize& size, long style) : wxMacControl( peer ) wxMacDataBrowserControl::wxMacDataBrowserControl( wxWindow* peer, const wxPoint& pos, const wxSize& size, long style) : wxMacControl( peer )
{ {
Rect bounds = wxMacGetBoundsForControl( peer, pos, size ); Rect bounds = wxMacGetBoundsForControl( peer, pos, size );
OSStatus err = ::CreateDataBrowserControl( OSStatus err = ::CreateDataBrowserControl(
MAC_WXHWND(peer->MacGetTopLevelWindowRef()), MAC_WXHWND(peer->MacGetTopLevelWindowRef()),
@@ -1534,17 +1537,17 @@ wxMacDataBrowserControl::wxMacDataBrowserControl( wxWindow* peer, const wxPoint&
OSStatus wxMacDataBrowserControl::GetItemCount( DataBrowserItemID container, OSStatus wxMacDataBrowserControl::GetItemCount( DataBrowserItemID container,
Boolean recurse, Boolean recurse,
DataBrowserItemState state, DataBrowserItemState state,
UInt32 *numItems) const UInt32 *numItems) const
{ {
return GetDataBrowserItemCount( m_controlRef, container, recurse, state, numItems ); return GetDataBrowserItemCount( m_controlRef, container, recurse, state, numItems );
} }
OSStatus wxMacDataBrowserControl::GetItems( DataBrowserItemID container, OSStatus wxMacDataBrowserControl::GetItems( DataBrowserItemID container,
Boolean recurse, Boolean recurse,
DataBrowserItemState state, DataBrowserItemState state,
Handle items) const Handle items) const
{ {
return GetDataBrowserItems( m_controlRef, container, recurse, state, items ); return GetDataBrowserItems( m_controlRef, container, recurse, state, items );
} }
OSStatus wxMacDataBrowserControl::SetSelectionFlags( DataBrowserSelectionFlags options ) OSStatus wxMacDataBrowserControl::SetSelectionFlags( DataBrowserSelectionFlags options )
@@ -1588,7 +1591,7 @@ OSStatus wxMacDataBrowserControl::SetCallbacks(const DataBrowserCallbacks *callb
return SetDataBrowserCallbacks( m_controlRef, callbacks ); return SetDataBrowserCallbacks( m_controlRef, callbacks );
} }
OSStatus wxMacDataBrowserControl::UpdateItems( OSStatus wxMacDataBrowserControl::UpdateItems(
DataBrowserItemID container, DataBrowserItemID container,
UInt32 numItems, UInt32 numItems,
const DataBrowserItemID *items, const DataBrowserItemID *items,
@@ -1652,166 +1655,166 @@ OSStatus wxMacDataBrowserControl::GetItemRow( DataBrowserItemID item, DataBrowse
return GetDataBrowserTableViewItemRow( m_controlRef, item, row ); return GetDataBrowserTableViewItemRow( m_controlRef, item, row );
} }
OSStatus wxMacDataBrowserControl::SetDefaultRowHeight( UInt16 height ) OSStatus wxMacDataBrowserControl::SetDefaultRowHeight( UInt16 height )
{ {
return SetDataBrowserTableViewRowHeight( m_controlRef , height ); return SetDataBrowserTableViewRowHeight( m_controlRef , height );
} }
OSStatus wxMacDataBrowserControl::GetDefaultRowHeight( UInt16 * height ) const OSStatus wxMacDataBrowserControl::GetDefaultRowHeight( UInt16 * height ) const
{ {
return GetDataBrowserTableViewRowHeight( m_controlRef, height ); return GetDataBrowserTableViewRowHeight( m_controlRef, height );
} }
OSStatus wxMacDataBrowserControl::SetRowHeight( DataBrowserItemID item , UInt16 height) OSStatus wxMacDataBrowserControl::SetRowHeight( DataBrowserItemID item , UInt16 height)
{ {
return SetDataBrowserTableViewItemRowHeight( m_controlRef, item , height ); return SetDataBrowserTableViewItemRowHeight( m_controlRef, item , height );
} }
OSStatus wxMacDataBrowserControl::GetRowHeight( DataBrowserItemID item , UInt16 *height) const OSStatus wxMacDataBrowserControl::GetRowHeight( DataBrowserItemID item , UInt16 *height) const
{ {
return GetDataBrowserTableViewItemRowHeight( m_controlRef, item , height); return GetDataBrowserTableViewItemRowHeight( m_controlRef, item , height);
} }
OSStatus wxMacDataBrowserControl::GetColumnWidth( DataBrowserPropertyID column , UInt16 *width ) const OSStatus wxMacDataBrowserControl::GetColumnWidth( DataBrowserPropertyID column , UInt16 *width ) const
{ {
return GetDataBrowserTableViewNamedColumnWidth( m_controlRef , column , width ); return GetDataBrowserTableViewNamedColumnWidth( m_controlRef , column , width );
} }
OSStatus wxMacDataBrowserControl::SetColumnWidth( DataBrowserPropertyID column , UInt16 width ) OSStatus wxMacDataBrowserControl::SetColumnWidth( DataBrowserPropertyID column , UInt16 width )
{ {
return SetDataBrowserTableViewNamedColumnWidth( m_controlRef , column , width ); return SetDataBrowserTableViewNamedColumnWidth( m_controlRef , column , width );
} }
OSStatus wxMacDataBrowserControl::GetDefaultColumnWidth( UInt16 *width ) const OSStatus wxMacDataBrowserControl::GetDefaultColumnWidth( UInt16 *width ) const
{ {
return GetDataBrowserTableViewColumnWidth( m_controlRef , width ); return GetDataBrowserTableViewColumnWidth( m_controlRef , width );
} }
OSStatus wxMacDataBrowserControl::SetDefaultColumnWidth( UInt16 width ) OSStatus wxMacDataBrowserControl::SetDefaultColumnWidth( UInt16 width )
{ {
return SetDataBrowserTableViewColumnWidth( m_controlRef , width ); return SetDataBrowserTableViewColumnWidth( m_controlRef , width );
} }
OSStatus wxMacDataBrowserControl::GetColumnCount(UInt32* numColumns) const OSStatus wxMacDataBrowserControl::GetColumnCount(UInt32* numColumns) const
{ {
return GetDataBrowserTableViewColumnCount( m_controlRef, numColumns); return GetDataBrowserTableViewColumnCount( m_controlRef, numColumns);
} }
OSStatus wxMacDataBrowserControl::GetColumnPosition( DataBrowserPropertyID column, OSStatus wxMacDataBrowserControl::GetColumnPosition( DataBrowserPropertyID column,
UInt32 *position) const UInt32 *position) const
{ {
return GetDataBrowserTableViewColumnPosition( m_controlRef , column , position); return GetDataBrowserTableViewColumnPosition( m_controlRef , column , position);
} }
OSStatus wxMacDataBrowserControl::SetColumnPosition( DataBrowserPropertyID column, UInt32 position) OSStatus wxMacDataBrowserControl::SetColumnPosition( DataBrowserPropertyID column, UInt32 position)
{ {
return SetDataBrowserTableViewColumnPosition( m_controlRef , column , position); return SetDataBrowserTableViewColumnPosition( m_controlRef , column , position);
} }
OSStatus wxMacDataBrowserControl::GetScrollPosition( UInt32 *top , UInt32 *left ) const OSStatus wxMacDataBrowserControl::GetScrollPosition( UInt32 *top , UInt32 *left ) const
{ {
return GetDataBrowserScrollPosition( m_controlRef , top , left ); return GetDataBrowserScrollPosition( m_controlRef , top , left );
} }
OSStatus wxMacDataBrowserControl::SetScrollPosition( UInt32 top , UInt32 left ) OSStatus wxMacDataBrowserControl::SetScrollPosition( UInt32 top , UInt32 left )
{ {
return SetDataBrowserScrollPosition( m_controlRef , top , left ); return SetDataBrowserScrollPosition( m_controlRef , top , left );
} }
OSStatus wxMacDataBrowserControl::GetSortProperty( DataBrowserPropertyID *column ) const OSStatus wxMacDataBrowserControl::GetSortProperty( DataBrowserPropertyID *column ) const
{ {
return GetDataBrowserSortProperty( m_controlRef , column ); return GetDataBrowserSortProperty( m_controlRef , column );
} }
OSStatus wxMacDataBrowserControl::SetSortProperty( DataBrowserPropertyID column ) OSStatus wxMacDataBrowserControl::SetSortProperty( DataBrowserPropertyID column )
{ {
return SetDataBrowserSortProperty( m_controlRef , column ); return SetDataBrowserSortProperty( m_controlRef , column );
} }
OSStatus wxMacDataBrowserControl::GetSortOrder( DataBrowserSortOrder *order ) const OSStatus wxMacDataBrowserControl::GetSortOrder( DataBrowserSortOrder *order ) const
{ {
return GetDataBrowserSortOrder( m_controlRef , order ); return GetDataBrowserSortOrder( m_controlRef , order );
} }
OSStatus wxMacDataBrowserControl::SetSortOrder( DataBrowserSortOrder order ) OSStatus wxMacDataBrowserControl::SetSortOrder( DataBrowserSortOrder order )
{ {
return SetDataBrowserSortOrder( m_controlRef , order ); return SetDataBrowserSortOrder( m_controlRef , order );
} }
OSStatus wxMacDataBrowserControl::GetPropertyFlags( DataBrowserPropertyID property, OSStatus wxMacDataBrowserControl::GetPropertyFlags( DataBrowserPropertyID property,
DataBrowserPropertyFlags *flags ) const DataBrowserPropertyFlags *flags ) const
{ {
return GetDataBrowserPropertyFlags( m_controlRef , property , flags ); return GetDataBrowserPropertyFlags( m_controlRef , property , flags );
} }
OSStatus wxMacDataBrowserControl::SetPropertyFlags( DataBrowserPropertyID property, OSStatus wxMacDataBrowserControl::SetPropertyFlags( DataBrowserPropertyID property,
DataBrowserPropertyFlags flags ) DataBrowserPropertyFlags flags )
{ {
return SetDataBrowserPropertyFlags( m_controlRef , property , flags ); return SetDataBrowserPropertyFlags( m_controlRef , property , flags );
} }
OSStatus wxMacDataBrowserControl::GetHeaderDesc( DataBrowserPropertyID property, OSStatus wxMacDataBrowserControl::GetHeaderDesc( DataBrowserPropertyID property,
DataBrowserListViewHeaderDesc *desc ) const DataBrowserListViewHeaderDesc *desc ) const
{ {
return GetDataBrowserListViewHeaderDesc( m_controlRef , property , desc ); return GetDataBrowserListViewHeaderDesc( m_controlRef , property , desc );
} }
OSStatus wxMacDataBrowserControl::SetHeaderDesc( DataBrowserPropertyID property, OSStatus wxMacDataBrowserControl::SetHeaderDesc( DataBrowserPropertyID property,
DataBrowserListViewHeaderDesc *desc ) DataBrowserListViewHeaderDesc *desc )
{ {
return SetDataBrowserListViewHeaderDesc( m_controlRef , property , desc ); return SetDataBrowserListViewHeaderDesc( m_controlRef , property , desc );
} }
OSStatus wxMacDataBrowserControl::SetDisclosureColumn( DataBrowserPropertyID property , OSStatus wxMacDataBrowserControl::SetDisclosureColumn( DataBrowserPropertyID property ,
Boolean expandableRows ) Boolean expandableRows )
{ {
return SetDataBrowserListViewDisclosureColumn( m_controlRef, property, expandableRows); return SetDataBrowserListViewDisclosureColumn( m_controlRef, property, expandableRows);
} }
// ============================================================================ // ============================================================================
// Higher-level Databrowser // Higher-level Databrowser
// ============================================================================ // ============================================================================
// //
// basing on data item objects // basing on data item objects
// //
wxMacDataItem::wxMacDataItem() wxMacDataItem::wxMacDataItem()
{ {
} }
wxMacDataItem::~wxMacDataItem() wxMacDataItem::~wxMacDataItem()
{ {
} }
bool wxMacDataItem::IsLessThan(wxMacDataItemBrowserControl *owner , bool wxMacDataItem::IsLessThan(wxMacDataItemBrowserControl *owner ,
const wxMacDataItem*, const wxMacDataItem*,
DataBrowserPropertyID property) const DataBrowserPropertyID property) const
{ {
return false; return false;
} }
OSStatus wxMacDataItem::GetSetData(wxMacDataItemBrowserControl *owner , OSStatus wxMacDataItem::GetSetData(wxMacDataItemBrowserControl *owner ,
DataBrowserPropertyID property, DataBrowserPropertyID property,
DataBrowserItemDataRef itemData, DataBrowserItemDataRef itemData,
bool changeValue ) bool changeValue )
{ {
return errDataBrowserPropertyNotSupported; return errDataBrowserPropertyNotSupported;
} }
void wxMacDataItem::Notification(wxMacDataItemBrowserControl *owner , void wxMacDataItem::Notification(wxMacDataItemBrowserControl *owner ,
DataBrowserItemNotification message, DataBrowserItemNotification message,
DataBrowserItemDataRef itemData ) const DataBrowserItemDataRef itemData ) const
{ {
} }
wxMacDataItemBrowserControl::wxMacDataItemBrowserControl( wxWindow* peer , const wxPoint& pos, const wxSize& size, long style) : wxMacDataItemBrowserControl::wxMacDataItemBrowserControl( wxWindow* peer , const wxPoint& pos, const wxSize& size, long style) :
wxMacDataBrowserControl( peer, pos, size, style ) wxMacDataBrowserControl( peer, pos, size, style )
{ {
m_suppressSelection = false; m_suppressSelection = false;
} }
wxMacDataItemBrowserSelectionSuppressor::wxMacDataItemBrowserSelectionSuppressor(wxMacDataItemBrowserControl *browser) wxMacDataItemBrowserSelectionSuppressor::wxMacDataItemBrowserSelectionSuppressor(wxMacDataItemBrowserControl *browser)
{ {
m_former = browser->SuppressSelection(true); m_former = browser->SuppressSelection(true);
m_browser = browser; m_browser = browser;
@@ -1830,18 +1833,18 @@ bool wxMacDataItemBrowserControl::SuppressSelection( bool suppress )
return former; return former;
} }
Boolean wxMacDataItemBrowserControl::CompareItems(DataBrowserItemID itemOneID, Boolean wxMacDataItemBrowserControl::CompareItems(DataBrowserItemID itemOneID,
DataBrowserItemID itemTwoID, DataBrowserItemID itemTwoID,
DataBrowserPropertyID sortProperty) DataBrowserPropertyID sortProperty)
{ {
wxMacDataItem* itemOne = (wxMacDataItem*) itemOneID; wxMacDataItem* itemOne = (wxMacDataItem*) itemOneID;
wxMacDataItem* itemTwo = (wxMacDataItem*) itemTwoID; wxMacDataItem* itemTwo = (wxMacDataItem*) itemTwoID;
return CompareItems( itemOne , itemTwo , sortProperty ); return CompareItems( itemOne , itemTwo , sortProperty );
} }
Boolean wxMacDataItemBrowserControl::CompareItems(const wxMacDataItem* itemOne, Boolean wxMacDataItemBrowserControl::CompareItems(const wxMacDataItem* itemOne,
const wxMacDataItem* itemTwo, const wxMacDataItem* itemTwo,
DataBrowserPropertyID sortProperty) DataBrowserPropertyID sortProperty)
{ {
Boolean retval = false; Boolean retval = false;
if ( itemOne != NULL ) if ( itemOne != NULL )
@@ -1853,7 +1856,7 @@ OSStatus wxMacDataItemBrowserControl::GetSetItemData(
DataBrowserItemID itemID, DataBrowserItemID itemID,
DataBrowserPropertyID property, DataBrowserPropertyID property,
DataBrowserItemDataRef itemData, DataBrowserItemDataRef itemData,
Boolean changeValue ) Boolean changeValue )
{ {
wxMacDataItem* item = (wxMacDataItem*) itemID; wxMacDataItem* item = (wxMacDataItem*) itemID;
return GetSetItemData(item, property, itemData , changeValue ); return GetSetItemData(item, property, itemData , changeValue );
@@ -1863,7 +1866,7 @@ OSStatus wxMacDataItemBrowserControl::GetSetItemData(
wxMacDataItem* item, wxMacDataItem* item,
DataBrowserPropertyID property, DataBrowserPropertyID property,
DataBrowserItemDataRef itemData, DataBrowserItemDataRef itemData,
Boolean changeValue ) Boolean changeValue )
{ {
OSStatus err = errDataBrowserPropertyNotSupported; OSStatus err = errDataBrowserPropertyNotSupported;
switch( property ) switch( property )
@@ -1877,7 +1880,7 @@ OSStatus wxMacDataItemBrowserControl::GetSetItemData(
if ( item != NULL ) if ( item != NULL )
err = item->GetSetData( this, property , itemData , changeValue ); err = item->GetSetData( this, property , itemData , changeValue );
break; break;
} }
return err; return err;
} }
@@ -1885,36 +1888,36 @@ OSStatus wxMacDataItemBrowserControl::GetSetItemData(
void wxMacDataItemBrowserControl::ItemNotification( void wxMacDataItemBrowserControl::ItemNotification(
DataBrowserItemID itemID, DataBrowserItemID itemID,
DataBrowserItemNotification message, DataBrowserItemNotification message,
DataBrowserItemDataRef itemData) DataBrowserItemDataRef itemData)
{ {
wxMacDataItem* item = (wxMacDataItem*) itemID; wxMacDataItem* item = (wxMacDataItem*) itemID;
ItemNotification( item , message, itemData); ItemNotification( item , message, itemData);
} }
void wxMacDataItemBrowserControl::ItemNotification( void wxMacDataItemBrowserControl::ItemNotification(
const wxMacDataItem* item, const wxMacDataItem* item,
DataBrowserItemNotification message, DataBrowserItemNotification message,
DataBrowserItemDataRef itemData) DataBrowserItemDataRef itemData)
{ {
if (item != NULL) if (item != NULL)
item->Notification( this, message, itemData); item->Notification( this, message, itemData);
} }
unsigned int wxMacDataItemBrowserControl::GetItemCount(const wxMacDataItem* container, unsigned int wxMacDataItemBrowserControl::GetItemCount(const wxMacDataItem* container,
bool recurse , DataBrowserItemState state) const bool recurse , DataBrowserItemState state) const
{ {
UInt32 numItems = 0; UInt32 numItems = 0;
verify_noerr( wxMacDataBrowserControl::GetItemCount( (DataBrowserItemID)container, verify_noerr( wxMacDataBrowserControl::GetItemCount( (DataBrowserItemID)container,
recurse, state, &numItems ) ); recurse, state, &numItems ) );
return numItems; return numItems;
} }
void wxMacDataItemBrowserControl::GetItems(const wxMacDataItem* container, void wxMacDataItemBrowserControl::GetItems(const wxMacDataItem* container,
bool recurse , DataBrowserItemState state, wxArrayMacDataItemPtr &items) const bool recurse , DataBrowserItemState state, wxArrayMacDataItemPtr &items) const
{ {
Handle handle = NewHandle(0); Handle handle = NewHandle(0);
verify_noerr( wxMacDataBrowserControl::GetItems( (DataBrowserItemID)container , verify_noerr( wxMacDataBrowserControl::GetItems( (DataBrowserItemID)container ,
recurse , state, handle) ); recurse , state, handle) );
int itemCount = GetHandleSize(handle)/sizeof(DataBrowserItemID); int itemCount = GetHandleSize(handle)/sizeof(DataBrowserItemID);
HLock( handle ); HLock( handle );
@@ -1940,17 +1943,17 @@ wxMacDataItem* wxMacDataItemBrowserControl::GetItemFromLine(unsigned int n) con
DataBrowserItemID id; DataBrowserItemID id;
OSStatus err = GetItemID( (DataBrowserTableViewRowIndex) n , &id); OSStatus err = GetItemID( (DataBrowserTableViewRowIndex) n , &id);
wxASSERT( err == noErr); wxASSERT( err == noErr);
return (wxMacDataItem*) id; return (wxMacDataItem*) id;
} }
void wxMacDataItemBrowserControl::UpdateItem(const wxMacDataItem *container, void wxMacDataItemBrowserControl::UpdateItem(const wxMacDataItem *container,
const wxMacDataItem *item , DataBrowserPropertyID property) const const wxMacDataItem *item , DataBrowserPropertyID property) const
{ {
verify_noerr( wxMacDataBrowserControl::UpdateItems((DataBrowserItemID)container, 1, verify_noerr( wxMacDataBrowserControl::UpdateItems((DataBrowserItemID)container, 1,
(DataBrowserItemID*) &item, kDataBrowserItemNoProperty /* notSorted */, property ) ); (DataBrowserItemID*) &item, kDataBrowserItemNoProperty /* notSorted */, property ) );
} }
void wxMacDataItemBrowserControl::UpdateItems(const wxMacDataItem *container, void wxMacDataItemBrowserControl::UpdateItems(const wxMacDataItem *container,
wxArrayMacDataItemPtr &itemArray , DataBrowserPropertyID property) const wxArrayMacDataItemPtr &itemArray , DataBrowserPropertyID property) const
{ {
unsigned int noItems = itemArray.GetCount(); unsigned int noItems = itemArray.GetCount();
@@ -1958,66 +1961,66 @@ void wxMacDataItemBrowserControl::UpdateItems(const wxMacDataItem *container,
for ( unsigned int i = 0; i < noItems; ++i ) for ( unsigned int i = 0; i < noItems; ++i )
items[i] = (DataBrowserItemID) itemArray[i]; items[i] = (DataBrowserItemID) itemArray[i];
verify_noerr( wxMacDataBrowserControl::UpdateItems((DataBrowserItemID)container, noItems, verify_noerr( wxMacDataBrowserControl::UpdateItems((DataBrowserItemID)container, noItems,
items, kDataBrowserItemNoProperty /* notSorted */, property ) ); items, kDataBrowserItemNoProperty /* notSorted */, property ) );
delete [] items; delete [] items;
} }
void wxMacDataItemBrowserControl::AddItem(wxMacDataItem *container, wxMacDataItem *item) void wxMacDataItemBrowserControl::AddItem(wxMacDataItem *container, wxMacDataItem *item)
{ {
verify_noerr( wxMacDataBrowserControl::AddItems( (DataBrowserItemID)container, 1, verify_noerr( wxMacDataBrowserControl::AddItems( (DataBrowserItemID)container, 1,
(DataBrowserItemID*) &item, kDataBrowserItemNoProperty ) ); (DataBrowserItemID*) &item, kDataBrowserItemNoProperty ) );
} }
void wxMacDataItemBrowserControl::AddItems(wxMacDataItem *container, wxArrayMacDataItemPtr &itemArray ) void wxMacDataItemBrowserControl::AddItems(wxMacDataItem *container, wxArrayMacDataItemPtr &itemArray )
{ {
unsigned int noItems = itemArray.GetCount(); unsigned int noItems = itemArray.GetCount();
DataBrowserItemID *items = new DataBrowserItemID[noItems]; DataBrowserItemID *items = new DataBrowserItemID[noItems];
for ( unsigned int i = 0; i < noItems; ++i ) for ( unsigned int i = 0; i < noItems; ++i )
items[i] = (DataBrowserItemID) itemArray[i]; items[i] = (DataBrowserItemID) itemArray[i];
verify_noerr( wxMacDataBrowserControl::AddItems( (DataBrowserItemID)container, noItems, verify_noerr( wxMacDataBrowserControl::AddItems( (DataBrowserItemID)container, noItems,
(DataBrowserItemID*) items, kDataBrowserItemNoProperty ) ); (DataBrowserItemID*) items, kDataBrowserItemNoProperty ) );
delete [] items; delete [] items;
} }
void wxMacDataItemBrowserControl::RemoveItem(wxMacDataItem *container, wxMacDataItem* item) void wxMacDataItemBrowserControl::RemoveItem(wxMacDataItem *container, wxMacDataItem* item)
{ {
OSStatus err = wxMacDataBrowserControl::RemoveItems( (DataBrowserItemID)container, 1, OSStatus err = wxMacDataBrowserControl::RemoveItems( (DataBrowserItemID)container, 1,
(UInt32*) &item, kDataBrowserItemNoProperty ); (UInt32*) &item, kDataBrowserItemNoProperty );
verify_noerr( err ); verify_noerr( err );
} }
void wxMacDataItemBrowserControl::RemoveItems(wxMacDataItem *container, wxArrayMacDataItemPtr &itemArray) void wxMacDataItemBrowserControl::RemoveItems(wxMacDataItem *container, wxArrayMacDataItemPtr &itemArray)
{ {
unsigned int noItems = itemArray.GetCount(); unsigned int noItems = itemArray.GetCount();
DataBrowserItemID *items = new DataBrowserItemID[noItems]; DataBrowserItemID *items = new DataBrowserItemID[noItems];
for ( unsigned int i = 0; i < noItems; ++i ) for ( unsigned int i = 0; i < noItems; ++i )
items[i] = (DataBrowserItemID) itemArray[i]; items[i] = (DataBrowserItemID) itemArray[i];
OSStatus err = wxMacDataBrowserControl::RemoveItems( (DataBrowserItemID)container, noItems, OSStatus err = wxMacDataBrowserControl::RemoveItems( (DataBrowserItemID)container, noItems,
(UInt32*) items, kDataBrowserItemNoProperty ); (UInt32*) items, kDataBrowserItemNoProperty );
verify_noerr( err ); verify_noerr( err );
delete [] items; delete [] items;
} }
void wxMacDataItemBrowserControl::RemoveAllItems(wxMacDataItem *container) void wxMacDataItemBrowserControl::RemoveAllItems(wxMacDataItem *container)
{ {
OSStatus err = wxMacDataBrowserControl::RemoveItems( (DataBrowserItemID)container, 0 , NULL , kDataBrowserItemNoProperty ); OSStatus err = wxMacDataBrowserControl::RemoveItems( (DataBrowserItemID)container, 0 , NULL , kDataBrowserItemNoProperty );
verify_noerr( err ); verify_noerr( err );
} }
void wxMacDataItemBrowserControl::SetSelectedItem(wxMacDataItem* item , DataBrowserSetOption option) void wxMacDataItemBrowserControl::SetSelectedItem(wxMacDataItem* item , DataBrowserSetOption option)
{ {
verify_noerr(wxMacDataBrowserControl::SetSelectedItems( 1, (DataBrowserItemID*) &item, option )); verify_noerr(wxMacDataBrowserControl::SetSelectedItems( 1, (DataBrowserItemID*) &item, option ));
} }
void wxMacDataItemBrowserControl::SetSelectedAllItems(DataBrowserSetOption option) void wxMacDataItemBrowserControl::SetSelectedAllItems(DataBrowserSetOption option)
{ {
verify_noerr(wxMacDataBrowserControl::SetSelectedItems( 0 , NULL , option )); verify_noerr(wxMacDataBrowserControl::SetSelectedItems( 0 , NULL , option ));
} }
void wxMacDataItemBrowserControl::SetSelectedItems(wxArrayMacDataItemPtr &itemArray , DataBrowserSetOption option) void wxMacDataItemBrowserControl::SetSelectedItems(wxArrayMacDataItemPtr &itemArray , DataBrowserSetOption option)
{ {
unsigned int noItems = itemArray.GetCount(); unsigned int noItems = itemArray.GetCount();
DataBrowserItemID *items = new DataBrowserItemID[noItems]; DataBrowserItemID *items = new DataBrowserItemID[noItems];
@@ -2033,17 +2036,17 @@ Boolean wxMacDataItemBrowserControl::IsItemSelected( const wxMacDataItem* item)
return wxMacDataBrowserControl::IsItemSelected( (DataBrowserItemID) item); return wxMacDataBrowserControl::IsItemSelected( (DataBrowserItemID) item);
} }
void wxMacDataItemBrowserControl::RevealItem( wxMacDataItem* item, DataBrowserRevealOptions options) void wxMacDataItemBrowserControl::RevealItem( wxMacDataItem* item, DataBrowserRevealOptions options)
{ {
verify_noerr(wxMacDataBrowserControl::RevealItem( (DataBrowserItemID) item, kDataBrowserNoItem , options ) ); verify_noerr(wxMacDataBrowserControl::RevealItem( (DataBrowserItemID) item, kDataBrowserNoItem , options ) );
} }
void wxMacDataItemBrowserControl::GetSelectionAnchor( wxMacDataItemPtr* first , wxMacDataItemPtr* last) const void wxMacDataItemBrowserControl::GetSelectionAnchor( wxMacDataItemPtr* first , wxMacDataItemPtr* last) const
{ {
verify_noerr(wxMacDataBrowserControl::GetSelectionAnchor( (DataBrowserItemID*) first, (DataBrowserItemID*) last) ); verify_noerr(wxMacDataBrowserControl::GetSelectionAnchor( (DataBrowserItemID*) first, (DataBrowserItemID*) last) );
} }
// //
// Tab Control // Tab Control
@@ -2121,7 +2124,7 @@ CGColorSpaceRef wxMacGetGenericRGBColorSpace()
wxASSERT_MSG( genericRGBColorSpace != NULL, wxT("couldn't create the generic RGB color space") ); wxASSERT_MSG( genericRGBColorSpace != NULL, wxT("couldn't create the generic RGB color space") );
// we opened the profile so it is up to us to close it // we opened the profile so it is up to us to close it
CMCloseProfile(genericRGBProfile); CMCloseProfile(genericRGBProfile);
} }
} }
} }

View File

@@ -15,16 +15,20 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#include "wx/app.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/window.h" #include "wx/window.h"
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/button.h" #include "wx/button.h"
#include "wx/app.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/pen.h" #include "wx/pen.h"
#include "wx/brush.h" #include "wx/brush.h"
#include "wx/cursor.h" #include "wx/cursor.h"
#include "wx/intl.h"
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/palette.h" #include "wx/palette.h"
#include "wx/dc.h" #include "wx/dc.h"

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: clipbrd.cpp // Name: src/mac/classic/clipbrd.cpp
// Purpose: Clipboard functionality // Purpose: Clipboard functionality
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
@@ -9,13 +9,19 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#include "wx/clipbrd.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/app.h" #include "wx/app.h"
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/metafile.h" #include "wx/metafile.h"
#include "wx/clipbrd.h"
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
#ifndef __DARWIN__ #ifndef __DARWIN__
@@ -240,7 +246,7 @@ bool wxClipboard::AddData( wxDataObject *data )
size_t sz = data->GetDataSize( array[i] ) ; size_t sz = data->GetDataSize( array[i] ) ;
void* buf = malloc( sz + 1 ) ; void* buf = malloc( sz + 1 ) ;
if ( buf ) if ( buf )
{ {
data->GetDataHere( array[i] , buf ) ; data->GetDataHere( array[i] , buf ) ;
OSType mactype = 0 ; OSType mactype = 0 ;
switch ( array[i].GetType() ) switch ( array[i].GetType() )
@@ -281,15 +287,15 @@ void wxClipboard::Close()
wxCHECK_RET( m_open, wxT("clipboard not open") ); wxCHECK_RET( m_open, wxT("clipboard not open") );
m_open = false ; m_open = false ;
// Get rid of cached object. If this is not done copying from another application will // Get rid of cached object. If this is not done copying from another application will
// only work once // only work once
if (m_data) if (m_data)
{ {
delete m_data; delete m_data;
m_data = (wxDataObject*) NULL; m_data = (wxDataObject*) NULL;
} }
} }
bool wxClipboard::IsSupported( const wxDataFormat &dataFormat ) bool wxClipboard::IsSupported( const wxDataFormat &dataFormat )

View File

@@ -15,11 +15,15 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#include "wx/filedlg.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/app.h" #include "wx/app.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/dialog.h" #include "wx/dialog.h"
#include "wx/filedlg.h"
#include "wx/intl.h"
#include "wx/tokenzr.h" #include "wx/tokenzr.h"
#include "wx/filename.h" #include "wx/filename.h"

View File

@@ -16,9 +16,12 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#include "wx/mac/mimetype.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h"
#if wxUSE_GUI #if wxUSE_GUI
#include "wx/icon.h" #include "wx/icon.h"
#endif #endif
@@ -27,11 +30,8 @@
#include "wx/log.h" #include "wx/log.h"
#include "wx/file.h" #include "wx/file.h"
#include "wx/intl.h"
#include "wx/confbase.h" #include "wx/confbase.h"
#include "wx/mac/mimetype.h"
// other standard headers // other standard headers
#include <ctype.h> #include <ctype.h>

View File

@@ -9,9 +9,16 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/app.h" // for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
#include "wx/intl.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/app.h"
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
IMPLEMENT_CLASS(wxMessageDialog, wxDialog) IMPLEMENT_CLASS(wxMessageDialog, wxDialog)
@@ -255,4 +262,3 @@ int wxMessageDialog::ShowModal()
return resultbutton ; return resultbutton ;
} }

View File

@@ -6,20 +6,23 @@
// Created: 1998-01-01 // Created: 1998-01-01
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Stefan Csomor // Copyright: (c) Stefan Csomor
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/utils.h" #include "wx/utils.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/app.h" #include "wx/app.h"
#include "wx/apptrait.h" #include "wx/apptrait.h"
#if wxUSE_GUI #if wxUSE_GUI
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
#include "wx/font.h" #include "wx/font.h"
#else
#include "wx/intl.h"
#endif #endif
#include <ctype.h> #include <ctype.h>
@@ -1218,7 +1221,7 @@ void wxMacConvertNewlines10To13( char * data )
void wxMacConvertNewlines13To10( wxString * data ) void wxMacConvertNewlines13To10( wxString * data )
{ {
size_t len = data->Length() ; size_t len = data->length() ;
if ( len == 0 || wxStrchr(data->c_str(),0x0d)==NULL) if ( len == 0 || wxStrchr(data->c_str(),0x0d)==NULL)
return ; return ;
@@ -1232,9 +1235,9 @@ void wxMacConvertNewlines13To10( wxString * data )
void wxMacConvertNewlines10To13( wxString * data ) void wxMacConvertNewlines10To13( wxString * data )
{ {
size_t len = data->Length() ; size_t len = data->length() ;
if ( data->Length() == 0 || wxStrchr(data->c_str(),0x0a)==NULL) if ( data->empty() || wxStrchr(data->c_str(),0x0a)==NULL)
return ; return ;
wxString temp(*data) ; wxString temp(*data) ;

View File

@@ -14,13 +14,17 @@
#endif #endif
#include "wx/bitmap.h" #include "wx/bitmap.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/filefn.h" #include "wx/filefn.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/dcmemory.h" #include "wx/dcmemory.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/xpmdecod.h" #include "wx/xpmdecod.h"

View File

@@ -15,10 +15,14 @@
#endif #endif
#include "wx/cursor.h" #include "wx/cursor.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/module.h" #include "wx/module.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h"
#include "wx/hashmap.h" #include "wx/hashmap.h"
#include "wx/mgl/private.h" #include "wx/mgl/private.h"

View File

@@ -18,9 +18,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h"
#endif #endif
#include "wx/intl.h"
#include "wx/apptrait.h" #include "wx/apptrait.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/process.h" #include "wx/process.h"

View File

@@ -23,8 +23,9 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#include "wx/window.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/window.h"
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
#include "wx/accel.h" #include "wx/accel.h"
#include "wx/dc.h" #include "wx/dc.h"
@@ -32,6 +33,7 @@
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/panel.h" #include "wx/panel.h"
#include "wx/intl.h"
#endif #endif
#if wxUSE_DRAG_AND_DROP #if wxUSE_DRAG_AND_DROP
@@ -41,7 +43,6 @@
#include "wx/log.h" #include "wx/log.h"
#include "wx/sysopt.h" #include "wx/sysopt.h"
#include "wx/mgl/private.h" #include "wx/mgl/private.h"
#include "wx/intl.h"
#include "wx/dcscreen.h" #include "wx/dcscreen.h"
#include "wx/caret.h" #include "wx/caret.h"

View File

@@ -17,16 +17,17 @@
#define XtDisplay XTDISPLAY #define XtDisplay XTDISPLAY
#endif #endif
#include "wx/app.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/hash.h" #include "wx/hash.h"
#include "wx/intl.h"
#endif #endif
#include "wx/app.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/module.h" #include "wx/module.h"
#include "wx/memory.h" #include "wx/memory.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h"
#include "wx/evtloop.h" #include "wx/evtloop.h"
#if wxUSE_THREADS #if wxUSE_THREADS

View File

@@ -13,10 +13,14 @@
#if wxUSE_DRAG_AND_DROP #if wxUSE_DRAG_AND_DROP
#include "wx/dnd.h" #include "wx/dnd.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/window.h" #include "wx/window.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/intl.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/log.h" #include "wx/log.h"

View File

@@ -18,9 +18,13 @@
#define XtWindow XTWINDOW #define XtWindow XTWINDOW
#endif #endif
#include "wx/utils.h"
#include "wx/filedlg.h" #include "wx/filedlg.h"
#include "wx/intl.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/utils.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/tokenzr.h" #include "wx/tokenzr.h"

View File

@@ -33,9 +33,13 @@
#pragma message enable nosimpint #pragma message enable nosimpint
#endif #endif
#include "wx/app.h"
#include "wx/intl.h"
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/app.h"
#include "wx/motif/private.h" #include "wx/motif/private.h"
#include "wx/settings.h" #include "wx/settings.h"

View File

@@ -18,9 +18,12 @@
#if wxUSE_MIMETYPE #if wxUSE_MIMETYPE
#include "wx/msdos/mimetype.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h"
#if wxUSE_GUI #if wxUSE_GUI
#include "wx/icon.h" #include "wx/icon.h"
#endif #endif
@@ -28,11 +31,8 @@
#include "wx/log.h" #include "wx/log.h"
#include "wx/file.h" #include "wx/file.h"
#include "wx/intl.h"
#include "wx/confbase.h" #include "wx/confbase.h"
#include "wx/msdos/mimetype.h"
// other standard headers // other standard headers
#include <ctype.h> #include <ctype.h>

View File

@@ -19,9 +19,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h"
#endif #endif
#include "wx/intl.h"
#include "wx/apptrait.h" #include "wx/apptrait.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/process.h" #include "wx/process.h"

View File

@@ -30,15 +30,15 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_WXDIB
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/string.h" #include "wx/string.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h"
#endif //WX_PRECOMP #endif //WX_PRECOMP
#if wxUSE_WXDIB
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/intl.h"
#include "wx/file.h" #include "wx/file.h"
#include <stdio.h> #include <stdio.h>
@@ -800,4 +800,3 @@ wxImage wxDIB::ConvertToImage() const
#endif // wxUSE_IMAGE #endif // wxUSE_IMAGE
#endif // wxUSE_WXDIB #endif // wxUSE_WXDIB

View File

@@ -21,23 +21,23 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_DRAGIMAGE #if wxUSE_DRAGIMAGE
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include <stdio.h> #include <stdio.h>
#include "wx/window.h" #include "wx/window.h"
#include "wx/dcclient.h" #include "wx/dcclient.h"
#include "wx/dcscreen.h" #include "wx/dcscreen.h"
#include "wx/dcmemory.h" #include "wx/dcmemory.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/intl.h"
#endif #endif
#include "wx/msw/private.h" #include "wx/msw/private.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h"
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/image.h" #include "wx/image.h"
@@ -298,8 +298,8 @@ bool wxDragImage::BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullS
if (!m_hCursorImageList) if (!m_hCursorImageList)
{ {
#ifndef SM_CXCURSOR #ifndef SM_CXCURSOR
// Smartphone may not have these metric symbol // Smartphone may not have these metric symbol
int cxCursor = 16; int cxCursor = 16;
int cyCursor = 16; int cyCursor = 16;
#else #else
int cxCursor = ::GetSystemMetrics(SM_CXCURSOR); int cxCursor = ::GetSystemMetrics(SM_CXCURSOR);

View File

@@ -30,12 +30,12 @@
#include "wx/dc.h" #include "wx/dc.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/dcmemory.h" #include "wx/dcmemory.h"
#include "wx/intl.h"
#include <stdio.h> #include <stdio.h>
#endif #endif
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/msw/imaglist.h" #include "wx/msw/imaglist.h"

View File

@@ -18,9 +18,12 @@
#if wxUSE_MIMETYPE #if wxUSE_MIMETYPE
#include "wx/msw/mimetype.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h"
#if wxUSE_GUI #if wxUSE_GUI
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
@@ -30,7 +33,6 @@
#include "wx/log.h" #include "wx/log.h"
#include "wx/file.h" #include "wx/file.h"
#include "wx/iconloc.h" #include "wx/iconloc.h"
#include "wx/intl.h"
#include "wx/confbase.h" #include "wx/confbase.h"
#ifdef __WXMSW__ #ifdef __WXMSW__
@@ -38,8 +40,6 @@
#include "wx/msw/private.h" #include "wx/msw/private.h"
#endif // OS #endif // OS
#include "wx/msw/mimetype.h"
// other standard headers // other standard headers
#include <ctype.h> #include <ctype.h>

View File

@@ -21,9 +21,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h"
#endif #endif
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/file.h" #include "wx/file.h"
#include "wx/wfstream.h" #include "wx/wfstream.h"

View File

@@ -16,18 +16,19 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#ifndef WX_PRECOMP
#include "wx/frame.h"
#include "wx/settings.h"
#include "wx/dcclient.h"
#endif
#if wxUSE_STATUSBAR && wxUSE_NATIVE_STATUSBAR #if wxUSE_STATUSBAR && wxUSE_NATIVE_STATUSBAR
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/statusbr.h" #include "wx/statusbr.h"
#ifndef WX_PRECOMP
#include "wx/frame.h"
#include "wx/settings.h"
#include "wx/dcclient.h"
#include "wx/intl.h"
#endif
#include "wx/log.h"
#include "wx/msw/private.h" #include "wx/msw/private.h"
#include <windowsx.h> #include <windowsx.h>

View File

@@ -43,6 +43,7 @@
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/statbox.h" #include "wx/statbox.h"
#include "wx/sizer.h" #include "wx/sizer.h"
#include "wx/intl.h"
#endif #endif
#if wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__) #if wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
@@ -86,7 +87,6 @@
#include "wx/spinctrl.h" #include "wx/spinctrl.h"
#endif // wxUSE_SPINCTRL #endif // wxUSE_SPINCTRL
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/textctrl.h" #include "wx/textctrl.h"

View File

@@ -14,9 +14,12 @@
#if wxUSE_MIMETYPE #if wxUSE_MIMETYPE
#include "wx/os2/mimetype.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h"
#if wxUSE_GUI #if wxUSE_GUI
#include "wx/icon.h" #include "wx/icon.h"
#endif #endif
@@ -30,11 +33,8 @@
#include "wx/log.h" #include "wx/log.h"
#include "wx/file.h" #include "wx/file.h"
#include "wx/iconloc.h" #include "wx/iconloc.h"
#include "wx/intl.h"
#include "wx/confbase.h" #include "wx/confbase.h"
#include "wx/os2/mimetype.h"
// other standard headers // other standard headers
#include <ctype.h> #include <ctype.h>

View File

@@ -6,7 +6,6 @@
// Created: 04/22/98 // Created: 04/22/98
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Stefan Neis (2003) // Copyright: (c) Stefan Neis (2003)
//
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -19,15 +18,19 @@
#if wxUSE_THREADS #if wxUSE_THREADS
#include <stdio.h> #include "wx/thread.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif //WX_PRECOMP
#include "wx/app.h" #include "wx/app.h"
#include "wx/apptrait.h" #include "wx/apptrait.h"
#include "wx/module.h" #include "wx/module.h"
#include "wx/intl.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/thread.h"
#include <stdio.h>
#define INCL_DOSSEMAPHORES #define INCL_DOSSEMAPHORES
#define INCL_DOSPROCESS #define INCL_DOSPROCESS

View File

@@ -17,10 +17,10 @@
#include "wx/window.h" #include "wx/window.h"
#include "wx/event.h" #include "wx/event.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/intl.h"
#endif #endif
#include "wx/os2/private.h" #include "wx/os2/private.h"
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/timer.h" #include "wx/timer.h"

View File

@@ -15,10 +15,10 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/intl.h"
#endif //WX_PRECOMP #endif //WX_PRECOMP
#include "wx/os2/private.h" #include "wx/os2/private.h"
#include "wx/intl.h"
#include "wx/apptrait.h" #include "wx/apptrait.h"
#include <ctype.h> #include <ctype.h>

View File

@@ -43,6 +43,7 @@
#include "wx/statusbr.h" #include "wx/statusbr.h"
#include "wx/toolbar.h" #include "wx/toolbar.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/intl.h"
#include <stdio.h> #include <stdio.h>
#endif #endif
@@ -71,7 +72,6 @@
#include "wx/caret.h" #include "wx/caret.h"
#endif // wxUSE_CARET #endif // wxUSE_CARET
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"

View File

@@ -23,14 +23,15 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#ifndef WX_PRECOMP
#endif
#if wxUSE_DATEPICKCTRL #if wxUSE_DATEPICKCTRL
#include "wx/datectrl.h" #include "wx/datectrl.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/app.h" #include "wx/app.h"
#include "wx/intl.h"
#include "wx/dynlib.h" #include "wx/dynlib.h"
#define _WX_DEFINE_DATE_EVENTS_ #define _WX_DEFINE_DATE_EVENTS_
@@ -133,4 +134,3 @@ bool wxDatePickerCtrl::SendClickEvent()
} }
#endif // wxUSE_DATEPICKCTRL #endif // wxUSE_DATEPICKCTRL

View File

@@ -24,15 +24,15 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_WXDIB
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/string.h" #include "wx/string.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h"
#endif //WX_PRECOMP #endif //WX_PRECOMP
#if wxUSE_WXDIB
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/intl.h"
#include "wx/file.h" #include "wx/file.h"
#include "wx/image.h" #include "wx/image.h"
@@ -167,4 +167,3 @@ wxImage wxDIB::ConvertToImage() const
#endif // wxUSE_IMAGE #endif // wxUSE_IMAGE
#endif // wxUSE_WXDIB #endif // wxUSE_WXDIB

View File

@@ -27,16 +27,16 @@
#if wxUSE_DRAGIMAGE #if wxUSE_DRAGIMAGE
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include <stdio.h> #include <stdio.h>
#include "wx/window.h" #include "wx/window.h"
#include "wx/dcclient.h" #include "wx/dcclient.h"
#include "wx/dcscreen.h" #include "wx/dcscreen.h"
#include "wx/dcmemory.h" #include "wx/dcmemory.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/intl.h"
#endif #endif
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h"
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/image.h" #include "wx/image.h"

View File

@@ -30,10 +30,10 @@
#include "wx/dc.h" #include "wx/dc.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/dcmemory.h" #include "wx/dcmemory.h"
#include "wx/intl.h"
#endif #endif
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h"
#include "wx/palmos/imaglist.h" #include "wx/palmos/imaglist.h"
#include "wx/palmos/private.h" #include "wx/palmos/private.h"
@@ -135,4 +135,3 @@ bool wxImageList::Draw(int index,
{ {
return false; return false;
} }

View File

@@ -16,17 +16,18 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_NATIVE_STATUSBAR
#include "wx/statusbr.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/dcclient.h" #include "wx/dcclient.h"
#include "wx/intl.h"
#endif #endif
#if wxUSE_NATIVE_STATUSBAR
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/statusbr.h"
#include <StatusBar.h> #include <StatusBar.h>

View File

@@ -41,6 +41,7 @@
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/statbox.h" #include "wx/statbox.h"
#include "wx/intl.h"
#endif #endif
#if wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__) #if wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
@@ -72,7 +73,6 @@
#include "wx/spinctrl.h" #include "wx/spinctrl.h"
#endif // wxUSE_SPINCTRL #endif // wxUSE_SPINCTRL
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/textctrl.h" #include "wx/textctrl.h"

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: richtext/richtextxml.cpp // Name: src/richtext/richtextxml.cpp
// Purpose: XML and HTML I/O for wxRichTextCtrl // Purpose: XML and HTML I/O for wxRichTextCtrl
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
@@ -21,7 +21,8 @@
#include "wx/richtext/richtextxml.h" #include "wx/richtext/richtextxml.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h" #include "wx/wx.h"
#include "wx/intl.h"
#endif #endif
#include "wx/filename.h" #include "wx/filename.h"
@@ -31,7 +32,6 @@
#include "wx/module.h" #include "wx/module.h"
#include "wx/txtstrm.h" #include "wx/txtstrm.h"
#include "wx/xml/xml.h" #include "wx/xml/xml.h"
#include "wx/intl.h"
IMPLEMENT_DYNAMIC_CLASS(wxRichTextXMLHandler, wxRichTextFileHandler) IMPLEMENT_DYNAMIC_CLASS(wxRichTextXMLHandler, wxRichTextFileHandler)
@@ -123,13 +123,13 @@ bool wxRichTextXMLHandler::ImportXML(wxRichTextBuffer* buffer, wxXmlNode* node)
wxString text2 = textChild->GetContent(); wxString text2 = textChild->GetContent();
// Strip whitespace from end // Strip whitespace from end
if (text2.Length() > 0 && text2[text2.Length()-1] == wxT('\n')) if (!text2.empty() && text2[text2.length()-1] == wxT('\n'))
text2 = text2.Mid(0, text2.Length()-1); text2 = text2.Mid(0, text2.length()-1);
if (text2.Length() > 0 && text2[0] == wxT('"')) if (!text2.empty() && text2[0] == wxT('"'))
text2 = text2.Mid(1); text2 = text2.Mid(1);
if (text2.Length() > 0 && text2[text2.Length()-1] == wxT('"')) if (!text2.empty() && text2[text2.length()-1] == wxT('"'))
text2 = text2.Mid(0, text2.Length() - 1); text2 = text2.Mid(0, text2.length() - 1);
text += text2; text += text2;
} }
@@ -175,7 +175,7 @@ bool wxRichTextXMLHandler::ImportXML(wxRichTextBuffer* buffer, wxXmlNode* node)
wxStringInputStream strStream(data); wxStringInputStream strStream(data);
imageObj->GetImageBlock().ReadHex(strStream, data.Length(), imageType); imageObj->GetImageBlock().ReadHex(strStream, data.length(), imageType);
} }
} }
child = child->GetNext(); child = child->GetNext();
@@ -307,7 +307,7 @@ static void OutputStringEnt(wxOutputStream& stream, const wxString& str,
for (i = 0; i < len; i++) for (i = 0; i < len; i++)
{ {
c = str.GetChar(i); c = str.GetChar(i);
// Original code excluded "&amp;" but we _do_ want to convert // Original code excluded "&amp;" but we _do_ want to convert
// the ampersand beginning &amp; because otherwise when read in, // the ampersand beginning &amp; because otherwise when read in,
// the original "&amp;" becomes "&". // the original "&amp;" becomes "&".
@@ -388,7 +388,7 @@ bool wxRichTextXMLHandler::DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream&
#endif #endif
// If SetEncoding has been called, change the output encoding. // If SetEncoding has been called, change the output encoding.
if (!m_encoding.IsEmpty() && m_encoding.Lower() != fileEncoding.Lower()) if (!m_encoding.empty() && m_encoding.Lower() != fileEncoding.Lower())
{ {
if (m_encoding == wxT("<System>")) if (m_encoding == wxT("<System>"))
{ {
@@ -400,7 +400,7 @@ bool wxRichTextXMLHandler::DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream&
} }
// GetSystemEncodingName may not have returned a name // GetSystemEncodingName may not have returned a name
if (fileEncoding.IsEmpty()) if (fileEncoding.empty())
#if wxUSE_UNICODE #if wxUSE_UNICODE
fileEncoding = wxT("UTF-8"); fileEncoding = wxT("UTF-8");
#else #else
@@ -430,7 +430,7 @@ bool wxRichTextXMLHandler::DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream&
if (deleteConvFile) if (deleteConvFile)
delete convFile; delete convFile;
return success; return success;
} }
@@ -461,7 +461,7 @@ bool wxRichTextXMLHandler::ExportXML(wxOutputStream& stream, wxMBConv* convMem,
OutputString(stream, style + wxT(">"), convMem, convFile); OutputString(stream, style + wxT(">"), convMem, convFile);
wxString str = text.GetText(); wxString str = text.GetText();
if (str.Length() > 0 && (str[0] == wxT(' ') || str[str.Length()-1] == wxT(' '))) if (!str.empty() && (str[0] == wxT(' ') || str[str.length()-1] == wxT(' ')))
{ {
OutputString(stream, wxT("\""), convMem, convFile); OutputString(stream, wxT("\""), convMem, convFile);
OutputStringEnt(stream, str, convMem, convFile); OutputStringEnt(stream, str, convMem, convFile);
@@ -683,6 +683,6 @@ bool wxRichTextXMLHandler::GetStyle(wxTextAttrEx& attr, wxXmlNode* node, bool is
#endif #endif
// wxUSE_STREAMS // wxUSE_STREAMS
#endif #endif
// wxUSE_RICHTEXT && wxUSE_XML // wxUSE_RICHTEXT && wxUSE_XML

View File

@@ -14,19 +14,20 @@
#if wxUSE_DIALUP_MANAGER #if wxUSE_DIALUP_MANAGER
#include "wx/dialup.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h"
#endif // !PCH #endif // !PCH
#include "wx/event.h" #include "wx/event.h"
#include "wx/dialup.h"
#include "wx/timer.h" #include "wx/timer.h"
#include "wx/filefn.h" #include "wx/filefn.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/ffile.h" #include "wx/ffile.h"
#include "wx/process.h" #include "wx/process.h"
#include "wx/intl.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/wxchar.h" #include "wx/wxchar.h"

View File

@@ -26,16 +26,17 @@
#if wxUSE_DISPLAY #if wxUSE_DISPLAY
#include "wx/display.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/intl.h"
#endif /* WX_PRECOMP */ #endif /* WX_PRECOMP */
#include "wx/display.h"
#include "wx/display_impl.h" #include "wx/display_impl.h"
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
/* These must be included after the wx files. Otherwise the Data macro in /* These must be included after the wx files. Otherwise the Data macro in

View File

@@ -38,14 +38,16 @@
#if wxUSE_MIMETYPE && wxUSE_FILE && wxUSE_TEXTFILE #if wxUSE_MIMETYPE && wxUSE_FILE && wxUSE_TEXTFILE
#include "wx/unix/mimetype.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h"
#endif #endif
#include "wx/log.h" #include "wx/log.h"
#include "wx/file.h" #include "wx/file.h"
#include "wx/intl.h"
#include "wx/confbase.h" #include "wx/confbase.h"
#include "wx/ffile.h" #include "wx/ffile.h"
@@ -56,8 +58,6 @@
#include "wx/iconloc.h" #include "wx/iconloc.h"
#include "wx/filename.h" #include "wx/filename.h"
#include "wx/unix/mimetype.h"
#if wxUSE_LIBGNOMEVFS #if wxUSE_LIBGNOMEVFS
// Not GUI dependent // Not GUI dependent
#include "wx/gtk/gnome/gvfs.h" #include "wx/gtk/gnome/gvfs.h"

View File

@@ -26,15 +26,16 @@
#if wxUSE_THREADS #if wxUSE_THREADS
#include "wx/thread.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/intl.h"
#endif #endif
#include "wx/thread.h"
#include "wx/module.h" #include "wx/module.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h"
#include "wx/timer.h" #include "wx/timer.h"
#include "wx/stopwatch.h" #include "wx/stopwatch.h"

View File

@@ -18,16 +18,17 @@
// for compilers that support precompilation, includes "wx.h". // for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/utils.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h"
#endif #endif
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/apptrait.h" #include "wx/apptrait.h"
#include "wx/utils.h"
#include "wx/process.h" #include "wx/process.h"
#include "wx/thread.h" #include "wx/thread.h"

View File

@@ -12,12 +12,14 @@
// for compilers that support precompilation, includes "wx.h". // for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/app.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/hash.h" #include "wx/hash.h"
#include "wx/intl.h"
#endif #endif
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/app.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/icon.h" #include "wx/icon.h"
@@ -26,7 +28,6 @@
#include "wx/module.h" #include "wx/module.h"
#include "wx/memory.h" #include "wx/memory.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h"
#include "wx/evtloop.h" #include "wx/evtloop.h"
#include "wx/timer.h" #include "wx/timer.h"
#include "wx/filename.h" #include "wx/filename.h"

View File

@@ -11,16 +11,20 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if defined(__BORLANDC__) #if defined(__BORLANDC__)
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_DRAG_AND_DROP #if wxUSE_DRAG_AND_DROP
#include "wx/dnd.h" #include "wx/dnd.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/window.h" #include "wx/window.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/intl.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/log.h" #include "wx/log.h"

View File

@@ -7,10 +7,16 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/textctrl.h" #include "wx/textctrl.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/panel.h" #include "wx/panel.h"

View File

@@ -19,11 +19,14 @@
#include "wx/xml/xml.h" #include "wx/xml/xml.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/wfstream.h" #include "wx/wfstream.h"
#include "wx/datstrm.h" #include "wx/datstrm.h"
#include "wx/zstream.h" #include "wx/zstream.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/intl.h"
#include "wx/strconv.h" #include "wx/strconv.h"
#include "expat.h" // from Expat #include "expat.h" // from Expat

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: xh_chckl.cpp // Name: src/xrc/xh_chckl.cpp
// Purpose: XRC resource for wxCheckList // Purpose: XRC resource for wxCheckList
// Author: Bob Mitchell // Author: Bob Mitchell
// Created: 2000/03/21 // Created: 2000/03/21
@@ -15,13 +15,15 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_XRC #if wxUSE_XRC && wxUSE_CHECKLISTBOX
#if wxUSE_CHECKLISTBOX
#include "wx/xrc/xh_chckl.h" #include "wx/xrc/xh_chckl.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/checklst.h" #include "wx/checklst.h"
#include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
IMPLEMENT_DYNAMIC_CLASS(wxCheckListBoxXmlHandler, wxXmlResourceHandler) IMPLEMENT_DYNAMIC_CLASS(wxCheckListBoxXmlHandler, wxXmlResourceHandler)
@@ -37,7 +39,7 @@ wxCheckListBoxXmlHandler::wxCheckListBoxXmlHandler()
XRC_ADD_STYLE(wxLB_ALWAYS_SB); XRC_ADD_STYLE(wxLB_ALWAYS_SB);
XRC_ADD_STYLE(wxLB_NEEDED_SB); XRC_ADD_STYLE(wxLB_NEEDED_SB);
XRC_ADD_STYLE(wxLB_SORT); XRC_ADD_STYLE(wxLB_SORT);
AddWindowStyles(); AddWindowStyles();
} }
@@ -127,6 +129,4 @@ bool wxCheckListBoxXmlHandler::CanHandle(wxXmlNode *node)
(m_insideBox && node->GetName() == wxT("item"))); (m_insideBox && node->GetName() == wxT("item")));
} }
#endif // wxUSE_CHECKLISTBOX #endif // wxUSE_XRC && wxUSE_CHECKLISTBOX
#endif // wxUSE_XRC

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: xh_choic.cpp // Name: src/xrc/xh_choic.cpp
// Purpose: XRC resource for wxChoice // Purpose: XRC resource for wxChoice
// Author: Bob Mitchell // Author: Bob Mitchell
// Created: 2000/03/21 // Created: 2000/03/21
@@ -18,8 +18,12 @@
#if wxUSE_XRC #if wxUSE_XRC
#include "wx/xrc/xh_choic.h" #include "wx/xrc/xh_choic.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/choice.h" #include "wx/choice.h"
#include "wx/intl.h"
IMPLEMENT_DYNAMIC_CLASS(wxChoiceXmlHandler, wxXmlResourceHandler) IMPLEMENT_DYNAMIC_CLASS(wxChoiceXmlHandler, wxXmlResourceHandler)

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: xh_combo.cpp // Name: src/xrc/xh_combo.cpp
// Purpose: XRC resource for wxRadioBox // Purpose: XRC resource for wxRadioBox
// Author: Bob Mitchell // Author: Bob Mitchell
// Created: 2000/03/21 // Created: 2000/03/21
@@ -18,8 +18,12 @@
#if wxUSE_XRC && wxUSE_COMBOBOX #if wxUSE_XRC && wxUSE_COMBOBOX
#include "wx/xrc/xh_combo.h" #include "wx/xrc/xh_combo.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#endif
#include "wx/combobox.h" #include "wx/combobox.h"
#include "wx/intl.h"
IMPLEMENT_DYNAMIC_CLASS(wxComboBoxXmlHandler, wxXmlResourceHandler) IMPLEMENT_DYNAMIC_CLASS(wxComboBoxXmlHandler, wxXmlResourceHandler)

Some files were not shown because too many files have changed in this diff Show More