git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38839
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
19 files changed:
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
+// 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.
// 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
///////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
-/*
-// SYNOPSIS START
-// SYNOPSIS STOP
-*/
-
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
-#ifdef DBDEBUG_CONSOLE
- #include "wx/ioswrap.h"
-#endif
#include "wx/list.h"
#include "wx/utils.h"
#include "wx/log.h"
#endif
#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"
#include "wx/filefn.h"
#include "wx/wxchar.h"
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
void wxDbConnectInf::SetDsn(const wxString &dsn)
{
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
wxStrncpy(Dsn, dsn, WXSIZEOF(Dsn)-1);
Dsn[WXSIZEOF(Dsn)-1] = 0; // Prevent buffer overrun
void wxDbConnectInf::SetUserID(const wxString &uid)
{
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()
wxStrncpy(Uid, uid, WXSIZEOF(Uid)-1);
Uid[WXSIZEOF(Uid)-1] = 0; // Prevent buffer overrun
} // wxDbConnectInf::SetUserID()
void wxDbConnectInf::SetPassword(const wxString &password)
{
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
wxStrncpy(AuthStr, password, WXSIZEOF(AuthStr)-1);
AuthStr[WXSIZEOF(AuthStr)-1] = 0; // Prevent buffer overrun
void wxDbConnectInf::SetConnectionStr(const wxString &connectStr)
{
void wxDbConnectInf::SetConnectionStr(const wxString &connectStr)
{
- wxASSERT(connectStr.Length() < WXSIZEOF(ConnectionStr));
+ wxASSERT(connectStr.length() < WXSIZEOF(ConnectionStr));
useConnectionStr = wxStrlen(connectStr) > 0;
useConnectionStr = wxStrlen(connectStr) > 0;
if ((i_sqlDataType == SQL_VARCHAR)
#if wxUSE_UNICODE
#if defined(SQL_WCHAR)
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)
#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
// 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.
//
// 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)
{
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)
{
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;
inConnectionStr = inConnectStr;
retcode = SQLDriverConnect(hdbc, parentWnd, (SQLTCHAR FAR *)inConnectionStr.c_str(),
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) &&
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)
{
/********** 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;
dsn = Dsn;
uid = Uid;
authStr = AuthStr;
- inConnectionStr = wxT("");
- outConnectionStr = wxT("");
+ inConnectionStr = wxEmptyString;
+ outConnectionStr = wxEmptyString;
inConnectionStr = copyDb->GetConnectionInStr();
retcode = SQLDriverConnect(hdbc, NULL, (SQLTCHAR FAR *)inConnectionStr.c_str(),
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) &&
sizeof(outConnectBuffer), &outConnectBufferLen, SQL_DRIVER_COMPLETE);
if ((retcode != SQL_SUCCESS) &&
/********** wxDb::logError() **********/
void wxDb::logError(const wxString &errMsg, const wxString &SQLState)
{
/********** wxDb::logError() **********/
void wxDb::logError(const wxString &errMsg, const wxString &SQLState)
{
- wxASSERT(errMsg.Length());
+ wxASSERT(errMsg.length());
static int pLast = -1;
int dbStatus;
static int pLast = -1;
int dbStatus;
wxStrncpy(errorList[pLast], errMsg, DB_MAX_ERROR_MSG_LEN);
errorList[pLast][DB_MAX_ERROR_MSG_LEN] = 0;
wxStrncpy(errorList[pLast], errMsg, DB_MAX_ERROR_MSG_LEN);
errorList[pLast][DB_MAX_ERROR_MSG_LEN] = 0;
if ((dbStatus = TranslateSqlState(SQLState)) != DB_ERR_FUNCTION_SEQUENCE_ERROR)
DB_STATUS = dbStatus;
if ((dbStatus = TranslateSqlState(SQLState)) != DB_ERR_FUNCTION_SEQUENCE_ERROR)
DB_STATUS = dbStatus;
sqlStmt = wxT("CREATE VIEW ");
sqlStmt += viewName;
sqlStmt = wxT("CREATE VIEW ");
sqlStmt += viewName;
{
sqlStmt += wxT(" (");
sqlStmt += colList;
{
sqlStmt += wxT(" (");
sqlStmt += colList;
break;
case SQL_LONGVARCHAR:
pColInf[colNum].dbDataType = DB_DATA_TYPE_MEMO;
break;
case SQL_LONGVARCHAR:
pColInf[colNum].dbDataType = DB_DATA_TYPE_MEMO;
case SQL_TINYINT:
case SQL_SMALLINT:
case SQL_INTEGER:
case SQL_TINYINT:
case SQL_SMALLINT:
case SQL_INTEGER:
case SQL_CHAR:
colInf[colNo].dbDataType = DB_DATA_TYPE_VARCHAR;
break;
case SQL_CHAR:
colInf[colNo].dbDataType = DB_DATA_TYPE_VARCHAR;
break;
colInf[colNo].dbDataType = DB_DATA_TYPE_MEMO;
colInf[colNo].dbDataType = DB_DATA_TYPE_MEMO;
case SQL_TINYINT:
case SQL_SMALLINT:
case SQL_INTEGER:
case SQL_TINYINT:
case SQL_SMALLINT:
case SQL_INTEGER:
* to avoid undesired unbinding of columns.
*/
{
* to avoid undesired unbinding of columns.
*/
{
- wxASSERT(fileName.Length());
+ wxASSERT(fileName.length());
RETCODE retcode;
SQLLEN cb;
RETCODE retcode;
SQLLEN cb;
* userID != "" ... UserID set equal to 'userID'
*/
{
* userID != "" ... UserID set equal to 'userID'
*/
{
- wxASSERT(tableName.Length());
+ wxASSERT(tableName.length());
wxString TableName;
if (Dbms() == dbmsDBASE)
{
wxString dbName;
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());
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))
{
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;
wxDbTablePrivilegeInfo result;
SQLLEN cbRetVal;
bool wxDb::SetSqlLogging(wxDbSqlLogState state, const wxString &filename, bool append)
{
wxASSERT(state == sqlLogON || state == sqlLogOFF);
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());
/********** wxDb::WriteSqlLog() **********/
bool wxDb::WriteSqlLog(const wxString &logMsg)
{
/********** wxDb::WriteSqlLog() **********/
bool wxDb::WriteSqlLog(const wxString &logMsg)
{
- wxASSERT(logMsg.Length());
+ wxASSERT(logMsg.length());
if (fpSqlLog == 0 || sqlLogState == sqlLogOFF)
return false;
if (fpSqlLog == 0 || sqlLogState == sqlLogOFF)
return false;
int dataType, ULONG columnLength,
const wxString &optionalParam)
{
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);
wxASSERT((dataType == DB_DATA_TYPE_VARCHAR && columnLength > 0) ||
dataType != DB_DATA_TYPE_VARCHAR);
}
// for passing things like "NOT NULL"
}
// for passing things like "NOT NULL"
- if (optionalParam.Length())
+ if (optionalParam.length())
{
sqlStmt += wxT(" ");
sqlStmt += optionalParam;
{
sqlStmt += wxT(" ");
sqlStmt += optionalParam;
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
-/*
-// SYNOPSIS START
-// SYNOPSIS STOP
-*/
-
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#include "wx/wxprec.h"
#ifdef __BORLANDC__
+#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>
#ifdef DBDEBUG_CONSOLE
#if wxUSE_IOSTREAMH
#include <iostream.h>
#include "wx/ioswrap.h"
#endif
#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>
#include "wx/filefn.h"
#include <stdio.h>
#if wxUSE_IMAGE && wxUSE_PCX
#ifndef WX_PRECOMP
#if wxUSE_IMAGE && wxUSE_PCX
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/intl.h"
#include "wx/palette.h"
#include "wx/log.h"
#include "wx/intl.h"
#include "wx/palette.h"
#include "wx/hash.h"
#include "wx/list.h"
#include "wx/hash.h"
#include "wx/list.h"
//-----------------------------------------------------------------------------
// wxPCXHandler
//-----------------------------------------------------------------------------
// wxPCXHandler
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#endif
#ifndef WX_PRECOMP
#endif
#ifndef WX_PRECOMP
#endif
#include <string.h>
#endif
#include <string.h>
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#include "wx/wxprec.h"
#ifdef __BORLANDC__
+#ifndef WX_PRECOMP
+ #include "wx/object.h"
+#endif
+
#include "wx/app.h"
#include "wx/apptrait.h"
#include "wx/app.h"
#include "wx/apptrait.h"
#include "wx/string.h"
#include "wx/timer.h"
#include "wx/utils.h"
#include "wx/string.h"
#include "wx/timer.h"
#include "wx/utils.h"
bool done = false;
bool valid_result = false;
bool done = false;
bool valid_result = false;
{
// This is used to avoid a busy loop on wxBase - having a select
// timeout of 50 ms per iteration should be enough.
{
// This is used to avoid a busy loop on wxBase - having a select
// timeout of 50 ms per iteration should be enough.
{
// If there's less than 50 ms left, just call select with that timeout.
if (time_left < 50)
{
// 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") );
int optlen)
{
wxASSERT_MSG( m_socket, _T("Socket not initialised") );
if (m_socket->SetSockOpt(level, optname, optval, optlen)
!= GSOCK_NOERROR)
{
if (m_socket->SetSockOpt(level, optname, optval, optlen)
!= GSOCK_NOERROR)
{
wxUint32 nBytes )
{
wxASSERT_MSG( m_socket, _T("Socket not initialised") );
wxUint32 nBytes )
{
wxASSERT_MSG( m_socket, _T("Socket not initialised") );
m_socket->SetPeer(addr.GetAddress());
Write(buf, nBytes);
return (*this);
m_socket->SetPeer(addr.GetAddress());
Write(buf, nBytes);
return (*this);
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#include "wx/wxprec.h"
#ifdef __BORLANDC__
+#if wxUSE_EXTENDED_RTTI
+
-#include "wx/hash.h"
-#include "wx/object.h"
+ #include "wx/object.h"
+ #include "wx/hash.h"
-#if wxUSE_EXTENDED_RTTI
-
#include "wx/xti.h"
#include "wx/xml/xml.h"
#include "wx/tokenzr.h"
#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 ) ;
}
wxASSERT_MSG( dynobj , wxT("cannot call wxDynamicClassInfo::SetProperty on an object other than wxDynamicObject") ) ;
value = dynobj->GetProperty( m_propertyName ) ;
}
+
+#endif // wxUSE_EXTENDED_RTTI
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#include "wx/wxprec.h"
#ifdef __BORLANDC__
+#if wxUSE_EXTENDED_RTTI
+
-#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"
#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"
#include "wx/xtistrm.h"
#include "wx/beforestd.h"
WX_DEFINE_OBJARRAY(wxxVariantArray);
WX_DEFINE_OBJARRAY(wxxVariantArray);
+#endif // wxUSE_EXTENDED_RTTI
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: src/common/xtistrm.cpp
+// Name: src/common/xtixml.cpp
// Purpose: streaming runtime metadata information
// Author: Stefan Csomor
// Modified by:
// Purpose: streaming runtime metadata information
// Author: Stefan Csomor
// Modified by:
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#include "wx/wxprec.h"
#ifdef __BORLANDC__
+#if wxUSE_EXTENDED_RTTI
+
-#include "wx/hash.h"
-#include "wx/object.h"
+ #include "wx/object.h"
+ #include "wx/hash.h"
#endif
#include "wx/xml/xml.h"
#endif
#include "wx/xml/xml.h"
#include "wx/txtstrm.h"
#include "wx/event.h"
#include "wx/txtstrm.h"
#include "wx/event.h"
-#if wxUSE_EXTENDED_RTTI
-
#include "wx/xtistrm.h"
#include "wx/xtixml.h"
#include "wx/xtistrm.h"
#include "wx/xtixml.h"
return wxInvalidObjectID ;
}
return wxInvalidObjectID ;
}
+#endif // wxUSE_EXTENDED_RTTI
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#ifndef WX_PRECOMP
+ #include "wx/object.h"
+#endif
+
#include "wx/window.h"
#include "wx/dc.h"
#include "wx/cursor.h"
#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;
/* 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"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#ifndef WX_PRECOMP
+ #include "wx/object.h"
+#endif
+
#include "wx/window.h"
#include "wx/dc.h"
#include "wx/cursor.h"
#include "wx/window.h"
#include "wx/dc.h"
#include "wx/cursor.h"
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
+// Name: src/html/helpdlg.cpp
// Purpose: wxHtmlHelpDialog
// Notes: Based on htmlhelp.cpp, implementing a monolithic
// HTML Help controller class, by Vaclav Slavik
// Purpose: wxHtmlHelpDialog
// Notes: Based on htmlhelp.cpp, implementing a monolithic
// HTML Help controller class, by Vaclav Slavik
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#endif
#if wxUSE_WXHTML_HELP
#ifndef WXPRECOMP
#endif
#if wxUSE_WXHTML_HELP
#ifndef WXPRECOMP
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/sizer.h"
#include "wx/bmpbuttn.h"
#include "wx/sizer.h"
#include "wx/bmpbuttn.h"
{
m_HtmlHelpWin = new wxHtmlHelpWindow(m_Data);
{
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),
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"));
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);
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
// Add some space for the resize handle
item4->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL, 0);
#endif
}
#endif // wxUSE_WXHTML_HELP
}
#endif // wxUSE_WXHTML_HELP
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
+// Name: src/html/helpfrm.cpp
// Purpose: wxHtmlHelpFrame
// Notes: Based on htmlhelp.cpp, implementing a monolithic
// HTML Help controller class, by Vaclav Slavik
// Purpose: wxHtmlHelpFrame
// Notes: Based on htmlhelp.cpp, implementing a monolithic
// HTML Help controller class, by Vaclav Slavik
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#endif
#if wxUSE_WXHTML_HELP
#ifndef WXPRECOMP
#endif
#if wxUSE_WXHTML_HELP
#ifndef WXPRECOMP
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/sizer.h"
#include "wx/bmpbuttn.h"
#include "wx/sizer.h"
#include "wx/bmpbuttn.h"
{
m_HtmlHelpWin = new wxHtmlHelpWindow(m_Data);
{
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),
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
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);
wxTAB_TRAVERSAL|wxNO_BORDER, style);
GetPosition(& (m_HtmlHelpWin->GetCfgData().x), & (m_HtmlHelpWin->GetCfgData()).y);
{
// So far, wxGTK only
#ifdef __WXGTK__
{
// 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();
// 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())
wxDialog *dialog = wxDynamicCast(win, wxDialog);
if (dialog && dialog->IsModal())
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#endif
#if wxUSE_WXHTML_HELP
#ifndef WXPRECOMP
#endif
#if wxUSE_WXHTML_HELP
#ifndef WXPRECOMP
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/sizer.h"
#include "wx/bmpbuttn.h"
#include "wx/sizer.h"
#include "wx/bmpbuttn.h"
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#include "wx/wxprec.h"
#ifdef __BORLANDC__
+#ifndef WX_PRECOMP
+ #include "wx/object.h"
+#endif
+
#include "wx/app.h"
#include "wx/apptrait.h"
#include "wx/app.h"
#include "wx/apptrait.h"
#include "wx/string.h"
#include "wx/timer.h"
#include "wx/utils.h"
#include "wx/string.h"
#include "wx/timer.h"
#include "wx/utils.h"
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// 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/wxprec.h"
#if wxUSE_PRINTING_ARCHITECTURE
+#ifndef WXPRECOMP
+ #include "wx/object.h"
+#endif
+
#include "wx/printdlg.h"
#include "wx/mac/printdlg.h"
#include "wx/dcprint.h"
#include "wx/printdlg.h"
#include "wx/mac/printdlg.h"
#include "wx/dcprint.h"
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
+// 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
// 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".
+#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/string.h"
#include "wx/log.h"
#include "wx/file.h"
#include "wx/timer.h"
#include "wx/intl.h"
#include "wx/timer.h"
#include "wx/intl.h"
// Carbon QT Implementation Details -
//
// Memory:
// 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!)
//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 `
// 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'
// 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;
if ( UMAGetSystemVersion() >= 0x1030 )
{
Handle dataRef = NULL;
err = QTNewDataReferenceFromFullPathCFString(wxMacCFStringHolder(m_sndname,wxLocale::GetSystemEncoding()),
//FIXME: Why does this have to be casted?
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);
//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);
{
err = NewMovieFromDataRef( &movie, newMovieDontAskUnresolvedDataRefs , NULL, dataRef, dataRefType );
wxASSERT(err == noErr);
CloseMovieFile (movieResFile);
}
CloseMovieFile (movieResFile);
}
if (err != noErr)
{
wxLogSysError(
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
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);
//work 100% correctly
while (!IsMovieDone(movie))
MoviesTask(movie, 1);
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
+// 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
// 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
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
+// 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"
#include "wx/printdlg.h"
#include "wx/dcprint.h"
#include "wx/msgdlg.h"
{
m_dialogParent = NULL;
m_printerDC = NULL;
{
m_dialogParent = NULL;
m_printerDC = NULL;
}
wxPrintDialog::wxPrintDialog(wxWindow *p, wxPrintDialogData* data)
}
wxPrintDialog::wxPrintDialog(wxWindow *p, wxPrintDialogData* data)
wxPrintDialogData data2;
if ( data )
data2 = *data;
wxPrintDialogData data2;
if ( data )
data2 = *data;
{
m_dialogParent = p;
m_printerDC = NULL;
{
m_dialogParent = p;
m_printerDC = NULL;
if ( data )
m_printDialogData = *data;
if ( data )
m_printDialogData = *data;
}
wxPrintDialog::~wxPrintDialog()
}
wxPrintDialog::~wxPrintDialog()
int result = m_printDialogData.GetPrintData().m_nativePrintData->ShowPrintDialog() ;
if ( result == wxID_OK )
m_printDialogData.ConvertFromNative() ;
int result = m_printDialogData.GetPrintData().m_nativePrintData->ShowPrintDialog() ;
if ( result == wxID_OK )
m_printDialogData.ConvertFromNative() ;
bool wxPageSetupDialog::Create(wxWindow *p, wxPageSetupData *data)
{
m_dialogParent = p;
bool wxPageSetupDialog::Create(wxWindow *p, wxPageSetupData *data)
{
m_dialogParent = p;
if (data)
m_pageSetupData = (*data);
if (data)
m_pageSetupData = (*data);
}
wxPageSetupDialog::~wxPageSetupDialog()
}
wxPageSetupDialog::~wxPageSetupDialog()
int result = m_pageSetupData.GetPrintData().m_nativePrintData->ShowPageSetupDialog() ;
if (result == wxID_OK )
m_pageSetupData.ConvertFromNative() ;
int result = m_pageSetupData.GetPrintData().m_nativePrintData->ShowPageSetupDialog() ;
if (result == wxID_OK )
m_pageSetupData.ConvertFromNative() ;
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
+// 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
// 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"
+#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__
#ifdef __WXMAC__
#include "wx/mac/private.h"
#ifndef __DARWIN__
- 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;
KillTimer(0,timerID);
}*/
KillTimer(0,timerID);
}*/
#if wxUSE_CHECKLISTBOX && wxUSE_OWNER_DRAWN
#if wxUSE_CHECKLISTBOX && wxUSE_OWNER_DRAWN
+#ifndef WX_PRECOMP
+ #include "wx/object.h"
+#endif
+
#include "wx/colour.h"
#include "wx/font.h"
#include "wx/bitmap.h"
#include "wx/colour.h"
#include "wx/font.h"
#include "wx/bitmap.h"