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

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-04-26 08:21:31 +00:00
parent 56b6cf265c
commit e4db172a3b
220 changed files with 1194 additions and 901 deletions

View File

@@ -80,6 +80,7 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/window.h" #include "wx/window.h"
#include "wx/log.h"
#endif // WX_PRECOMP #endif // WX_PRECOMP
#include "wx/cocoa/ObjcPose.h" #include "wx/cocoa/ObjcPose.h"
@@ -160,7 +161,6 @@ void wxCocoaNSComboBox::DisassociateNSComboBox(WX_NSComboBox cocoaNSComboBox)
#include "wx/app.h" #include "wx/app.h"
#include "wx/combobox.h" #include "wx/combobox.h"
#include "wx/log.h"
#include "wx/cocoa/autorelease.h" #include "wx/cocoa/autorelease.h"
#include "wx/cocoa/string.h" #include "wx/cocoa/string.h"

View File

@@ -21,11 +21,15 @@
defined(__WXMOTIF__) || \ defined(__WXMOTIF__) || \
defined(__WXX11__) defined(__WXX11__)
#include "wx/bitmap.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif // WX_PRECOMP
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/palette.h" #include "wx/palette.h"
#include "wx/bitmap.h"
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/log.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/module.h" #include "wx/module.h"

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: cmndata.cpp // Name: src/common/cmndata.cpp
// Purpose: Common GDI data // Purpose: Common GDI data
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
@@ -24,16 +24,17 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#include "wx/cmndata.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include <stdio.h> #include <stdio.h>
#include "wx/string.h" #include "wx/string.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/log.h"
#endif #endif
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/cmndata.h"
#include "wx/log.h"
#include "wx/prntbase.h" #include "wx/prntbase.h"
#include "wx/printdlg.h" #include "wx/printdlg.h"

View File

@@ -19,9 +19,11 @@
#include "wx/colour.h" #include "wx/colour.h"
#include "wx/gdicmn.h" #ifndef WX_PRECOMP
#include "wx/log.h" #include "wx/log.h"
#endif
#include "wx/gdicmn.h"
// ============================================================================ // ============================================================================

View File

@@ -28,9 +28,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif //WX_PRECOMP #endif //WX_PRECOMP
#include "wx/log.h"
#include "wx/arrstr.h" #include "wx/arrstr.h"
#if wxUSE_CONFIG && ((wxUSE_FILE && wxUSE_TEXTFILE) || wxUSE_CONFIG_NATIVE) #if wxUSE_CONFIG && ((wxUSE_FILE && wxUSE_TEXTFILE) || wxUSE_CONFIG_NATIVE)

View File

@@ -24,15 +24,19 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_DYNLIB_CLASS #if wxUSE_DYNLIB_CLASS
#include "wx/dynlib.h" #include "wx/dynlib.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
#endif //WX_PRECOMP
#include "wx/filefn.h" #include "wx/filefn.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/filename.h" // for SplitPath() #include "wx/filename.h" // for SplitPath()
#include "wx/app.h" #include "wx/app.h"
@@ -245,7 +249,7 @@ wxString wxDynamicLibrary::CanonicalizePluginName(const wxString& name,
{ {
wxAppTraits *traits = wxAppConsole::GetInstance() ? wxAppTraits *traits = wxAppConsole::GetInstance() ?
wxAppConsole::GetInstance()->GetTraits() : NULL; wxAppConsole::GetInstance()->GetTraits() : NULL;
wxCHECK_MSG( traits, _T(""), wxCHECK_MSG( traits, wxEmptyString,
_("can't query for GUI plugins name in console applications") ); _("can't query for GUI plugins name in console applications") );
suffix = traits->GetToolkitInfo().shortName; suffix = traits->GetToolkitInfo().shortName;
} }

View File

@@ -27,11 +27,11 @@
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif //WX_PRECOMP #endif //WX_PRECOMP
#include "wx/app.h" #include "wx/app.h"
#include "wx/file.h" #include "wx/file.h"
#include "wx/log.h"
#include "wx/textfile.h" #include "wx/textfile.h"
#include "wx/memtext.h" #include "wx/memtext.h"
#include "wx/config.h" #include "wx/config.h"

View File

@@ -26,6 +26,7 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/utils.h" #include "wx/utils.h"
@@ -52,8 +53,6 @@
#include "wx/mac/private.h" // includes mac headers #include "wx/mac/private.h" // includes mac headers
#endif #endif
#include "wx/log.h"
#ifdef __WINDOWS__ #ifdef __WINDOWS__
#include "wx/msw/private.h" #include "wx/msw/private.h"
#include "wx/msw/mslu.h" #include "wx/msw/mslu.h"

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: filesys.cpp // Name: src/common/filesys.cpp
// Purpose: wxFileSystem class - interface for opening files // Purpose: wxFileSystem class - interface for opening files
// Author: Vaclav Slavik // Author: Vaclav Slavik
// Copyright: (c) 1999 Vaclav Slavik // Copyright: (c) 1999 Vaclav Slavik
@@ -10,18 +10,22 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_FILESYSTEM #if wxUSE_FILESYSTEM
#include "wx/filesys.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/wfstream.h" #include "wx/wfstream.h"
#include "wx/module.h" #include "wx/module.h"
#include "wx/filesys.h"
#include "wx/mimetype.h" #include "wx/mimetype.h"
#include "wx/filename.h" #include "wx/filename.h"
#include "wx/log.h"
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
@@ -36,7 +40,7 @@ wxString wxFileSystemHandler::GetMimeTypeFromExt(const wxString& location)
wxString ext, mime; wxString ext, mime;
wxString loc = GetRightLocation(location); wxString loc = GetRightLocation(location);
wxChar c; wxChar c;
int l = loc.Length(), l2; int l = loc.length(), l2;
l2 = l; l2 = l;
for (int i = l-1; i >= 0; i--) for (int i = l-1; i >= 0; i--)
@@ -120,7 +124,7 @@ wxString wxFileSystemHandler::GetMimeTypeFromExt(const wxString& location)
wxString wxFileSystemHandler::GetProtocol(const wxString& location) const wxString wxFileSystemHandler::GetProtocol(const wxString& location) const
{ {
wxString s = wxEmptyString; wxString s = wxEmptyString;
int i, l = location.Length(); int i, l = location.length();
bool fnd = false; bool fnd = false;
for (i = l-1; (i >= 0) && ((location[i] != wxT('#')) || (!fnd)); i--) { for (i = l-1; (i >= 0) && ((location[i] != wxT('#')) || (!fnd)); i--) {
@@ -137,7 +141,7 @@ wxString wxFileSystemHandler::GetLeftLocation(const wxString& location) const
int i; int i;
bool fnd = false; bool fnd = false;
for (i = location.Length()-1; i >= 0; i--) { for (i = location.length()-1; i >= 0; i--) {
if ((location[i] == wxT(':')) && (i != 1 /*win: C:\path*/)) fnd = true; if ((location[i] == wxT(':')) && (i != 1 /*win: C:\path*/)) fnd = true;
else if (fnd && (location[i] == wxT('#'))) return location.Left(i); else if (fnd && (location[i] == wxT('#'))) return location.Left(i);
} }
@@ -146,7 +150,7 @@ wxString wxFileSystemHandler::GetLeftLocation(const wxString& location) const
wxString wxFileSystemHandler::GetRightLocation(const wxString& location) const wxString wxFileSystemHandler::GetRightLocation(const wxString& location) const
{ {
int i, l = location.Length(); int i, l = location.length();
int l2 = l + 1; int l2 = l + 1;
for (i = l-1; for (i = l-1;
@@ -163,7 +167,7 @@ wxString wxFileSystemHandler::GetRightLocation(const wxString& location) const
wxString wxFileSystemHandler::GetAnchor(const wxString& location) const wxString wxFileSystemHandler::GetAnchor(const wxString& location) const
{ {
wxChar c; wxChar c;
int l = location.Length(); int l = location.length();
for (int i = l-1; i >= 0; i--) { for (int i = l-1; i >= 0; i--) {
c = location[i]; c = location[i];
@@ -256,7 +260,7 @@ static wxString MakeCorrectPath(const wxString& path)
wxString r; wxString r;
int i, j, cnt; int i, j, cnt;
cnt = p.Length(); cnt = p.length();
for (i = 0; i < cnt; i++) for (i = 0; i < cnt; i++)
if (p.GetChar(i) == wxT('\\')) p.GetWritableChar(i) = wxT('/'); // Want to be windows-safe if (p.GetChar(i) == wxT('\\')) p.GetWritableChar(i) = wxT('/'); // Want to be windows-safe
@@ -275,7 +279,7 @@ static wxString MakeCorrectPath(const wxString& path)
r << p.GetChar(i); r << p.GetChar(i);
if (p.GetChar(i) == wxT('/') && p.GetChar(i-1) == wxT('.') && p.GetChar(i-2) == wxT('.')) if (p.GetChar(i) == wxT('/') && p.GetChar(i-1) == wxT('.') && p.GetChar(i-2) == wxT('.'))
{ {
for (j = r.Length() - 2; j >= 0 && r.GetChar(j) != wxT('/') && r.GetChar(j) != wxT(':'); j--) {} for (j = r.length() - 2; j >= 0 && r.GetChar(j) != wxT('/') && r.GetChar(j) != wxT(':'); j--) {}
if (j >= 0 && r.GetChar(j) != wxT(':')) if (j >= 0 && r.GetChar(j) != wxT(':'))
{ {
for (j = j - 1; j >= 0 && r.GetChar(j) != wxT('/') && r.GetChar(j) != wxT(':'); j--) {} for (j = j - 1; j >= 0 && r.GetChar(j) != wxT('/') && r.GetChar(j) != wxT(':'); j--) {}
@@ -298,13 +302,13 @@ void wxFileSystem::ChangePathTo(const wxString& location, bool is_dir)
if (is_dir) if (is_dir)
{ {
if (m_Path.Length() > 0 && m_Path.Last() != wxT('/') && m_Path.Last() != wxT(':')) if (m_Path.length() > 0 && m_Path.Last() != wxT('/') && m_Path.Last() != wxT(':'))
m_Path << wxT('/'); m_Path << wxT('/');
} }
else else
{ {
for (i = m_Path.Length()-1; i >= 0; i--) for (i = m_Path.length()-1; i >= 0; i--)
{ {
if (m_Path[(unsigned int) i] == wxT('/')) if (m_Path[(unsigned int) i] == wxT('/'))
{ {
@@ -326,7 +330,7 @@ void wxFileSystem::ChangePathTo(const wxString& location, bool is_dir)
} }
if (pathpos == -1) if (pathpos == -1)
{ {
for (i = 0; i < (int) m_Path.Length(); i++) for (i = 0; i < (int) m_Path.length(); i++)
{ {
if (m_Path[(unsigned int) i] == wxT(':')) if (m_Path[(unsigned int) i] == wxT(':'))
{ {
@@ -334,7 +338,7 @@ void wxFileSystem::ChangePathTo(const wxString& location, bool is_dir)
break; break;
} }
} }
if (i == (int) m_Path.Length()) if (i == (int) m_Path.length())
m_Path = wxEmptyString; m_Path = wxEmptyString;
} }
else else
@@ -354,7 +358,7 @@ wxFSFile* wxFileSystem::OpenFile(const wxString& location)
wxFSFile *s = NULL; wxFSFile *s = NULL;
wxList::compatibility_iterator node; wxList::compatibility_iterator node;
ln = loc.Length(); ln = loc.length();
meta = 0; meta = 0;
for (i = 0; i < ln; i++) for (i = 0; i < ln; i++)
{ {
@@ -411,7 +415,7 @@ wxString wxFileSystem::FindFirst(const wxString& spec, int flags)
m_FindFileHandler = NULL; m_FindFileHandler = NULL;
for (int i = spec2.Length()-1; i >= 0; i--) for (int i = spec2.length()-1; i >= 0; i--)
if (spec2[(unsigned int) i] == wxT('\\')) spec2.GetWritableChar(i) = wxT('/'); // Want to be windows-safe if (spec2[(unsigned int) i] == wxT('\\')) spec2.GetWritableChar(i) = wxT('/'); // Want to be windows-safe
node = m_Handlers.GetFirst(); node = m_Handlers.GetFirst();
@@ -491,7 +495,7 @@ wxFileName wxFileSystem::URLToFileName(const wxString& url)
} }
else if ( (url.Find(wxT("file://")) == 0) && else if ( (url.Find(wxT("file://")) == 0) &&
(path.Find(wxT('/')) != wxNOT_FOUND) && (path.Find(wxT('/')) != wxNOT_FOUND) &&
(path.Length() > 1) && (path[1u] != wxT(':')) ) (path.length() > 1) && (path[1u] != wxT(':')) )
{ {
path = wxT("//") + path; path = wxT("//") + path;
} }
@@ -555,6 +559,3 @@ IMPLEMENT_DYNAMIC_CLASS(wxFileSystemModule, wxModule)
#endif #endif
// wxUSE_FILESYSTEM // wxUSE_FILESYSTEM

View File

@@ -20,8 +20,13 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#include "wx/event.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/event.h"
#include "wx/brush.h" #include "wx/brush.h"
#include "wx/pen.h" #include "wx/pen.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
@@ -35,7 +40,6 @@
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/hashmap.h" #include "wx/hashmap.h"
#include "wx/log.h"
#include <string.h> #include <string.h>
#ifdef __WXMOTIF__ #ifdef __WXMOTIF__

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: common/geometry.cpp // Name: src/common/geometry.cpp
// Purpose: Common Geometry Classes // Purpose: Common Geometry Classes
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
@@ -12,17 +12,20 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_GEOMETRY #if wxUSE_GEOMETRY
#include "wx/log.h" #include "wx/geometry.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include <string.h> #include <string.h>
#include "wx/geometry.h"
#include "wx/datstrm.h" #include "wx/datstrm.h"
// //

View File

@@ -20,9 +20,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/log.h"
#include "wx/txtstrm.h" #include "wx/txtstrm.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -184,4 +184,4 @@ bool wxPNMHandler::DoCanRead( wxInputStream& stream )
#endif // wxUSE_STREAMS #endif // wxUSE_STREAMS
#endif // wxUSE_PNM #endif // wxUSE_IMAGE && wxUSE_PNM

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: log.cpp // Name: src/common/log.cpp
// Purpose: Assorted wxLogXXX functions, and wxLog (sink for logs) // Purpose: Assorted wxLogXXX functions, and wxLog (sink for logs)
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
@@ -28,6 +28,7 @@
// wxWidgets // wxWidgets
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/arrstr.h" #include "wx/arrstr.h"
#include "wx/intl.h" #include "wx/intl.h"
@@ -36,7 +37,6 @@
#include "wx/apptrait.h" #include "wx/apptrait.h"
#include "wx/file.h" #include "wx/file.h"
#include "wx/log.h"
#include "wx/msgout.h" #include "wx/msgout.h"
#include "wx/textfile.h" #include "wx/textfile.h"
#include "wx/thread.h" #include "wx/thread.h"
@@ -833,4 +833,3 @@ const wxChar *wxSysErrorMsg(unsigned long nErrCode)
} }
#endif // wxUSE_LOG #endif // wxUSE_LOG

View File

@@ -18,17 +18,19 @@
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT #if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
#include "wx/memory.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/hash.h" #include "wx/hash.h"
#include "wx/log.h"
#endif #endif
#if wxUSE_THREADS #if wxUSE_THREADS
#include "wx/thread.h" #include "wx/thread.h"
#endif #endif
#include "wx/log.h"
#include <stdlib.h> #include <stdlib.h>
#include "wx/ioswrap.h" #include "wx/ioswrap.h"
@@ -54,8 +56,6 @@
#endif #endif
#include "wx/memory.h"
#if wxUSE_THREADS && defined(__WXDEBUG__) #if wxUSE_THREADS && defined(__WXDEBUG__)
#define USE_THREADSAFE_MEMORY_ALLOCATION 1 #define USE_THREADSAFE_MEMORY_ALLOCATION 1
#else #else

View File

@@ -33,10 +33,10 @@
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif //WX_PRECOMP #endif //WX_PRECOMP
#include "wx/module.h" #include "wx/module.h"
#include "wx/log.h"
#include "wx/file.h" #include "wx/file.h"
#include "wx/iconloc.h" #include "wx/iconloc.h"
#include "wx/confbase.h" #include "wx/confbase.h"

View File

@@ -21,9 +21,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/hash.h" #include "wx/hash.h"
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/log.h"
#include "wx/listimpl.cpp" #include "wx/listimpl.cpp"
#define TRACE_MODULE _T("module") #define TRACE_MODULE _T("module")

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: common/msgout.cpp // Name: src/common/msgout.cpp
// Purpose: wxMessageOutput implementation // Purpose: wxMessageOutput implementation
// Author: Mattia Barbon // Author: Mattia Barbon
// Modified by: // Modified by:
@@ -29,6 +29,7 @@
#include "wx/ffile.h" #include "wx/ffile.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#if wxUSE_GUI #if wxUSE_GUI
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
#endif // wxUSE_GUI #endif // wxUSE_GUI
@@ -36,8 +37,6 @@
#include "wx/msgout.h" #include "wx/msgout.h"
#include "wx/apptrait.h" #include "wx/apptrait.h"
#include "wx/log.h"
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
@@ -221,4 +220,3 @@ void wxMessageOutputMessageBox::Printf(const wxChar* format, ...)
} }
#endif // wxUSE_GUI #endif // wxUSE_GUI

View File

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

View File

@@ -22,10 +22,10 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/utils.h" #include "wx/utils.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
// apparently not the case for all MSW makefiles and so, unless we use // apparently not the case for all MSW makefiles and so, unless we use

View File

@@ -6,7 +6,7 @@
// Created: 2006-04-13 // Created: 2006-04-13
// Id: $Id$ // Id: $Id$
// Copyright: (c) Julian Smart, Robert Roebling, Vadim Zeitlin, // Copyright: (c) Julian Smart, Robert Roebling, Vadim Zeitlin,
// SciTech Software, Inc. // SciTech Software, Inc.
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -28,15 +28,16 @@
// Currently, only for Mac as a toolbar replacement. // Currently, only for Mac as a toolbar replacement.
#if defined(__WXMAC__) && wxUSE_TOOLBAR && wxUSE_BMPBUTTON #if defined(__WXMAC__) && wxUSE_TOOLBAR && wxUSE_BMPBUTTON
#include "wx/generic/buttonbar.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/log.h"
#endif #endif
#include "wx/generic/buttonbar.h"
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/log.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/dcclient.h" #include "wx/dcclient.h"
@@ -62,7 +63,7 @@ public:
m_x = m_y = wxDefaultCoord; m_x = m_y = wxDefaultCoord;
m_width = m_width =
m_height = 0; m_height = 0;
m_button = NULL; m_button = NULL;
} }
@@ -118,7 +119,7 @@ void wxButtonToolBar::Init()
m_labelMargin = 2; m_labelMargin = 2;
m_labelHeight = 0; m_labelHeight = 0;
SetMargins(8, 2); SetMargins(8, 2);
SetToolPacking(8); SetToolPacking(8);
} }
@@ -347,10 +348,10 @@ bool wxButtonToolBar::Realize()
{ {
if ( !wxToolBarBase::Realize() ) if ( !wxToolBarBase::Realize() )
return false; return false;
m_needsLayout = true; m_needsLayout = true;
DoLayout(); DoLayout();
SetBestSize(wxSize(m_maxWidth, m_maxHeight)); SetBestSize(wxSize(m_maxWidth, m_maxHeight));
return true; return true;
@@ -378,7 +379,7 @@ void wxButtonToolBar::DoLayout()
tool->m_x = x; tool->m_x = x;
tool->m_y = y; tool->m_y = y;
if (tool->IsButton()) if (tool->IsButton())
{ {
if (!tool->GetButton()) if (!tool->GetButton())
@@ -387,14 +388,14 @@ void wxButtonToolBar::DoLayout()
wxBU_AUTODRAW|wxBORDER_NONE); wxBU_AUTODRAW|wxBORDER_NONE);
if (!tool->GetShortHelp().IsEmpty()) if (!tool->GetShortHelp().IsEmpty())
bmpButton->SetLabel(tool->GetShortHelp()); bmpButton->SetLabel(tool->GetShortHelp());
tool->SetButton(bmpButton); tool->SetButton(bmpButton);
} }
else else
{ {
tool->GetButton()->Move(wxPoint(tool->m_x, tool->m_y)); tool->GetButton()->Move(wxPoint(tool->m_x, tool->m_y));
} }
int w = widthTool; int w = widthTool;
if (tool->GetButton()) if (tool->GetButton())
{ {
@@ -553,4 +554,3 @@ void wxButtonToolBar::OnLeftUp(wxMouseEvent& event)
} }
#endif // wxUSE_TOOLBAR && wxUSE_BMPBUTTON #endif // wxUSE_TOOLBAR && wxUSE_BMPBUTTON

View File

@@ -21,13 +21,13 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif // WX_PRECOMP #endif // WX_PRECOMP
#include "wx/dcmemory.h" #include "wx/dcmemory.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/log.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"

View File

@@ -23,6 +23,7 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/hash.h" #include "wx/hash.h"
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/module.h" #include "wx/module.h"
@@ -37,7 +38,6 @@
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/imaglist.h" #include "wx/imaglist.h"
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/log.h"
#include "wx/sizer.h" #include "wx/sizer.h"
#include "wx/tokenzr.h" #include "wx/tokenzr.h"
#include "wx/dir.h" #include "wx/dir.h"

View File

@@ -35,10 +35,9 @@
#include "wx/dcmemory.h" #include "wx/dcmemory.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/log.h"
#define wxUSE_IMAGE_IN_DRAGIMAGE 1 #define wxUSE_IMAGE_IN_DRAGIMAGE 1
#if wxUSE_IMAGE_IN_DRAGIMAGE #if wxUSE_IMAGE_IN_DRAGIMAGE

View File

@@ -24,13 +24,15 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#include "wx/generic/mdig.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/panel.h" #include "wx/panel.h"
#include "wx/menu.h" #include "wx/menu.h"
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif //WX_PRECOMP #endif //WX_PRECOMP
#include "wx/generic/mdig.h"
#include "wx/stockitem.h" #include "wx/stockitem.h"
enum MDI_MENU_ID enum MDI_MENU_ID
@@ -399,7 +401,6 @@ wxGenericMDIChildFrame::wxGenericMDIChildFrame( wxGenericMDIParentFrame *parent,
Create( parent, id, title, wxDefaultPosition, size, style, name ); Create( parent, id, title, wxDefaultPosition, size, style, name );
} }
#include "wx/log.h"
wxGenericMDIChildFrame::~wxGenericMDIChildFrame() wxGenericMDIChildFrame::~wxGenericMDIChildFrame()
{ {
wxGenericMDIParentFrame *pParentFrame = GetMDIParentFrame(); wxGenericMDIParentFrame *pParentFrame = GetMDIParentFrame();
@@ -812,4 +813,3 @@ IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame, wxGenericMDIChildFrame)
IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxGenericMDIClientWindow) IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxGenericMDIClientWindow)
#endif #endif

View File

@@ -30,9 +30,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/string.h" #include "wx/string.h"
#include "wx/log.h"
#endif #endif
#include "wx/log.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/generic/imaglist.h" #include "wx/generic/imaglist.h"
#include "wx/dcclient.h" #include "wx/dcclient.h"

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: mgl/timer.cpp // Name: src/generic/timer.cpp
// Purpose: wxTimer implementation // Purpose: wxTimer implementation
// Author: Vaclav Slavik // Author: Vaclav Slavik
// Id: $Id$ // Id: $Id$
@@ -20,11 +20,14 @@
// is in wxEventLoop::Dispatch(). // is in wxEventLoop::Dispatch().
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#include "wx/timer.h"
#if wxUSE_TIMER #if wxUSE_TIMER
#include "wx/log.h" #include "wx/timer.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/module.h" #include "wx/module.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -20,11 +20,11 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/log.h"
#include "wx/memory.h" #include "wx/memory.h"
#include "wx/font.h" #include "wx/font.h"
#include "wx/settings.h" #include "wx/settings.h"
@@ -257,7 +257,7 @@ static gint wxapp_idle_callback( gpointer WXUNUSED(data) )
#if wxUSE_THREADS #if wxUSE_THREADS
wxMutexLocker lock(gs_idleTagsMutex); wxMutexLocker lock(gs_idleTagsMutex);
#endif #endif
g_isIdle = TRUE; g_isIdle = true;
wxTheApp->m_idleTag = 0; wxTheApp->m_idleTag = 0;
} }
@@ -348,7 +348,7 @@ static gint wxapp_poll_func( GPollFD *ufds, guint nfds, gint timeout )
gdk_threads_enter(); gdk_threads_enter();
wxMutexGuiLeave(); wxMutexGuiLeave();
g_mainThreadLocked = TRUE; g_mainThreadLocked = true;
// we rely on the fact that glib GPollFD struct is really just pollfd but // we rely on the fact that glib GPollFD struct is really just pollfd but
// I wonder how wise is this in the long term (VZ) // I wonder how wise is this in the long term (VZ)
@@ -428,7 +428,7 @@ wxApp::wxApp()
#endif // __WXDEBUG__ #endif // __WXDEBUG__
m_idleTag = 0; m_idleTag = 0;
g_isIdle = TRUE; g_isIdle = true;
wxapp_install_idle_handler(); wxapp_install_idle_handler();
#if wxUSE_THREADS #if wxUSE_THREADS
@@ -664,7 +664,7 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
return false; return false;
} }
wxSetDetectableAutoRepeat( TRUE ); wxSetDetectableAutoRepeat( true );
#if wxUSE_INTL #if wxUSE_INTL
wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding()); wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
@@ -702,6 +702,6 @@ void wxApp::RemoveIdleTag()
{ {
g_source_remove( wxTheApp->m_idleTag ); g_source_remove( wxTheApp->m_idleTag );
wxTheApp->m_idleTag = 0; wxTheApp->m_idleTag = 0;
g_isIdle = TRUE; g_isIdle = true;
} }
} }

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: gtk/clipbrd.cpp // Name: src/gtk/clipbrd.cpp
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -10,23 +10,19 @@
// 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_CLIPBOARD
#include "wx/clipbrd.h" #include "wx/clipbrd.h"
#if wxUSE_CLIPBOARD #ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/dataobj.h" #include "wx/dataobj.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/log.h"
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
//-----------------------------------------------------------------------------
// thread system
//-----------------------------------------------------------------------------
#if wxUSE_THREADS
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// data // data
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -120,8 +116,8 @@ targets_selection_received( GtkWidget *WXUNUSED(widget),
if (format == clipboard->m_targetRequested) if (format == clipboard->m_targetRequested)
{ {
clipboard->m_waiting = FALSE; clipboard->m_waiting = false;
clipboard->m_formatSupported = TRUE; clipboard->m_formatSupported = true;
return; return;
} }
} }
@@ -184,7 +180,7 @@ selection_received( GtkWidget *WXUNUSED(widget),
data_object->SetData( format, (size_t) selection_data->length, (const char*) selection_data->data ); data_object->SetData( format, (size_t) selection_data->length, (const char*) selection_data->data );
wxTheClipboard->m_formatSupported = TRUE; wxTheClipboard->m_formatSupported = true;
clipboard->m_waiting = FALSE; clipboard->m_waiting = FALSE;
} }
} }
@@ -197,20 +193,20 @@ extern "C" {
static gint static gint
selection_clear_clip( GtkWidget *WXUNUSED(widget), GdkEventSelection *event ) selection_clear_clip( GtkWidget *WXUNUSED(widget), GdkEventSelection *event )
{ {
if (!wxTheClipboard) return TRUE; if (!wxTheClipboard) return true;
if (event->selection == GDK_SELECTION_PRIMARY) if (event->selection == GDK_SELECTION_PRIMARY)
{ {
wxTheClipboard->m_ownsPrimarySelection = FALSE; wxTheClipboard->m_ownsPrimarySelection = false;
} }
else else
if (event->selection == g_clipboardAtom) if (event->selection == g_clipboardAtom)
{ {
wxTheClipboard->m_ownsClipboard = FALSE; wxTheClipboard->m_ownsClipboard = false;
} }
else else
{ {
wxTheClipboard->m_waiting = FALSE; wxTheClipboard->m_waiting = false;
return FALSE; return FALSE;
} }
@@ -227,7 +223,7 @@ selection_clear_clip( GtkWidget *WXUNUSED(widget), GdkEventSelection *event )
} }
} }
wxTheClipboard->m_waiting = FALSE; wxTheClipboard->m_waiting = false;
return TRUE; return TRUE;
} }
} }
@@ -382,7 +378,7 @@ void wxClipboard::Clear()
// it, clear_selection is called which will set m_data to zero // it, clear_selection is called which will set m_data to zero
if (gdk_selection_owner_get( g_clipboardAtom ) == m_clipboardWidget->window) if (gdk_selection_owner_get( g_clipboardAtom ) == m_clipboardWidget->window)
{ {
m_waiting = TRUE; m_waiting = true;
gtk_selection_owner_set( (GtkWidget*) NULL, g_clipboardAtom, gtk_selection_owner_set( (GtkWidget*) NULL, g_clipboardAtom,
(guint32) GDK_CURRENT_TIME ); (guint32) GDK_CURRENT_TIME );

View File

@@ -12,8 +12,12 @@
#if wxUSE_CONTROLS #if wxUSE_CONTROLS
#include "wx/log.h"
#include "wx/control.h" #include "wx/control.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/fontutil.h" #include "wx/fontutil.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
@@ -126,7 +130,7 @@ GtkWidget* wxControl::GTKCreateFrame(const wxString& label)
GtkWidget* framewidget = gtk_frame_new(NULL); GtkWidget* framewidget = gtk_frame_new(NULL);
gtk_frame_set_label_widget(GTK_FRAME(framewidget), labelwidget); gtk_frame_set_label_widget(GTK_FRAME(framewidget), labelwidget);
return framewidget; //note that the label is already set so you'll return framewidget; //note that the label is already set so you'll
//only need to call wxControl::SetLabel afterwards //only need to call wxControl::SetLabel afterwards
} }
@@ -363,4 +367,3 @@ wxControl::GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromAdj_t widget_new,
} }
#endif // wxUSE_CONTROLS #endif // wxUSE_CONTROLS

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: dataobj.cpp // Name: src/gtk/dataobj.cpp
// Purpose: wxDataObject class // Purpose: wxDataObject class
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -10,15 +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"
#if wxUSE_DATAOBJ
#include "wx/dataobj.h" #include "wx/dataobj.h"
#if wxUSE_DATAOBJ #ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/app.h" #include "wx/app.h"
#include "wx/debug.h" #include "wx/debug.h"
#include "wx/mstream.h" #include "wx/mstream.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/log.h"
#include "wx/uri.h" #include "wx/uri.h"
#include <gdk/gdk.h> #include <gdk/gdk.h>

View File

@@ -16,12 +16,15 @@
#ifndef wxUSE_GENERICDATAVIEWCTRL #ifndef wxUSE_GENERICDATAVIEWCTRL
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/stockitem.h" #include "wx/stockitem.h"
#include "wx/dcclient.h" #include "wx/dcclient.h"
#include "wx/calctrl.h" #include "wx/calctrl.h"
#include "wx/popupwin.h" #include "wx/popupwin.h"
#include "wx/sizer.h" #include "wx/sizer.h"
#include "wx/log.h"
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/win_gtk.h" #include "wx/gtk/win_gtk.h"
@@ -1349,17 +1352,17 @@ wxDataViewColumn::wxDataViewColumn( const wxString &title, wxDataViewCell *cell,
GtkTreeViewColumn *column = gtk_tree_view_column_new(); GtkTreeViewColumn *column = gtk_tree_view_column_new();
gtk_tree_view_column_set_title( column, wxGTK_CONV(title) ); gtk_tree_view_column_set_title( column, wxGTK_CONV(title) );
if (sizing == wxDATAVIEW_COL_WIDTH_FIXED) if (sizing == wxDATAVIEW_COL_WIDTH_FIXED)
gtk_tree_view_column_set_sizing( column, GTK_TREE_VIEW_COLUMN_FIXED ); gtk_tree_view_column_set_sizing( column, GTK_TREE_VIEW_COLUMN_FIXED );
else if (sizing == wxDATAVIEW_COL_WIDTH_GROW) else if (sizing == wxDATAVIEW_COL_WIDTH_GROW)
gtk_tree_view_column_set_sizing( column, GTK_TREE_VIEW_COLUMN_GROW_ONLY ); gtk_tree_view_column_set_sizing( column, GTK_TREE_VIEW_COLUMN_GROW_ONLY );
else else
gtk_tree_view_column_set_sizing( column, GTK_TREE_VIEW_COLUMN_AUTOSIZE ); gtk_tree_view_column_set_sizing( column, GTK_TREE_VIEW_COLUMN_AUTOSIZE );
if (fixed_width > 0) if (fixed_width > 0)
gtk_tree_view_column_set_fixed_width( column, fixed_width ); gtk_tree_view_column_set_fixed_width( column, fixed_width );
gtk_tree_view_column_pack_start( column, renderer, TRUE ); gtk_tree_view_column_pack_start( column, renderer, TRUE );
gtk_tree_view_column_set_cell_data_func( column, renderer, gtk_tree_view_column_set_cell_data_func( column, renderer,

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: gtk/dcclient.cpp // Name: src/gtk/dcclient.cpp
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// RCS-ID: $Id$ // RCS-ID: $Id$
@@ -15,10 +15,14 @@
#endif #endif
#include "wx/dcclient.h" #include "wx/dcclient.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/dcmemory.h" #include "wx/dcmemory.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/module.h" #include "wx/module.h"
#include "wx/log.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"
#include "wx/gtk/win_gtk.h" #include "wx/gtk/win_gtk.h"

View File

@@ -16,12 +16,12 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #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/log.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/gtk/private.h" #include "wx/gtk/private.h"

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: gtk/font.cpp // Name: src/gtk/font.cpp
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -19,10 +19,14 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/font.h" #include "wx/font.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/fontutil.h" #include "wx/fontutil.h"
#include "wx/cmndata.h" #include "wx/cmndata.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/log.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/tokenzr.h" #include "wx/tokenzr.h"
#include "wx/settings.h" #include "wx/settings.h"
@@ -424,7 +428,7 @@ int wxFont::GetPointSize() const
wxString wxFont::GetFaceName() const wxString wxFont::GetFaceName() const
{ {
wxCHECK_MSG( Ok(), wxT(""), wxT("invalid font") ); wxCHECK_MSG( Ok(), wxEmptyString, wxT("invalid font") );
#if wxUSE_PANGO #if wxUSE_PANGO
return M_FONTDATA->HasNativeFont() ? M_FONTDATA->m_nativeFontInfo.GetFaceName() return M_FONTDATA->HasNativeFont() ? M_FONTDATA->m_nativeFontInfo.GetFaceName()

View File

@@ -19,13 +19,16 @@
#if wxUSE_LIBGNOMEPRINT #if wxUSE_LIBGNOMEPRINT
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/math.h" #include "wx/math.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/module.h" #include "wx/module.h"
#include "wx/dynlib.h" #include "wx/dynlib.h"
#include "wx/dcmemory.h" #include "wx/dcmemory.h"
#include "wx/log.h"
#include "wx/icon.h" #include "wx/icon.h"
#include <libgnomeprint/gnome-print.h> #include <libgnomeprint/gnome-print.h>
@@ -1160,7 +1163,7 @@ void wxGnomePrintDC::DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width,
} }
} }
void wxGnomePrintDC::makeEllipticalPath(wxCoord x, wxCoord y, void wxGnomePrintDC::makeEllipticalPath(wxCoord x, wxCoord y,
wxCoord width, wxCoord height) wxCoord width, wxCoord height)
{ {
double r = 4 * (sqrt (2) - 1) / 3; double r = 4 * (sqrt (2) - 1) / 3;
@@ -1170,22 +1173,22 @@ void wxGnomePrintDC::makeEllipticalPath(wxCoord x, wxCoord y,
halfHR = r * halfH; halfHR = r * halfH;
wxCoord halfWI = (wxCoord) halfW, wxCoord halfWI = (wxCoord) halfW,
halfHI = (wxCoord) halfH; halfHI = (wxCoord) halfH;
gs_lgp->gnome_print_newpath( m_gpc ); gs_lgp->gnome_print_newpath( m_gpc );
// Approximate an ellipse using four cubic splines, clockwise from 0 deg */ // Approximate an ellipse using four cubic splines, clockwise from 0 deg */
gs_lgp->gnome_print_moveto( m_gpc, gs_lgp->gnome_print_moveto( m_gpc,
XLOG2DEV(x + width), XLOG2DEV(x + width),
YLOG2DEV(y + halfHI) ); YLOG2DEV(y + halfHI) );
gs_lgp->gnome_print_curveto( m_gpc, gs_lgp->gnome_print_curveto( m_gpc,
XLOG2DEV(x + width), XLOG2DEV(x + width),
YLOG2DEV(y + (wxCoord) rint (halfH + halfHR)), YLOG2DEV(y + (wxCoord) rint (halfH + halfHR)),
XLOG2DEV(x + (wxCoord) rint(halfW + halfWR)), XLOG2DEV(x + (wxCoord) rint(halfW + halfWR)),
YLOG2DEV(y + height), YLOG2DEV(y + height),
XLOG2DEV(x + halfWI), XLOG2DEV(x + halfWI),
YLOG2DEV(y + height) ); YLOG2DEV(y + height) );
gs_lgp->gnome_print_curveto( m_gpc, gs_lgp->gnome_print_curveto( m_gpc,
XLOG2DEV(x + (wxCoord) rint(halfW - halfWR)), XLOG2DEV(x + (wxCoord) rint(halfW - halfWR)),
YLOG2DEV(y + height), YLOG2DEV(y + height),
XLOG2DEV(x), XLOG2DEV(x),
YLOG2DEV(y + (wxCoord) rint (halfH + halfHR)), YLOG2DEV(y + (wxCoord) rint (halfH + halfHR)),
@@ -1202,7 +1205,7 @@ void wxGnomePrintDC::makeEllipticalPath(wxCoord x, wxCoord y,
XLOG2DEV(x + width), XLOG2DEV(x + width),
YLOG2DEV(y + (wxCoord) rint(halfH - halfHR)), YLOG2DEV(y + (wxCoord) rint(halfH - halfHR)),
XLOG2DEV(x + width), YLOG2DEV(y + halfHI) ); XLOG2DEV(x + width), YLOG2DEV(y + halfHI) );
gs_lgp->gnome_print_closepath(m_gpc); gs_lgp->gnome_print_closepath(m_gpc);
} }
@@ -1534,7 +1537,7 @@ void wxGnomePrintDC::SetPen( const wxPen& pen )
case wxSHORT_DASH: gs_lgp->gnome_print_setdash( m_gpc, 2, short_dashed, 0 ); break; case wxSHORT_DASH: gs_lgp->gnome_print_setdash( m_gpc, 2, short_dashed, 0 ); break;
case wxLONG_DASH: gs_lgp->gnome_print_setdash( m_gpc, 2, wxCoord_dashed, 0 ); break; case wxLONG_DASH: gs_lgp->gnome_print_setdash( m_gpc, 2, wxCoord_dashed, 0 ); break;
case wxDOT_DASH: gs_lgp->gnome_print_setdash( m_gpc, 4, dotted_dashed, 0 ); break; case wxDOT_DASH: gs_lgp->gnome_print_setdash( m_gpc, 4, dotted_dashed, 0 ); break;
case wxUSER_DASH: case wxUSER_DASH:
{ {
// It may be noted that libgnomeprint between at least // It may be noted that libgnomeprint between at least
// versions 2.8.0 and 2.12.1 makes a copy of the dashes // versions 2.8.0 and 2.12.1 makes a copy of the dashes

View File

@@ -19,11 +19,14 @@
#if wxUSE_MIMETYPE && wxUSE_LIBGNOMEVFS #if wxUSE_MIMETYPE && wxUSE_LIBGNOMEVFS
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/mimetype.h" #include "wx/mimetype.h"
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/module.h" #include "wx/module.h"
#include "wx/dynlib.h" #include "wx/dynlib.h"
#include "wx/log.h"
#include <libgnomevfs/gnome-vfs-mime-handlers.h> #include <libgnomevfs/gnome-vfs-mime-handlers.h>
@@ -62,7 +65,7 @@ public:
(), (), FALSE ) (), (), FALSE )
wxDL_METHOD_DEFINE( void, gnome_vfs_shutdown, wxDL_METHOD_DEFINE( void, gnome_vfs_shutdown,
(), (), /**/ ) (), (), /**/ )
wxDL_METHOD_DEFINE( GnomeVFSResult, gnome_vfs_mime_set_icon, wxDL_METHOD_DEFINE( GnomeVFSResult, gnome_vfs_mime_set_icon,
(const char *mime_type, const char *filename), (mime_type, filename), GNOME_VFS_OK ) (const char *mime_type, const char *filename), (mime_type, filename), GNOME_VFS_OK )
}; };
@@ -98,7 +101,7 @@ void wxGnomeVFSLibrary::InitializeMethods()
wxDL_METHOD_LOAD( m_gnome_vfs_lib, gnome_vfs_init, success ) wxDL_METHOD_LOAD( m_gnome_vfs_lib, gnome_vfs_init, success )
wxDL_METHOD_LOAD( m_gnome_vfs_lib, gnome_vfs_shutdown, success ) wxDL_METHOD_LOAD( m_gnome_vfs_lib, gnome_vfs_shutdown, success )
m_ok = true; m_ok = true;
} }
@@ -125,7 +128,7 @@ bool wxGnomeVFSMimeTypesManagerImpl::DoAssociation(const wxString& strType,
const wxString& strDesc) const wxString& strDesc)
{ {
int nIndex = AddToMimeData(strType, strIcon, entry, strExtensions, strDesc, true); int nIndex = AddToMimeData(strType, strIcon, entry, strExtensions, strDesc, true);
if ( nIndex == wxNOT_FOUND ) if ( nIndex == wxNOT_FOUND )
return false; return false;
@@ -134,7 +137,7 @@ bool wxGnomeVFSMimeTypesManagerImpl::DoAssociation(const wxString& strType,
// User modificationt to the MIME database // User modificationt to the MIME database
// are not supported :-) // are not supported :-)
} }
return false; return false;
} }
@@ -168,7 +171,7 @@ void wxGnomeVFSModule::OnExit()
{ {
if (gs_lgvfs->IsOk()) if (gs_lgvfs->IsOk())
gs_lgvfs->gnome_vfs_shutdown(); gs_lgvfs->gnome_vfs_shutdown();
delete gs_lgvfs; delete gs_lgvfs;
} }

View File

@@ -18,13 +18,13 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/arrstr.h" #include "wx/arrstr.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/checklst.h" #include "wx/checklst.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/log.h"
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/treeentry_gtk.h" #include "wx/gtk/treeentry_gtk.h"

View File

@@ -14,9 +14,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/log.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"

View File

@@ -16,12 +16,12 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #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/log.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"

View File

@@ -14,9 +14,12 @@
#include "wx/radiobox.h" #include "wx/radiobox.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/dialog.h" #include "wx/dialog.h"
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/log.h"
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include <gdk/gdkkeysyms.h> #include <gdk/gdkkeysyms.h>

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: gtk/region.cpp // Name: src/gtk/region.cpp
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Modified: VZ at 05.10.00: use AllocExclusive(), comparison fixed // Modified: VZ at 05.10.00: use AllocExclusive(), comparison fixed
@@ -19,8 +19,11 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/region.h" #include "wx/region.h"
#include "wx/log.h"
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
@@ -524,4 +527,3 @@ wxRect wxRegionIterator::GetRect() const
return r; return r;
} }

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// File: taskbar.cpp // File: src/gtk/taskbar.cpp
// Purpose: wxTaskBarIcon (src/unix/taskbarx11.cpp) helper for GTK2 // Purpose: wxTaskBarIcon (src/unix/taskbarx11.cpp) helper for GTK2
// Author: Vaclav Slavik // Author: Vaclav Slavik
// Modified by: // Modified by:
@@ -13,7 +13,11 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/gtk/taskbarpriv.h" #include "wx/gtk/taskbarpriv.h"
#include "wx/log.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/menu.h" #include "wx/menu.h"

View File

@@ -14,10 +14,10 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/log.h"
#include "wx/math.h" #include "wx/math.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/panel.h" #include "wx/panel.h"

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: thread.cpp // Name: src/gtk/thread.cpp
// Purpose: Solaris thread support // Purpose: Solaris thread support
// Author: Guilhem Lavaux // Author: Guilhem Lavaux
// Modified by: // Modified by:
@@ -13,9 +13,13 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/thread.h" #include "wx/thread.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/wx.h" #include "wx/wx.h"
#include "wx/module.h" #include "wx/module.h"
#include "wx/log.h"
wxMutex::wxMutex() wxMutex::wxMutex()
{ {

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: threadsgi.cpp // Name: src/gtk/threadsgi.cpp
// Purpose: wxThread (SGI) Implementation // Purpose: wxThread (SGI) Implementation
// Author: Original from Wolfram Gloger/Guilhem Lavaux // Author: Original from Wolfram Gloger/Guilhem Lavaux
// Modified by: // Modified by:
@@ -13,6 +13,11 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/thread.h" #include "wx/thread.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
@@ -21,7 +26,6 @@
#include <sys/prctl.h> #include <sys/prctl.h>
#include "wx/module.h" #include "wx/module.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/log.h"
#include "gdk/gdk.h" #include "gdk/gdk.h"
#include "gtk/gtk.h" #include "gtk/gtk.h"
@@ -266,4 +270,3 @@ void wxThreadModule::OnExit()
wxThreadGuiExit(); wxThreadGuiExit();
delete wxMainMutex; delete wxMainMutex;
} }

View File

@@ -23,7 +23,11 @@
#endif #endif
#include "wx/toplevel.h" #include "wx/toplevel.h"
#include "wx/log.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/dialog.h" #include "wx/dialog.h"
#include "wx/control.h" #include "wx/control.h"
#include "wx/app.h" #include "wx/app.h"

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: treectrl.cpp // Name: src/gtk/treectrl.cpp
// Purpose: wxTreeCtrl // Purpose: wxTreeCtrl
// Author: Denis Pershin // Author: Denis Pershin
// Modified by: // Modified by:
@@ -13,16 +13,16 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h" #include "wx/wx.h"
#include "wx/log.h"
#endif #endif
#include "wx/gtk/treectrl.h" #include "wx/gtk/treectrl.h"
#include "wx/textctrl.h" #include "wx/textctrl.h"
#include "wx/log.h"
#include <gtk/gtk.h> #include <gtk/gtk.h>
@@ -186,16 +186,17 @@ void wxTreeCtrl::SetStateImageList(wxImageList *imageList) {
m_imageListState = imageList; m_imageListState = imageList;
} }
wxString wxTreeCtrl::GetItemText(const wxTreeItemId &item) const { wxString wxTreeCtrl::GetItemText(const wxTreeItemId &item) const
char *t; {
char *t;
if (!item.IsOk()) if (!item.IsOk())
return wxString(""); return wxEmptyString;
GtkLabel *l = GTK_LABEL(gtk_object_get_data(GTK_OBJECT((GtkTreeItem *)item), "w_label")); GtkLabel *l = GTK_LABEL(gtk_object_get_data(GTK_OBJECT((GtkTreeItem *)item), "w_label"));
gtk_label_get(l, &t); gtk_label_get(l, &t);
return t; return t;
} }
int wxTreeCtrl::GetItemImage(const wxTreeItemId& item) const { int wxTreeCtrl::GetItemImage(const wxTreeItemId& item) const {

View File

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

View File

@@ -15,9 +15,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/list.h" #include "wx/list.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/log.h"
#endif #endif
#include "wx/log.h"
#include "wx/config.h" #include "wx/config.h"
#include "wx/app.h" #include "wx/app.h"

View File

@@ -18,6 +18,7 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/dcclient.h" #include "wx/dcclient.h"
@@ -52,7 +53,6 @@
#include "wx/menu.h" #include "wx/menu.h"
#include "wx/statusbr.h" #include "wx/statusbr.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/log.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__

View File

@@ -20,11 +20,11 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/log.h"
#include "wx/memory.h" #include "wx/memory.h"
#include "wx/font.h" #include "wx/font.h"
#include "wx/settings.h" #include "wx/settings.h"

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: gtk/clipbrd.cpp // Name: src/gtk1/clipbrd.cpp
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -10,25 +10,21 @@
// 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_CLIPBOARD
#include "wx/clipbrd.h" #include "wx/clipbrd.h"
#if wxUSE_CLIPBOARD #ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/dataobj.h" #include "wx/dataobj.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/log.h"
#include <glib.h> #include <glib.h>
#include <gdk/gdk.h> #include <gdk/gdk.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
//-----------------------------------------------------------------------------
// thread system
//-----------------------------------------------------------------------------
#if wxUSE_THREADS
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// data // data
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -642,4 +638,3 @@ bool wxClipboard::GetData( wxDataObject& data )
#endif #endif
// wxUSE_CLIPBOARD // wxUSE_CLIPBOARD

View File

@@ -12,8 +12,12 @@
#if wxUSE_CONTROLS #if wxUSE_CONTROLS
#include "wx/log.h"
#include "wx/control.h" #include "wx/control.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/fontutil.h" #include "wx/fontutil.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/gtk1/private.h" #include "wx/gtk1/private.h"
@@ -260,4 +264,3 @@ wxControl::GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromAdj_t widget_new,
} }
#endif // wxUSE_CONTROLS #endif // wxUSE_CONTROLS

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: dataobj.cpp // Name: src/gtk1/dataobj.cpp
// Purpose: wxDataObject class // Purpose: wxDataObject class
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -10,15 +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"
#if wxUSE_DATAOBJ
#include "wx/dataobj.h" #include "wx/dataobj.h"
#if wxUSE_DATAOBJ #ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/app.h" #include "wx/app.h"
#include "wx/debug.h" #include "wx/debug.h"
#include "wx/mstream.h" #include "wx/mstream.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/log.h"
#include "wx/uri.h" #include "wx/uri.h"
#include <gdk/gdk.h> #include <gdk/gdk.h>

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: gtk/dcclient.cpp // Name: src/gtk1/dcclient.cpp
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// RCS-ID: $Id$ // RCS-ID: $Id$
@@ -15,10 +15,14 @@
#endif #endif
#include "wx/dcclient.h" #include "wx/dcclient.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/dcmemory.h" #include "wx/dcmemory.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/module.h" #include "wx/module.h"
#include "wx/log.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"
#include "wx/gtk1/win_gtk.h" #include "wx/gtk1/win_gtk.h"

View File

@@ -16,9 +16,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #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"

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: gtk/font.cpp // Name: src/gtk/font.cpp
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -19,10 +19,14 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/font.h" #include "wx/font.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/fontutil.h" #include "wx/fontutil.h"
#include "wx/cmndata.h" #include "wx/cmndata.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/log.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/tokenzr.h" #include "wx/tokenzr.h"
#include "wx/settings.h" #include "wx/settings.h"
@@ -546,7 +550,7 @@ int wxFont::GetPointSize() const
wxString wxFont::GetFaceName() const wxString wxFont::GetFaceName() const
{ {
wxCHECK_MSG( Ok(), wxT(""), wxT("invalid font") ); wxCHECK_MSG( Ok(), wxEmptyString, wxT("invalid font") );
#if wxUSE_PANGO #if wxUSE_PANGO
return M_FONTDATA->HasNativeFont() ? M_FONTDATA->m_nativeFontInfo.GetFaceName() return M_FONTDATA->HasNativeFont() ? M_FONTDATA->m_nativeFontInfo.GetFaceName()

View File

@@ -14,9 +14,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/log.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"

View File

@@ -16,12 +16,12 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #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/log.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"

View File

@@ -14,9 +14,12 @@
#include "wx/radiobox.h" #include "wx/radiobox.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/dialog.h" #include "wx/dialog.h"
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/log.h"
#include "wx/gtk1/private.h" #include "wx/gtk1/private.h"
#include <gdk/gdkkeysyms.h> #include <gdk/gdkkeysyms.h>

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: gtk/region.cpp // Name: src/gtk1/region.cpp
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Modified: VZ at 05.10.00: use AllocExclusive(), comparison fixed // Modified: VZ at 05.10.00: use AllocExclusive(), comparison fixed
@@ -20,7 +20,11 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/region.h" #include "wx/region.h"
#include "wx/log.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/gtk1/private.h" #include "wx/gtk1/private.h"
@@ -568,4 +572,3 @@ wxRect wxRegionIterator::GetRect() const
return r; return r;
} }

View File

@@ -14,10 +14,10 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/log.h"
#include "wx/math.h" #include "wx/math.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/panel.h" #include "wx/panel.h"

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: thread.cpp // Name: src/gtk1/thread.cpp
// Purpose: Solaris thread support // Purpose: Solaris thread support
// Author: Guilhem Lavaux // Author: Guilhem Lavaux
// Modified by: // Modified by:
@@ -13,9 +13,13 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/thread.h" #include "wx/thread.h"
#include "wx/wx.h"
#ifndef WX_PRECOMP
#include "wx/wx.h"
#include "wx/log.h"
#endif
#include "wx/module.h" #include "wx/module.h"
#include "wx/log.h"
wxMutex::wxMutex() wxMutex::wxMutex()
{ {

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: threadsgi.cpp // Name: src/gtk1/threadsgi.cpp
// Purpose: wxThread (SGI) Implementation // Purpose: wxThread (SGI) Implementation
// Author: Original from Wolfram Gloger/Guilhem Lavaux // Author: Original from Wolfram Gloger/Guilhem Lavaux
// Modified by: // Modified by:
@@ -13,6 +13,11 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/thread.h" #include "wx/thread.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
@@ -21,7 +26,6 @@
#include <sys/prctl.h> #include <sys/prctl.h>
#include "wx/module.h" #include "wx/module.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/log.h"
#include "gdk/gdk.h" #include "gdk/gdk.h"
#include "gtk/gtk.h" #include "gtk/gtk.h"

View File

@@ -23,7 +23,11 @@
#endif #endif
#include "wx/toplevel.h" #include "wx/toplevel.h"
#include "wx/log.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/dialog.h" #include "wx/dialog.h"
#include "wx/control.h" #include "wx/control.h"
#include "wx/app.h" #include "wx/app.h"

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: treectrl.cpp // Name: src/gtk1/treectrl.cpp
// Purpose: wxTreeCtrl // Purpose: wxTreeCtrl
// Author: Denis Pershin // Author: Denis Pershin
// Modified by: // Modified by:
@@ -13,16 +13,16 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h" #include "wx/wx.h"
#include "wx/log.h"
#endif #endif
#include "wx/gtk1/treectrl.h" #include "wx/gtk1/treectrl.h"
#include "wx/textctrl.h" #include "wx/textctrl.h"
#include "wx/log.h"
#include <gtk/gtk.h> #include <gtk/gtk.h>
@@ -186,16 +186,17 @@ void wxTreeCtrl::SetStateImageList(wxImageList *imageList) {
m_imageListState = imageList; m_imageListState = imageList;
} }
wxString wxTreeCtrl::GetItemText(const wxTreeItemId &item) const { wxString wxTreeCtrl::GetItemText(const wxTreeItemId &item) const
char *t; {
char *t;
if (!item.IsOk()) if (!item.IsOk())
return wxString(""); return wxEmptyString;
GtkLabel *l = GTK_LABEL(gtk_object_get_data(GTK_OBJECT((GtkTreeItem *)item), "w_label")); GtkLabel *l = GTK_LABEL(gtk_object_get_data(GTK_OBJECT((GtkTreeItem *)item), "w_label"));
gtk_label_get(l, &t); gtk_label_get(l, &t);
return t; return t;
} }
int wxTreeCtrl::GetItemImage(const wxTreeItemId& item) const { int wxTreeCtrl::GetItemImage(const wxTreeItemId& item) const {

View File

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

View File

@@ -15,9 +15,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/list.h" #include "wx/list.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/log.h"
#endif #endif
#include "wx/log.h"
#include "wx/config.h" #include "wx/config.h"
#include "wx/app.h" #include "wx/app.h"

View File

@@ -18,6 +18,7 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/dcclient.h" #include "wx/dcclient.h"
@@ -49,7 +50,6 @@
#include "wx/menu.h" #include "wx/menu.h"
#include "wx/statusbr.h" #include "wx/statusbr.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/log.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__

View File

@@ -31,7 +31,6 @@
#include "wx/busyinfo.h" #include "wx/busyinfo.h"
#include "wx/encconv.h" #include "wx/encconv.h"
#include "wx/fontmap.h" #include "wx/fontmap.h"
#include "wx/log.h"
#include "wx/html/htmlpars.h" #include "wx/html/htmlpars.h"
#include "wx/html/htmldefs.h" #include "wx/html/htmldefs.h"
#include "wx/html/htmlfilt.h" #include "wx/html/htmlfilt.h"

View File

@@ -21,6 +21,7 @@
#include "wx/scrolwin.h" #include "wx/scrolwin.h"
#include "wx/timer.h" #include "wx/timer.h"
#include "wx/dcmemory.h" #include "wx/dcmemory.h"
#include "wx/log.h"
#endif #endif
#include "wx/html/forcelnk.h" #include "wx/html/forcelnk.h"
@@ -29,7 +30,6 @@
#include "wx/image.h" #include "wx/image.h"
#include "wx/gifdecod.h" #include "wx/gifdecod.h"
#include "wx/log.h"
#include "wx/artprov.h" #include "wx/artprov.h"
#include "wx/math.h" #include "wx/math.h"

View File

@@ -18,13 +18,13 @@
#ifndef WXPRECOMP #ifndef WXPRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/dc.h" #include "wx/dc.h"
#include "wx/log.h"
#endif #endif
#include "wx/html/htmldefs.h" #include "wx/html/htmldefs.h"
#include "wx/html/winpars.h" #include "wx/html/winpars.h"
#include "wx/html/htmlwin.h" #include "wx/html/htmlwin.h"
#include "wx/fontmap.h" #include "wx/fontmap.h"
#include "wx/log.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/uri.h" #include "wx/uri.h"

View File

@@ -15,6 +15,7 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/window.h" #include "wx/window.h"
@@ -30,7 +31,6 @@
#include "wx/dc.h" #include "wx/dc.h"
#include "wx/dialog.h" #include "wx/dialog.h"
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
#include "wx/log.h"
#include "wx/module.h" #include "wx/module.h"
#include "wx/memory.h" #include "wx/memory.h"
#include "wx/tooltip.h" #include "wx/tooltip.h"

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: bitmap.cpp // Name: src/mac/carbon/bitmap.cpp
// Purpose: wxBitmap // Purpose: wxBitmap
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
@@ -12,8 +12,12 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/log.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/metafile.h" #include "wx/metafile.h"
#include "wx/xpmdecod.h" #include "wx/xpmdecod.h"

View File

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

View File

@@ -18,6 +18,7 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/app.h" #include "wx/app.h"
@@ -25,7 +26,6 @@
#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/log.h"
#ifndef __DARWIN__ #ifndef __DARWIN__
#include <Scrap.h> #include <Scrap.h>

View File

@@ -18,9 +18,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/log.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: dc.cpp // Name: src/mac/carbon/dc.cpp
// Purpose: wxDC class // Purpose: wxDC class
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
@@ -14,13 +14,17 @@
#include "wx/dc.h" #include "wx/dc.h"
#if !wxMAC_USE_CORE_GRAPHICS #if !wxMAC_USE_CORE_GRAPHICS
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/app.h" #include "wx/app.h"
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
#include "wx/dcmemory.h" #include "wx/dcmemory.h"
#include "wx/dcprint.h" #include "wx/dcprint.h"
#include "wx/region.h" #include "wx/region.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/log.h"
#ifdef __MSL__ #ifdef __MSL__
#if __MSL__ >= 0x6000 #if __MSL__ >= 0x6000
@@ -1008,7 +1012,7 @@ void wxDC::DoDrawPolygon(int n, wxPoint points[],
if ( m_brush.GetStyle() == wxTRANSPARENT && m_pen.GetStyle() == wxTRANSPARENT ) if ( m_brush.GetStyle() == wxTRANSPARENT && m_pen.GetStyle() == wxTRANSPARENT )
return ; return ;
wxMacFastPortSetter helper(this) ; wxMacFastPortSetter helper(this) ;
wxCoord x1, x2 , y1 , y2 ; wxCoord x1, x2 , y1 , y2 ;
@@ -1147,7 +1151,7 @@ void wxDC::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
// CMB: draw nothing if transformed w or h is 0 // CMB: draw nothing if transformed w or h is 0
if (ww == 0 || hh == 0) if (ww == 0 || hh == 0)
return; return;
// CMB: handle -ve width and/or height // CMB: handle -ve width and/or height
if (ww < 0) if (ww < 0)
{ {
@@ -1473,7 +1477,7 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
// TODO: support text background color (only possible by hand, ATSUI does not support it) // TODO: support text background color (only possible by hand, ATSUI does not support it)
wxCHECK_RET( Ok(), wxT("wxDC::DoDrawRotatedText - invalid DC") ); wxCHECK_RET( Ok(), wxT("wxDC::DoDrawRotatedText - invalid DC") );
if ( str.Length() == 0 ) if ( str.empty() )
return ; return ;
wxMacFastPortSetter helper(this) ; wxMacFastPortSetter helper(this) ;
@@ -1490,7 +1494,7 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
OSStatus status = noErr ; OSStatus status = noErr ;
ATSUTextLayout atsuLayout ; ATSUTextLayout atsuLayout ;
UniCharCount chars = str.Length() ; UniCharCount chars = str.length() ;
UniChar* ubuf = NULL ; UniChar* ubuf = NULL ;
#if SIZEOF_WCHAR_T == 4 #if SIZEOF_WCHAR_T == 4
@@ -1734,9 +1738,9 @@ bool wxDC::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) con
wxCHECK_MSG(Ok(), false, wxT("wxDC::DoGetPartialTextExtents - invalid DC")); wxCHECK_MSG(Ok(), false, wxT("wxDC::DoGetPartialTextExtents - invalid DC"));
widths.Empty(); widths.Empty();
widths.Add(0, text.Length()); widths.Add(0, text.length());
if (text.Length() == 0) if (text.length() == 0)
return false; return false;
wxMacFastPortSetter helper(this) ; wxMacFastPortSetter helper(this) ;
@@ -1754,7 +1758,7 @@ bool wxDC::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) con
// fonts, please change it. Currently it is measuring from the // fonts, please change it. Currently it is measuring from the
// beginning of the string for each succeeding substring, which is much // beginning of the string for each succeeding substring, which is much
// slower than this should be. // slower than this should be.
for (size_t i=0; i<text.Length(); i++) for (size_t i=0; i<text.length(); i++)
{ {
wxString str(text.Left(i + 1)); wxString str(text.Left(i + 1));
Point bounds = {0, 0}; Point bounds = {0, 0};
@@ -1781,7 +1785,7 @@ bool wxDC::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) con
// Copy to widths, starting at measurements[1] // Copy to widths, starting at measurements[1]
// NOTE: this doesn't take into account any multi-byte characters // NOTE: this doesn't take into account any multi-byte characters
// in buff, it probably should... // in buff, it probably should...
for (size_t i=0; i<text.Length(); i++) for (size_t i=0; i<text.length(); i++)
widths[i] = XDEV2LOGREL(measurements[i + 1]); widths[i] = XDEV2LOGREL(measurements[i + 1]);
delete [] measurements; delete [] measurements;
@@ -2162,13 +2166,13 @@ void wxDC::MacInstallBrush() const
Pattern whiteColor ; Pattern whiteColor ;
::BackPat(GetQDGlobalsWhite(&whiteColor)); ::BackPat(GetQDGlobalsWhite(&whiteColor));
::SetThemePen( m_brush.MacGetTheme() , wxDisplayDepth() , true ) ; ::SetThemePen( m_brush.MacGetTheme() , wxDisplayDepth() , true ) ;
} }
break ; break ;
default : default :
::PenPat(GetQDGlobalsBlack(&blackColor)); ::PenPat(GetQDGlobalsBlack(&blackColor));
break ; break ;
} }
} }
else if (m_brush.IsHatch()) else if (m_brush.IsHatch())

View File

@@ -1,12 +1,12 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dc.cpp // Name: src/mac/carbon/dccg.cpp
// Purpose: wxDC class // Purpose: wxDC class
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
// Created: 01/02/97 // Created: 01/02/97
// 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"
@@ -15,13 +15,16 @@
#if wxMAC_USE_CORE_GRAPHICS #if wxMAC_USE_CORE_GRAPHICS
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/app.h" #include "wx/app.h"
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
#include "wx/dcmemory.h" #include "wx/dcmemory.h"
#include "wx/dcprint.h" #include "wx/dcprint.h"
#include "wx/region.h" #include "wx/region.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/log.h"
#ifdef __MSL__ #ifdef __MSL__
@@ -1720,14 +1723,14 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
wxCHECK_RET( Ok(), wxT("wxDC(cg)::DoDrawRotatedText - invalid DC") ); wxCHECK_RET( Ok(), wxT("wxDC(cg)::DoDrawRotatedText - invalid DC") );
wxCHECK_RET( m_macATSUIStyle != NULL, wxT("wxDC(cg)::DoDrawRotatedText - no valid font set") ); wxCHECK_RET( m_macATSUIStyle != NULL, wxT("wxDC(cg)::DoDrawRotatedText - no valid font set") );
if ( str.Length() == 0 ) if ( str.length() == 0 )
return ; return ;
if ( m_logicalFunction != wxCOPY ) if ( m_logicalFunction != wxCOPY )
return ; return ;
OSStatus status = noErr ; OSStatus status = noErr ;
ATSUTextLayout atsuLayout ; ATSUTextLayout atsuLayout ;
UniCharCount chars = str.Length() ; UniCharCount chars = str.length() ;
UniChar* ubuf = NULL ; UniChar* ubuf = NULL ;
#if SIZEOF_WCHAR_T == 4 #if SIZEOF_WCHAR_T == 4
@@ -1885,14 +1888,14 @@ void wxDC::DoGetTextExtent( const wxString &str, wxCoord *width, wxCoord *height
MacInstallFont() ; MacInstallFont() ;
} }
if ( str.Length() == 0 ) if ( str.empty() )
return ; return ;
wxCHECK_RET( m_macATSUIStyle != NULL, wxT("wxDC(cg)::DoGetTextExtent - no valid font set") ) ; wxCHECK_RET( m_macATSUIStyle != NULL, wxT("wxDC(cg)::DoGetTextExtent - no valid font set") ) ;
OSStatus status = noErr ; OSStatus status = noErr ;
ATSUTextLayout atsuLayout ; ATSUTextLayout atsuLayout ;
UniCharCount chars = str.Length() ; UniCharCount chars = str.length() ;
UniChar* ubuf = NULL ; UniChar* ubuf = NULL ;
#if SIZEOF_WCHAR_T == 4 #if SIZEOF_WCHAR_T == 4
@@ -1957,13 +1960,13 @@ bool wxDC::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) con
wxCHECK_MSG( Ok(), false, wxT("wxDC(cg)::DoGetPartialTextExtents - invalid DC") ); wxCHECK_MSG( Ok(), false, wxT("wxDC(cg)::DoGetPartialTextExtents - invalid DC") );
widths.Empty(); widths.Empty();
widths.Add(0, text.Length()); widths.Add(0, text.length());
if (text.Length() == 0) if (text.empty())
return false; return false;
ATSUTextLayout atsuLayout ; ATSUTextLayout atsuLayout ;
UniCharCount chars = text.Length() ; UniCharCount chars = text.length() ;
UniChar* ubuf = NULL ; UniChar* ubuf = NULL ;
#if SIZEOF_WCHAR_T == 4 #if SIZEOF_WCHAR_T == 4
@@ -2198,4 +2201,3 @@ wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const
} }
#endif // wxMAC_USE_CORE_GRAPHICS #endif // wxMAC_USE_CORE_GRAPHICS

View File

@@ -1,17 +1,22 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dcclient.cpp // Name: src/mac/carbon/dcclient.cpp
// Purpose: wxClientDC class // Purpose: wxClientDC class
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
// Created: 01/02/97 // Created: 01/02/97
// 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/dcclient.h" #include "wx/dcclient.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/dcmemory.h" #include "wx/dcmemory.h"
#include "wx/region.h" #include "wx/region.h"
#include "wx/window.h" #include "wx/window.h"
@@ -19,7 +24,6 @@
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/math.h" #include "wx/math.h"
#include "wx/mac/private.h" #include "wx/mac/private.h"
#include "wx/log.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// constants // constants
@@ -42,7 +46,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxWindowDC)
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
#include "wx/notebook.h" #include "wx/notebook.h"
#include "wx/tabctrl.h" #include "wx/tabctrl.h"
static wxBrush MacGetBackgroundBrush( wxWindow* window ) static wxBrush MacGetBackgroundBrush( wxWindow* window )
{ {
@@ -83,11 +87,11 @@ static wxBrush MacGetBackgroundBrush( wxWindow* window )
extent.top-- ; extent.top-- ;
extent.right = x + size.x ; extent.right = x + size.x ;
extent.bottom = y + size.y ; extent.bottom = y + size.y ;
bkdBrush.MacSetThemeBackground( kThemeBackgroundTabPane , (WXRECTPTR) &extent ) ; bkdBrush.MacSetThemeBackground( kThemeBackgroundTabPane , (WXRECTPTR) &extent ) ;
break ; break ;
} }
parent = parent->GetParent() ; parent = parent->GetParent() ;
} }
} }
@@ -99,14 +103,14 @@ static wxBrush MacGetBackgroundBrush( wxWindow* window )
#endif #endif
return bkdBrush ; return bkdBrush ;
} }
wxWindowDC::wxWindowDC() wxWindowDC::wxWindowDC()
{ {
m_window = NULL ; m_window = NULL ;
} }
wxWindowDC::wxWindowDC(wxWindow *window) wxWindowDC::wxWindowDC(wxWindow *window)
{ {
m_window = window ; m_window = window ;
wxTopLevelWindowMac* rootwindow = window->MacGetTopLevelWindow() ; wxTopLevelWindowMac* rootwindow = window->MacGetTopLevelWindow() ;
@@ -137,7 +141,7 @@ wxWindowDC::wxWindowDC(wxWindow *window)
// situations // situations
m_macLocalOrigin.x = x ; m_macLocalOrigin.x = x ;
m_macLocalOrigin.y = y ; m_macLocalOrigin.y = y ;
m_graphicContext = new wxMacCGContext( (CGrafPtr) m_macPort ) ; m_graphicContext = new wxMacCGContext( (CGrafPtr) m_macPort ) ;
m_graphicContext->SetPen( m_pen ) ; m_graphicContext->SetPen( m_pen ) ;
m_graphicContext->SetBrush( m_brush ) ; m_graphicContext->SetBrush( m_brush ) ;

View File

@@ -23,11 +23,11 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/cmndata.h" #include "wx/cmndata.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"
#include "wx/log.h"
// ============================================================================ // ============================================================================
// implementation // implementation

View File

@@ -1,30 +1,31 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: glcanvas.cpp // Name: src/mac/carbon/glcanvas.cpp
// Purpose: wxGLCanvas, for using OpenGL with wxWidgets under Macintosh // Purpose: wxGLCanvas, for using OpenGL with wxWidgets under Macintosh
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
// 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"
#if defined(__BORLANDC__) #if defined(__BORLANDC__)
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_GLCANVAS #if wxUSE_GLCANVAS
#include "wx/glcanvas.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/log.h"
#endif #endif
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/log.h"
#include "wx/glcanvas.h"
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
// DLL options compatibility check: // DLL options compatibility check:
@@ -42,12 +43,12 @@ wxGLContext::wxGLContext(
) )
{ {
m_window = win; m_window = win;
m_drawable = (AGLDrawable) UMAGetWindowPort(MAC_WXHWND(win->MacGetTopLevelWindowRef())); m_drawable = (AGLDrawable) UMAGetWindowPort(MAC_WXHWND(win->MacGetTopLevelWindowRef()));
m_glContext = aglCreateContext(fmt, other ? other->m_glContext : NULL); m_glContext = aglCreateContext(fmt, other ? other->m_glContext : NULL);
wxCHECK_RET( m_glContext, wxT("Couldn't create OpenGl context") ); wxCHECK_RET( m_glContext, wxT("Couldn't create OpenGl context") );
GLboolean b; GLboolean b;
b = aglSetDrawable(m_glContext, m_drawable); b = aglSetDrawable(m_glContext, m_drawable);
wxCHECK_RET( b, wxT("Couldn't bind OpenGl context") ); wxCHECK_RET( b, wxT("Couldn't bind OpenGl context") );
@@ -145,14 +146,14 @@ wxGLCanvas::~wxGLCanvas()
static AGLPixelFormat ChoosePixelFormat(const int *attribList) static AGLPixelFormat ChoosePixelFormat(const int *attribList)
{ {
GLint data[512]; GLint data[512];
GLint defaultAttribs[] = { AGL_RGBA, GLint defaultAttribs[] = { AGL_RGBA,
AGL_DOUBLEBUFFER, AGL_DOUBLEBUFFER,
AGL_MINIMUM_POLICY, AGL_MINIMUM_POLICY,
AGL_DEPTH_SIZE, 1, // use largest available depth buffer AGL_DEPTH_SIZE, 1, // use largest available depth buffer
AGL_RED_SIZE, 1, AGL_RED_SIZE, 1,
AGL_GREEN_SIZE, 1, AGL_GREEN_SIZE, 1,
AGL_BLUE_SIZE, 1, AGL_BLUE_SIZE, 1,
AGL_ALPHA_SIZE, 0, AGL_ALPHA_SIZE, 0,
AGL_NONE }; AGL_NONE };
GLint *attribs; GLint *attribs;
if (!attribList) if (!attribList)
@@ -162,7 +163,7 @@ static AGLPixelFormat ChoosePixelFormat(const int *attribList)
else else
{ {
int arg=0, p=0; int arg=0, p=0;
data[p++] = AGL_MINIMUM_POLICY; // make _SIZE tags behave more like GLX data[p++] = AGL_MINIMUM_POLICY; // make _SIZE tags behave more like GLX
while( (attribList[arg]!=0) && (p<512) ) while( (attribList[arg]!=0) && (p<512) )
{ {
@@ -185,9 +186,9 @@ static AGLPixelFormat ChoosePixelFormat(const int *attribList)
data[p++]=AGL_BLUE_SIZE; data[p++]=attribList[arg++]; break; data[p++]=AGL_BLUE_SIZE; data[p++]=attribList[arg++]; break;
case WX_GL_MIN_ALPHA: case WX_GL_MIN_ALPHA:
data[p++]=AGL_ALPHA_SIZE; data[p++]=attribList[arg++]; break; data[p++]=AGL_ALPHA_SIZE; data[p++]=attribList[arg++]; break;
case WX_GL_DEPTH_SIZE: case WX_GL_DEPTH_SIZE:
data[p++]=AGL_DEPTH_SIZE; data[p++]=attribList[arg++]; break; data[p++]=AGL_DEPTH_SIZE; data[p++]=attribList[arg++]; break;
case WX_GL_STENCIL_SIZE: case WX_GL_STENCIL_SIZE:
data[p++]=AGL_STENCIL_SIZE; data[p++]=attribList[arg++]; break; data[p++]=AGL_STENCIL_SIZE; data[p++]=attribList[arg++]; break;
case WX_GL_MIN_ACCUM_RED: case WX_GL_MIN_ACCUM_RED:
data[p++]=AGL_ACCUM_RED_SIZE; data[p++]=attribList[arg++]; break; data[p++]=AGL_ACCUM_RED_SIZE; data[p++]=attribList[arg++]; break;
@@ -200,12 +201,12 @@ static AGLPixelFormat ChoosePixelFormat(const int *attribList)
default: default:
break; break;
} }
} }
data[p] = 0; data[p] = 0;
attribs = data; attribs = data;
} }
return aglChoosePixelFormat(NULL, 0, attribs); return aglChoosePixelFormat(NULL, 0, attribs);
} }
@@ -216,14 +217,14 @@ bool wxGLCanvas::Create(wxWindow *parent, const wxGLContext *shared, wxWindowID
m_macCanvasIsShown = false ; m_macCanvasIsShown = false ;
m_glContext = 0 ; m_glContext = 0 ;
wxWindow::Create( parent, id, pos, size, style, name ); wxWindow::Create( parent, id, pos, size, style, name );
AGLPixelFormat fmt = ChoosePixelFormat(attribList); AGLPixelFormat fmt = ChoosePixelFormat(attribList);
wxCHECK_MSG( fmt, false, wxT("Couldn't create OpenGl pixel format") ); wxCHECK_MSG( fmt, false, wxT("Couldn't create OpenGl pixel format") );
m_glContext = new wxGLContext(fmt, this, palette, shared); m_glContext = new wxGLContext(fmt, this, palette, shared);
m_macCanvasIsShown = true ; m_macCanvasIsShown = true ;
aglDestroyPixelFormat(fmt); aglDestroyPixelFormat(fmt);
return true; return true;
} }
@@ -245,30 +246,30 @@ void wxGLCanvas::SetViewport()
// adjust glViewport to just this window // adjust glViewport to just this window
int x = 0 ; int x = 0 ;
int y = 0 ; int y = 0 ;
wxWindow* iter = this ; wxWindow* iter = this ;
while( iter->GetParent() ) while( iter->GetParent() )
{ {
iter = iter->GetParent() ; iter = iter->GetParent() ;
} }
if ( iter && iter->IsTopLevel() ) if ( iter && iter->IsTopLevel() )
{ {
MacClientToRootWindow( &x , &y ) ; MacClientToRootWindow( &x , &y ) ;
int width, height; int width, height;
GetClientSize(& width, & height); GetClientSize(& width, & height);
Rect bounds ; Rect bounds ;
GetWindowPortBounds( MAC_WXHWND(MacGetTopLevelWindowRef()) , &bounds ) ; GetWindowPortBounds( MAC_WXHWND(MacGetTopLevelWindowRef()) , &bounds ) ;
GLint parms[4] ; GLint parms[4] ;
parms[0] = x ; parms[0] = x ;
parms[1] = bounds.bottom - bounds.top - ( y + height ) ; parms[1] = bounds.bottom - bounds.top - ( y + height ) ;
parms[2] = width ; parms[2] = width ;
parms[3] = height ; parms[3] = height ;
if ( !m_macCanvasIsShown ) if ( !m_macCanvasIsShown )
parms[0] += 20000 ; parms[0] += 20000 ;
aglSetInteger( m_glContext->m_glContext , AGL_BUFFER_RECT , parms ) ; aglSetInteger( m_glContext->m_glContext , AGL_BUFFER_RECT , parms ) ;
} }
} }
void wxGLCanvas::OnSize(wxSizeEvent& event) void wxGLCanvas::OnSize(wxSizeEvent& event)
@@ -312,11 +313,11 @@ void wxGLCanvas::SetColour(const wxChar *colour)
m_glContext->SetColour(colour); m_glContext->SetColour(colour);
} }
bool wxGLCanvas::Show(bool show) bool wxGLCanvas::Show(bool show)
{ {
if ( !wxWindow::Show( show ) ) if ( !wxWindow::Show( show ) )
return FALSE ; return FALSE ;
/* /*
if ( !show ) if ( !show )
{ {
if ( m_macCanvasIsShown ) if ( m_macCanvasIsShown )
@@ -337,7 +338,7 @@ bool wxGLCanvas::Show(bool show)
return TRUE ; return TRUE ;
} }
void wxGLCanvas::MacVisibilityChanged() void wxGLCanvas::MacVisibilityChanged()
{ {
if ( !MacIsReallyShown() ) if ( !MacIsReallyShown() )
{ {

View File

@@ -13,16 +13,17 @@
#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/log.h"
#endif #endif
#include "wx/app.h" #include "wx/app.h"
#include "wx/listbox.h"
#include "wx/button.h" #include "wx/button.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/toplevel.h" #include "wx/toplevel.h"
#include "wx/log.h"
#include "wx/utils.h" #include "wx/utils.h"

View File

@@ -1,12 +1,12 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: menu.cpp // Name: src/mac/carbon/menu.cpp
// Purpose: wxMenu, wxMenuBar, wxMenuItem // Purpose: wxMenu, wxMenuBar, wxMenuItem
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
// 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
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// ============================================================================ // ============================================================================
@@ -18,8 +18,13 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/app.h"
#include "wx/menu.h" #include "wx/menu.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/app.h"
#include "wx/menuitem.h" #include "wx/menuitem.h"
#include "wx/window.h" #include "wx/window.h"
#include "wx/log.h" #include "wx/log.h"
@@ -198,7 +203,7 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
UMAInsertMenuItem(MAC_WXHMENU(m_hMenu), wxT("a"), wxFont::GetDefaultEncoding(), pos); UMAInsertMenuItem(MAC_WXHMENU(m_hMenu), wxT("a"), wxFont::GetDefaultEncoding(), pos);
pos += 1 ; pos += 1 ;
} }
SetMenuItemCommandID( MAC_WXHMENU(m_hMenu) , pos , wxIdToMacCommand ( pItem->GetId() ) ) ; SetMenuItemCommandID( MAC_WXHMENU(m_hMenu) , pos , wxIdToMacCommand ( pItem->GetId() ) ) ;
SetMenuItemRefCon( MAC_WXHMENU(m_hMenu) , pos , (UInt32) pItem ) ; SetMenuItemRefCon( MAC_WXHMENU(m_hMenu) , pos , (UInt32) pItem ) ;
pItem->UpdateItemText() ; pItem->UpdateItemText() ;

View File

@@ -38,13 +38,13 @@
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#if wxUSE_GUI #if wxUSE_GUI
#include "wx/icon.h" #include "wx/icon.h"
#endif #endif
#endif #endif
#include "wx/log.h"
#include "wx/file.h" #include "wx/file.h"
#include "wx/confbase.h" #include "wx/confbase.h"

View File

@@ -17,11 +17,11 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/string.h" #include "wx/string.h"
#include "wx/log.h"
#endif #endif
#include "wx/app.h" #include "wx/app.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/log.h"
#include "wx/imaglist.h" #include "wx/imaglist.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/mac/uma.h" #include "wx/mac/uma.h"

View File

@@ -20,9 +20,9 @@
#include "wx/object.h" #include "wx/object.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/log.h"
#include "wx/file.h" #include "wx/file.h"
#include "wx/timer.h" #include "wx/timer.h"

View File

@@ -11,8 +11,13 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/menu.h"
#include "wx/window.h" #include "wx/window.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/menu.h"
#include "wx/dc.h" #include "wx/dc.h"
#include "wx/dcclient.h" #include "wx/dcclient.h"
#include "wx/utils.h" #include "wx/utils.h"
@@ -30,7 +35,6 @@
#include "wx/statusbr.h" #include "wx/statusbr.h"
#include "wx/menuitem.h" #include "wx/menuitem.h"
#include "wx/spinctrl.h" #include "wx/spinctrl.h"
#include "wx/log.h"
#include "wx/geometry.h" #include "wx/geometry.h"
#include "wx/textctrl.h" #include "wx/textctrl.h"
@@ -514,7 +518,7 @@ pascal OSStatus wxMacUnicodeTextEventHandler( EventHandlerCallRef handler , Even
uniChars = new wchar_t[ numChars ] ; uniChars = new wchar_t[ numChars ] ;
GetEventParameter( event, kEventParamTextInputSendText, typeUnicodeText, NULL, dataSize , NULL , charBuf ) ; GetEventParameter( event, kEventParamTextInputSendText, typeUnicodeText, NULL, dataSize , NULL , charBuf ) ;
charBuf[ numChars - 1 ] = 0; charBuf[ numChars - 1 ] = 0;
#if SIZEOF_WCHAR_T == 2 #if SIZEOF_WCHAR_T == 2
uniChars = (wchar_t*) charBuf ; uniChars = (wchar_t*) charBuf ;
memcpy( uniChars , charBuf , numChars * 2 ) ; memcpy( uniChars , charBuf , numChars * 2 ) ;

View File

@@ -19,6 +19,7 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/window.h" #include "wx/window.h"
@@ -34,7 +35,6 @@
#include "wx/dc.h" #include "wx/dc.h"
#include "wx/dialog.h" #include "wx/dialog.h"
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
#include "wx/log.h"
#include "wx/module.h" #include "wx/module.h"
#include "wx/memory.h" #include "wx/memory.h"
#include "wx/tooltip.h" #include "wx/tooltip.h"

View File

@@ -16,8 +16,12 @@
#endif #endif
#include "wx/bitmap.h" #include "wx/bitmap.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/log.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/xpmdecod.h" #include "wx/xpmdecod.h"
@@ -1433,4 +1437,3 @@ void wxBitmap::UseAlpha()
// mask in UngetRawData() // mask in UngetRawData()
M_BITMAPDATA->m_hasAlpha = true; M_BITMAPDATA->m_hasAlpha = true;
} }

View File

@@ -15,6 +15,7 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/app.h" #include "wx/app.h"
@@ -22,7 +23,6 @@
#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/log.h"
#ifndef __DARWIN__ #ifndef __DARWIN__
#include <Scrap.h> #include <Scrap.h>

View File

@@ -25,9 +25,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#endif #endif
#include "wx/log.h"
#include "wx/dataobj.h" #include "wx/dataobj.h"
#include "wx/mstream.h" #include "wx/mstream.h"
#include "wx/image.h" #include "wx/image.h"

View File

@@ -1,22 +1,28 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dc.cpp // Name: src/mac/classic/dc.cpp
// Purpose: wxDC class // Purpose: wxDC class
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
// Created: 01/02/97 // Created: 01/02/97
// 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/dc.h" #include "wx/dc.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/app.h" #include "wx/app.h"
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
#include "wx/dcmemory.h" #include "wx/dcmemory.h"
#include "wx/dcprint.h" #include "wx/dcprint.h"
#include "wx/region.h" #include "wx/region.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/log.h"
#if __MSL__ >= 0x6000 #if __MSL__ >= 0x6000
namespace std {} namespace std {}
@@ -1349,7 +1355,7 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
return; return;
} }
if ( str.Length() == 0 ) if ( str.length() == 0 )
return ; return ;
wxMacFastPortSetter helper(this) ; wxMacFastPortSetter helper(this) ;
@@ -1363,9 +1369,9 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
} }
OSStatus status = noErr ; OSStatus status = noErr ;
ATSUTextLayout atsuLayout ; ATSUTextLayout atsuLayout ;
UniCharCount chars = str.Length() ; UniCharCount chars = str.length() ;
#if wxUSE_UNICODE #if wxUSE_UNICODE
status = ::ATSUCreateTextLayoutWithTextPtr( (UniCharArrayPtr) (const wxChar*) str , 0 , str.Length() , str.Length() , 1 , status = ::ATSUCreateTextLayoutWithTextPtr( (UniCharArrayPtr) (const wxChar*) str , 0 , str.length() , str.length() , 1 ,
&chars , (ATSUStyle*) &m_macATSUIStyle , &atsuLayout ) ; &chars , (ATSUStyle*) &m_macATSUIStyle , &atsuLayout ) ;
#else #else
wxWCharBuffer wchar = str.wc_str( wxConvLocal ) ; wxWCharBuffer wchar = str.wc_str( wxConvLocal ) ;
@@ -1454,7 +1460,7 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
{ {
::TextMode( srcCopy ) ; ::TextMode( srcCopy ) ;
} }
int length = strtext.Length() ; int length = strtext.length() ;
int laststop = 0 ; int laststop = 0 ;
int i = 0 ; int i = 0 ;
@@ -1604,7 +1610,7 @@ void wxDC::DoGetTextExtent( const wxString &strtext, wxCoord *width, wxCoord *h
*descent =YDEV2LOGREL( fi.descent ); *descent =YDEV2LOGREL( fi.descent );
if ( externalLeading ) if ( externalLeading )
*externalLeading = YDEV2LOGREL( fi.leading ) ; *externalLeading = YDEV2LOGREL( fi.leading ) ;
int length = strtext.Length() ; int length = strtext.length() ;
int laststop = 0 ; int laststop = 0 ;
int i = 0 ; int i = 0 ;
@@ -1687,9 +1693,9 @@ bool wxDC::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) con
wxCHECK_MSG(Ok(), false, wxT("Invalid DC")); wxCHECK_MSG(Ok(), false, wxT("Invalid DC"));
widths.Empty(); widths.Empty();
widths.Add(0, text.Length()); widths.Add(0, text.length());
if (text.Length() == 0) if (text.length() == 0)
return false; return false;
wxMacFastPortSetter helper(this) ; wxMacFastPortSetter helper(this) ;
@@ -1706,7 +1712,7 @@ bool wxDC::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) con
// fonts, please change it. Currently it is measuring from the // fonts, please change it. Currently it is measuring from the
// begining of the string for each succeding substring, which is much // begining of the string for each succeding substring, which is much
// slower than this should be. // slower than this should be.
for (size_t i=0; i<text.Length(); i++) for (size_t i=0; i<text.length(); i++)
{ {
wxString str(text.Left(i+1)); wxString str(text.Left(i+1));
Point bounds = {0,0}; Point bounds = {0,0};
@@ -1732,7 +1738,7 @@ bool wxDC::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) con
// Copy to widths, starting at measurements[1] // Copy to widths, starting at measurements[1]
// NOTE: this doesn't take into account any multi-byte characters // NOTE: this doesn't take into account any multi-byte characters
// in buff, it probabkly should... // in buff, it probabkly should...
for (size_t i=0; i<text.Length(); i++) for (size_t i=0; i<text.length(); i++)
widths[i] = XDEV2LOGREL(measurements[i+1]); widths[i] = XDEV2LOGREL(measurements[i+1]);
delete [] measurements; delete [] measurements;

View File

@@ -6,25 +6,26 @@
// 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"
#if defined(__BORLANDC__) #if defined(__BORLANDC__)
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_GLCANVAS #if wxUSE_GLCANVAS
#include "wx/glcanvas.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/log.h"
#endif #endif
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/log.h"
#include "wx/glcanvas.h"
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
// DLL options compatibility check: // DLL options compatibility check:

View File

@@ -13,16 +13,17 @@
#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/log.h"
#endif #endif
#include "wx/app.h" #include "wx/app.h"
#include "wx/listbox.h"
#include "wx/button.h" #include "wx/button.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/toplevel.h" #include "wx/toplevel.h"
#include "wx/log.h"
#include "wx/utils.h" #include "wx/utils.h"

View File

@@ -1,18 +1,24 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: mdi.cpp // Name: src/mac/classic/mdi.cpp
// Purpose: MDI classes // Purpose: MDI classes
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
// 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/mdi.h" #include "wx/mdi.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/menu.h" #include "wx/menu.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/log.h"
#include "wx/mac/private.h" #include "wx/mac/private.h"
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
@@ -67,7 +73,7 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
{ {
m_clientWindow = NULL; m_clientWindow = NULL;
m_currentChild = NULL; m_currentChild = NULL;
// this style can be used to prevent a window from having the standard MDI // this style can be used to prevent a window from having the standard MDI
// "Window" menu // "Window" menu
if ( style & wxFRAME_NO_WINDOW_MENU ) if ( style & wxFRAME_NO_WINDOW_MENU )
@@ -78,7 +84,7 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
else // normal case: we have the window menu, so construct it else // normal case: we have the window menu, so construct it
{ {
m_windowMenu = new wxMenu; m_windowMenu = new wxMenu;
m_windowMenu->Append(IDM_WINDOWCASCADE, wxT("&Cascade")); m_windowMenu->Append(IDM_WINDOWCASCADE, wxT("&Cascade"));
m_windowMenu->Append(IDM_WINDOWTILEHOR, wxT("Tile &Horizontally")); m_windowMenu->Append(IDM_WINDOWTILEHOR, wxT("Tile &Horizontally"));
m_windowMenu->Append(IDM_WINDOWTILEVERT, wxT("Tile &Vertically")); m_windowMenu->Append(IDM_WINDOWTILEVERT, wxT("Tile &Vertically"));
@@ -86,12 +92,12 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
m_windowMenu->Append(IDM_WINDOWICONS, wxT("&Arrange Icons")); m_windowMenu->Append(IDM_WINDOWICONS, wxT("&Arrange Icons"));
m_windowMenu->Append(IDM_WINDOWNEXT, wxT("&Next")); m_windowMenu->Append(IDM_WINDOWNEXT, wxT("&Next"));
} }
wxFrame::Create( parent , id , title , pos , size , style , name ) ; wxFrame::Create( parent , id , title , pos , size , style , name ) ;
m_parentFrameActive = TRUE; m_parentFrameActive = TRUE;
OnCreateClient(); OnCreateClient();
return TRUE; return TRUE;
} }
@@ -104,15 +110,15 @@ wxMDIParentFrame::~wxMDIParentFrame()
#endif #endif
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR
m_frameStatusBar = NULL; m_frameStatusBar = NULL;
#endif #endif
m_clientWindow = NULL ; m_clientWindow = NULL ;
if (m_windowMenu) if (m_windowMenu)
{ {
delete m_windowMenu; delete m_windowMenu;
m_windowMenu = (wxMenu*) NULL; m_windowMenu = (wxMenu*) NULL;
} }
if ( m_clientWindow ) if ( m_clientWindow )
{ {
delete m_clientWindow; delete m_clientWindow;
@@ -195,7 +201,7 @@ wxMDIClientWindow *wxMDIParentFrame::OnCreateClient()
void wxMDIParentFrame::OnSysColourChanged(wxSysColourChangedEvent& event) void wxMDIParentFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
{ {
// TODO // TODO
// Propagate the event to the non-top-level children // Propagate the event to the non-top-level children
wxFrame::OnSysColourChanged(event); wxFrame::OnSysColourChanged(event);
} }
@@ -245,19 +251,19 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
const wxString& name) const wxString& name)
{ {
SetName(name); SetName(name);
if ( id > -1 ) if ( id > -1 )
m_windowId = id; m_windowId = id;
else else
m_windowId = (int)NewControlId(); m_windowId = (int)NewControlId();
if (parent) parent->AddChild(this); if (parent) parent->AddChild(this);
MacCreateRealWindow( title, pos , size , MacRemoveBordersFromStyle(style) , name ) ; MacCreateRealWindow( title, pos , size , MacRemoveBordersFromStyle(style) , name ) ;
m_macWindowBackgroundTheme = kThemeBrushDocumentWindowBackground ; m_macWindowBackgroundTheme = kThemeBrushDocumentWindowBackground ;
SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ; SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ;
wxModelessWindows.Append(this); wxModelessWindows.Append(this);
return FALSE; return FALSE;
} }
@@ -275,7 +281,7 @@ wxMDIChildFrame::~wxMDIChildFrame()
#endif #endif
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR
m_frameStatusBar = NULL; m_frameStatusBar = NULL;
#endif #endif
} }
void wxMDIChildFrame::SetMenuBar(wxMenuBar *menu_bar) void wxMDIChildFrame::SetMenuBar(wxMenuBar *menu_bar)
@@ -299,7 +305,7 @@ void wxMDIChildFrame::MacActivate(long timestamp, bool activating)
} }
else if((mdiparent->m_currentChild==this) || !s_macDeactivateWindow) else if((mdiparent->m_currentChild==this) || !s_macDeactivateWindow)
mdiparent->wxFrame::MacActivate(timestamp,activating); mdiparent->wxFrame::MacActivate(timestamp,activating);
if(mdiparent->m_currentChild && mdiparent->m_currentChild!=this) if(mdiparent->m_currentChild && mdiparent->m_currentChild!=this)
mdiparent->m_currentChild->wxFrame::MacActivate(timestamp,false); mdiparent->m_currentChild->wxFrame::MacActivate(timestamp,false);
mdiparent->m_currentChild = this; mdiparent->m_currentChild = this;
@@ -362,15 +368,15 @@ wxMDIClientWindow::~wxMDIClientWindow()
bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style) bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style)
{ {
m_windowId = (int)NewControlId(); m_windowId = (int)NewControlId();
if ( parent ) if ( parent )
{ {
parent->AddChild(this); parent->AddChild(this);
} }
m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE); m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE);
wxModelessWindows.Append(this); wxModelessWindows.Append(this);
return TRUE; return TRUE;
} }
@@ -385,4 +391,3 @@ void wxMDIClientWindow::DoGetClientSize(int *x, int *y) const
void wxMDIClientWindow::OnScroll(wxScrollEvent& event) void wxMDIClientWindow::OnScroll(wxScrollEvent& event)
{ {
} }

View File

@@ -1,12 +1,12 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: menu.cpp // Name: src/mac/classic/menu.cpp
// Purpose: wxMenu, wxMenuBar, wxMenuItem // Purpose: wxMenu, wxMenuBar, wxMenuItem
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
// 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
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// ============================================================================ // ============================================================================
@@ -16,11 +16,17 @@
// wxWidgets headers // wxWidgets headers
// ----------------- // -----------------
#include "wx/app.h" #include "wx/wxprec.h"
#include "wx/menu.h" #include "wx/menu.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/app.h"
#include "wx/menuitem.h" #include "wx/menuitem.h"
#include "wx/window.h" #include "wx/window.h"
#include "wx/log.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/frame.h" #include "wx/frame.h"
@@ -71,7 +77,7 @@ void wxMenu::Init()
} }
// if we have a title, insert it in the beginning of the menu // if we have a title, insert it in the beginning of the menu
if ( !!m_title ) if ( !m_title.empty() )
{ {
Append(idMenuTitle, m_title) ; Append(idMenuTitle, m_title) ;
AppendSeparator() ; AppendSeparator() ;
@@ -870,5 +876,3 @@ wxMenuItem *wxMenuBar::FindItem(int id, wxMenu **itemMenu) const
return item; return item;
} }

View File

@@ -22,13 +22,13 @@
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h"
#if wxUSE_GUI #if wxUSE_GUI
#include "wx/icon.h" #include "wx/icon.h"
#endif #endif
#endif //WX_PRECOMP #endif //WX_PRECOMP
#include "wx/log.h"
#include "wx/file.h" #include "wx/file.h"
#include "wx/confbase.h" #include "wx/confbase.h"

View File

@@ -23,10 +23,10 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/string.h" #include "wx/string.h"
#include "wx/log.h"
#endif #endif
#include "wx/app.h" #include "wx/app.h"
#include "wx/log.h"
#include "wx/imaglist.h" #include "wx/imaglist.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/mac/uma.h" #include "wx/mac/uma.h"

View File

@@ -1,16 +1,22 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: utilsexec.cpp // Name: src/mac/classic/utilsexec.cpp
// Purpose: Execution-related utilities // Purpose: Execution-related utilities
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: David Elliott // Modified by: David Elliott
// 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/log.h" #include "wx/wxprec.h"
#include "wx/utils.h" #include "wx/utils.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#ifdef __DARWIN__ #ifdef __DARWIN__
#include "wx/unix/execute.h" #include "wx/unix/execute.h"
#include <unistd.h> #include <unistd.h>
@@ -133,20 +139,20 @@ long wxExecute(const wxString& command, int flags, wxProcess *WXUNUSED(handler))
#ifdef __DARWIN__ #ifdef __DARWIN__
void wxMAC_MachPortEndProcessDetect(CFMachPortRef port, void *data) void wxMAC_MachPortEndProcessDetect(CFMachPortRef port, void *data)
{ {
wxEndProcessData *proc_data = (wxEndProcessData*)data; wxEndProcessData *proc_data = (wxEndProcessData*)data;
wxLogDebug(wxT("Wow.. this actually worked!")); wxLogDebug(wxT("Wow.. this actually worked!"));
int status = 0; int status = 0;
int rc = waitpid(abs(proc_data->pid), &status, WNOHANG); int rc = waitpid(abs(proc_data->pid), &status, WNOHANG);
if(!rc) if(!rc)
{ {
wxLogDebug(wxT("Mach port was invalidated, but process hasn't terminated!")); wxLogDebug(wxT("Mach port was invalidated, but process hasn't terminated!"));
return; return;
} }
if((rc != -1) && WIFEXITED(status)) if((rc != -1) && WIFEXITED(status))
proc_data->exitcode = WEXITSTATUS(status); proc_data->exitcode = WEXITSTATUS(status);
else else
proc_data->exitcode = -1; proc_data->exitcode = -1;
wxHandleProcessTermination(proc_data); wxHandleProcessTermination(proc_data);
} }
int wxAddProcessCallbackForPid(wxEndProcessData *proc_data, int pid) int wxAddProcessCallbackForPid(wxEndProcessData *proc_data, int pid)
@@ -208,7 +214,7 @@ int wxAddProcessCallbackForPid(wxEndProcessData *proc_data, int pid)
wxLogDebug(wxT("Couldn't create runloopsource")); wxLogDebug(wxT("Couldn't create runloopsource"));
return -1; return -1;
} }
CFRelease(CFMachPortForProcess); CFRelease(CFMachPortForProcess);
CFRunLoopAddSource(CFRunLoopGetCurrent(),runloopsource,kCFRunLoopDefaultMode); CFRunLoopAddSource(CFRunLoopGetCurrent(),runloopsource,kCFRunLoopDefaultMode);

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