///////////////////////////////////////////////////////////////////////////////
-// Name: db.cpp
+// Name: src/common/db.cpp
// Purpose: Implementation of the wxDb class. The wxDb class represents a connection
// to an ODBC data source. The wxDb class allows operations on the data
// source such as opening and closing the data source.
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
-/*
-// SYNOPSIS START
-// SYNOPSIS STOP
-*/
-
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
-#ifdef DBDEBUG_CONSOLE
- #include "wx/ioswrap.h"
-#endif
+#if wxUSE_ODBC
#ifndef WX_PRECOMP
- #include "wx/string.h"
#include "wx/object.h"
+ #include "wx/string.h"
#include "wx/list.h"
#include "wx/utils.h"
#include "wx/log.h"
#endif
+
+#ifdef DBDEBUG_CONSOLE
+ #include "wx/ioswrap.h"
+#endif
+
#include "wx/filefn.h"
#include "wx/wxchar.h"
-#if wxUSE_ODBC
-
#include <stdio.h>
#include <string.h>
#include <assert.h>
void wxDbConnectInf::SetDsn(const wxString &dsn)
{
- wxASSERT(dsn.Length() < WXSIZEOF(Dsn));
+ wxASSERT(dsn.length() < WXSIZEOF(Dsn));
wxStrncpy(Dsn, dsn, WXSIZEOF(Dsn)-1);
Dsn[WXSIZEOF(Dsn)-1] = 0; // Prevent buffer overrun
void wxDbConnectInf::SetUserID(const wxString &uid)
{
- wxASSERT(uid.Length() < WXSIZEOF(Uid));
+ wxASSERT(uid.length() < WXSIZEOF(Uid));
wxStrncpy(Uid, uid, WXSIZEOF(Uid)-1);
Uid[WXSIZEOF(Uid)-1] = 0; // Prevent buffer overrun
} // wxDbConnectInf::SetUserID()
void wxDbConnectInf::SetPassword(const wxString &password)
{
- wxASSERT(password.Length() < WXSIZEOF(AuthStr));
+ wxASSERT(password.length() < WXSIZEOF(AuthStr));
wxStrncpy(AuthStr, password, WXSIZEOF(AuthStr)-1);
AuthStr[WXSIZEOF(AuthStr)-1] = 0; // Prevent buffer overrun
void wxDbConnectInf::SetConnectionStr(const wxString &connectStr)
{
- wxASSERT(connectStr.Length() < WXSIZEOF(ConnectionStr));
+ wxASSERT(connectStr.length() < WXSIZEOF(ConnectionStr));
useConnectionStr = wxStrlen(connectStr) > 0;
if ((i_sqlDataType == SQL_VARCHAR)
#if wxUSE_UNICODE
#if defined(SQL_WCHAR)
- || (i_sqlDataType == SQL_WCHAR)
+ || (i_sqlDataType == SQL_WCHAR)
#endif
#if defined(SQL_WVARCHAR)
|| (i_sqlDataType == SQL_WVARCHAR)
// These are the possible SQL types we check for use agains the datasource we are connected
// to for the purpose of determining which data type to use for the MEMO column types
- // (a type which allow to store large strings; like VARCHAR just with a bigger precision)
+ // (a type which allow to store large strings; like VARCHAR just with a bigger precision)
//
// NOTE: The first type in this enumeration that is determined to be supported by the
// datasource/driver is the one that will be used.
bool wxDb::Open(const wxString& inConnectStr, bool failOnDataTypeUnsupported)
{
- wxASSERT(inConnectStr.Length());
+ wxASSERT(inConnectStr.length());
return Open(inConnectStr, NULL, failOnDataTypeUnsupported);
}
bool wxDb::Open(const wxString& inConnectStr, SQLHWND parentWnd, bool failOnDataTypeUnsupported)
{
- dsn = wxT("");
- uid = wxT("");
- authStr = wxT("");
+ dsn = wxEmptyString;
+ uid = wxEmptyString;
+ authStr = wxEmptyString;
RETCODE retcode;
inConnectionStr = inConnectStr;
retcode = SQLDriverConnect(hdbc, parentWnd, (SQLTCHAR FAR *)inConnectionStr.c_str(),
- (SWORD)inConnectionStr.Length(), (SQLTCHAR FAR *)outConnectBuffer,
+ (SWORD)inConnectionStr.length(), (SQLTCHAR FAR *)outConnectBuffer,
sizeof(outConnectBuffer), &outConnectBufferLen, SQL_DRIVER_COMPLETE );
if ((retcode != SQL_SUCCESS) &&
/********** wxDb::Open() **********/
bool wxDb::Open(const wxString &Dsn, const wxString &Uid, const wxString &AuthStr, bool failOnDataTypeUnsupported)
{
- wxASSERT(Dsn.Length());
+ wxASSERT(!Dsn.empty());
dsn = Dsn;
uid = Uid;
authStr = AuthStr;
- inConnectionStr = wxT("");
- outConnectionStr = wxT("");
+ inConnectionStr = wxEmptyString;
+ outConnectionStr = wxEmptyString;
RETCODE retcode;
inConnectionStr = copyDb->GetConnectionInStr();
retcode = SQLDriverConnect(hdbc, NULL, (SQLTCHAR FAR *)inConnectionStr.c_str(),
- (SWORD)inConnectionStr.Length(), (SQLTCHAR FAR *)outConnectBuffer,
+ (SWORD)inConnectionStr.length(), (SQLTCHAR FAR *)outConnectBuffer,
sizeof(outConnectBuffer), &outConnectBufferLen, SQL_DRIVER_COMPLETE);
if ((retcode != SQL_SUCCESS) &&
/********** wxDb::logError() **********/
void wxDb::logError(const wxString &errMsg, const wxString &SQLState)
{
- wxASSERT(errMsg.Length());
+ wxASSERT(errMsg.length());
static int pLast = -1;
int dbStatus;
wxStrncpy(errorList[pLast], errMsg, DB_MAX_ERROR_MSG_LEN);
errorList[pLast][DB_MAX_ERROR_MSG_LEN] = 0;
- if (SQLState.Length())
+ if (SQLState.length())
if ((dbStatus = TranslateSqlState(SQLState)) != DB_ERR_FUNCTION_SEQUENCE_ERROR)
DB_STATUS = dbStatus;
sqlStmt = wxT("CREATE VIEW ");
sqlStmt += viewName;
- if (colList.Length())
+ if (colList.length())
{
sqlStmt += wxT(" (");
sqlStmt += colList;
break;
case SQL_LONGVARCHAR:
pColInf[colNum].dbDataType = DB_DATA_TYPE_MEMO;
- break;
+ break;
case SQL_TINYINT:
case SQL_SMALLINT:
case SQL_INTEGER:
case SQL_CHAR:
colInf[colNo].dbDataType = DB_DATA_TYPE_VARCHAR;
break;
- case SQL_LONGVARCHAR:
+ case SQL_LONGVARCHAR:
colInf[colNo].dbDataType = DB_DATA_TYPE_MEMO;
- break;
+ break;
case SQL_TINYINT:
case SQL_SMALLINT:
case SQL_INTEGER:
* to avoid undesired unbinding of columns.
*/
{
- wxASSERT(fileName.Length());
+ wxASSERT(fileName.length());
RETCODE retcode;
SQLLEN cb;
* userID != "" ... UserID set equal to 'userID'
*/
{
- wxASSERT(tableName.Length());
+ wxASSERT(tableName.length());
wxString TableName;
if (Dbms() == dbmsDBASE)
{
wxString dbName;
- if (tablePath.Length())
+ if (tablePath.length())
dbName.Printf(wxT("%s/%s.dbf"), tablePath.c_str(), tableName.c_str());
else
dbName.Printf(wxT("%s.dbf"), tableName.c_str());
bool wxDb::TablePrivileges(const wxString &tableName, const wxString &priv, const wxChar *userID,
const wxChar *schema, const wxString &WXUNUSED(tablePath))
{
- wxASSERT(tableName.Length());
+ wxASSERT(tableName.length());
wxDbTablePrivilegeInfo result;
SQLLEN cbRetVal;
bool wxDb::SetSqlLogging(wxDbSqlLogState state, const wxString &filename, bool append)
{
wxASSERT(state == sqlLogON || state == sqlLogOFF);
- wxASSERT(state == sqlLogOFF || filename.Length());
+ wxASSERT(state == sqlLogOFF || filename.length());
if (state == sqlLogON)
{
/********** wxDb::WriteSqlLog() **********/
bool wxDb::WriteSqlLog(const wxString &logMsg)
{
- wxASSERT(logMsg.Length());
+ wxASSERT(logMsg.length());
if (fpSqlLog == 0 || sqlLogState == sqlLogOFF)
return false;
int dataType, ULONG columnLength,
const wxString &optionalParam)
{
- wxASSERT(tableName.Length());
- wxASSERT(columnName.Length());
+ wxASSERT(tableName.length());
+ wxASSERT(columnName.length());
wxASSERT((dataType == DB_DATA_TYPE_VARCHAR && columnLength > 0) ||
dataType != DB_DATA_TYPE_VARCHAR);
}
// for passing things like "NOT NULL"
- if (optionalParam.Length())
+ if (optionalParam.length())
{
sqlStmt += wxT(" ");
sqlStmt += optionalParam;
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
-/*
-// SYNOPSIS START
-// SYNOPSIS STOP
-*/
-
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#if wxUSE_ODBC
+#ifndef WX_PRECOMP
+ #include "wx/object.h"
+ #include "wx/string.h"
+ #include "wx/list.h"
+ #include "wx/utils.h"
+ #include "wx/log.h"
+#endif
+
#ifdef DBDEBUG_CONSOLE
#if wxUSE_IOSTREAMH
#include <iostream.h>
#include "wx/ioswrap.h"
#endif
-#ifndef WX_PRECOMP
- #include "wx/string.h"
- #include "wx/object.h"
- #include "wx/list.h"
- #include "wx/utils.h"
- #include "wx/log.h"
-#endif
#include "wx/filefn.h"
#include <stdio.h>
#if wxUSE_IMAGE && wxUSE_PCX
#ifndef WX_PRECOMP
+ #include "wx/object.h"
#include "wx/log.h"
#include "wx/intl.h"
#include "wx/palette.h"
#include "wx/hash.h"
#include "wx/list.h"
-#include "wx/object.h"
//-----------------------------------------------------------------------------
// wxPCXHandler
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#ifndef WX_PRECOMP
- #include "wx/hash.h"
#include "wx/object.h"
+ #include "wx/hash.h"
#endif
#include <string.h>
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_SOCKETS
+#ifndef WX_PRECOMP
+ #include "wx/object.h"
+#endif
+
#include "wx/app.h"
#include "wx/apptrait.h"
-#include "wx/object.h"
#include "wx/string.h"
#include "wx/timer.h"
#include "wx/utils.h"
bool done = false;
bool valid_result = false;
- if (!has_event_loop)
+ if (!has_event_loop)
{
// This is used to avoid a busy loop on wxBase - having a select
// timeout of 50 ms per iteration should be enough.
done = true;
else
{
- if (has_event_loop)
+ if (has_event_loop)
{
PROCESS_EVENTS();
}
- else
+ else
{
// If there's less than 50 ms left, just call select with that timeout.
if (time_left < 50)
int optlen)
{
wxASSERT_MSG( m_socket, _T("Socket not initialised") );
-
+
if (m_socket->SetSockOpt(level, optname, optval, optlen)
!= GSOCK_NOERROR)
{
wxUint32 nBytes )
{
wxASSERT_MSG( m_socket, _T("Socket not initialised") );
-
+
m_socket->SetPeer(addr.GetAddress());
Write(buf, nBytes);
return (*this);
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
+#if wxUSE_EXTENDED_RTTI
+
#ifndef WX_PRECOMP
-#include "wx/hash.h"
-#include "wx/object.h"
+ #include "wx/object.h"
+ #include "wx/hash.h"
#endif
-#if wxUSE_EXTENDED_RTTI
-
#include "wx/xti.h"
#include "wx/xml/xml.h"
#include "wx/tokenzr.h"
wxASSERT_MSG( dynobj , wxT("cannot call wxDynamicClassInfo::SetProperty on an object other than wxDynamicObject") ) ;
value = dynobj->GetProperty( m_propertyName ) ;
}
-#endif
+
+#endif // wxUSE_EXTENDED_RTTI
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
+#if wxUSE_EXTENDED_RTTI
+
#ifndef WX_PRECOMP
-#include "wx/hash.h"
-#include "wx/object.h"
+ #include "wx/object.h"
+ #include "wx/hash.h"
#endif
#include "wx/tokenzr.h"
#include "wx/txtstrm.h"
#include "wx/event.h"
-#if wxUSE_EXTENDED_RTTI
-
#include "wx/xtistrm.h"
#include "wx/beforestd.h"
WX_DEFINE_OBJARRAY(wxxVariantArray);
-#endif
+#endif // wxUSE_EXTENDED_RTTI
/////////////////////////////////////////////////////////////////////////////
-// Name: src/common/xtistrm.cpp
+// Name: src/common/xtixml.cpp
// Purpose: streaming runtime metadata information
// Author: Stefan Csomor
// Modified by:
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
+#if wxUSE_EXTENDED_RTTI
+
#ifndef WX_PRECOMP
-#include "wx/hash.h"
-#include "wx/object.h"
+ #include "wx/object.h"
+ #include "wx/hash.h"
#endif
#include "wx/xml/xml.h"
#include "wx/txtstrm.h"
#include "wx/event.h"
-#if wxUSE_EXTENDED_RTTI
-
#include "wx/xtistrm.h"
#include "wx/xtixml.h"
return wxInvalidObjectID ;
}
-#endif
+#endif // wxUSE_EXTENDED_RTTI
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/object.h"
+#ifndef WX_PRECOMP
+ #include "wx/object.h"
+#endif
+
#include "wx/window.h"
#include "wx/dc.h"
#include "wx/cursor.h"
/* true when the message queue is empty. this gets set to
false by all event callbacks before anything else is done */
bool g_isIdle = false;
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/object.h"
+#ifndef WX_PRECOMP
+ #include "wx/object.h"
+#endif
+
#include "wx/window.h"
#include "wx/dc.h"
#include "wx/cursor.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: helpdlg.cpp
+// Name: src/html/helpdlg.cpp
// Purpose: wxHtmlHelpDialog
// Notes: Based on htmlhelp.cpp, implementing a monolithic
// HTML Help controller class, by Vaclav Slavik
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_WXHTML_HELP
#ifndef WXPRECOMP
+ #include "wx/object.h"
#include "wx/intl.h"
#include "wx/log.h"
- #include "wx/object.h"
#include "wx/sizer.h"
#include "wx/bmpbuttn.h"
{
m_HtmlHelpWin = new wxHtmlHelpWindow(m_Data);
- wxDialog::Create(parent, id, _("Help"),
+ wxDialog::Create(parent, id, _("Help"),
wxPoint(m_HtmlHelpWin->GetCfgData().x, m_HtmlHelpWin->GetCfgData().y),
- wxSize(m_HtmlHelpWin->GetCfgData().w, m_HtmlHelpWin->GetCfgData().h),
+ wxSize(m_HtmlHelpWin->GetCfgData().w, m_HtmlHelpWin->GetCfgData().h),
wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER, wxT("wxHtmlHelp"));
- m_HtmlHelpWin->Create(this, -1, wxDefaultPosition, GetClientSize(),
+ m_HtmlHelpWin->Create(this, wxID_ANY, wxDefaultPosition, GetClientSize(),
wxTAB_TRAVERSAL|wxNO_BORDER, style);
GetPosition(& (m_HtmlHelpWin->GetCfgData().x), & (m_HtmlHelpWin->GetCfgData()).y);
// Add some space for the resize handle
item4->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL, 0);
#endif
-
+
Layout();
Centre();
}
#endif // wxUSE_WXHTML_HELP
-
/////////////////////////////////////////////////////////////////////////////
-// Name: helpfrm.cpp
+// Name: src/html/helpfrm.cpp
// Purpose: wxHtmlHelpFrame
// Notes: Based on htmlhelp.cpp, implementing a monolithic
// HTML Help controller class, by Vaclav Slavik
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_WXHTML_HELP
#ifndef WXPRECOMP
+ #include "wx/object.h"
#include "wx/intl.h"
#include "wx/log.h"
- #include "wx/object.h"
#include "wx/sizer.h"
#include "wx/bmpbuttn.h"
{
m_HtmlHelpWin = new wxHtmlHelpWindow(m_Data);
- wxFrame::Create(parent, id, _("Help"),
+ wxFrame::Create(parent, id, _("Help"),
wxPoint(m_HtmlHelpWin->GetCfgData().x, m_HtmlHelpWin->GetCfgData().y),
- wxSize(m_HtmlHelpWin->GetCfgData().w, m_HtmlHelpWin->GetCfgData().h),
+ wxSize(m_HtmlHelpWin->GetCfgData().w, m_HtmlHelpWin->GetCfgData().h),
wxDEFAULT_FRAME_STYLE, wxT("wxHtmlHelp"));
#if wxUSE_STATUSBAR
CreateStatusBar();
#endif
- m_HtmlHelpWin->Create(this, -1, wxDefaultPosition, wxDefaultSize,
+ m_HtmlHelpWin->Create(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
wxTAB_TRAVERSAL|wxNO_BORDER, style);
GetPosition(& (m_HtmlHelpWin->GetCfgData().x), & (m_HtmlHelpWin->GetCfgData()).y);
{
// So far, wxGTK only
#ifdef __WXGTK__
- bool needGrab = FALSE;
-
+ bool needGrab = false;
+
// Check if there are any modal windows present,
// in which case we need to add a grab.
for ( wxWindowList::iterator it = wxTopLevelWindows.begin();
wxDialog *dialog = wxDynamicCast(win, wxDialog);
if (dialog && dialog->IsModal())
- needGrab = TRUE;
+ needGrab = true;
}
if (needGrab)
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_WXHTML_HELP
#ifndef WXPRECOMP
+ #include "wx/object.h"
#include "wx/intl.h"
#include "wx/log.h"
- #include "wx/object.h"
#include "wx/sizer.h"
#include "wx/bmpbuttn.h"
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_SOCKETS
+#ifndef WX_PRECOMP
+ #include "wx/object.h"
+#endif
+
#include "wx/app.h"
#include "wx/apptrait.h"
-#include "wx/object.h"
#include "wx/string.h"
#include "wx/timer.h"
#include "wx/utils.h"
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#if wxUSE_PRINTING_ARCHITECTURE
-#include "wx/object.h"
+#ifndef WXPRECOMP
+ #include "wx/object.h"
+#endif
+
#include "wx/printdlg.h"
#include "wx/mac/printdlg.h"
#include "wx/dcprint.h"
/////////////////////////////////////////////////////////////////////////////
-// Name: sound.cpp
+// Name: src/mac/carbon/sound.cpp
// Purpose: wxSound class implementation: optional
// Author: Ryan Norton
// Modified by: Stefan Csomor
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Ryan Norton
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/object.h"
+#if wxUSE_SOUND
+
+#ifndef WX_PRECOMP
+ #include "wx/object.h"
+#endif
+
#include "wx/string.h"
#include "wx/log.h"
#include "wx/file.h"
#include "wx/timer.h"
#include "wx/intl.h"
-#if wxUSE_SOUND
-
// Carbon QT Implementation Details -
//
// Memory:
//NB: RN: Stefan - I think the 10.3 path functions are broken if kQTNativeDefaultPathStyle is
//going to trigger a warning every time it is used - where its _supposed to be used_!!
//(kQTNativePathStyle is negative but the function argument is unsigned!)
-//../src/mac/carbon/sound.cpp: In member function `virtual bool
+//../src/mac/carbon/sound.cpp: In member function `virtual bool
// wxSound::DoPlay(unsigned int) const':
//../src/mac/carbon/sound.cpp:387: warning: passing negative value `
-// kQTNativeDefaultPathStyle' for argument passing 2 of `OSErr
-// QTNewDataReferenceFromFullPathCFString(const __CFString*, long unsigned int,
+// kQTNativeDefaultPathStyle' for argument passing 2 of `OSErr
+// QTNewDataReferenceFromFullPathCFString(const __CFString*, long unsigned int,
// long unsigned int, char***, OSType*)'
//../src/mac/carbon/sound.cpp:387: warning: argument of negative value `
// kQTNativeDefaultPathStyle' to `long unsigned int'
if ( UMAGetSystemVersion() >= 0x1030 )
{
Handle dataRef = NULL;
- OSType dataRefType;
-
+ OSType dataRefType;
+
err = QTNewDataReferenceFromFullPathCFString(wxMacCFStringHolder(m_sndname,wxLocale::GetSystemEncoding()),
//FIXME: Why does this have to be casted?
- (unsigned int)kQTNativeDefaultPathStyle,
+ (unsigned int)kQTNativeDefaultPathStyle,
//FIXME: End
0, &dataRef, &dataRefType);
wxASSERT(err == noErr);
-
- if (NULL != dataRef || err != noErr)
+
+ if (NULL != dataRef || err != noErr)
{
err = NewMovieFromDataRef( &movie, newMovieDontAskUnresolvedDataRefs , NULL, dataRef, dataRefType );
wxASSERT(err == noErr);
CloseMovieFile (movieResFile);
}
-
+
if (err != noErr)
{
wxLogSysError(
wxASSERT_MSG(!(flags & wxSOUND_LOOP), wxT("Can't loop and play syncronously at the same time"));
//Play movie until it ends, then exit
- //Note that due to quicktime caching this may not always
+ //Note that due to quicktime caching this may not always
//work 100% correctly
while (!IsMovieDone(movie))
MoviesTask(movie, 1);
/////////////////////////////////////////////////////////////////////////////
-// Name: printdlg.cpp
+// Name: src/mac/classic/printdlg.cpp
// Purpose: wxPrintDialog, wxPageSetupDialog
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#include "wx/object.h"
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/object.h"
+#endif
+
#include "wx/printdlg.h"
#include "wx/dcprint.h"
#include "wx/msgdlg.h"
{
m_dialogParent = NULL;
m_printerDC = NULL;
- m_destroyDC = TRUE;
+ m_destroyDC = true;
}
wxPrintDialog::wxPrintDialog(wxWindow *p, wxPrintDialogData* data)
wxPrintDialogData data2;
if ( data )
data2 = *data;
-
+
Create(p, &data2);
}
{
m_dialogParent = p;
m_printerDC = NULL;
- m_destroyDC = TRUE;
-
+ m_destroyDC = true;
+
if ( data )
m_printDialogData = *data;
-
- return TRUE;
+
+ return true;
}
wxPrintDialog::~wxPrintDialog()
int result = m_printDialogData.GetPrintData().m_nativePrintData->ShowPrintDialog() ;
if ( result == wxID_OK )
m_printDialogData.ConvertFromNative() ;
-
+
return result ;
}
bool wxPageSetupDialog::Create(wxWindow *p, wxPageSetupData *data)
{
m_dialogParent = p;
-
+
if (data)
m_pageSetupData = (*data);
-
- return TRUE;
+
+ return true;
}
wxPageSetupDialog::~wxPageSetupDialog()
int result = m_pageSetupData.GetPrintData().m_nativePrintData->ShowPageSetupDialog() ;
if (result == wxID_OK )
m_pageSetupData.ConvertFromNative() ;
-
+
return result ;
}
-
/////////////////////////////////////////////////////////////////////////////
-// Name: sound.cpp
+// Name: src/mac/classic/sound.cpp
// Purpose: wxSound class implementation: optional
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#include "wx/object.h"
-#include "wx/string.h"
-#include "wx/sound.h"
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
#if wxUSE_SOUND
+#ifndef WX_PRECOMP
+ #include "wx/object.h"
+#endif
+
+#include "wx/string.h"
+#include "wx/sound.h"
+
#ifdef __WXMAC__
#include "wx/mac/private.h"
#ifndef __DARWIN__
if (m_isResource)
{
- Str255 snd ;
- wxMacStringToPascal( m_sndname , snd ) ;
- SndListHandle hSnd;
+ Str255 snd ;
+ wxMacStringToPascal( m_sndname , snd ) ;
+ SndListHandle hSnd;
- hSnd = (SndListHandle) GetNamedResource('snd ', snd);
+ hSnd = (SndListHandle) GetNamedResource('snd ', snd);
- if ((hSnd != NULL) && (SndPlay((SndChannelPtr)m_sndChan, (SndListHandle) hSnd, (flags & wxSOUND_ASYNC)) == noErr))
- ret = true;
+ if ((hSnd != NULL) && (SndPlay((SndChannelPtr)m_sndChan, (SndListHandle) hSnd, (flags & wxSOUND_ASYNC)) == noErr))
+ ret = true;
}
return ret;
KillTimer(0,timerID);
}*/
-
-#endif
+#endif // wxUSE_SOUND
#if wxUSE_CHECKLISTBOX && wxUSE_OWNER_DRAWN
-#include "wx/object.h"
+#ifndef WX_PRECOMP
+ #include "wx/object.h"
+#endif
+
#include "wx/colour.h"
#include "wx/font.h"
#include "wx/bitmap.h"