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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -26,6 +26,7 @@
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
#endif
#include "wx/utils.h"
@@ -52,8 +53,6 @@
#include "wx/mac/private.h" // includes mac headers
#endif
#include "wx/log.h"
#ifdef __WINDOWS__
#include "wx/msw/private.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
// Author: Vaclav Slavik
// Copyright: (c) 1999 Vaclav Slavik
@@ -10,18 +10,22 @@
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#pragma hdrstop
#endif
#if wxUSE_FILESYSTEM
#include "wx/filesys.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/wfstream.h"
#include "wx/module.h"
#include "wx/filesys.h"
#include "wx/mimetype.h"
#include "wx/filename.h"
#include "wx/log.h"
//--------------------------------------------------------------------------------
@@ -36,7 +40,7 @@ wxString wxFileSystemHandler::GetMimeTypeFromExt(const wxString& location)
wxString ext, mime;
wxString loc = GetRightLocation(location);
wxChar c;
int l = loc.Length(), l2;
int l = loc.length(), l2;
l2 = l;
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 s = wxEmptyString;
int i, l = location.Length();
int i, l = location.length();
bool fnd = false;
for (i = l-1; (i >= 0) && ((location[i] != wxT('#')) || (!fnd)); i--) {
@@ -137,7 +141,7 @@ wxString wxFileSystemHandler::GetLeftLocation(const wxString& location) const
int i;
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;
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
{
int i, l = location.Length();
int i, l = location.length();
int l2 = l + 1;
for (i = l-1;
@@ -163,7 +167,7 @@ wxString wxFileSystemHandler::GetRightLocation(const wxString& location) const
wxString wxFileSystemHandler::GetAnchor(const wxString& location) const
{
wxChar c;
int l = location.Length();
int l = location.length();
for (int i = l-1; i >= 0; i--) {
c = location[i];
@@ -256,7 +260,7 @@ static wxString MakeCorrectPath(const wxString& path)
wxString r;
int i, j, cnt;
cnt = p.Length();
cnt = p.length();
for (i = 0; i < cnt; i++)
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);
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(':'))
{
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 (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('/');
}
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('/'))
{
@@ -326,7 +330,7 @@ void wxFileSystem::ChangePathTo(const wxString& location, bool is_dir)
}
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(':'))
{
@@ -334,7 +338,7 @@ void wxFileSystem::ChangePathTo(const wxString& location, bool is_dir)
break;
}
}
if (i == (int) m_Path.Length())
if (i == (int) m_Path.length())
m_Path = wxEmptyString;
}
else
@@ -354,7 +358,7 @@ wxFSFile* wxFileSystem::OpenFile(const wxString& location)
wxFSFile *s = NULL;
wxList::compatibility_iterator node;
ln = loc.Length();
ln = loc.length();
meta = 0;
for (i = 0; i < ln; i++)
{
@@ -411,7 +415,7 @@ wxString wxFileSystem::FindFirst(const wxString& spec, int flags)
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
node = m_Handlers.GetFirst();
@@ -491,7 +495,7 @@ wxFileName wxFileSystem::URLToFileName(const wxString& url)
}
else if ( (url.Find(wxT("file://")) == 0) &&
(path.Find(wxT('/')) != wxNOT_FOUND) &&
(path.Length() > 1) && (path[1u] != wxT(':')) )
(path.length() > 1) && (path[1u] != wxT(':')) )
{
path = wxT("//") + path;
}
@@ -555,6 +559,3 @@ IMPLEMENT_DYNAMIC_CLASS(wxFileSystemModule, wxModule)
#endif
// wxUSE_FILESYSTEM

View File

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

View File

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

View File

@@ -20,9 +20,9 @@
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
#endif
#include "wx/log.h"
#include "wx/txtstrm.h"
//-----------------------------------------------------------------------------
@@ -184,4 +184,4 @@ bool wxPNMHandler::DoCanRead( wxInputStream& stream )
#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)
// Author: Vadim Zeitlin
// Modified by:
@@ -28,6 +28,7 @@
// wxWidgets
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/app.h"
#include "wx/arrstr.h"
#include "wx/intl.h"
@@ -36,7 +37,6 @@
#include "wx/apptrait.h"
#include "wx/file.h"
#include "wx/log.h"
#include "wx/msgout.h"
#include "wx/textfile.h"
#include "wx/thread.h"
@@ -833,4 +833,3 @@ const wxChar *wxSysErrorMsg(unsigned long nErrCode)
}
#endif // wxUSE_LOG

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -22,10 +22,10 @@
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
#endif
#include "wx/utils.h"
#include "wx/log.h"
// normally, the compiler options should contain -I../zlib, but it is
// apparently not the case for all MSW makefiles and so, unless we use

View File

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

View File

@@ -21,13 +21,13 @@
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
#endif // WX_PRECOMP
#include "wx/dcmemory.h"
#include "wx/utils.h"
#include "wx/app.h"
#include "wx/image.h"
#include "wx/log.h"
#include "wx/prntbase.h"
#include "wx/generic/prntdlgg.h"
#include "wx/paper.h"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -20,11 +20,11 @@
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
#endif
#include "wx/gdicmn.h"
#include "wx/utils.h"
#include "wx/log.h"
#include "wx/memory.h"
#include "wx/font.h"
#include "wx/settings.h"
@@ -257,7 +257,7 @@ static gint wxapp_idle_callback( gpointer WXUNUSED(data) )
#if wxUSE_THREADS
wxMutexLocker lock(gs_idleTagsMutex);
#endif
g_isIdle = TRUE;
g_isIdle = true;
wxTheApp->m_idleTag = 0;
}
@@ -348,7 +348,7 @@ static gint wxapp_poll_func( GPollFD *ufds, guint nfds, gint timeout )
gdk_threads_enter();
wxMutexGuiLeave();
g_mainThreadLocked = TRUE;
g_mainThreadLocked = true;
// 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)
@@ -428,7 +428,7 @@ wxApp::wxApp()
#endif // __WXDEBUG__
m_idleTag = 0;
g_isIdle = TRUE;
g_isIdle = true;
wxapp_install_idle_handler();
#if wxUSE_THREADS
@@ -664,7 +664,7 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
return false;
}
wxSetDetectableAutoRepeat( TRUE );
wxSetDetectableAutoRepeat( true );
#if wxUSE_INTL
wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
@@ -702,6 +702,6 @@ void wxApp::RemoveIdleTag()
{
g_source_remove( wxTheApp->m_idleTag );
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:
// Author: Robert Roebling
// Id: $Id$
@@ -10,23 +10,19 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#if wxUSE_CLIPBOARD
#include "wx/clipbrd.h"
#if wxUSE_CLIPBOARD
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/dataobj.h"
#include "wx/utils.h"
#include "wx/log.h"
#include "wx/gtk/private.h"
//-----------------------------------------------------------------------------
// thread system
//-----------------------------------------------------------------------------
#if wxUSE_THREADS
#endif
//-----------------------------------------------------------------------------
// data
//-----------------------------------------------------------------------------
@@ -120,8 +116,8 @@ targets_selection_received( GtkWidget *WXUNUSED(widget),
if (format == clipboard->m_targetRequested)
{
clipboard->m_waiting = FALSE;
clipboard->m_formatSupported = TRUE;
clipboard->m_waiting = false;
clipboard->m_formatSupported = true;
return;
}
}
@@ -184,7 +180,7 @@ selection_received( GtkWidget *WXUNUSED(widget),
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;
}
}
@@ -197,20 +193,20 @@ extern "C" {
static gint
selection_clear_clip( GtkWidget *WXUNUSED(widget), GdkEventSelection *event )
{
if (!wxTheClipboard) return TRUE;
if (!wxTheClipboard) return true;
if (event->selection == GDK_SELECTION_PRIMARY)
{
wxTheClipboard->m_ownsPrimarySelection = FALSE;
wxTheClipboard->m_ownsPrimarySelection = false;
}
else
if (event->selection == g_clipboardAtom)
{
wxTheClipboard->m_ownsClipboard = FALSE;
wxTheClipboard->m_ownsClipboard = false;
}
else
{
wxTheClipboard->m_waiting = FALSE;
wxTheClipboard->m_waiting = 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;
}
}
@@ -382,7 +378,7 @@ void wxClipboard::Clear()
// it, clear_selection is called which will set m_data to zero
if (gdk_selection_owner_get( g_clipboardAtom ) == m_clipboardWidget->window)
{
m_waiting = TRUE;
m_waiting = true;
gtk_selection_owner_set( (GtkWidget*) NULL, g_clipboardAtom,
(guint32) GDK_CURRENT_TIME );

View File

@@ -12,8 +12,12 @@
#if wxUSE_CONTROLS
#include "wx/log.h"
#include "wx/control.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/fontutil.h"
#include "wx/settings.h"
#include "wx/gtk/private.h"
@@ -126,7 +130,7 @@ GtkWidget* wxControl::GTKCreateFrame(const wxString& label)
GtkWidget* framewidget = gtk_frame_new(NULL);
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
}
@@ -363,4 +367,3 @@ wxControl::GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromAdj_t widget_new,
}
#endif // wxUSE_CONTROLS

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Name: dataobj.cpp
// Name: src/gtk/dataobj.cpp
// Purpose: wxDataObject class
// Author: Robert Roebling
// Id: $Id$
@@ -10,15 +10,18 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#if wxUSE_DATAOBJ
#include "wx/dataobj.h"
#if wxUSE_DATAOBJ
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/app.h"
#include "wx/debug.h"
#include "wx/mstream.h"
#include "wx/image.h"
#include "wx/log.h"
#include "wx/uri.h"
#include <gdk/gdk.h>

View File

@@ -16,12 +16,15 @@
#ifndef wxUSE_GENERICDATAVIEWCTRL
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/stockitem.h"
#include "wx/dcclient.h"
#include "wx/calctrl.h"
#include "wx/popupwin.h"
#include "wx/sizer.h"
#include "wx/log.h"
#include "wx/gtk/private.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();
gtk_tree_view_column_set_title( column, wxGTK_CONV(title) );
if (sizing == wxDATAVIEW_COL_WIDTH_FIXED)
gtk_tree_view_column_set_sizing( column, GTK_TREE_VIEW_COLUMN_FIXED );
else if (sizing == wxDATAVIEW_COL_WIDTH_GROW)
gtk_tree_view_column_set_sizing( column, GTK_TREE_VIEW_COLUMN_GROW_ONLY );
else
gtk_tree_view_column_set_sizing( column, GTK_TREE_VIEW_COLUMN_AUTOSIZE );
if (fixed_width > 0)
gtk_tree_view_column_set_fixed_width( column, fixed_width );
gtk_tree_view_column_pack_start( column, renderer, TRUE );
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:
// Author: Robert Roebling
// RCS-ID: $Id$
@@ -15,10 +15,14 @@
#endif
#include "wx/dcclient.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/dcmemory.h"
#include "wx/image.h"
#include "wx/module.h"
#include "wx/log.h"
#include "wx/fontutil.h"
#include "wx/gtk/win_gtk.h"

View File

@@ -16,12 +16,12 @@
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
#endif
#include "wx/window.h"
#include "wx/app.h"
#include "wx/gdicmn.h"
#include "wx/log.h"
#include "wx/utils.h"
#include "wx/gtk/private.h"

View File

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

View File

@@ -19,13 +19,16 @@
#if wxUSE_LIBGNOMEPRINT
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/math.h"
#include "wx/fontutil.h"
#include "wx/gtk/private.h"
#include "wx/module.h"
#include "wx/dynlib.h"
#include "wx/dcmemory.h"
#include "wx/log.h"
#include "wx/icon.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)
{
double r = 4 * (sqrt (2) - 1) / 3;
@@ -1170,22 +1173,22 @@ void wxGnomePrintDC::makeEllipticalPath(wxCoord x, wxCoord y,
halfHR = r * halfH;
wxCoord halfWI = (wxCoord) halfW,
halfHI = (wxCoord) halfH;
gs_lgp->gnome_print_newpath( m_gpc );
// Approximate an ellipse using four cubic splines, clockwise from 0 deg */
gs_lgp->gnome_print_moveto( m_gpc,
XLOG2DEV(x + width),
XLOG2DEV(x + width),
YLOG2DEV(y + halfHI) );
gs_lgp->gnome_print_curveto( m_gpc,
XLOG2DEV(x + width),
YLOG2DEV(y + (wxCoord) rint (halfH + halfHR)),
XLOG2DEV(x + (wxCoord) rint(halfW + halfWR)),
XLOG2DEV(x + (wxCoord) rint(halfW + halfWR)),
YLOG2DEV(y + height),
XLOG2DEV(x + halfWI),
XLOG2DEV(x + halfWI),
YLOG2DEV(y + height) );
gs_lgp->gnome_print_curveto( m_gpc,
XLOG2DEV(x + (wxCoord) rint(halfW - halfWR)),
XLOG2DEV(x + (wxCoord) rint(halfW - halfWR)),
YLOG2DEV(y + height),
XLOG2DEV(x),
YLOG2DEV(y + (wxCoord) rint (halfH + halfHR)),
@@ -1202,7 +1205,7 @@ void wxGnomePrintDC::makeEllipticalPath(wxCoord x, wxCoord y,
XLOG2DEV(x + width),
YLOG2DEV(y + (wxCoord) rint(halfH - halfHR)),
XLOG2DEV(x + width), YLOG2DEV(y + halfHI) );
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 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 wxUSER_DASH:
case wxUSER_DASH:
{
// It may be noted that libgnomeprint between at least
// 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
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/mimetype.h"
#include "wx/gtk/private.h"
#include "wx/module.h"
#include "wx/dynlib.h"
#include "wx/log.h"
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
@@ -62,7 +65,7 @@ public:
(), (), FALSE )
wxDL_METHOD_DEFINE( void, gnome_vfs_shutdown,
(), (), /**/ )
wxDL_METHOD_DEFINE( GnomeVFSResult, gnome_vfs_mime_set_icon,
(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_shutdown, success )
m_ok = true;
}
@@ -125,7 +128,7 @@ bool wxGnomeVFSMimeTypesManagerImpl::DoAssociation(const wxString& strType,
const wxString& strDesc)
{
int nIndex = AddToMimeData(strType, strIcon, entry, strExtensions, strDesc, true);
if ( nIndex == wxNOT_FOUND )
return false;
@@ -134,7 +137,7 @@ bool wxGnomeVFSMimeTypesManagerImpl::DoAssociation(const wxString& strType,
// User modificationt to the MIME database
// are not supported :-)
}
return false;
}
@@ -168,7 +171,7 @@ void wxGnomeVFSModule::OnExit()
{
if (gs_lgvfs->IsOk())
gs_lgvfs->gnome_vfs_shutdown();
delete gs_lgvfs;
}

View File

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

View File

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

View File

@@ -16,12 +16,12 @@
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
#endif
#include "wx/panel.h"
#include "wx/utils.h"
#include "wx/imaglist.h"
#include "wx/log.h"
#include "wx/bitmap.h"
#include "wx/fontutil.h"

View File

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

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: gtk/region.cpp
// Name: src/gtk/region.cpp
// Purpose:
// Author: Robert Roebling
// Modified: VZ at 05.10.00: use AllocExclusive(), comparison fixed
@@ -19,8 +19,11 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/region.h"
#include "wx/log.h"
#include "wx/gtk/private.h"
@@ -524,4 +527,3 @@ wxRect wxRegionIterator::GetRect() const
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
// Author: Vaclav Slavik
// Modified by:
@@ -13,7 +13,11 @@
#include "wx/wxprec.h"
#include "wx/gtk/taskbarpriv.h"
#include "wx/log.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/frame.h"
#include "wx/menu.h"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Name: dataobj.cpp
// Name: src/gtk1/dataobj.cpp
// Purpose: wxDataObject class
// Author: Robert Roebling
// Id: $Id$
@@ -10,15 +10,18 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#if wxUSE_DATAOBJ
#include "wx/dataobj.h"
#if wxUSE_DATAOBJ
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/app.h"
#include "wx/debug.h"
#include "wx/mstream.h"
#include "wx/image.h"
#include "wx/log.h"
#include "wx/uri.h"
#include <gdk/gdk.h>

View File

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

View File

@@ -16,9 +16,9 @@
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
#endif
#include "wx/log.h"
#include "wx/window.h"
#include "wx/app.h"
#include "wx/gdicmn.h"

View File

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

View File

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

View File

@@ -16,12 +16,12 @@
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
#endif
#include "wx/panel.h"
#include "wx/utils.h"
#include "wx/imaglist.h"
#include "wx/log.h"
#include "wx/bitmap.h"
#include "wx/fontutil.h"

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: thread.cpp
// Name: src/gtk1/thread.cpp
// Purpose: Solaris thread support
// Author: Guilhem Lavaux
// Modified by:
@@ -13,9 +13,13 @@
#include "wx/wxprec.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/log.h"
wxMutex::wxMutex()
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -18,6 +18,7 @@
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
#endif
#include "wx/app.h"
@@ -25,7 +26,6 @@
#include "wx/bitmap.h"
#include "wx/utils.h"
#include "wx/metafile.h"
#include "wx/log.h"
#ifndef __DARWIN__
#include <Scrap.h>

View File

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

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dc.cpp
// Name: src/mac/carbon/dc.cpp
// Purpose: wxDC class
// Author: Stefan Csomor
// Modified by:
@@ -14,13 +14,17 @@
#include "wx/dc.h"
#if !wxMAC_USE_CORE_GRAPHICS
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/app.h"
#include "wx/mac/uma.h"
#include "wx/dcmemory.h"
#include "wx/dcprint.h"
#include "wx/region.h"
#include "wx/image.h"
#include "wx/log.h"
#ifdef __MSL__
#if __MSL__ >= 0x6000
@@ -1008,7 +1012,7 @@ void wxDC::DoDrawPolygon(int n, wxPoint points[],
if ( m_brush.GetStyle() == wxTRANSPARENT && m_pen.GetStyle() == wxTRANSPARENT )
return ;
wxMacFastPortSetter helper(this) ;
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
if (ww == 0 || hh == 0)
return;
// CMB: handle -ve width and/or height
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)
wxCHECK_RET( Ok(), wxT("wxDC::DoDrawRotatedText - invalid DC") );
if ( str.Length() == 0 )
if ( str.empty() )
return ;
wxMacFastPortSetter helper(this) ;
@@ -1490,7 +1494,7 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
OSStatus status = noErr ;
ATSUTextLayout atsuLayout ;
UniCharCount chars = str.Length() ;
UniCharCount chars = str.length() ;
UniChar* ubuf = NULL ;
#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"));
widths.Empty();
widths.Add(0, text.Length());
widths.Add(0, text.length());
if (text.Length() == 0)
if (text.length() == 0)
return false;
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
// beginning of the string for each succeeding substring, which is much
// 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));
Point bounds = {0, 0};
@@ -1781,7 +1785,7 @@ bool wxDC::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) con
// Copy to widths, starting at measurements[1]
// NOTE: this doesn't take into account any multi-byte characters
// 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]);
delete [] measurements;
@@ -2162,13 +2166,13 @@ void wxDC::MacInstallBrush() const
Pattern whiteColor ;
::BackPat(GetQDGlobalsWhite(&whiteColor));
::SetThemePen( m_brush.MacGetTheme() , wxDisplayDepth() , true ) ;
}
}
break ;
default :
::PenPat(GetQDGlobalsBlack(&blackColor));
break ;
}
}
else if (m_brush.IsHatch())

View File

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

View File

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

View File

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

View File

@@ -13,16 +13,17 @@
#if wxUSE_LISTBOX
#include "wx/listbox.h"
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/log.h"
#endif
#include "wx/app.h"
#include "wx/listbox.h"
#include "wx/button.h"
#include "wx/settings.h"
#include "wx/toplevel.h"
#include "wx/log.h"
#include "wx/utils.h"

View File

@@ -1,12 +1,12 @@
/////////////////////////////////////////////////////////////////////////////
// Name: menu.cpp
// Name: src/mac/carbon/menu.cpp
// Purpose: wxMenu, wxMenuBar, wxMenuItem
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
@@ -18,8 +18,13 @@
#include "wx/wxprec.h"
#include "wx/app.h"
#include "wx/menu.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/app.h"
#include "wx/menuitem.h"
#include "wx/window.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);
pos += 1 ;
}
SetMenuItemCommandID( MAC_WXHMENU(m_hMenu) , pos , wxIdToMacCommand ( pItem->GetId() ) ) ;
SetMenuItemRefCon( MAC_WXHMENU(m_hMenu) , pos , (UInt32) pItem ) ;
pItem->UpdateItemText() ;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -15,6 +15,7 @@
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
#endif
#include "wx/app.h"
@@ -22,7 +23,6 @@
#include "wx/bitmap.h"
#include "wx/utils.h"
#include "wx/metafile.h"
#include "wx/log.h"
#ifndef __DARWIN__
#include <Scrap.h>

View File

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

View File

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

View File

@@ -6,25 +6,26 @@
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
#pragma hdrstop
#pragma hdrstop
#endif
#if wxUSE_GLCANVAS
#include "wx/glcanvas.h"
#ifndef WX_PRECOMP
#include "wx/frame.h"
#include "wx/frame.h"
#include "wx/log.h"
#endif
#include "wx/settings.h"
#include "wx/log.h"
#include "wx/glcanvas.h"
#include "wx/mac/uma.h"
// DLL options compatibility check:

View File

@@ -13,16 +13,17 @@
#if wxUSE_LISTBOX
#include "wx/listbox.h"
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/log.h"
#endif
#include "wx/app.h"
#include "wx/listbox.h"
#include "wx/button.h"
#include "wx/settings.h"
#include "wx/toplevel.h"
#include "wx/log.h"
#include "wx/utils.h"

View File

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

View File

@@ -1,12 +1,12 @@
/////////////////////////////////////////////////////////////////////////////
// Name: menu.cpp
// Name: src/mac/classic/menu.cpp
// Purpose: wxMenu, wxMenuBar, wxMenuItem
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
@@ -16,11 +16,17 @@
// wxWidgets headers
// -----------------
#include "wx/app.h"
#include "wx/wxprec.h"
#include "wx/menu.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#include "wx/app.h"
#include "wx/menuitem.h"
#include "wx/window.h"
#include "wx/log.h"
#include "wx/utils.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 ( !!m_title )
if ( !m_title.empty() )
{
Append(idMenuTitle, m_title) ;
AppendSeparator() ;
@@ -870,5 +876,3 @@ wxMenuItem *wxMenuBar::FindItem(int id, wxMenu **itemMenu) const
return item;
}

View File

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

View File

@@ -23,10 +23,10 @@
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/log.h"
#endif
#include "wx/app.h"
#include "wx/log.h"
#include "wx/imaglist.h"
#include "wx/image.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
// Author: Stefan Csomor
// Modified by: David Elliott
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/log.h"
#include "wx/wxprec.h"
#include "wx/utils.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#ifdef __DARWIN__
#include "wx/unix/execute.h"
#include <unistd.h>
@@ -133,20 +139,20 @@ long wxExecute(const wxString& command, int flags, wxProcess *WXUNUSED(handler))
#ifdef __DARWIN__
void wxMAC_MachPortEndProcessDetect(CFMachPortRef port, void *data)
{
wxEndProcessData *proc_data = (wxEndProcessData*)data;
wxLogDebug(wxT("Wow.. this actually worked!"));
int status = 0;
int rc = waitpid(abs(proc_data->pid), &status, WNOHANG);
if(!rc)
{
wxLogDebug(wxT("Mach port was invalidated, but process hasn't terminated!"));
return;
}
if((rc != -1) && WIFEXITED(status))
proc_data->exitcode = WEXITSTATUS(status);
else
proc_data->exitcode = -1;
wxHandleProcessTermination(proc_data);
wxEndProcessData *proc_data = (wxEndProcessData*)data;
wxLogDebug(wxT("Wow.. this actually worked!"));
int status = 0;
int rc = waitpid(abs(proc_data->pid), &status, WNOHANG);
if(!rc)
{
wxLogDebug(wxT("Mach port was invalidated, but process hasn't terminated!"));
return;
}
if((rc != -1) && WIFEXITED(status))
proc_data->exitcode = WEXITSTATUS(status);
else
proc_data->exitcode = -1;
wxHandleProcessTermination(proc_data);
}
int wxAddProcessCallbackForPid(wxEndProcessData *proc_data, int pid)
@@ -208,7 +214,7 @@ int wxAddProcessCallbackForPid(wxEndProcessData *proc_data, int pid)
wxLogDebug(wxT("Couldn't create runloopsource"));
return -1;
}
CFRelease(CFMachPortForProcess);
CFRunLoopAddSource(CFRunLoopGetCurrent(),runloopsource,kCFRunLoopDefaultMode);

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