Fix some compilation and linking errors in samples.
Replace some calls to wxString::getWriteBuffer with wxStringBuffer. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -136,7 +136,7 @@ protected:
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_DECLARE_EVENT_TYPES()
|
BEGIN_DECLARE_EVENT_TYPES()
|
||||||
DECLARE_EVENT_TYPE(wxEVT_END_PROCESS, 440)
|
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_BASE, wxEVT_END_PROCESS, 440)
|
||||||
END_DECLARE_EVENT_TYPES()
|
END_DECLARE_EVENT_TYPES()
|
||||||
|
|
||||||
class WXDLLIMPEXP_BASE wxProcessEvent : public wxEvent
|
class WXDLLIMPEXP_BASE wxProcessEvent : public wxEvent
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
#include "wx/object.h"
|
#include "wx/object.h"
|
||||||
#include "wx/string.h"
|
#include "wx/string.h"
|
||||||
|
#include "wx/arrstr.h"
|
||||||
#include "wx/list.h"
|
#include "wx/list.h"
|
||||||
|
|
||||||
#if wxUSE_DATETIME
|
#if wxUSE_DATETIME
|
||||||
|
@@ -123,25 +123,6 @@ copystring (const wxChar *s)
|
|||||||
|
|
||||||
#endif // WXWIN_COMPATIBILITY_2_4
|
#endif // WXWIN_COMPATIBILITY_2_4
|
||||||
|
|
||||||
// Id generation
|
|
||||||
static long wxCurrentId = 100;
|
|
||||||
|
|
||||||
long
|
|
||||||
wxNewId (void)
|
|
||||||
{
|
|
||||||
return wxCurrentId++;
|
|
||||||
}
|
|
||||||
|
|
||||||
long
|
|
||||||
wxGetCurrentId(void) { return wxCurrentId; }
|
|
||||||
|
|
||||||
void
|
|
||||||
wxRegisterId (long id)
|
|
||||||
{
|
|
||||||
if (id >= wxCurrentId)
|
|
||||||
wxCurrentId = id + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// String <-> Number conversions (deprecated)
|
// String <-> Number conversions (deprecated)
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -354,8 +335,7 @@ wxString wxGetUserId()
|
|||||||
static const int maxLoginLen = 256; // FIXME arbitrary number
|
static const int maxLoginLen = 256; // FIXME arbitrary number
|
||||||
|
|
||||||
wxString buf;
|
wxString buf;
|
||||||
bool ok = wxGetUserId(buf.GetWriteBuf(maxLoginLen), maxLoginLen);
|
bool ok = wxGetUserId(wxStringBuffer(buf, maxLoginLen), maxLoginLen);
|
||||||
buf.UngetWriteBuf();
|
|
||||||
|
|
||||||
if ( !ok )
|
if ( !ok )
|
||||||
buf.Empty();
|
buf.Empty();
|
||||||
@@ -368,8 +348,7 @@ wxString wxGetUserName()
|
|||||||
static const int maxUserNameLen = 1024; // FIXME arbitrary number
|
static const int maxUserNameLen = 1024; // FIXME arbitrary number
|
||||||
|
|
||||||
wxString buf;
|
wxString buf;
|
||||||
bool ok = wxGetUserName(buf.GetWriteBuf(maxUserNameLen), maxUserNameLen);
|
bool ok = wxGetUserName(wxStringBuffer(buf, maxUserNameLen), maxUserNameLen);
|
||||||
buf.UngetWriteBuf();
|
|
||||||
|
|
||||||
if ( !ok )
|
if ( !ok )
|
||||||
buf.Empty();
|
buf.Empty();
|
||||||
@@ -382,9 +361,7 @@ wxString wxGetHostName()
|
|||||||
static const size_t hostnameSize = 257;
|
static const size_t hostnameSize = 257;
|
||||||
|
|
||||||
wxString buf;
|
wxString buf;
|
||||||
bool ok = wxGetHostName(buf.GetWriteBuf(hostnameSize), hostnameSize);
|
bool ok = wxGetHostName(wxStringBuffer(buf, hostnameSize), hostnameSize);
|
||||||
|
|
||||||
buf.UngetWriteBuf();
|
|
||||||
|
|
||||||
if ( !ok )
|
if ( !ok )
|
||||||
buf.Empty();
|
buf.Empty();
|
||||||
@@ -397,9 +374,7 @@ wxString wxGetFullHostName()
|
|||||||
static const size_t hostnameSize = 257;
|
static const size_t hostnameSize = 257;
|
||||||
|
|
||||||
wxString buf;
|
wxString buf;
|
||||||
bool ok = wxGetFullHostName(buf.GetWriteBuf(hostnameSize), hostnameSize);
|
bool ok = wxGetFullHostName(wxStringBuffer(buf, hostnameSize), hostnameSize);
|
||||||
|
|
||||||
buf.UngetWriteBuf();
|
|
||||||
|
|
||||||
if ( !ok )
|
if ( !ok )
|
||||||
buf.Empty();
|
buf.Empty();
|
||||||
@@ -554,6 +529,25 @@ bool wxYieldIfNeeded()
|
|||||||
|
|
||||||
#if wxUSE_GUI
|
#if wxUSE_GUI
|
||||||
|
|
||||||
|
// Id generation
|
||||||
|
static long wxCurrentId = 100;
|
||||||
|
|
||||||
|
long
|
||||||
|
wxNewId (void)
|
||||||
|
{
|
||||||
|
return wxCurrentId++;
|
||||||
|
}
|
||||||
|
|
||||||
|
long
|
||||||
|
wxGetCurrentId(void) { return wxCurrentId; }
|
||||||
|
|
||||||
|
void
|
||||||
|
wxRegisterId (long id)
|
||||||
|
{
|
||||||
|
if (id >= wxCurrentId)
|
||||||
|
wxCurrentId = id + 1;
|
||||||
|
}
|
||||||
|
|
||||||
#if wxUSE_MENUS
|
#if wxUSE_MENUS
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user