Include wx/object.h according to precompiled headers of wx/wx.h (with other minor cleaning).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
ddae497f7b
commit
8e3f3880bc
@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// 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.
|
||||
@ -21,33 +21,29 @@
|
||||
// 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>
|
||||
@ -201,7 +197,7 @@ void wxDbConnectInf::FreeHenv()
|
||||
|
||||
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
|
||||
@ -210,7 +206,7 @@ void wxDbConnectInf::SetDsn(const wxString &dsn)
|
||||
|
||||
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()
|
||||
@ -218,7 +214,7 @@ void wxDbConnectInf::SetUserID(const wxString &uid)
|
||||
|
||||
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
|
||||
@ -226,7 +222,7 @@ void wxDbConnectInf::SetPassword(const wxString &password)
|
||||
|
||||
void wxDbConnectInf::SetConnectionStr(const wxString &connectStr)
|
||||
{
|
||||
wxASSERT(connectStr.Length() < WXSIZEOF(ConnectionStr));
|
||||
wxASSERT(connectStr.length() < WXSIZEOF(ConnectionStr));
|
||||
|
||||
useConnectionStr = wxStrlen(connectStr) > 0;
|
||||
|
||||
@ -287,7 +283,7 @@ int wxDbColFor::Format(int Nation, int dbDataType, SWORD sqlDataType,
|
||||
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)
|
||||
@ -658,7 +654,7 @@ bool wxDb::determineDataTypes(bool failOnDataTypeUnsupported)
|
||||
|
||||
// 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.
|
||||
@ -826,15 +822,15 @@ bool wxDb::open(bool failOnDataTypeUnsupported)
|
||||
|
||||
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;
|
||||
|
||||
@ -861,7 +857,7 @@ bool wxDb::Open(const wxString& inConnectStr, SQLHWND parentWnd, bool failOnData
|
||||
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) &&
|
||||
@ -878,13 +874,13 @@ bool wxDb::Open(const wxString& inConnectStr, SQLHWND parentWnd, bool failOnData
|
||||
/********** 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;
|
||||
|
||||
@ -966,7 +962,7 @@ bool wxDb::Open(wxDb *copyDb)
|
||||
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) &&
|
||||
@ -1889,7 +1885,7 @@ void wxDb::DispNextError(void)
|
||||
/********** wxDb::logError() **********/
|
||||
void wxDb::logError(const wxString &errMsg, const wxString &SQLState)
|
||||
{
|
||||
wxASSERT(errMsg.Length());
|
||||
wxASSERT(errMsg.length());
|
||||
|
||||
static int pLast = -1;
|
||||
int dbStatus;
|
||||
@ -1905,7 +1901,7 @@ void wxDb::logError(const wxString &errMsg, const wxString &SQLState)
|
||||
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;
|
||||
|
||||
@ -2170,7 +2166,7 @@ bool wxDb::CreateView(const wxString &viewName, const wxString &colList,
|
||||
sqlStmt = wxT("CREATE VIEW ");
|
||||
sqlStmt += viewName;
|
||||
|
||||
if (colList.Length())
|
||||
if (colList.length())
|
||||
{
|
||||
sqlStmt += wxT(" (");
|
||||
sqlStmt += colList;
|
||||
@ -2323,7 +2319,7 @@ bool wxDb::ExecSql(const wxString &pSqlStmt, wxDbColInf** columns, short& numcol
|
||||
break;
|
||||
case SQL_LONGVARCHAR:
|
||||
pColInf[colNum].dbDataType = DB_DATA_TYPE_MEMO;
|
||||
break;
|
||||
break;
|
||||
case SQL_TINYINT:
|
||||
case SQL_SMALLINT:
|
||||
case SQL_INTEGER:
|
||||
@ -3107,9 +3103,9 @@ wxDbColInf *wxDb::GetColumns(const wxString &tableName, int *numCols, const wxCh
|
||||
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:
|
||||
@ -3452,7 +3448,7 @@ bool wxDb::Catalog(const wxChar *userID, const wxString &fileName)
|
||||
* to avoid undesired unbinding of columns.
|
||||
*/
|
||||
{
|
||||
wxASSERT(fileName.Length());
|
||||
wxASSERT(fileName.length());
|
||||
|
||||
RETCODE retcode;
|
||||
SQLLEN cb;
|
||||
@ -3572,14 +3568,14 @@ bool wxDb::TableExists(const wxString &tableName, const wxChar *userID, const wx
|
||||
* 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());
|
||||
@ -3649,7 +3645,7 @@ bool wxDb::TableExists(const wxString &tableName, const wxChar *userID, const wx
|
||||
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;
|
||||
@ -3798,7 +3794,7 @@ const wxString wxDb::SQLColumnName(const wxChar *colName)
|
||||
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)
|
||||
{
|
||||
@ -3828,7 +3824,7 @@ bool wxDb::SetSqlLogging(wxDbSqlLogState state, const wxString &filename, bool a
|
||||
/********** wxDb::WriteSqlLog() **********/
|
||||
bool wxDb::WriteSqlLog(const wxString &logMsg)
|
||||
{
|
||||
wxASSERT(logMsg.Length());
|
||||
wxASSERT(logMsg.length());
|
||||
|
||||
if (fpSqlLog == 0 || sqlLogState == sqlLogOFF)
|
||||
return false;
|
||||
@ -4000,8 +3996,8 @@ bool wxDb::ModifyColumn(const wxString &tableName, const wxString &columnName,
|
||||
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);
|
||||
|
||||
@ -4079,7 +4075,7 @@ bool wxDb::ModifyColumn(const wxString &tableName, const wxString &columnName,
|
||||
}
|
||||
|
||||
// for passing things like "NOT NULL"
|
||||
if (optionalParam.Length())
|
||||
if (optionalParam.length())
|
||||
{
|
||||
sqlStmt += wxT(" ");
|
||||
sqlStmt += optionalParam;
|
||||
|
@ -11,11 +11,6 @@
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
// SYNOPSIS START
|
||||
// SYNOPSIS STOP
|
||||
*/
|
||||
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
@ -24,6 +19,14 @@
|
||||
|
||||
#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>
|
||||
@ -33,13 +36,6 @@
|
||||
#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>
|
||||
|
@ -18,6 +18,7 @@
|
||||
#if wxUSE_IMAGE && wxUSE_PCX
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/object.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/intl.h"
|
||||
#include "wx/palette.h"
|
||||
@ -29,7 +30,6 @@
|
||||
|
||||
#include "wx/hash.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/object.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxPCXHandler
|
||||
|
@ -14,12 +14,12 @@
|
||||
#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>
|
||||
|
@ -17,14 +17,17 @@
|
||||
#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"
|
||||
@ -710,7 +713,7 @@ bool wxSocketBase::_Wait(long seconds,
|
||||
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.
|
||||
@ -756,11 +759,11 @@ bool wxSocketBase::_Wait(long seconds,
|
||||
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)
|
||||
@ -1193,7 +1196,7 @@ bool wxSocketBase::SetOption(int level, int optname, const void *optval,
|
||||
int optlen)
|
||||
{
|
||||
wxASSERT_MSG( m_socket, _T("Socket not initialised") );
|
||||
|
||||
|
||||
if (m_socket->SetSockOpt(level, optname, optval, optlen)
|
||||
!= GSOCK_NOERROR)
|
||||
{
|
||||
@ -1379,7 +1382,7 @@ wxDatagramSocket& wxDatagramSocket::SendTo( const wxSockAddress& addr,
|
||||
wxUint32 nBytes )
|
||||
{
|
||||
wxASSERT_MSG( m_socket, _T("Socket not initialised") );
|
||||
|
||||
|
||||
m_socket->SetPeer(addr.GetAddress());
|
||||
Write(buf, nBytes);
|
||||
return (*this);
|
||||
|
@ -14,16 +14,16 @@
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/hash.h"
|
||||
#include "wx/object.h"
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_EXTENDED_RTTI
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/object.h"
|
||||
#include "wx/hash.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xti.h"
|
||||
#include "wx/xml/xml.h"
|
||||
#include "wx/tokenzr.h"
|
||||
@ -763,4 +763,5 @@ void wxGenericPropertyAccessor::GetProperty(const wxObject *object, wxxVariant&
|
||||
wxASSERT_MSG( dynobj , wxT("cannot call wxDynamicClassInfo::SetProperty on an object other than wxDynamicObject") ) ;
|
||||
value = dynobj->GetProperty( m_propertyName ) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_EXTENDED_RTTI
|
||||
|
@ -13,20 +13,20 @@
|
||||
#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"
|
||||
@ -844,4 +844,4 @@ void wxCodeDepersister::SetConnect(int eventSourceObjectID,
|
||||
|
||||
WX_DEFINE_OBJARRAY(wxxVariantArray);
|
||||
|
||||
#endif
|
||||
#endif // wxUSE_EXTENDED_RTTI
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: src/common/xtistrm.cpp
|
||||
// Name: src/common/xtixml.cpp
|
||||
// Purpose: streaming runtime metadata information
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@ -13,12 +13,14 @@
|
||||
#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"
|
||||
@ -26,8 +28,6 @@
|
||||
#include "wx/txtstrm.h"
|
||||
#include "wx/event.h"
|
||||
|
||||
#if wxUSE_EXTENDED_RTTI
|
||||
|
||||
#include "wx/xtistrm.h"
|
||||
#include "wx/xtixml.h"
|
||||
|
||||
@ -534,4 +534,4 @@ int wxXmlReader::ReadObject( const wxString &name , wxDepersister *callbacks)
|
||||
return wxInvalidObjectID ;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // wxUSE_EXTENDED_RTTI
|
||||
|
@ -10,7 +10,10 @@
|
||||
// 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"
|
||||
@ -31,4 +34,3 @@ int g_openDialogs = 0;
|
||||
/* 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;
|
||||
|
||||
|
@ -10,7 +10,10 @@
|
||||
// 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"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
@ -13,16 +13,16 @@
|
||||
#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"
|
||||
@ -67,11 +67,11 @@ bool wxHtmlHelpDialog::Create(wxWindow* parent, wxWindowID id,
|
||||
{
|
||||
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);
|
||||
@ -97,7 +97,7 @@ bool wxHtmlHelpDialog::Create(wxWindow* parent, wxWindowID id,
|
||||
// Add some space for the resize handle
|
||||
item4->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL, 0);
|
||||
#endif
|
||||
|
||||
|
||||
Layout();
|
||||
Centre();
|
||||
|
||||
@ -133,4 +133,3 @@ void wxHtmlHelpDialog::OnCloseWindow(wxCloseEvent& evt)
|
||||
}
|
||||
|
||||
#endif // wxUSE_WXHTML_HELP
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
@ -14,16 +14,16 @@
|
||||
#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"
|
||||
@ -90,14 +90,14 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id,
|
||||
{
|
||||
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);
|
||||
@ -194,8 +194,8 @@ void wxHtmlHelpFrame::AddGrabIfNeeded()
|
||||
{
|
||||
// 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();
|
||||
@ -206,7 +206,7 @@ void wxHtmlHelpFrame::AddGrabIfNeeded()
|
||||
wxDialog *dialog = wxDynamicCast(win, wxDialog);
|
||||
|
||||
if (dialog && dialog->IsModal())
|
||||
needGrab = TRUE;
|
||||
needGrab = true;
|
||||
}
|
||||
|
||||
if (needGrab)
|
||||
|
@ -14,16 +14,16 @@
|
||||
#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"
|
||||
|
@ -12,14 +12,17 @@
|
||||
#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"
|
||||
|
@ -6,14 +6,17 @@
|
||||
// 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"
|
||||
|
@ -1,17 +1,23 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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"
|
||||
@ -19,8 +25,6 @@
|
||||
#include "wx/timer.h"
|
||||
#include "wx/intl.h"
|
||||
|
||||
#if wxUSE_SOUND
|
||||
|
||||
// Carbon QT Implementation Details -
|
||||
//
|
||||
// Memory:
|
||||
@ -384,11 +388,11 @@ bool wxSound::DoPlay(unsigned flags) const
|
||||
//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'
|
||||
@ -396,17 +400,17 @@ bool wxSound::DoPlay(unsigned flags) const
|
||||
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);
|
||||
@ -449,7 +453,7 @@ bool wxSound::DoPlay(unsigned flags) const
|
||||
|
||||
CloseMovieFile (movieResFile);
|
||||
}
|
||||
|
||||
|
||||
if (err != noErr)
|
||||
{
|
||||
wxLogSysError(
|
||||
@ -480,7 +484,7 @@ bool wxSound::DoPlay(unsigned flags) const
|
||||
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);
|
||||
|
@ -1,15 +1,21 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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"
|
||||
@ -24,7 +30,7 @@ wxPrintDialog::wxPrintDialog()
|
||||
{
|
||||
m_dialogParent = NULL;
|
||||
m_printerDC = NULL;
|
||||
m_destroyDC = TRUE;
|
||||
m_destroyDC = true;
|
||||
}
|
||||
|
||||
wxPrintDialog::wxPrintDialog(wxWindow *p, wxPrintDialogData* data)
|
||||
@ -37,7 +43,7 @@ wxPrintDialog::wxPrintDialog(wxWindow *p, wxPrintData* data)
|
||||
wxPrintDialogData data2;
|
||||
if ( data )
|
||||
data2 = *data;
|
||||
|
||||
|
||||
Create(p, &data2);
|
||||
}
|
||||
|
||||
@ -45,12 +51,12 @@ bool wxPrintDialog::Create(wxWindow *p, wxPrintDialogData* data)
|
||||
{
|
||||
m_dialogParent = p;
|
||||
m_printerDC = NULL;
|
||||
m_destroyDC = TRUE;
|
||||
|
||||
m_destroyDC = true;
|
||||
|
||||
if ( data )
|
||||
m_printDialogData = *data;
|
||||
|
||||
return TRUE;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
wxPrintDialog::~wxPrintDialog()
|
||||
@ -67,7 +73,7 @@ int wxPrintDialog::ShowModal()
|
||||
int result = m_printDialogData.GetPrintData().m_nativePrintData->ShowPrintDialog() ;
|
||||
if ( result == wxID_OK )
|
||||
m_printDialogData.ConvertFromNative() ;
|
||||
|
||||
|
||||
return result ;
|
||||
}
|
||||
|
||||
@ -95,11 +101,11 @@ wxDialog()
|
||||
bool wxPageSetupDialog::Create(wxWindow *p, wxPageSetupData *data)
|
||||
{
|
||||
m_dialogParent = p;
|
||||
|
||||
|
||||
if (data)
|
||||
m_pageSetupData = (*data);
|
||||
|
||||
return TRUE;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
wxPageSetupDialog::~wxPageSetupDialog()
|
||||
@ -112,7 +118,6 @@ int wxPageSetupDialog::ShowModal()
|
||||
int result = m_pageSetupData.GetPrintData().m_nativePrintData->ShowPageSetupDialog() ;
|
||||
if (result == wxID_OK )
|
||||
m_pageSetupData.ConvertFromNative() ;
|
||||
|
||||
|
||||
return result ;
|
||||
}
|
||||
|
||||
|
@ -1,20 +1,26 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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__
|
||||
@ -135,14 +141,14 @@ bool wxSound::DoPlay(unsigned flags) const
|
||||
|
||||
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;
|
||||
@ -235,5 +241,4 @@ void TimerCallBack(HWND hwnd,UINT uMsg,UINT idEvent,DWORD dwTime)
|
||||
KillTimer(0,timerID);
|
||||
}*/
|
||||
|
||||
|
||||
#endif
|
||||
#endif // wxUSE_SOUND
|
||||
|
@ -18,7 +18,10 @@
|
||||
|
||||
#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"
|
||||
|
Loading…
Reference in New Issue
Block a user