Source cleaning: whitespaces, tabs, -1/wxID_ANY/wxNOT_FOUND/wxDefaultCoord, TRUE/true, FALSE/false.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -41,7 +41,7 @@ public:
|
|||||||
|
|
||||||
// Called when the value in the window must be validated.
|
// Called when the value in the window must be validated.
|
||||||
// This function can pop up an error message.
|
// This function can pop up an error message.
|
||||||
virtual bool Validate(wxWindow * WXUNUSED(parent)) { return TRUE; }
|
virtual bool Validate(wxWindow * WXUNUSED(parent)) { return true; }
|
||||||
|
|
||||||
// Called to transfer data to the window
|
// Called to transfer data to the window
|
||||||
virtual bool TransferToWindow();
|
virtual bool TransferToWindow();
|
||||||
@@ -69,5 +69,5 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
// wxUSE_VALIDATORS
|
// wxUSE_VALIDATORS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// _WX_VALGENH__
|
// _WX_VALGENH__
|
||||||
|
@@ -50,17 +50,17 @@ public:
|
|||||||
virtual wxObject *Clone() const
|
virtual wxObject *Clone() const
|
||||||
{ return (wxValidator *)NULL; }
|
{ return (wxValidator *)NULL; }
|
||||||
bool Copy(const wxValidator& val)
|
bool Copy(const wxValidator& val)
|
||||||
{ m_validatorWindow = val.m_validatorWindow; return TRUE; }
|
{ m_validatorWindow = val.m_validatorWindow; return true; }
|
||||||
|
|
||||||
// Called when the value in the window must be validated.
|
// Called when the value in the window must be validated.
|
||||||
// This function can pop up an error message.
|
// This function can pop up an error message.
|
||||||
virtual bool Validate(wxWindow *WXUNUSED(parent)) { return FALSE; };
|
virtual bool Validate(wxWindow *WXUNUSED(parent)) { return false; };
|
||||||
|
|
||||||
// Called to transfer data to the window
|
// Called to transfer data to the window
|
||||||
virtual bool TransferToWindow() { return FALSE; }
|
virtual bool TransferToWindow() { return false; }
|
||||||
|
|
||||||
// Called to transfer data from the window
|
// Called to transfer data from the window
|
||||||
virtual bool TransferFromWindow() { return FALSE; };
|
virtual bool TransferFromWindow() { return false; };
|
||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
wxWindow *GetWindow() const { return (wxWindow *)m_validatorWindow; }
|
wxWindow *GetWindow() const { return (wxWindow *)m_validatorWindow; }
|
||||||
@@ -69,7 +69,7 @@ public:
|
|||||||
// validators beep by default if invalid key is pressed, these functions
|
// validators beep by default if invalid key is pressed, these functions
|
||||||
// allow to change it
|
// allow to change it
|
||||||
static bool IsSilent() { return ms_isSilent; }
|
static bool IsSilent() { return ms_isSilent; }
|
||||||
static void SetBellOnError(bool doIt = TRUE) { ms_isSilent = doIt; }
|
static void SetBellOnError(bool doIt = true) { ms_isSilent = doIt; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxWindowBase *m_validatorWindow;
|
wxWindowBase *m_validatorWindow;
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 29/01/98
|
// Created: 29/01/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 1998 Julian Smart
|
// Copyright: (c) 1998 Julian Smart
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_VALTEXTH__
|
#ifndef _WX_VALTEXTH__
|
||||||
@@ -86,14 +86,14 @@ protected:
|
|||||||
|
|
||||||
bool CheckValidator() const
|
bool CheckValidator() const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( m_validatorWindow, FALSE,
|
wxCHECK_MSG( m_validatorWindow, false,
|
||||||
_T("No window associated with validator") );
|
_T("No window associated with validator") );
|
||||||
wxCHECK_MSG( m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)), FALSE,
|
wxCHECK_MSG( m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)), false,
|
||||||
_T("wxTextValidator is only for wxTextCtrl's") );
|
_T("wxTextValidator is only for wxTextCtrl's") );
|
||||||
wxCHECK_MSG( m_stringValue, FALSE,
|
wxCHECK_MSG( m_stringValue, false,
|
||||||
_T("No variable storage for validator") );
|
_T("No variable storage for validator") );
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -98,7 +98,7 @@ public:
|
|||||||
wxVariant(const wxStringList& val, const wxString& name = wxEmptyString);
|
wxVariant(const wxStringList& val, const wxString& name = wxEmptyString);
|
||||||
wxVariant(const wxList& val, const wxString& name = wxEmptyString); // List of variants
|
wxVariant(const wxList& val, const wxString& name = wxEmptyString); // List of variants
|
||||||
wxVariant(void* ptr, const wxString& name = wxEmptyString); // void* (general purpose)
|
wxVariant(void* ptr, const wxString& name = wxEmptyString); // void* (general purpose)
|
||||||
wxVariant(wxObject* ptr, const wxString& name = wxEmptyString); //wxObject
|
wxVariant(wxObject* ptr, const wxString& name = wxEmptyString); //wxObject
|
||||||
wxVariant(wxVariantData* data, const wxString& name = wxEmptyString); // User-defined data
|
wxVariant(wxVariantData* data, const wxString& name = wxEmptyString); // User-defined data
|
||||||
#if wxUSE_DATETIME
|
#if wxUSE_DATETIME
|
||||||
wxVariant(const wxDateTime& val, const wxString& name = wxEmptyString); // Date
|
wxVariant(const wxDateTime& val, const wxString& name = wxEmptyString); // Date
|
||||||
@@ -109,7 +109,7 @@ public:
|
|||||||
wxVariant(const TIME_STRUCT* valptr, const wxString& name = wxEmptyString); // DateTime
|
wxVariant(const TIME_STRUCT* valptr, const wxString& name = wxEmptyString); // DateTime
|
||||||
wxVariant(const TIMESTAMP_STRUCT* valptr, const wxString& name = wxEmptyString); // DateTime
|
wxVariant(const TIMESTAMP_STRUCT* valptr, const wxString& name = wxEmptyString); // DateTime
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxVariant(const wxVariant& variant);
|
wxVariant(const wxVariant& variant);
|
||||||
~wxVariant();
|
~wxVariant();
|
||||||
|
|
||||||
@@ -240,7 +240,7 @@ public:
|
|||||||
// Insert at front of list
|
// Insert at front of list
|
||||||
void Insert(const wxVariant& value);
|
void Insert(const wxVariant& value);
|
||||||
|
|
||||||
// Returns TRUE if the variant is a member of the list
|
// Returns true if the variant is a member of the list
|
||||||
bool Member(const wxVariant& value) const;
|
bool Member(const wxVariant& value) const;
|
||||||
|
|
||||||
// Deletes the nth element of the list
|
// Deletes the nth element of the list
|
||||||
@@ -268,12 +268,12 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
//Since we want type safety wxVariant we need to fetch and dynamic_cast
|
//Since we want type safety wxVariant we need to fetch and dynamic_cast
|
||||||
//in a seemingly safe way so the compiler can check, so we define
|
//in a seemingly safe way so the compiler can check, so we define
|
||||||
//a dynamic_cast /wxDynamicCast analogue.
|
//a dynamic_cast /wxDynamicCast analogue.
|
||||||
|
|
||||||
#define wxGetVariantCast(var,classname) \
|
#define wxGetVariantCast(var,classname) \
|
||||||
((classname*)(var.IsValueKindOf(&classname::ms_classInfo) ?\
|
((classname*)(var.IsValueKindOf(&classname::ms_classInfo) ?\
|
||||||
var.GetWxObjectPtr() : NULL));
|
var.GetWxObjectPtr() : NULL));
|
||||||
|
|
||||||
extern wxVariant WXDLLIMPEXP_BASE wxNullVariant;
|
extern wxVariant WXDLLIMPEXP_BASE wxNullVariant;
|
||||||
|
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
/**
|
/**
|
||||||
* Name: wx/version.h
|
* Name: wx/version.h
|
||||||
* Purpose: wxWidgets version numbers
|
* Purpose: wxWidgets version numbers
|
||||||
* Author: Julian Smart
|
* Author: Julian Smart
|
||||||
* Modified by: Ryan Norton (Converted to C)
|
* Modified by: Ryan Norton (Converted to C)
|
||||||
* Created: 29/01/98
|
* Created: 29/01/98
|
||||||
* RCS-ID: $Id$
|
* RCS-ID: $Id$
|
||||||
* Copyright: (c) 1998 Julian Smart
|
* Copyright: (c) 1998 Julian Smart
|
||||||
* Licence: wxWindows licence
|
* Licence: wxWindows licence
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
|
/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
|
||||||
|
@@ -192,7 +192,7 @@ public:
|
|||||||
virtual void ApplyParentThemeBackground(const wxColour& WXUNUSED(bg))
|
virtual void ApplyParentThemeBackground(const wxColour& WXUNUSED(bg))
|
||||||
{ /* do nothing */ }
|
{ /* do nothing */ }
|
||||||
|
|
||||||
|
|
||||||
virtual wxVisualAttributes GetDefaultAttributes() const
|
virtual wxVisualAttributes GetDefaultAttributes() const
|
||||||
{
|
{
|
||||||
return GetClassDefaultAttributes(GetWindowVariant());
|
return GetClassDefaultAttributes(GetWindowVariant());
|
||||||
@@ -200,7 +200,7 @@ public:
|
|||||||
|
|
||||||
static wxVisualAttributes
|
static wxVisualAttributes
|
||||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// the derived class must implement this function to actually draw the item
|
// the derived class must implement this function to actually draw the item
|
||||||
// with the given index on the provided DC
|
// with the given index on the provided DC
|
||||||
|
@@ -748,10 +748,10 @@
|
|||||||
#define _XEatData _XEATDATA
|
#define _XEatData _XEATDATA
|
||||||
#define _XFlush _XFLUSH
|
#define _XFlush _XFLUSH
|
||||||
#define _XFreeTemp _XFREETEMP
|
#define _XFreeTemp _XFREETEMP
|
||||||
#define _XGetAsyncReply _XGETASYNCREPLY
|
#define _XGetAsyncReply _XGETASYNCREPLY
|
||||||
#define _XInitImageFuncPtrs _XINITIMAGEFUNCPTRS
|
#define _XInitImageFuncPtrs _XINITIMAGEFUNCPTRS
|
||||||
#define _XRead _XREAD
|
#define _XRead _XREAD
|
||||||
#define _XRegisterFilterByType _XREGISTERFILTERBYTYPE
|
#define _XRegisterFilterByType _XREGISTERFILTERBYTYPE
|
||||||
#define _XReply _XREPLY
|
#define _XReply _XREPLY
|
||||||
#define _XSend _XSEND
|
#define _XSend _XSEND
|
||||||
#define _XUnregisterFilter _XUNREGISTERFILTER
|
#define _XUnregisterFilter _XUNREGISTERFILTER
|
||||||
@@ -1077,10 +1077,10 @@
|
|||||||
|
|
||||||
#define SetReqLen(req,n,badlen) \
|
#define SetReqLen(req,n,badlen) \
|
||||||
if ((req->length + n) > (unsigned)65535) { \
|
if ((req->length + n) > (unsigned)65535) { \
|
||||||
n = badlen; \
|
n = badlen; \
|
||||||
req->length += n; \
|
req->length += n; \
|
||||||
} else \
|
} else \
|
||||||
req->length += n
|
req->length += n
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 2004/02/01
|
// Created: 2004/02/01
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 2004, Vaclav Slavik
|
// Copyright: (c) 2004, Vaclav Slavik
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_WAVE_H_BASE_
|
#ifndef _WX_WAVE_H_BASE_
|
||||||
|
@@ -1202,7 +1202,7 @@ protected:
|
|||||||
void SetBestSize(const wxSize& size) { SetBestFittingSize(size); }
|
void SetBestSize(const wxSize& size) { SetBestFittingSize(size); }
|
||||||
|
|
||||||
// set the initial window size if none is given (i.e. at least one of the
|
// set the initial window size if none is given (i.e. at least one of the
|
||||||
// components of the size passed to ctor/Create() is -1)
|
// components of the size passed to ctor/Create() is wxDefaultCoord)
|
||||||
//
|
//
|
||||||
// normally just calls SetBestSize() for controls, but can be overridden
|
// normally just calls SetBestSize() for controls, but can be overridden
|
||||||
// not to do it for the controls which have to do some additional
|
// not to do it for the controls which have to do some additional
|
||||||
|
@@ -180,7 +180,7 @@ public:
|
|||||||
function taking the following arguments:
|
function taking the following arguments:
|
||||||
|
|
||||||
wxWizard(wxWindow *parent,
|
wxWizard(wxWindow *parent,
|
||||||
int id = -1,
|
int id = wxID_ANY,
|
||||||
const wxString& title = wxEmptyString,
|
const wxString& title = wxEmptyString,
|
||||||
const wxBitmap& bitmap = wxNullBitmap,
|
const wxBitmap& bitmap = wxNullBitmap,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
@@ -188,8 +188,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
wxWizardBase() { }
|
wxWizardBase() { }
|
||||||
|
|
||||||
// executes the wizard starting from the given page, returns TRUE if it was
|
// executes the wizard starting from the given page, returns true if it was
|
||||||
// successfully finished, FALSE if user cancelled it
|
// successfully finished, false if user cancelled it
|
||||||
virtual bool RunWizard(wxWizardPage *firstPage) = 0;
|
virtual bool RunWizard(wxWizardPage *firstPage) = 0;
|
||||||
|
|
||||||
// get the current page (NULL if RunWizard() isn't running)
|
// get the current page (NULL if RunWizard() isn't running)
|
||||||
@@ -214,15 +214,15 @@ public:
|
|||||||
|
|
||||||
// Adding pages to page area sizer enlarges wizard
|
// Adding pages to page area sizer enlarges wizard
|
||||||
virtual wxSizer *GetPageAreaSizer() const = 0;
|
virtual wxSizer *GetPageAreaSizer() const = 0;
|
||||||
|
|
||||||
// Set border around page area. Default is 0 if you add at least one
|
// Set border around page area. Default is 0 if you add at least one
|
||||||
// page to GetPageAreaSizer and 5 if you don't.
|
// page to GetPageAreaSizer and 5 if you don't.
|
||||||
virtual void SetBorder(int border) = 0;
|
virtual void SetBorder(int border) = 0;
|
||||||
|
|
||||||
// wxWizard should be created using "new wxWizard" now, not with Create()
|
// wxWizard should be created using "new wxWizard" now, not with Create()
|
||||||
#if WXWIN_COMPATIBILITY_2_2
|
#if WXWIN_COMPATIBILITY_2_2
|
||||||
static wxWizard *Create(wxWindow *parent,
|
static wxWizard *Create(wxWindow *parent,
|
||||||
int id = -1,
|
int id = wxID_ANY,
|
||||||
const wxString& title = wxEmptyString,
|
const wxString& title = wxEmptyString,
|
||||||
const wxBitmap& bitmap = wxNullBitmap,
|
const wxBitmap& bitmap = wxNullBitmap,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
@@ -239,7 +239,7 @@ public:
|
|||||||
{ return page->GetPrev() != NULL; }
|
{ return page->GetPrev() != NULL; }
|
||||||
|
|
||||||
/// Override these functions to stop InitDialog from calling TransferDataToWindow
|
/// Override these functions to stop InitDialog from calling TransferDataToWindow
|
||||||
/// for _all_ pages when the wizard starts. Instead 'ShowPage' will call
|
/// for _all_ pages when the wizard starts. Instead 'ShowPage' will call
|
||||||
/// TransferDataToWindow for the first page only.
|
/// TransferDataToWindow for the first page only.
|
||||||
bool TransferDataToWindow() { return true; }
|
bool TransferDataToWindow() { return true; }
|
||||||
bool TransferDataFromWindow() { return true; }
|
bool TransferDataFromWindow() { return true; }
|
||||||
@@ -262,13 +262,13 @@ class WXDLLIMPEXP_ADV wxWizardEvent : public wxNotifyEvent
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxWizardEvent(wxEventType type = wxEVT_NULL,
|
wxWizardEvent(wxEventType type = wxEVT_NULL,
|
||||||
int id = -1,
|
int id = wxID_ANY,
|
||||||
bool direction = TRUE,
|
bool direction = true,
|
||||||
wxWizardPage* page = NULL);
|
wxWizardPage* page = NULL);
|
||||||
|
|
||||||
// for EVT_WIZARD_PAGE_CHANGING, return TRUE if we're going forward or
|
// for EVT_WIZARD_PAGE_CHANGING, return true if we're going forward or
|
||||||
// FALSE otherwise and for EVT_WIZARD_PAGE_CHANGED return TRUE if we came
|
// false otherwise and for EVT_WIZARD_PAGE_CHANGED return true if we came
|
||||||
// from the previous page and FALSE if we returned from the next one
|
// from the previous page and false if we returned from the next one
|
||||||
// (this function doesn't make sense for CANCEL events)
|
// (this function doesn't make sense for CANCEL events)
|
||||||
bool GetDirection() const { return m_direction; }
|
bool GetDirection() const { return m_direction; }
|
||||||
|
|
||||||
@@ -297,21 +297,21 @@ END_DECLARE_EVENT_TYPES()
|
|||||||
typedef void (wxEvtHandler::*wxWizardEventFunction)(wxWizardEvent&);
|
typedef void (wxEvtHandler::*wxWizardEventFunction)(wxWizardEvent&);
|
||||||
|
|
||||||
// notifies that the page has just been changed (can't be vetoed)
|
// notifies that the page has just been changed (can't be vetoed)
|
||||||
#define EVT_WIZARD_PAGE_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_WIZARD_PAGE_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxWizardEventFunction, & fn ), (wxObject *)NULL),
|
#define EVT_WIZARD_PAGE_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_WIZARD_PAGE_CHANGED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxWizardEventFunction, & fn ), (wxObject *)NULL),
|
||||||
|
|
||||||
// the user pressed "<Back" or "Next>" button and the page is going to be
|
// the user pressed "<Back" or "Next>" button and the page is going to be
|
||||||
// changed - unless the event handler vetoes the event
|
// changed - unless the event handler vetoes the event
|
||||||
#define EVT_WIZARD_PAGE_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_WIZARD_PAGE_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxWizardEventFunction, & fn ), (wxObject *)NULL),
|
#define EVT_WIZARD_PAGE_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_WIZARD_PAGE_CHANGING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxWizardEventFunction, & fn ), (wxObject *)NULL),
|
||||||
|
|
||||||
// the user pressed "Cancel" button and the wizard is going to be dismissed -
|
// the user pressed "Cancel" button and the wizard is going to be dismissed -
|
||||||
// unless the event handler vetoes the event
|
// unless the event handler vetoes the event
|
||||||
#define EVT_WIZARD_CANCEL(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_WIZARD_CANCEL, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxWizardEventFunction, & fn ), (wxObject *)NULL),
|
#define EVT_WIZARD_CANCEL(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_WIZARD_CANCEL, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxWizardEventFunction, & fn ), (wxObject *)NULL),
|
||||||
|
|
||||||
// the user pressed "Finish" button and the wizard is going to be dismissed -
|
// the user pressed "Finish" button and the wizard is going to be dismissed -
|
||||||
#define EVT_WIZARD_FINISHED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_WIZARD_FINISHED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxWizardEventFunction, & fn ), (wxObject *)NULL),
|
#define EVT_WIZARD_FINISHED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_WIZARD_FINISHED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxWizardEventFunction, & fn ), (wxObject *)NULL),
|
||||||
|
|
||||||
// the user pressed "Help" button
|
// the user pressed "Help" button
|
||||||
#define EVT_WIZARD_HELP(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_WIZARD_HELP, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxWizardEventFunction, & fn ), (wxObject *)NULL),
|
#define EVT_WIZARD_HELP(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_WIZARD_HELP, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxWizardEventFunction, & fn ), (wxObject *)NULL),
|
||||||
|
|
||||||
#endif // wxUSE_WIZARDDLG
|
#endif // wxUSE_WIZARDDLG
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 12/10/98
|
// Created: 12/10/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Stefan Csomor
|
// Copyright: (c) Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_CW__
|
#ifndef _WX_CW__
|
||||||
@@ -18,47 +18,47 @@
|
|||||||
|
|
||||||
#if __option(profile)
|
#if __option(profile)
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wx_PPC++_prof.mch>
|
#include <wx_PPC++_prof.mch>
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#include <wx_x86++_prof.mch>
|
#include <wx_x86++_prof.mch>
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#include <wx_cfm++_prof.mch>
|
#include <wx_cfm++_prof.mch>
|
||||||
#else
|
#else
|
||||||
#include <wx_68k++_prof.mch>
|
#include <wx_68k++_prof.mch>
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wx_PPC_prof.mch>
|
#include <wx_PPC_prof.mch>
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#include <wx_x86_prof.mch>
|
#include <wx_x86_prof.mch>
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#include <wx_cfm_prof.mch>
|
#include <wx_cfm_prof.mch>
|
||||||
#else
|
#else
|
||||||
#include <wx_68k_prof.mch>
|
#include <wx_68k_prof.mch>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wx_PPC++.mch>
|
#include <wx_PPC++.mch>
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#include <wx_x86++.mch>
|
#include <wx_x86++.mch>
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#include <wx_cfm++.mch>
|
#include <wx_cfm++.mch>
|
||||||
#else
|
#else
|
||||||
#include <wx_68k++.mch>
|
#include <wx_68k++.mch>
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wx_PPC.mch>
|
#include <wx_PPC.mch>
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#include <wx_x86.mch>
|
#include <wx_x86.mch>
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#include <wx_cfm.mch>
|
#include <wx_cfm.mch>
|
||||||
#else
|
#else
|
||||||
#include <wx_68k.mch>
|
#include <wx_68k.mch>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
#define MSL_USE_PRECOMPILED_HEADERS 0
|
#define MSL_USE_PRECOMPILED_HEADERS 0
|
||||||
#if __WXDEBUG__
|
#if __WXDEBUG__
|
||||||
// mac os assert levels
|
// mac os assert levels
|
||||||
#define DEBUG 1
|
#define DEBUG 1
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#if !defined( __MWERKS__ )
|
#if !defined( __MWERKS__ )
|
||||||
#error "this file is only for builds with Metrowerks CodeWarrior"
|
#error "this file is only for builds with Metrowerks CodeWarrior"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define WX_COMP_INLINE_NO_CLASS // defined if the compiler does not want the classname repeated for inlines within a class definition
|
#define WX_COMP_INLINE_NO_CLASS // defined if the compiler does not want the classname repeated for inlines within a class definition
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
#elif __BEOS__
|
#elif __BEOS__
|
||||||
#include <ansi_prefix.be.h>
|
#include <ansi_prefix.be.h>
|
||||||
#include <Be.h>
|
#include <Be.h>
|
||||||
#else
|
#else
|
||||||
#error unknown MW compiler
|
#error unknown MW compiler
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -38,32 +38,32 @@
|
|||||||
#include <ansi_parms.h>
|
#include <ansi_parms.h>
|
||||||
#ifdef __MWERKS__
|
#ifdef __MWERKS__
|
||||||
#if defined( __MSL__ ) && __MSL__ >= 0x5012 && __MSL__ < 0x7000
|
#if defined( __MSL__ ) && __MSL__ >= 0x5012 && __MSL__ < 0x7000
|
||||||
#define fileno _fileno
|
#define fileno _fileno
|
||||||
#define fdopen _fdopen
|
#define fdopen _fdopen
|
||||||
#define tell _tell
|
#define tell _tell
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#elif defined( __WXMAC__)
|
#elif defined( __WXMAC__)
|
||||||
#define USE_PRECOMPILED_MAC_HEADERS 0 /*Set to 0 if you don't want to use precompiled MacHeaders*/
|
#define USE_PRECOMPILED_MAC_HEADERS 0 /*Set to 0 if you don't want to use precompiled MacHeaders*/
|
||||||
#define ACCESSOR_CALLS_ARE_FUNCTIONS 1
|
#define ACCESSOR_CALLS_ARE_FUNCTIONS 1
|
||||||
#define OPAQUE_TOOLBOX_STRUCTS 1
|
#define OPAQUE_TOOLBOX_STRUCTS 1
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
#include <ansi_prefix.mach.h>
|
#include <ansi_prefix.mach.h>
|
||||||
#include <msl_c_version.h>
|
#include <msl_c_version.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#undef WCHAR_MAX
|
#undef WCHAR_MAX
|
||||||
#include <machine/ansi.h>
|
#include <machine/ansi.h>
|
||||||
#else
|
#else
|
||||||
#include <ansi_prefix.mac.h>
|
#include <ansi_prefix.mac.h>
|
||||||
#endif
|
#endif
|
||||||
// for getting the correct expat includes
|
// for getting the correct expat includes
|
||||||
#define MACOS_CLASSIC
|
#define MACOS_CLASSIC
|
||||||
/*
|
/*
|
||||||
#include <MacTypes.h>
|
#include <MacTypes.h>
|
||||||
#if UNIVERSAL_INTERFACES_VERSION < 0x0340
|
#if UNIVERSAL_INTERFACES_VERSION < 0x0340
|
||||||
#error "please update to Apple's lastest universal headers from http://developer.apple.com/sdk/"
|
#error "please update to Apple's lastest universal headers from http://developer.apple.com/sdk/"
|
||||||
#endif
|
#endif
|
||||||
*/
|
*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define USE_DEFINE
|
#define USE_DEFINE
|
||||||
@@ -72,11 +72,11 @@
|
|||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
char *strdup(const char *s) ;
|
char *strdup(const char *s) ;
|
||||||
int isascii( int c ) ;
|
int isascii( int c ) ;
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 12/10/98
|
// Created: 12/10/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Stefan Csomor
|
// Copyright: (c) Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_CW__
|
#ifndef _WX_CW__
|
||||||
@@ -20,25 +20,25 @@
|
|||||||
#error "profiling is not supported in debug versions"
|
#error "profiling is not supported in debug versions"
|
||||||
#else
|
#else
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wx_PPC++_d.mch>
|
#include <wx_PPC++_d.mch>
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#include <wx_x86++_d.mch>
|
#include <wx_x86++_d.mch>
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#include <wx_cfm++_d.mch>
|
#include <wx_cfm++_d.mch>
|
||||||
#else
|
#else
|
||||||
#include <wx_68k++_d.mch>
|
#include <wx_68k++_d.mch>
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wx_PPC_d.mch>
|
#include <wx_PPC_d.mch>
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#include <wx_x86_d.mch>
|
#include <wx_x86_d.mch>
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#include <wx_cfm_d.mch>
|
#include <wx_cfm_d.mch>
|
||||||
#else
|
#else
|
||||||
#include <wx_68k_d.mch>
|
#include <wx_68k_d.mch>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 12/10/98
|
// Created: 12/10/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Stefan Csomor
|
// Copyright: (c) Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_CW__
|
#ifndef _WX_CW__
|
||||||
@@ -18,31 +18,31 @@
|
|||||||
|
|
||||||
#if __option(profile)
|
#if __option(profile)
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
#include <wx_Mach++_prof.mch>
|
#include <wx_Mach++_prof.mch>
|
||||||
#elif __POWERPC__
|
#elif __POWERPC__
|
||||||
#include <wx_Carbon++_prof.mch>
|
#include <wx_Carbon++_prof.mch>
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
#include <wx_Mach_prof.mch>
|
#include <wx_Mach_prof.mch>
|
||||||
#elif __POWERPC__
|
#elif __POWERPC__
|
||||||
#include <wx_Carbon_prof.mch>
|
#include <wx_Carbon_prof.mch>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
#include <wx_Mach++.mch>
|
#include <wx_Mach++.mch>
|
||||||
#elif __POWERPC__
|
#elif __POWERPC__
|
||||||
#include <wx_Carbon++.mch>
|
#include <wx_Carbon++.mch>
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
#include <wx_Mach.mch>
|
#include <wx_Mach.mch>
|
||||||
#elif __POWERPC__
|
#elif __POWERPC__
|
||||||
#include <wx_Carbon.mch>
|
#include <wx_Carbon.mch>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 12/10/98
|
// Created: 12/10/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Stefan Csomor
|
// Copyright: (c) Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_CW__
|
#ifndef _WX_CW__
|
||||||
@@ -20,17 +20,17 @@
|
|||||||
#error "profiling is not supported in debug versions"
|
#error "profiling is not supported in debug versions"
|
||||||
#else
|
#else
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
#include "wx_Mach++_d.mch"
|
#include "wx_Mach++_d.mch"
|
||||||
#elif __POWERPC__
|
#elif __POWERPC__
|
||||||
#include "wx_Carbon++_d.mch"
|
#include "wx_Carbon++_d.mch"
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
#include "wx_Mach_d.mch"
|
#include "wx_Mach_d.mch"
|
||||||
#elif __POWERPC__
|
#elif __POWERPC__
|
||||||
#include "wx_Carbon_d.mch"
|
#include "wx_Carbon_d.mch"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 12/10/98
|
// Created: 12/10/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Stefan Csomor
|
// Copyright: (c) Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_CW__
|
#ifndef _WX_CW__
|
||||||
@@ -20,25 +20,25 @@
|
|||||||
#error "profiling is not supported in debug versions"
|
#error "profiling is not supported in debug versions"
|
||||||
#else
|
#else
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wx_PPCu++_d.mch>
|
#include <wx_PPCu++_d.mch>
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#include <wx_x86u++_d.mch>
|
#include <wx_x86u++_d.mch>
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#include <wx_cfmu++_d.mch>
|
#include <wx_cfmu++_d.mch>
|
||||||
#else
|
#else
|
||||||
#include <wx_68ku++_d.mch>
|
#include <wx_68ku++_d.mch>
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wx_PPCu_d.mch>
|
#include <wx_PPCu_d.mch>
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#include <wx_x86u_d.mch>
|
#include <wx_x86u_d.mch>
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#include <wx_cfmu_d.mch>
|
#include <wx_cfmu_d.mch>
|
||||||
#else
|
#else
|
||||||
#include <wx_68ku_d.mch>
|
#include <wx_68ku_d.mch>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -74,9 +74,9 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#if defined(__MWERKS__) && !defined(__MACH__)
|
#if defined(__MWERKS__) && !defined(__MACH__)
|
||||||
#ifndef HAVE_WCSLEN
|
#ifndef HAVE_WCSLEN
|
||||||
#define HAVE_WCSLEN
|
#define HAVE_WCSLEN
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_WCHAR_T
|
#if wxUSE_WCHAR_T
|
||||||
@@ -441,7 +441,7 @@
|
|||||||
#else
|
#else
|
||||||
#define wxPutchar(wch) wxPutc(wch, stdout)
|
#define wxPutchar(wch) wxPutc(wch, stdout)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_PUTWS
|
#ifdef HAVE_PUTWS
|
||||||
#define wxPuts putws
|
#define wxPuts putws
|
||||||
#else
|
#else
|
||||||
@@ -656,10 +656,10 @@
|
|||||||
#ifdef HAVE_WCSLEN
|
#ifdef HAVE_WCSLEN
|
||||||
#define wxWcslen wcslen
|
#define wxWcslen wcslen
|
||||||
#else
|
#else
|
||||||
#if defined( __WXMAC_XCODE__ ) && !defined( __cplusplus )
|
#if defined( __WXMAC_XCODE__ ) && !defined( __cplusplus )
|
||||||
/* xcode native targets are giving multiply defined symbols on regex */
|
/* xcode native targets are giving multiply defined symbols on regex */
|
||||||
static
|
static
|
||||||
#endif
|
#endif
|
||||||
inline size_t wxWcslen(const wchar_t *s)
|
inline size_t wxWcslen(const wchar_t *s)
|
||||||
{
|
{
|
||||||
size_t n = 0;
|
size_t n = 0;
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 12/10/98
|
// Created: 12/10/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Stefan Csomor
|
// Copyright: (c) Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_CW__
|
#ifndef _WX_CW__
|
||||||
@@ -18,47 +18,47 @@
|
|||||||
|
|
||||||
#if __option(profile)
|
#if __option(profile)
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wxshlb_PPC++_prof.mch>
|
#include <wxshlb_PPC++_prof.mch>
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#include <wxshlb_x86++_prof.mch>
|
#include <wxshlb_x86++_prof.mch>
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#include <wxshlb_cfm++_prof.mch>
|
#include <wxshlb_cfm++_prof.mch>
|
||||||
#else
|
#else
|
||||||
#include <wxshlb_68k++_prof.mch>
|
#include <wxshlb_68k++_prof.mch>
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wxshlb_PPC_prof.mch>
|
#include <wxshlb_PPC_prof.mch>
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#include <wxshlb_x86_prof.mch>
|
#include <wxshlb_x86_prof.mch>
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#include <wxshlb_cfm_prof.mch>
|
#include <wxshlb_cfm_prof.mch>
|
||||||
#else
|
#else
|
||||||
#include <wxshlb_68k_prof.mch>
|
#include <wxshlb_68k_prof.mch>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wxshlb_PPC++.mch>
|
#include <wxshlb_PPC++.mch>
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#include <wxshlb_x86++.mch>
|
#include <wxshlb_x86++.mch>
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#include <wxshlb_cfm++.mch>
|
#include <wxshlb_cfm++.mch>
|
||||||
#else
|
#else
|
||||||
#include <wxshlb_68k++.mch>
|
#include <wxshlb_68k++.mch>
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wxshlb_PPC.mch>
|
#include <wxshlb_PPC.mch>
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#include <wxshlb_x86.mch>
|
#include <wxshlb_x86.mch>
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#include <wxshlb_cfm.mch>
|
#include <wxshlb_cfm.mch>
|
||||||
#else
|
#else
|
||||||
#include <wxshlb_68k.mch>
|
#include <wxshlb_68k.mch>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 12/10/98
|
// Created: 12/10/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Stefan Csomor
|
// Copyright: (c) Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_CW__
|
#ifndef _WX_CW__
|
||||||
@@ -20,25 +20,25 @@
|
|||||||
#error "profiling is not supported in debug versions"
|
#error "profiling is not supported in debug versions"
|
||||||
#else
|
#else
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wxshlb_PPC++_d.mch>
|
#include <wxshlb_PPC++_d.mch>
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#include <wxshlb_x86++_d.mch>
|
#include <wxshlb_x86++_d.mch>
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#include <wxshlb_cfm++_d.mch>
|
#include <wxshlb_cfm++_d.mch>
|
||||||
#else
|
#else
|
||||||
#include <wxshlb_68k++_d.mch>
|
#include <wxshlb_68k++_d.mch>
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wxshlb_PPC_d.mch>
|
#include <wxshlb_PPC_d.mch>
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#include <wxshlb_x86_d.mch>
|
#include <wxshlb_x86_d.mch>
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#include <wxshlb_cfm_d.mch>
|
#include <wxshlb_cfm_d.mch>
|
||||||
#else
|
#else
|
||||||
#include <wxshlb_68k_d.mch>
|
#include <wxshlb_68k_d.mch>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 12/10/98
|
// Created: 12/10/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Stefan Csomor
|
// Copyright: (c) Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_CW__
|
#ifndef _WX_CW__
|
||||||
@@ -18,27 +18,27 @@
|
|||||||
|
|
||||||
#if __option(profile)
|
#if __option(profile)
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wxshlb_Carbon++_prof.mch>
|
#include <wxshlb_Carbon++_prof.mch>
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wxshlb_Carbon_prof.mch>
|
#include <wxshlb_Carbon_prof.mch>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wxshlb_Carbon++.mch>
|
#include <wxshlb_Carbon++.mch>
|
||||||
#elif __MACH__
|
#elif __MACH__
|
||||||
#include <wxshlb_Mach++.mch>
|
#include <wxshlb_Mach++.mch>
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wxshlb_Carbon.mch>
|
#include <wxshlb_Carbon.mch>
|
||||||
#elif __MACH__
|
#elif __MACH__
|
||||||
#include <wxshlb_Mach.mch>
|
#include <wxshlb_Mach.mch>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 12/10/98
|
// Created: 12/10/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Stefan Csomor
|
// Copyright: (c) Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_CW__
|
#ifndef _WX_CW__
|
||||||
@@ -20,17 +20,17 @@
|
|||||||
#error "profiling is not supported in debug versions"
|
#error "profiling is not supported in debug versions"
|
||||||
#else
|
#else
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
#include <wxshlb_Mach++_d.mch>
|
#include <wxshlb_Mach++_d.mch>
|
||||||
#elif __POWERPC__
|
#elif __POWERPC__
|
||||||
#include <wxshlb_Carbon++_d.mch>
|
#include <wxshlb_Carbon++_d.mch>
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
#include <wxshlb_Mach_d.mch>
|
#include <wxshlb_Mach_d.mch>
|
||||||
#elif __POWERPC__
|
#elif __POWERPC__
|
||||||
#include <wxshlb_Carbon_d.mch>
|
#include <wxshlb_Carbon_d.mch>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 12/10/98
|
// Created: 12/10/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Stefan Csomor
|
// Copyright: (c) Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_CW__
|
#ifndef _WX_CW__
|
||||||
@@ -18,47 +18,47 @@
|
|||||||
|
|
||||||
#if __option(profile)
|
#if __option(profile)
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wxshlba_PPC++_prof.mch>
|
#include <wxshlba_PPC++_prof.mch>
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#include <wxshlba_x86++_prof.mch>
|
#include <wxshlba_x86++_prof.mch>
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#include <wxshlba_cfm++_prof.mch>
|
#include <wxshlba_cfm++_prof.mch>
|
||||||
#else
|
#else
|
||||||
#include <wxshlba_68k++_prof.mch>
|
#include <wxshlba_68k++_prof.mch>
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wxshlba_PPC_prof.mch>
|
#include <wxshlba_PPC_prof.mch>
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#include <wxshlba_x86_prof.mch>
|
#include <wxshlba_x86_prof.mch>
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#include <wxshlba_cfm_prof.mch>
|
#include <wxshlba_cfm_prof.mch>
|
||||||
#else
|
#else
|
||||||
#include <wxshlba_68k_prof.mch>
|
#include <wxshlba_68k_prof.mch>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wxshlba_PPC++.mch>
|
#include <wxshlba_PPC++.mch>
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#include <wxshlba_x86++.mch>
|
#include <wxshlba_x86++.mch>
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#include <wxshlba_cfm++.mch>
|
#include <wxshlba_cfm++.mch>
|
||||||
#else
|
#else
|
||||||
#include <wxshlba_68k++.mch>
|
#include <wxshlba_68k++.mch>
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wxshlba_PPC.mch>
|
#include <wxshlba_PPC.mch>
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#include <wxshlba_x86.mch>
|
#include <wxshlba_x86.mch>
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#include <wxshlba_cfm.mch>
|
#include <wxshlba_cfm.mch>
|
||||||
#else
|
#else
|
||||||
#include <wxshlba_68k.mch>
|
#include <wxshlba_68k.mch>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 12/10/98
|
// Created: 12/10/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Stefan Csomor
|
// Copyright: (c) Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_CW__
|
#ifndef _WX_CW__
|
||||||
@@ -20,25 +20,25 @@
|
|||||||
#error "profiling is not supported in debug versions"
|
#error "profiling is not supported in debug versions"
|
||||||
#else
|
#else
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wxshlba_PPC++_d.mch>
|
#include <wxshlba_PPC++_d.mch>
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#include <wxshlba_x86++_d.mch>
|
#include <wxshlba_x86++_d.mch>
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#include <wxshlba_cfm++_d.mch>
|
#include <wxshlba_cfm++_d.mch>
|
||||||
#else
|
#else
|
||||||
#include <wxshlba_68k++_d.mch>
|
#include <wxshlba_68k++_d.mch>
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wxshlba_PPC_d.mch>
|
#include <wxshlba_PPC_d.mch>
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#include <wxshlba_x86_d.mch>
|
#include <wxshlba_x86_d.mch>
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#include <wxshlba_cfm_d.mch>
|
#include <wxshlba_cfm_d.mch>
|
||||||
#else
|
#else
|
||||||
#include <wxshlba_68k_d.mch>
|
#include <wxshlba_68k_d.mch>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 12/10/98
|
// Created: 12/10/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Stefan Csomor
|
// Copyright: (c) Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_CW__
|
#ifndef _WX_CW__
|
||||||
@@ -18,27 +18,27 @@
|
|||||||
|
|
||||||
#if __option(profile)
|
#if __option(profile)
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wxshlba_Carbon++_prof.mch>
|
#include <wxshlba_Carbon++_prof.mch>
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#include <wxshlba_Carbon_prof.mch>
|
#include <wxshlba_Carbon_prof.mch>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
#include <wxshlba_Mach++.mch>
|
#include <wxshlba_Mach++.mch>
|
||||||
#elif __POWERPC__
|
#elif __POWERPC__
|
||||||
#include <wxshlba_Carbon++.mch>
|
#include <wxshlba_Carbon++.mch>
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
#include <wxshlba_Mach.mch>
|
#include <wxshlba_Mach.mch>
|
||||||
#elif __POWERPC__
|
#elif __POWERPC__
|
||||||
#include <wxshlba_Carbon.mch>
|
#include <wxshlba_Carbon.mch>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 12/10/98
|
// Created: 12/10/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Stefan Csomor
|
// Copyright: (c) Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_CW__
|
#ifndef _WX_CW__
|
||||||
@@ -20,17 +20,17 @@
|
|||||||
#error "profiling is not supported in debug versions"
|
#error "profiling is not supported in debug versions"
|
||||||
#else
|
#else
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
#include <wxshlba_Mach++_d.mch>
|
#include <wxshlba_Mach++_d.mch>
|
||||||
#elif __POWERPC__
|
#elif __POWERPC__
|
||||||
#include <wxshlba_Carbon++_d.mch>
|
#include <wxshlba_Carbon++_d.mch>
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
#include <wxshlba_Mach_d.mch>
|
#include <wxshlba_Mach_d.mch>
|
||||||
#elif __POWERPC__
|
#elif __POWERPC__
|
||||||
#include <wxshlba_Carbon_d.mch>
|
#include <wxshlba_Carbon_d.mch>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -94,7 +94,7 @@ class WXDLLIMPEXP_BASE wxEvent;
|
|||||||
typedef void (wxObject::*wxObjectEventFunction)(wxEvent&);
|
typedef void (wxObject::*wxObjectEventFunction)(wxEvent&);
|
||||||
|
|
||||||
#if wxUSE_FUNC_TEMPLATE_POINTER
|
#if wxUSE_FUNC_TEMPLATE_POINTER
|
||||||
# define wxTO_STRING(type) wxToStringConverter<type>
|
# define wxTO_STRING(type) wxToStringConverter<type>
|
||||||
# define wxTO_STRING_IMP(type)
|
# define wxTO_STRING_IMP(type)
|
||||||
# define wxFROM_STRING(type) wxFromStringConverter<type>
|
# define wxFROM_STRING(type) wxFromStringConverter<type>
|
||||||
# define wxFROM_STRING_IMP(type)
|
# define wxFROM_STRING_IMP(type)
|
||||||
@@ -533,8 +533,8 @@ public :
|
|||||||
wxTypeInfo( wxT_COLLECTION , to , from , name )
|
wxTypeInfo( wxT_COLLECTION , to , from , name )
|
||||||
{ m_elementTypeName = wxString::FromAscii( elementName ) ; m_elementType = NULL ;}
|
{ m_elementTypeName = wxString::FromAscii( elementName ) ; m_elementType = NULL ;}
|
||||||
#endif
|
#endif
|
||||||
const wxTypeInfo* GetElementType() const
|
const wxTypeInfo* GetElementType() const
|
||||||
{
|
{
|
||||||
if ( m_elementType == NULL )
|
if ( m_elementType == NULL )
|
||||||
m_elementType = wxTypeInfo::FindType( m_elementTypeName ) ;
|
m_elementType = wxTypeInfo::FindType( m_elementTypeName ) ;
|
||||||
return m_elementType ; }
|
return m_elementType ; }
|
||||||
@@ -707,7 +707,7 @@ template<typename T>
|
|||||||
void wxToStringConverter( const wxxVariant &v, wxString &s wxTEMPLATED_FUNCTION_FIX(T)) { wxStringWriteValue( s , v.wxTEMPLATED_MEMBER_CALL(Get , T) ) ; }
|
void wxToStringConverter( const wxxVariant &v, wxString &s wxTEMPLATED_FUNCTION_FIX(T)) { wxStringWriteValue( s , v.wxTEMPLATED_MEMBER_CALL(Get , T) ) ; }
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void wxFromStringConverter( const wxString &s, wxxVariant &v wxTEMPLATED_FUNCTION_FIX(T)) { T d ; wxStringReadValue( s , d ) ; v = wxxVariant(d) ; }
|
void wxFromStringConverter( const wxString &s, wxxVariant &v wxTEMPLATED_FUNCTION_FIX(T)) { T d ; wxStringReadValue( s , d ) ; v = wxxVariant(d) ; }
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Property Support
|
// Property Support
|
||||||
@@ -1042,13 +1042,13 @@ public :
|
|||||||
~wxPropertyInfo() ;
|
~wxPropertyInfo() ;
|
||||||
|
|
||||||
// return the class this property is declared in
|
// return the class this property is declared in
|
||||||
const wxClassInfo* GetDeclaringClass() const { return m_itsClass ; }
|
const wxClassInfo* GetDeclaringClass() const { return m_itsClass ; }
|
||||||
|
|
||||||
// return the name of this property
|
// return the name of this property
|
||||||
const wxString& GetName() const { return m_name ; }
|
const wxString& GetName() const { return m_name ; }
|
||||||
|
|
||||||
// returns the flags of this property
|
// returns the flags of this property
|
||||||
wxPropertyInfoFlags GetFlags() const { return m_flags ;}
|
wxPropertyInfoFlags GetFlags() const { return m_flags ;}
|
||||||
|
|
||||||
// returns the short help string of this property
|
// returns the short help string of this property
|
||||||
const wxString& GetHelpString() const { return m_helpString ; }
|
const wxString& GetHelpString() const { return m_helpString ; }
|
||||||
@@ -1057,7 +1057,7 @@ public :
|
|||||||
const wxString& GetGroupString() const { return m_groupString ; }
|
const wxString& GetGroupString() const { return m_groupString ; }
|
||||||
|
|
||||||
// return the element type info of this property (for collections, otherwise NULL)
|
// return the element type info of this property (for collections, otherwise NULL)
|
||||||
const wxTypeInfo * GetCollectionElementTypeInfo() const
|
const wxTypeInfo * GetCollectionElementTypeInfo() const
|
||||||
{
|
{
|
||||||
if ( m_collectionElementTypeInfo == NULL )
|
if ( m_collectionElementTypeInfo == NULL )
|
||||||
m_collectionElementTypeInfo = wxTypeInfo::FindType(m_collectionElementTypeName) ;
|
m_collectionElementTypeInfo = wxTypeInfo::FindType(m_collectionElementTypeName) ;
|
||||||
@@ -1065,7 +1065,7 @@ public :
|
|||||||
}
|
}
|
||||||
|
|
||||||
// return the type info of this property
|
// return the type info of this property
|
||||||
const wxTypeInfo * GetTypeInfo() const
|
const wxTypeInfo * GetTypeInfo() const
|
||||||
{
|
{
|
||||||
if ( m_typeInfo == NULL )
|
if ( m_typeInfo == NULL )
|
||||||
m_typeInfo = wxTypeInfo::FindType(m_typeName) ;
|
m_typeInfo = wxTypeInfo::FindType(m_typeName) ;
|
||||||
@@ -1079,7 +1079,7 @@ public :
|
|||||||
wxPropertyInfo* GetNext() const { return m_next ; }
|
wxPropertyInfo* GetNext() const { return m_next ; }
|
||||||
|
|
||||||
// returns the default value of this property, its kind may be wxT_VOID if it is not valid
|
// returns the default value of this property, its kind may be wxT_VOID if it is not valid
|
||||||
wxxVariant GetDefaultValue() const { return m_defaultValue ; }
|
wxxVariant GetDefaultValue() const { return m_defaultValue ; }
|
||||||
private :
|
private :
|
||||||
void Insert(wxPropertyInfo* &iter)
|
void Insert(wxPropertyInfo* &iter)
|
||||||
{
|
{
|
||||||
@@ -1103,7 +1103,7 @@ private :
|
|||||||
mutable wxTypeInfo* m_collectionElementTypeInfo ;
|
mutable wxTypeInfo* m_collectionElementTypeInfo ;
|
||||||
wxString m_collectionElementTypeName ;
|
wxString m_collectionElementTypeName ;
|
||||||
wxPropertyAccessor* m_accessor ;
|
wxPropertyAccessor* m_accessor ;
|
||||||
wxxVariant m_defaultValue;
|
wxxVariant m_defaultValue;
|
||||||
wxPropertyInfoFlags m_flags ;
|
wxPropertyInfoFlags m_flags ;
|
||||||
wxString m_helpString ;
|
wxString m_helpString ;
|
||||||
wxString m_groupString ;
|
wxString m_groupString ;
|
||||||
@@ -1225,13 +1225,13 @@ public :
|
|||||||
~wxHandlerInfo() ;
|
~wxHandlerInfo() ;
|
||||||
|
|
||||||
// return the name of this handler
|
// return the name of this handler
|
||||||
const wxString& GetName() const { return m_name ; }
|
const wxString& GetName() const { return m_name ; }
|
||||||
|
|
||||||
// return the class info of the event
|
// return the class info of the event
|
||||||
const wxClassInfo * GetEventClassInfo() const { return m_eventClassInfo ; }
|
const wxClassInfo *GetEventClassInfo() const { return m_eventClassInfo ; }
|
||||||
|
|
||||||
// get the handler function pointer
|
// get the handler function pointer
|
||||||
wxObjectEventFunction GetEventFunction() const { return m_eventFunction ; }
|
wxObjectEventFunction GetEventFunction() const { return m_eventFunction ; }
|
||||||
|
|
||||||
// returns NULL if this is the last handler of this class
|
// returns NULL if this is the last handler of this class
|
||||||
wxHandlerInfo* GetNext() const { return m_next ; }
|
wxHandlerInfo* GetNext() const { return m_next ; }
|
||||||
@@ -1739,10 +1739,11 @@ public:
|
|||||||
|
|
||||||
// we must be able to cast variants to wxObject pointers, templates seem not to be suitable
|
// we must be able to cast variants to wxObject pointers, templates seem not to be suitable
|
||||||
wxObject* VariantToInstance( wxxVariant &data ) const
|
wxObject* VariantToInstance( wxxVariant &data ) const
|
||||||
{ if ( data.GetTypeInfo()->GetKind() == wxT_OBJECT )
|
{
|
||||||
return m_variantToObjectConverter( data ) ;
|
if ( data.GetTypeInfo()->GetKind() == wxT_OBJECT )
|
||||||
else
|
return m_variantToObjectConverter( data ) ;
|
||||||
return m_variantOfPtrToObjectConverter( data ) ;
|
else
|
||||||
|
return m_variantOfPtrToObjectConverter( data ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxxVariant InstanceToVariant( wxObject *object ) const { return m_objectToVariantConverter( object ) ; }
|
wxxVariant InstanceToVariant( wxObject *object ) const { return m_objectToVariantConverter( object ) ; }
|
||||||
@@ -1778,15 +1779,15 @@ public:
|
|||||||
static wxHashTable *sm_classTable;
|
static wxHashTable *sm_classTable;
|
||||||
|
|
||||||
protected :
|
protected :
|
||||||
wxPropertyInfo * m_firstProperty ;
|
wxPropertyInfo * m_firstProperty ;
|
||||||
wxHandlerInfo * m_firstHandler ;
|
wxHandlerInfo * m_firstHandler ;
|
||||||
private:
|
private:
|
||||||
const wxClassInfo** m_parents ;
|
const wxClassInfo** m_parents ;
|
||||||
const wxChar* m_unitName;
|
const wxChar* m_unitName;
|
||||||
|
|
||||||
wxConstructorBridge* m_constructor ;
|
wxConstructorBridge* m_constructor ;
|
||||||
const wxChar ** m_constructorProperties ;
|
const wxChar ** m_constructorProperties ;
|
||||||
const int m_constructorPropertiesCount ;
|
const int m_constructorPropertiesCount ;
|
||||||
wxVariantToObjectConverter m_variantOfPtrToObjectConverter ;
|
wxVariantToObjectConverter m_variantOfPtrToObjectConverter ;
|
||||||
wxVariantToObjectConverter m_variantToObjectConverter ;
|
wxVariantToObjectConverter m_variantToObjectConverter ;
|
||||||
wxObjectToVariantConverter m_objectToVariantConverter ;
|
wxObjectToVariantConverter m_objectToVariantConverter ;
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
// Name: wx/xtistrm.h
|
// Name: wx/xtistrm.h
|
||||||
// Purpose: streaming runtime metadata information (extended class info)
|
// Purpose: streaming runtime metadata information (extended class info)
|
||||||
// Author: Stefan Csomor
|
// Author: Stefan Csomor
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 27/07/03
|
// Created: 27/07/03
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 2003 Stefan Csomor
|
// Copyright: (c) 2003 Stefan Csomor
|
||||||
@@ -50,28 +50,28 @@ class WXDLLIMPEXP_BASE wxPersister
|
|||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
// will be called before an object is written, may veto by returning false
|
// will be called before an object is written, may veto by returning false
|
||||||
virtual bool BeforeWriteObject( wxWriter *WXUNUSED(writer) , const wxObject *WXUNUSED(object) , const wxClassInfo *WXUNUSED(classInfo) , wxxVariantArray &WXUNUSED(metadata)) { return true ; }
|
virtual bool BeforeWriteObject( wxWriter *WXUNUSED(writer) , const wxObject *WXUNUSED(object) , const wxClassInfo *WXUNUSED(classInfo) , wxxVariantArray &WXUNUSED(metadata)) { return true ; }
|
||||||
|
|
||||||
// will be called after this object has been written, may be needed for adjusting stacks
|
// will be called after this object has been written, may be needed for adjusting stacks
|
||||||
virtual void AfterWriteObject( wxWriter *WXUNUSED(writer) , const wxObject *WXUNUSED(object) , const wxClassInfo *WXUNUSED(classInfo) ) {}
|
virtual void AfterWriteObject( wxWriter *WXUNUSED(writer) , const wxObject *WXUNUSED(object) , const wxClassInfo *WXUNUSED(classInfo) ) {}
|
||||||
|
|
||||||
// will be called before a property gets written, may change the value , eg replace a concrete wxSize by wxSize( -1 , -1 ) or veto
|
// will be called before a property gets written, may change the value , eg replace a concrete wxSize by wxSize( wxDefaultCoord , wxDefaultCoord ) or veto
|
||||||
// writing that property at all by returning false
|
// writing that property at all by returning false
|
||||||
virtual bool BeforeWriteProperty( wxWriter *WXUNUSED(writer) , const wxObject *WXUNUSED(object), const wxPropertyInfo *WXUNUSED(propInfo) , wxxVariant &WXUNUSED(value) ) { return true ; }
|
virtual bool BeforeWriteProperty( wxWriter *WXUNUSED(writer) , const wxObject *WXUNUSED(object), const wxPropertyInfo *WXUNUSED(propInfo) , wxxVariant &WXUNUSED(value) ) { return true ; }
|
||||||
|
|
||||||
// will be called before a property gets written, may change the value , eg replace a concrete wxSize by wxSize( -1 , -1 ) or veto
|
// will be called before a property gets written, may change the value , eg replace a concrete wxSize by wxSize( wxDefaultCoord , wxDefaultCoord ) or veto
|
||||||
// writing that property at all by returning false
|
// writing that property at all by returning false
|
||||||
virtual bool BeforeWriteProperty( wxWriter *WXUNUSED(writer) , const wxObject *WXUNUSED(object), const wxPropertyInfo *WXUNUSED(propInfo) , wxxVariantArray &WXUNUSED(value) ) { return true ; }
|
virtual bool BeforeWriteProperty( wxWriter *WXUNUSED(writer) , const wxObject *WXUNUSED(object), const wxPropertyInfo *WXUNUSED(propInfo) , wxxVariantArray &WXUNUSED(value) ) { return true ; }
|
||||||
|
|
||||||
// will be called after a property has been written out, may be needed for adjusting stacks
|
// will be called after a property has been written out, may be needed for adjusting stacks
|
||||||
virtual void AfterWriteProperty( wxWriter *WXUNUSED(writer) , const wxPropertyInfo *WXUNUSED(propInfo) ) {}
|
virtual void AfterWriteProperty( wxWriter *WXUNUSED(writer) , const wxPropertyInfo *WXUNUSED(propInfo) ) {}
|
||||||
|
|
||||||
// will be called before this delegate gets written
|
// will be called before this delegate gets written
|
||||||
virtual bool BeforeWriteDelegate( wxWriter *WXUNUSED(writer) , const wxObject *WXUNUSED(object), const wxClassInfo* WXUNUSED(classInfo) , const wxPropertyInfo *WXUNUSED(propInfo) ,
|
virtual bool BeforeWriteDelegate( wxWriter *WXUNUSED(writer) , const wxObject *WXUNUSED(object), const wxClassInfo* WXUNUSED(classInfo) , const wxPropertyInfo *WXUNUSED(propInfo) ,
|
||||||
const wxObject *&WXUNUSED(eventSink) , const wxHandlerInfo* &WXUNUSED(handlerInfo) ) { return true ; }
|
const wxObject *&WXUNUSED(eventSink) , const wxHandlerInfo* &WXUNUSED(handlerInfo) ) { return true ; }
|
||||||
|
|
||||||
virtual void AfterWriteDelegate( wxWriter *WXUNUSED(writer) , const wxObject *WXUNUSED(object), const wxClassInfo* WXUNUSED(classInfo) , const wxPropertyInfo *WXUNUSED(propInfo) ,
|
virtual void AfterWriteDelegate( wxWriter *WXUNUSED(writer) , const wxObject *WXUNUSED(object), const wxClassInfo* WXUNUSED(classInfo) , const wxPropertyInfo *WXUNUSED(propInfo) ,
|
||||||
const wxObject *&WXUNUSED(eventSink) , const wxHandlerInfo* &WXUNUSED(handlerInfo) ) { }
|
const wxObject *&WXUNUSED(eventSink) , const wxHandlerInfo* &WXUNUSED(handlerInfo) ) { }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
class WXDLLIMPEXP_BASE wxWriter : public wxObject
|
class WXDLLIMPEXP_BASE wxWriter : public wxObject
|
||||||
@@ -86,7 +86,7 @@ public :
|
|||||||
//
|
//
|
||||||
// Managing the object identity table a.k.a context
|
// Managing the object identity table a.k.a context
|
||||||
//
|
//
|
||||||
// these methods make sure that no object gets written twice, because sometimes multiple calls to the WriteObject will be
|
// these methods make sure that no object gets written twice, because sometimes multiple calls to the WriteObject will be
|
||||||
// made without wanting to have duplicate objects written, the object identity table will be reset manually
|
// made without wanting to have duplicate objects written, the object identity table will be reset manually
|
||||||
|
|
||||||
virtual void ClearObjectContext() ;
|
virtual void ClearObjectContext() ;
|
||||||
@@ -125,14 +125,14 @@ public :
|
|||||||
|
|
||||||
virtual void DoBeginWriteElement() = 0 ;
|
virtual void DoBeginWriteElement() = 0 ;
|
||||||
virtual void DoEndWriteElement() = 0 ;
|
virtual void DoEndWriteElement() = 0 ;
|
||||||
// insert an object reference to an already written object
|
// insert an object reference to an already written object
|
||||||
virtual void DoWriteRepeatedObject( int objectID ) = 0 ;
|
virtual void DoWriteRepeatedObject( int objectID ) = 0 ;
|
||||||
|
|
||||||
// insert a null reference
|
// insert a null reference
|
||||||
virtual void DoWriteNullObject() = 0 ;
|
virtual void DoWriteNullObject() = 0 ;
|
||||||
|
|
||||||
// writes a delegate in the stream format
|
// writes a delegate in the stream format
|
||||||
virtual void DoWriteDelegate( const wxObject *object, const wxClassInfo* classInfo , const wxPropertyInfo *propInfo ,
|
virtual void DoWriteDelegate( const wxObject *object, const wxClassInfo* classInfo , const wxPropertyInfo *propInfo ,
|
||||||
const wxObject *eventSink , int sinkObjectID , const wxClassInfo* eventSinkClassInfo , const wxHandlerInfo* handlerIndo ) = 0;
|
const wxObject *eventSink , int sinkObjectID , const wxClassInfo* eventSinkClassInfo , const wxHandlerInfo* handlerIndo ) = 0;
|
||||||
private :
|
private :
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ public :
|
|||||||
bool HasObjectClassInfo( int objectID ) ;
|
bool HasObjectClassInfo( int objectID ) ;
|
||||||
void SetObjectClassInfo(int objectID, wxClassInfo* classInfo);
|
void SetObjectClassInfo(int objectID, wxClassInfo* classInfo);
|
||||||
|
|
||||||
// Reads the component the reader is pointed at from the underlying format.
|
// Reads the component the reader is pointed at from the underlying format.
|
||||||
// The return value is the root object ID, which can
|
// The return value is the root object ID, which can
|
||||||
// then be used to ask the depersister about that object
|
// then be used to ask the depersister about that object
|
||||||
// if there was a problem you will get back wxInvalidObjectID and the current
|
// if there was a problem you will get back wxInvalidObjectID and the current
|
||||||
@@ -270,7 +270,7 @@ public :
|
|||||||
wxRuntimeDepersister();
|
wxRuntimeDepersister();
|
||||||
virtual ~wxRuntimeDepersister();
|
virtual ~wxRuntimeDepersister();
|
||||||
|
|
||||||
// returns the object having the corresponding ID fully constructed
|
// returns the object having the corresponding ID fully constructed
|
||||||
wxObject *GetObject(int objectID) ;
|
wxObject *GetObject(int objectID) ;
|
||||||
|
|
||||||
// allocate the new object on the heap, that object will have the passed in ID
|
// allocate the new object on the heap, that object will have the passed in ID
|
||||||
@@ -343,7 +343,7 @@ public :
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
wxDepersisterCode implements the callbacks that will depersist
|
wxDepersisterCode implements the callbacks that will depersist
|
||||||
an object into a C++ initialization function. this will move to
|
an object into a C++ initialization function. this will move to
|
||||||
a utility lib soon
|
a utility lib soon
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
// Name: wx/xtixml.h
|
// Name: wx/xtixml.h
|
||||||
// Purpose: xml streaming runtime metadata information (extended class info)
|
// Purpose: xml streaming runtime metadata information (extended class info)
|
||||||
// Author: Stefan Csomor
|
// Author: Stefan Csomor
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 27/07/03
|
// Created: 27/07/03
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 2003 Stefan Csomor
|
// Copyright: (c) 2003 Stefan Csomor
|
||||||
@@ -66,14 +66,14 @@ public :
|
|||||||
virtual void DoBeginWriteElement() ;
|
virtual void DoBeginWriteElement() ;
|
||||||
virtual void DoEndWriteElement() ;
|
virtual void DoEndWriteElement() ;
|
||||||
|
|
||||||
// insert an object reference to an already written object
|
// insert an object reference to an already written object
|
||||||
virtual void DoWriteRepeatedObject( int objectID ) ;
|
virtual void DoWriteRepeatedObject( int objectID ) ;
|
||||||
|
|
||||||
// insert a null reference
|
// insert a null reference
|
||||||
virtual void DoWriteNullObject() ;
|
virtual void DoWriteNullObject() ;
|
||||||
|
|
||||||
// writes a delegate in the stream format
|
// writes a delegate in the stream format
|
||||||
virtual void DoWriteDelegate( const wxObject *object, const wxClassInfo* classInfo , const wxPropertyInfo *propInfo ,
|
virtual void DoWriteDelegate( const wxObject *object, const wxClassInfo* classInfo , const wxPropertyInfo *propInfo ,
|
||||||
const wxObject *eventSink , int sinkObjectID , const wxClassInfo* eventSinkClassInfo , const wxHandlerInfo* handlerIndo ) ;
|
const wxObject *eventSink , int sinkObjectID , const wxClassInfo* eventSinkClassInfo , const wxHandlerInfo* handlerIndo ) ;
|
||||||
private :
|
private :
|
||||||
struct wxXmlWriterInternal ;
|
struct wxXmlWriterInternal ;
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
|
|
||||||
#if wxUSE_STREAMS && wxUSE_ZIPSTREAM && wxUSE_ZLIB
|
#if wxUSE_STREAMS && wxUSE_ZIPSTREAM && wxUSE_ZLIB
|
||||||
|
|
||||||
#include "wx/stream.h"
|
#include "wx/stream.h"
|
||||||
|
|
||||||
@@ -54,8 +54,8 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// wxUSE_STREAMS && wxUSE_ZIPSTREAM && wxUSE_ZLIB
|
// wxUSE_STREAMS && wxUSE_ZIPSTREAM && wxUSE_ZLIB
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// __ZIPSTREAM_H__
|
// __ZIPSTREAM_H__
|
||||||
|
@@ -44,13 +44,13 @@
|
|||||||
#include "wx/slider.h"
|
#include "wx/slider.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include "wx/spinctrl.h"
|
#include "wx/spinctrl.h"
|
||||||
|
|
||||||
#if wxUSE_SPINBTN
|
#if wxUSE_SPINBTN
|
||||||
#include "wx/spinbutt.h"
|
#include "wx/spinbutt.h"
|
||||||
#endif
|
#endif
|
||||||
#if wxUSE_CHECKLISTBOX
|
#if wxUSE_CHECKLISTBOX
|
||||||
#include "wx/checklst.h"
|
#include "wx/checklst.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ bool wxGenericValidator::Copy(const wxGenericValidator& val)
|
|||||||
m_pString = val.m_pString;
|
m_pString = val.m_pString;
|
||||||
m_pArrayInt = val.m_pArrayInt;
|
m_pArrayInt = val.m_pArrayInt;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGenericValidator::~wxGenericValidator()
|
wxGenericValidator::~wxGenericValidator()
|
||||||
@@ -108,7 +108,7 @@ wxGenericValidator::~wxGenericValidator()
|
|||||||
bool wxGenericValidator::TransferToWindow(void)
|
bool wxGenericValidator::TransferToWindow(void)
|
||||||
{
|
{
|
||||||
if ( !m_validatorWindow )
|
if ( !m_validatorWindow )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
// bool controls
|
// bool controls
|
||||||
#if wxUSE_CHECKBOX
|
#if wxUSE_CHECKBOX
|
||||||
@@ -118,7 +118,7 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
if (m_pBool)
|
if (m_pBool)
|
||||||
{
|
{
|
||||||
pControl->SetValue(*m_pBool);
|
pControl->SetValue(*m_pBool);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -129,7 +129,7 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
if (m_pBool)
|
if (m_pBool)
|
||||||
{
|
{
|
||||||
pControl->SetValue(*m_pBool) ;
|
pControl->SetValue(*m_pBool) ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -142,7 +142,7 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
if (m_pInt)
|
if (m_pInt)
|
||||||
{
|
{
|
||||||
pControl->SetValue(*m_pInt);
|
pControl->SetValue(*m_pInt);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -153,7 +153,7 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
if (m_pInt)
|
if (m_pInt)
|
||||||
{
|
{
|
||||||
pControl->SetSelection(*m_pInt) ;
|
pControl->SetSelection(*m_pInt) ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -164,7 +164,7 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
if (m_pInt)
|
if (m_pInt)
|
||||||
{
|
{
|
||||||
pControl->SetThumbPosition(*m_pInt) ;
|
pControl->SetThumbPosition(*m_pInt) ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -175,7 +175,7 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
if (m_pInt)
|
if (m_pInt)
|
||||||
{
|
{
|
||||||
pControl->SetValue(*m_pInt);
|
pControl->SetValue(*m_pInt);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -186,7 +186,7 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
if (m_pInt)
|
if (m_pInt)
|
||||||
{
|
{
|
||||||
pControl->SetValue(*m_pInt) ;
|
pControl->SetValue(*m_pInt) ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -197,7 +197,7 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
if (m_pInt)
|
if (m_pInt)
|
||||||
{
|
{
|
||||||
pControl->SetValue(*m_pInt) ;
|
pControl->SetValue(*m_pInt) ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -210,7 +210,7 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
if (m_pString)
|
if (m_pString)
|
||||||
{
|
{
|
||||||
pControl->SetLabel(*m_pString) ;
|
pControl->SetLabel(*m_pString) ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -221,11 +221,11 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
if (m_pInt)
|
if (m_pInt)
|
||||||
{
|
{
|
||||||
pControl->SetSelection(*m_pInt) ;
|
pControl->SetSelection(*m_pInt) ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else if (m_pString)
|
else if (m_pString)
|
||||||
{
|
{
|
||||||
if (pControl->FindString(* m_pString) > -1)
|
if (pControl->FindString(* m_pString) != wxNOT_FOUND)
|
||||||
{
|
{
|
||||||
pControl->SetStringSelection(* m_pString);
|
pControl->SetStringSelection(* m_pString);
|
||||||
}
|
}
|
||||||
@@ -233,7 +233,7 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
{
|
{
|
||||||
pControl->SetValue(* m_pString);
|
pControl->SetValue(* m_pString);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -244,15 +244,15 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
if (m_pInt)
|
if (m_pInt)
|
||||||
{
|
{
|
||||||
pControl->SetSelection(*m_pInt) ;
|
pControl->SetSelection(*m_pInt) ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else if (m_pString)
|
else if (m_pString)
|
||||||
{
|
{
|
||||||
if (pControl->FindString(* m_pString) > -1)
|
if (pControl->FindString(* m_pString) != wxNOT_FOUND)
|
||||||
{
|
{
|
||||||
pControl->SetStringSelection(* m_pString);
|
pControl->SetStringSelection(* m_pString);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -262,7 +262,7 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
if (m_pString)
|
if (m_pString)
|
||||||
{
|
{
|
||||||
pControl->SetLabel(*m_pString) ;
|
pControl->SetLabel(*m_pString) ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#if wxUSE_TEXTCTRL
|
#if wxUSE_TEXTCTRL
|
||||||
@@ -272,14 +272,14 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
if (m_pString)
|
if (m_pString)
|
||||||
{
|
{
|
||||||
pControl->SetValue(*m_pString) ;
|
pControl->SetValue(*m_pString) ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else if (m_pInt)
|
else if (m_pInt)
|
||||||
{
|
{
|
||||||
wxString str;
|
wxString str;
|
||||||
str.Printf(wxT("%d"), *m_pInt);
|
str.Printf(wxT("%d"), *m_pInt);
|
||||||
pControl->SetValue(str);
|
pControl->SetValue(str);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -295,17 +295,17 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
size_t i,
|
size_t i,
|
||||||
count = pControl->GetCount();
|
count = pControl->GetCount();
|
||||||
for ( i = 0 ; i < count; i++ )
|
for ( i = 0 ; i < count; i++ )
|
||||||
pControl->Check(i, FALSE);
|
pControl->Check(i, false);
|
||||||
|
|
||||||
// select each item in our array
|
// select each item in our array
|
||||||
count = m_pArrayInt->GetCount();
|
count = m_pArrayInt->GetCount();
|
||||||
for ( i = 0 ; i < count; i++ )
|
for ( i = 0 ; i < count; i++ )
|
||||||
pControl->Check(m_pArrayInt->Item(i));
|
pControl->Check(m_pArrayInt->Item(i));
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
#if wxUSE_LISTBOX
|
#if wxUSE_LISTBOX
|
||||||
@@ -325,21 +325,21 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
for ( i = 0 ; i < count; i++ )
|
for ( i = 0 ; i < count; i++ )
|
||||||
pControl->SetSelection(m_pArrayInt->Item(i));
|
pControl->SetSelection(m_pArrayInt->Item(i));
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
; // to match the last 'else' above
|
; // to match the last 'else' above
|
||||||
|
|
||||||
// unrecognized control, or bad pointer
|
// unrecognized control, or bad pointer
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called to transfer data from the window
|
// Called to transfer data from the window
|
||||||
bool wxGenericValidator::TransferFromWindow(void)
|
bool wxGenericValidator::TransferFromWindow(void)
|
||||||
{
|
{
|
||||||
if ( !m_validatorWindow )
|
if ( !m_validatorWindow )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
// bool controls
|
// bool controls
|
||||||
#if wxUSE_CHECKBOX
|
#if wxUSE_CHECKBOX
|
||||||
@@ -349,7 +349,7 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
if (m_pBool)
|
if (m_pBool)
|
||||||
{
|
{
|
||||||
*m_pBool = pControl->GetValue() ;
|
*m_pBool = pControl->GetValue() ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -360,7 +360,7 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
if (m_pBool)
|
if (m_pBool)
|
||||||
{
|
{
|
||||||
*m_pBool = pControl->GetValue() ;
|
*m_pBool = pControl->GetValue() ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -372,7 +372,7 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
if (m_pInt)
|
if (m_pInt)
|
||||||
{
|
{
|
||||||
*m_pInt = pControl->GetValue() ;
|
*m_pInt = pControl->GetValue() ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -383,7 +383,7 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
if (m_pInt)
|
if (m_pInt)
|
||||||
{
|
{
|
||||||
*m_pInt = pControl->GetSelection() ;
|
*m_pInt = pControl->GetSelection() ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -394,7 +394,7 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
if (m_pInt)
|
if (m_pInt)
|
||||||
{
|
{
|
||||||
*m_pInt = pControl->GetThumbPosition() ;
|
*m_pInt = pControl->GetThumbPosition() ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -405,7 +405,7 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
if (m_pInt)
|
if (m_pInt)
|
||||||
{
|
{
|
||||||
*m_pInt=pControl->GetValue();
|
*m_pInt=pControl->GetValue();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -416,7 +416,7 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
if (m_pInt)
|
if (m_pInt)
|
||||||
{
|
{
|
||||||
*m_pInt = pControl->GetValue() ;
|
*m_pInt = pControl->GetValue() ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -427,7 +427,7 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
if (m_pInt)
|
if (m_pInt)
|
||||||
{
|
{
|
||||||
*m_pInt = pControl->GetValue() ;
|
*m_pInt = pControl->GetValue() ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -439,7 +439,7 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
if (m_pString)
|
if (m_pString)
|
||||||
{
|
{
|
||||||
*m_pString = pControl->GetLabel() ;
|
*m_pString = pControl->GetLabel() ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -450,12 +450,12 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
if (m_pInt)
|
if (m_pInt)
|
||||||
{
|
{
|
||||||
*m_pInt = pControl->GetSelection() ;
|
*m_pInt = pControl->GetSelection() ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else if (m_pString)
|
else if (m_pString)
|
||||||
{
|
{
|
||||||
*m_pString = pControl->GetValue();
|
*m_pString = pControl->GetValue();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -466,12 +466,12 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
if (m_pInt)
|
if (m_pInt)
|
||||||
{
|
{
|
||||||
*m_pInt = pControl->GetSelection() ;
|
*m_pInt = pControl->GetSelection() ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else if (m_pString)
|
else if (m_pString)
|
||||||
{
|
{
|
||||||
*m_pString = pControl->GetStringSelection();
|
*m_pString = pControl->GetStringSelection();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -481,7 +481,7 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
if (m_pString)
|
if (m_pString)
|
||||||
{
|
{
|
||||||
*m_pString = pControl->GetLabel() ;
|
*m_pString = pControl->GetLabel() ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#if wxUSE_TEXTCTRL
|
#if wxUSE_TEXTCTRL
|
||||||
@@ -491,12 +491,12 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
if (m_pString)
|
if (m_pString)
|
||||||
{
|
{
|
||||||
*m_pString = pControl->GetValue() ;
|
*m_pString = pControl->GetValue() ;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else if (m_pInt)
|
else if (m_pInt)
|
||||||
{
|
{
|
||||||
*m_pInt = wxAtoi(pControl->GetValue());
|
*m_pInt = wxAtoi(pControl->GetValue());
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -520,10 +520,10 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
m_pArrayInt->Add(i);
|
m_pArrayInt->Add(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
#if wxUSE_LISTBOX
|
#if wxUSE_LISTBOX
|
||||||
@@ -544,14 +544,14 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
m_pArrayInt->Add(i);
|
m_pArrayInt->Add(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// unrecognized control, or bad pointer
|
// unrecognized control, or bad pointer
|
||||||
return FALSE;
|
return false;
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -36,9 +36,9 @@ const wxValidator wxDefaultValidator;
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxValidator, wxEvtHandler)
|
IMPLEMENT_DYNAMIC_CLASS(wxValidator, wxEvtHandler)
|
||||||
|
|
||||||
// VZ: personally, I think TRUE would be more appropriate - these bells are
|
// VZ: personally, I think true would be more appropriate - these bells are
|
||||||
// _annoying_
|
// _annoying_
|
||||||
bool wxValidator::ms_isSilent = FALSE;
|
bool wxValidator::ms_isSilent = false;
|
||||||
|
|
||||||
wxValidator::wxValidator()
|
wxValidator::wxValidator()
|
||||||
{
|
{
|
||||||
|
@@ -76,7 +76,7 @@ bool wxTextValidator::Copy(const wxTextValidator& val)
|
|||||||
m_includeList = val.m_includeList;
|
m_includeList = val.m_includeList;
|
||||||
m_excludeList = val.m_excludeList;
|
m_excludeList = val.m_excludeList;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxTextValidator::~wxTextValidator()
|
wxTextValidator::~wxTextValidator()
|
||||||
@@ -89,9 +89,9 @@ static bool wxIsAlpha(const wxString& val)
|
|||||||
for ( i = 0; i < (int)val.Length(); i++)
|
for ( i = 0; i < (int)val.Length(); i++)
|
||||||
{
|
{
|
||||||
if (!wxIsalpha(val[i]))
|
if (!wxIsalpha(val[i]))
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool wxIsAlphaNumeric(const wxString& val)
|
static bool wxIsAlphaNumeric(const wxString& val)
|
||||||
@@ -100,9 +100,9 @@ static bool wxIsAlphaNumeric(const wxString& val)
|
|||||||
for ( i = 0; i < (int)val.Length(); i++)
|
for ( i = 0; i < (int)val.Length(); i++)
|
||||||
{
|
{
|
||||||
if (!wxIsalnum(val[i]))
|
if (!wxIsalnum(val[i]))
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called when the value in the window must be validated.
|
// Called when the value in the window must be validated.
|
||||||
@@ -110,17 +110,17 @@ static bool wxIsAlphaNumeric(const wxString& val)
|
|||||||
bool wxTextValidator::Validate(wxWindow *parent)
|
bool wxTextValidator::Validate(wxWindow *parent)
|
||||||
{
|
{
|
||||||
if( !CheckValidator() )
|
if( !CheckValidator() )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;
|
wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow;
|
||||||
|
|
||||||
// If window is disabled, simply return
|
// If window is disabled, simply return
|
||||||
if ( !control->IsEnabled() )
|
if ( !control->IsEnabled() )
|
||||||
return TRUE;
|
return true;
|
||||||
|
|
||||||
wxString val(control->GetValue());
|
wxString val(control->GetValue());
|
||||||
|
|
||||||
bool ok = TRUE;
|
bool ok = true;
|
||||||
|
|
||||||
// NB: this format string should contian exactly one '%s'
|
// NB: this format string should contian exactly one '%s'
|
||||||
wxString errormsg;
|
wxString errormsg;
|
||||||
@@ -138,25 +138,25 @@ bool wxTextValidator::Validate(wxWindow *parent)
|
|||||||
}
|
}
|
||||||
else if ( (m_validatorStyle & wxFILTER_ASCII) && !val.IsAscii() )
|
else if ( (m_validatorStyle & wxFILTER_ASCII) && !val.IsAscii() )
|
||||||
{
|
{
|
||||||
ok = FALSE;
|
ok = false;
|
||||||
|
|
||||||
errormsg = _("'%s' should only contain ASCII characters.");
|
errormsg = _("'%s' should only contain ASCII characters.");
|
||||||
}
|
}
|
||||||
else if ( (m_validatorStyle & wxFILTER_ALPHA) && !wxIsAlpha(val) )
|
else if ( (m_validatorStyle & wxFILTER_ALPHA) && !wxIsAlpha(val) )
|
||||||
{
|
{
|
||||||
ok = FALSE;
|
ok = false;
|
||||||
|
|
||||||
errormsg = _("'%s' should only contain alphabetic characters.");
|
errormsg = _("'%s' should only contain alphabetic characters.");
|
||||||
}
|
}
|
||||||
else if ( (m_validatorStyle & wxFILTER_ALPHANUMERIC) && !wxIsAlphaNumeric(val))
|
else if ( (m_validatorStyle & wxFILTER_ALPHANUMERIC) && !wxIsAlphaNumeric(val))
|
||||||
{
|
{
|
||||||
ok = FALSE;
|
ok = false;
|
||||||
|
|
||||||
errormsg = _("'%s' should only contain alphabetic or numeric characters.");
|
errormsg = _("'%s' should only contain alphabetic or numeric characters.");
|
||||||
}
|
}
|
||||||
else if ( (m_validatorStyle & wxFILTER_NUMERIC) && !wxIsNumeric(val))
|
else if ( (m_validatorStyle & wxFILTER_NUMERIC) && !wxIsNumeric(val))
|
||||||
{
|
{
|
||||||
ok = FALSE;
|
ok = false;
|
||||||
|
|
||||||
errormsg = _("'%s' should be numeric.");
|
errormsg = _("'%s' should be numeric.");
|
||||||
}
|
}
|
||||||
@@ -164,13 +164,13 @@ bool wxTextValidator::Validate(wxWindow *parent)
|
|||||||
{
|
{
|
||||||
//it's only ok to have the members of the list
|
//it's only ok to have the members of the list
|
||||||
errormsg = _("'%s' is invalid");
|
errormsg = _("'%s' is invalid");
|
||||||
ok = FALSE;
|
ok = false;
|
||||||
}
|
}
|
||||||
else if ( (m_validatorStyle & wxFILTER_EXCLUDE_CHAR_LIST) && !IsNotInCharExcludeList(val))
|
else if ( (m_validatorStyle & wxFILTER_EXCLUDE_CHAR_LIST) && !IsNotInCharExcludeList(val))
|
||||||
{
|
{
|
||||||
// it's only ok to have non-members of the list
|
// it's only ok to have non-members of the list
|
||||||
errormsg = _("'%s' is invalid");
|
errormsg = _("'%s' is invalid");
|
||||||
ok = FALSE;
|
ok = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !ok )
|
if ( !ok )
|
||||||
@@ -193,7 +193,7 @@ bool wxTextValidator::Validate(wxWindow *parent)
|
|||||||
bool wxTextValidator::TransferToWindow(void)
|
bool wxTextValidator::TransferToWindow(void)
|
||||||
{
|
{
|
||||||
if( !CheckValidator() )
|
if( !CheckValidator() )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
if ( m_stringValue )
|
if ( m_stringValue )
|
||||||
{
|
{
|
||||||
@@ -201,14 +201,14 @@ bool wxTextValidator::TransferToWindow(void)
|
|||||||
control->SetValue(* m_stringValue);
|
control->SetValue(* m_stringValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called to transfer data to the window
|
// Called to transfer data to the window
|
||||||
bool wxTextValidator::TransferFromWindow(void)
|
bool wxTextValidator::TransferFromWindow(void)
|
||||||
{
|
{
|
||||||
if( !CheckValidator() )
|
if( !CheckValidator() )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
if ( m_stringValue )
|
if ( m_stringValue )
|
||||||
{
|
{
|
||||||
@@ -216,7 +216,7 @@ bool wxTextValidator::TransferFromWindow(void)
|
|||||||
*m_stringValue = control->GetValue();
|
*m_stringValue = control->GetValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTextValidator::SetIncludeList(const wxStringList& list)
|
void wxTextValidator::SetIncludeList(const wxStringList& list)
|
||||||
@@ -273,9 +273,9 @@ static bool wxIsNumeric(const wxString& val)
|
|||||||
// Allow for "," (French) as well as "." -- in future we should
|
// Allow for "," (French) as well as "." -- in future we should
|
||||||
// use wxSystemSettings or other to do better localisation
|
// use wxSystemSettings or other to do better localisation
|
||||||
if ((!wxIsdigit(val[i])) && (val[i] != '.') && (val[i] != ',') && (val[i] != wxT('e')) && (val[i] != wxT('E')) && (val[i] != wxT('+')) && (val[i] != wxT('-')))
|
if ((!wxIsdigit(val[i])) && (val[i] != '.') && (val[i] != ',') && (val[i] != wxT('e')) && (val[i] != wxT('E')) && (val[i] != wxT('+')) && (val[i] != wxT('-')))
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxTextValidator::IsInCharIncludeList(const wxString& val)
|
bool wxTextValidator::IsInCharIncludeList(const wxString& val)
|
||||||
@@ -284,9 +284,9 @@ bool wxTextValidator::IsInCharIncludeList(const wxString& val)
|
|||||||
for ( i = 0; i < val.Length(); i++)
|
for ( i = 0; i < val.Length(); i++)
|
||||||
{
|
{
|
||||||
if (!m_includeList.Member((wxString) val[i]))
|
if (!m_includeList.Member((wxString) val[i]))
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxTextValidator::IsNotInCharExcludeList(const wxString& val)
|
bool wxTextValidator::IsNotInCharExcludeList(const wxString& val)
|
||||||
@@ -295,9 +295,9 @@ bool wxTextValidator::IsNotInCharExcludeList(const wxString& val)
|
|||||||
for ( i = 0; i < val.Length(); i++)
|
for ( i = 0; i < val.Length(); i++)
|
||||||
{
|
{
|
||||||
if (m_excludeList.Member((wxString) val[i]))
|
if (m_excludeList.Member((wxString) val[i]))
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -143,12 +143,12 @@ bool wxVariantDataList::Eq(wxVariantData& data) const
|
|||||||
wxVariant* var1 = (wxVariant*) node1->GetData();
|
wxVariant* var1 = (wxVariant*) node1->GetData();
|
||||||
wxVariant* var2 = (wxVariant*) node2->GetData();
|
wxVariant* var2 = (wxVariant*) node2->GetData();
|
||||||
if ((*var1) != (*var2))
|
if ((*var1) != (*var2))
|
||||||
return FALSE;
|
return false;
|
||||||
node1 = node1->GetNext();
|
node1 = node1->GetNext();
|
||||||
node2 = node2->GetNext();
|
node2 = node2->GetNext();
|
||||||
}
|
}
|
||||||
if (node1 || node2) return FALSE;
|
if (node1 || node2) return false;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_STD_IOSTREAM
|
#if wxUSE_STD_IOSTREAM
|
||||||
@@ -157,7 +157,7 @@ bool wxVariantDataList::Write(wxSTD ostream& str) const
|
|||||||
wxString s;
|
wxString s;
|
||||||
Write(s);
|
Write(s);
|
||||||
str << (const char*) s.mb_str();
|
str << (const char*) s.mb_str();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -175,7 +175,7 @@ bool wxVariantDataList::Write(wxString& str) const
|
|||||||
node = node->GetNext();
|
node = node->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_STD_IOSTREAM
|
#if wxUSE_STD_IOSTREAM
|
||||||
@@ -183,7 +183,7 @@ bool wxVariantDataList::Read(wxSTD istream& WXUNUSED(str))
|
|||||||
{
|
{
|
||||||
wxFAIL_MSG(wxT("Unimplemented"));
|
wxFAIL_MSG(wxT("Unimplemented"));
|
||||||
// TODO
|
// TODO
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -191,7 +191,7 @@ bool wxVariantDataList::Read(wxString& WXUNUSED(str))
|
|||||||
{
|
{
|
||||||
wxFAIL_MSG(wxT("Unimplemented"));
|
wxFAIL_MSG(wxT("Unimplemented"));
|
||||||
// TODO
|
// TODO
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -252,12 +252,12 @@ bool wxVariantDataStringList::Eq(wxVariantData& data) const
|
|||||||
wxString str1 ( node1->GetData() );
|
wxString str1 ( node1->GetData() );
|
||||||
wxString str2 ( node2->GetData() );
|
wxString str2 ( node2->GetData() );
|
||||||
if (str1 != str2)
|
if (str1 != str2)
|
||||||
return FALSE;
|
return false;
|
||||||
node1 = node1->GetNext();
|
node1 = node1->GetNext();
|
||||||
node2 = node2->GetNext();
|
node2 = node2->GetNext();
|
||||||
}
|
}
|
||||||
if (node1 || node2) return FALSE;
|
if (node1 || node2) return false;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_STD_IOSTREAM
|
#if wxUSE_STD_IOSTREAM
|
||||||
@@ -266,7 +266,7 @@ bool wxVariantDataStringList::Write(wxSTD ostream& str) const
|
|||||||
wxString s;
|
wxString s;
|
||||||
Write(s);
|
Write(s);
|
||||||
str << (const char*) s.mb_str();
|
str << (const char*) s.mb_str();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -283,7 +283,7 @@ bool wxVariantDataStringList::Write(wxString& str) const
|
|||||||
node = node->GetNext();
|
node = node->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_STD_IOSTREAM
|
#if wxUSE_STD_IOSTREAM
|
||||||
@@ -291,7 +291,7 @@ bool wxVariantDataStringList::Read(wxSTD istream& WXUNUSED(str))
|
|||||||
{
|
{
|
||||||
wxFAIL_MSG(wxT("Unimplemented"));
|
wxFAIL_MSG(wxT("Unimplemented"));
|
||||||
// TODO
|
// TODO
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -299,7 +299,7 @@ bool wxVariantDataStringList::Read(wxString& WXUNUSED(str))
|
|||||||
{
|
{
|
||||||
wxFAIL_MSG(wxT("Unimplemented"));
|
wxFAIL_MSG(wxT("Unimplemented"));
|
||||||
// TODO
|
// TODO
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -362,21 +362,21 @@ bool wxVariantDataLong::Write(wxSTD ostream& str) const
|
|||||||
wxString s;
|
wxString s;
|
||||||
Write(s);
|
Write(s);
|
||||||
str << (const char*) s.mb_str();
|
str << (const char*) s.mb_str();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool wxVariantDataLong::Write(wxString& str) const
|
bool wxVariantDataLong::Write(wxString& str) const
|
||||||
{
|
{
|
||||||
str.Printf(wxT("%ld"), m_value);
|
str.Printf(wxT("%ld"), m_value);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_STD_IOSTREAM
|
#if wxUSE_STD_IOSTREAM
|
||||||
bool wxVariantDataLong::Read(wxSTD istream& str)
|
bool wxVariantDataLong::Read(wxSTD istream& str)
|
||||||
{
|
{
|
||||||
str >> m_value;
|
str >> m_value;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -386,21 +386,21 @@ bool wxVariantDataLong::Write(wxOutputStream& str) const
|
|||||||
wxTextOutputStream s(str);
|
wxTextOutputStream s(str);
|
||||||
|
|
||||||
s.Write32((size_t)m_value);
|
s.Write32((size_t)m_value);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxVariantDataLong::Read(wxInputStream& str)
|
bool wxVariantDataLong::Read(wxInputStream& str)
|
||||||
{
|
{
|
||||||
wxTextInputStream s(str);
|
wxTextInputStream s(str);
|
||||||
m_value = s.Read32();
|
m_value = s.Read32();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
#endif // wxUSE_STREAMS
|
#endif // wxUSE_STREAMS
|
||||||
|
|
||||||
bool wxVariantDataLong::Read(wxString& str)
|
bool wxVariantDataLong::Read(wxString& str)
|
||||||
{
|
{
|
||||||
m_value = wxAtol((const wxChar*) str);
|
m_value = wxAtol((const wxChar*) str);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -463,21 +463,21 @@ bool wxVariantDataReal::Write(wxSTD ostream& str) const
|
|||||||
wxString s;
|
wxString s;
|
||||||
Write(s);
|
Write(s);
|
||||||
str << (const char*) s.mb_str();
|
str << (const char*) s.mb_str();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool wxVariantDataReal::Write(wxString& str) const
|
bool wxVariantDataReal::Write(wxString& str) const
|
||||||
{
|
{
|
||||||
str.Printf(wxT("%.4f"), m_value);
|
str.Printf(wxT("%.4f"), m_value);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_STD_IOSTREAM
|
#if wxUSE_STD_IOSTREAM
|
||||||
bool wxVariantDataReal::Read(wxSTD istream& str)
|
bool wxVariantDataReal::Read(wxSTD istream& str)
|
||||||
{
|
{
|
||||||
str >> m_value;
|
str >> m_value;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -486,21 +486,21 @@ bool wxVariantDataReal::Write(wxOutputStream& str) const
|
|||||||
{
|
{
|
||||||
wxTextOutputStream s(str);
|
wxTextOutputStream s(str);
|
||||||
s.WriteDouble((double)m_value);
|
s.WriteDouble((double)m_value);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxVariantDataReal::Read(wxInputStream& str)
|
bool wxVariantDataReal::Read(wxInputStream& str)
|
||||||
{
|
{
|
||||||
wxTextInputStream s(str);
|
wxTextInputStream s(str);
|
||||||
m_value = (float)s.ReadDouble();
|
m_value = (float)s.ReadDouble();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
#endif // wxUSE_STREAMS
|
#endif // wxUSE_STREAMS
|
||||||
|
|
||||||
bool wxVariantDataReal::Read(wxString& str)
|
bool wxVariantDataReal::Read(wxString& str)
|
||||||
{
|
{
|
||||||
m_value = wxAtof((const wxChar*) str);
|
m_value = wxAtof((const wxChar*) str);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_BOOL
|
#ifdef HAVE_BOOL
|
||||||
@@ -564,14 +564,14 @@ bool wxVariantDataBool::Write(wxSTD ostream& str) const
|
|||||||
wxString s;
|
wxString s;
|
||||||
Write(s);
|
Write(s);
|
||||||
str << (const char*) s.mb_str();
|
str << (const char*) s.mb_str();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool wxVariantDataBool::Write(wxString& str) const
|
bool wxVariantDataBool::Write(wxString& str) const
|
||||||
{
|
{
|
||||||
str.Printf(wxT("%d"), (int) m_value);
|
str.Printf(wxT("%d"), (int) m_value);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_STD_IOSTREAM
|
#if wxUSE_STD_IOSTREAM
|
||||||
@@ -579,7 +579,7 @@ bool wxVariantDataBool::Read(wxSTD istream& WXUNUSED(str))
|
|||||||
{
|
{
|
||||||
wxFAIL_MSG(wxT("Unimplemented"));
|
wxFAIL_MSG(wxT("Unimplemented"));
|
||||||
// str >> (long) m_value;
|
// str >> (long) m_value;
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -589,7 +589,7 @@ bool wxVariantDataBool::Write(wxOutputStream& str) const
|
|||||||
wxTextOutputStream s(str);
|
wxTextOutputStream s(str);
|
||||||
|
|
||||||
s.Write8(m_value);
|
s.Write8(m_value);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxVariantDataBool::Read(wxInputStream& str)
|
bool wxVariantDataBool::Read(wxInputStream& str)
|
||||||
@@ -597,14 +597,14 @@ bool wxVariantDataBool::Read(wxInputStream& str)
|
|||||||
wxTextInputStream s(str);
|
wxTextInputStream s(str);
|
||||||
|
|
||||||
m_value = s.Read8() != 0;
|
m_value = s.Read8() != 0;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
#endif // wxUSE_STREAMS
|
#endif // wxUSE_STREAMS
|
||||||
|
|
||||||
bool wxVariantDataBool::Read(wxString& str)
|
bool wxVariantDataBool::Read(wxString& str)
|
||||||
{
|
{
|
||||||
m_value = (wxAtol((const wxChar*) str) != 0);
|
m_value = (wxAtol((const wxChar*) str) != 0);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
#endif // HAVE_BOOL
|
#endif // HAVE_BOOL
|
||||||
|
|
||||||
@@ -666,14 +666,14 @@ bool wxVariantDataChar::Write(wxSTD ostream& str) const
|
|||||||
wxString s;
|
wxString s;
|
||||||
Write(s);
|
Write(s);
|
||||||
str << (const char*) s.mb_str();
|
str << (const char*) s.mb_str();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool wxVariantDataChar::Write(wxString& str) const
|
bool wxVariantDataChar::Write(wxString& str) const
|
||||||
{
|
{
|
||||||
str.Printf(wxT("%c"), m_value);
|
str.Printf(wxT("%c"), m_value);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_STD_IOSTREAM
|
#if wxUSE_STD_IOSTREAM
|
||||||
@@ -681,7 +681,7 @@ bool wxVariantDataChar::Read(wxSTD istream& WXUNUSED(str))
|
|||||||
{
|
{
|
||||||
wxFAIL_MSG(wxT("Unimplemented"));
|
wxFAIL_MSG(wxT("Unimplemented"));
|
||||||
// str >> m_value;
|
// str >> m_value;
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -691,7 +691,7 @@ bool wxVariantDataChar::Write(wxOutputStream& str) const
|
|||||||
wxTextOutputStream s(str);
|
wxTextOutputStream s(str);
|
||||||
|
|
||||||
s.Write8(m_value);
|
s.Write8(m_value);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxVariantDataChar::Read(wxInputStream& str)
|
bool wxVariantDataChar::Read(wxInputStream& str)
|
||||||
@@ -699,14 +699,14 @@ bool wxVariantDataChar::Read(wxInputStream& str)
|
|||||||
wxTextInputStream s(str);
|
wxTextInputStream s(str);
|
||||||
|
|
||||||
m_value = s.Read8();
|
m_value = s.Read8();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
#endif // wxUSE_STREAMS
|
#endif // wxUSE_STREAMS
|
||||||
|
|
||||||
bool wxVariantDataChar::Read(wxString& str)
|
bool wxVariantDataChar::Read(wxString& str)
|
||||||
{
|
{
|
||||||
m_value = str[(size_t)0];
|
m_value = str[(size_t)0];
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -765,21 +765,21 @@ bool wxVariantDataString::Eq(wxVariantData& data) const
|
|||||||
bool wxVariantDataString::Write(wxSTD ostream& str) const
|
bool wxVariantDataString::Write(wxSTD ostream& str) const
|
||||||
{
|
{
|
||||||
str << (const char*) m_value.mb_str();
|
str << (const char*) m_value.mb_str();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool wxVariantDataString::Write(wxString& str) const
|
bool wxVariantDataString::Write(wxString& str) const
|
||||||
{
|
{
|
||||||
str = m_value;
|
str = m_value;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_STD_IOSTREAM
|
#if wxUSE_STD_IOSTREAM
|
||||||
bool wxVariantDataString::Read(wxSTD istream& str)
|
bool wxVariantDataString::Read(wxSTD istream& str)
|
||||||
{
|
{
|
||||||
str >> m_value;
|
str >> m_value;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -789,7 +789,7 @@ bool wxVariantDataString::Write(wxOutputStream& str) const
|
|||||||
// why doesn't wxOutputStream::operator<< take "const wxString&"
|
// why doesn't wxOutputStream::operator<< take "const wxString&"
|
||||||
wxTextOutputStream s(str);
|
wxTextOutputStream s(str);
|
||||||
s.WriteString(m_value);
|
s.WriteString(m_value);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxVariantDataString::Read(wxInputStream& str)
|
bool wxVariantDataString::Read(wxInputStream& str)
|
||||||
@@ -797,14 +797,14 @@ bool wxVariantDataString::Read(wxInputStream& str)
|
|||||||
wxTextInputStream s(str);
|
wxTextInputStream s(str);
|
||||||
|
|
||||||
m_value = s.ReadString();
|
m_value = s.ReadString();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
#endif // wxUSE_STREAMS
|
#endif // wxUSE_STREAMS
|
||||||
|
|
||||||
bool wxVariantDataString::Read(wxString& str)
|
bool wxVariantDataString::Read(wxString& str)
|
||||||
{
|
{
|
||||||
m_value = str;
|
m_value = str;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxVariantDataString, wxVariantData)
|
IMPLEMENT_DYNAMIC_CLASS(wxVariantDataString, wxVariantData)
|
||||||
@@ -868,28 +868,28 @@ bool wxVariantDataVoidPtr::Write(wxSTD ostream& str) const
|
|||||||
wxString s;
|
wxString s;
|
||||||
Write(s);
|
Write(s);
|
||||||
str << (const char*) s.mb_str();
|
str << (const char*) s.mb_str();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool wxVariantDataVoidPtr::Write(wxString& str) const
|
bool wxVariantDataVoidPtr::Write(wxString& str) const
|
||||||
{
|
{
|
||||||
str.Printf(wxT("%ld"), (long) m_value);
|
str.Printf(wxT("%ld"), (long) m_value);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_STD_IOSTREAM
|
#if wxUSE_STD_IOSTREAM
|
||||||
bool wxVariantDataVoidPtr::Read(wxSTD istream& WXUNUSED(str))
|
bool wxVariantDataVoidPtr::Read(wxSTD istream& WXUNUSED(str))
|
||||||
{
|
{
|
||||||
// Not implemented
|
// Not implemented
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool wxVariantDataVoidPtr::Read(wxString& WXUNUSED(str))
|
bool wxVariantDataVoidPtr::Read(wxString& WXUNUSED(str))
|
||||||
{
|
{
|
||||||
// Not implemented
|
// Not implemented
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -919,7 +919,7 @@ public:
|
|||||||
virtual wxString GetType() const ;
|
virtual wxString GetType() const ;
|
||||||
virtual wxVariantData* Clone() { return new wxVariantDataWxObjectPtr; }
|
virtual wxVariantData* Clone() { return new wxVariantDataWxObjectPtr; }
|
||||||
|
|
||||||
virtual wxClassInfo* GetValueClassInfo() ;
|
virtual wxClassInfo* GetValueClassInfo() ;
|
||||||
protected:
|
protected:
|
||||||
wxObject* m_value;
|
wxObject* m_value;
|
||||||
|
|
||||||
@@ -960,8 +960,8 @@ wxString wxVariantDataWxObjectPtr::GetType() const
|
|||||||
wxClassInfo* wxVariantDataWxObjectPtr::GetValueClassInfo()
|
wxClassInfo* wxVariantDataWxObjectPtr::GetValueClassInfo()
|
||||||
{
|
{
|
||||||
wxClassInfo* returnVal=NULL;
|
wxClassInfo* returnVal=NULL;
|
||||||
|
|
||||||
if (m_value) returnVal = m_value->GetClassInfo();
|
if (m_value) returnVal = m_value->GetClassInfo();
|
||||||
|
|
||||||
return returnVal;
|
return returnVal;
|
||||||
}
|
}
|
||||||
@@ -972,28 +972,28 @@ bool wxVariantDataWxObjectPtr::Write(wxSTD ostream& str) const
|
|||||||
wxString s;
|
wxString s;
|
||||||
Write(s);
|
Write(s);
|
||||||
str << (const char*) s.mb_str();
|
str << (const char*) s.mb_str();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool wxVariantDataWxObjectPtr::Write(wxString& str) const
|
bool wxVariantDataWxObjectPtr::Write(wxString& str) const
|
||||||
{
|
{
|
||||||
str.Printf(wxT("%s(%ld)"), GetType().c_str(), (long) m_value);
|
str.Printf(wxT("%s(%ld)"), GetType().c_str(), (long) m_value);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_STD_IOSTREAM
|
#if wxUSE_STD_IOSTREAM
|
||||||
bool wxVariantDataWxObjectPtr::Read(wxSTD istream& WXUNUSED(str))
|
bool wxVariantDataWxObjectPtr::Read(wxSTD istream& WXUNUSED(str))
|
||||||
{
|
{
|
||||||
// Not implemented
|
// Not implemented
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool wxVariantDataWxObjectPtr::Read(wxString& WXUNUSED(str))
|
bool wxVariantDataWxObjectPtr::Read(wxString& WXUNUSED(str))
|
||||||
{
|
{
|
||||||
// Not implemented
|
// Not implemented
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1067,7 +1067,7 @@ bool wxVariantDataDateTime::Eq(wxVariantData& data) const
|
|||||||
bool wxVariantDataDateTime::Write(wxSTD ostream& str) const
|
bool wxVariantDataDateTime::Write(wxSTD ostream& str) const
|
||||||
{
|
{
|
||||||
// Not implemented
|
// Not implemented
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1075,7 +1075,7 @@ bool wxVariantDataDateTime::Write(wxSTD ostream& str) const
|
|||||||
bool wxVariantDataDateTime::Write(wxString& str) const
|
bool wxVariantDataDateTime::Write(wxString& str) const
|
||||||
{
|
{
|
||||||
str = m_value.Format();
|
str = m_value.Format();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1083,7 +1083,7 @@ bool wxVariantDataDateTime::Write(wxString& str) const
|
|||||||
bool wxVariantDataDateTime::Read(wxSTD istream& WXUNUSED(str))
|
bool wxVariantDataDateTime::Read(wxSTD istream& WXUNUSED(str))
|
||||||
{
|
{
|
||||||
// Not implemented
|
// Not implemented
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1091,8 +1091,8 @@ bool wxVariantDataDateTime::Read(wxSTD istream& WXUNUSED(str))
|
|||||||
bool wxVariantDataDateTime::Read(wxString& str)
|
bool wxVariantDataDateTime::Read(wxString& str)
|
||||||
{
|
{
|
||||||
if(! m_value.ParseDateTime(str))
|
if(! m_value.ParseDateTime(str))
|
||||||
return FALSE;
|
return false;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_DATETIME
|
#endif // wxUSE_DATETIME
|
||||||
@@ -1155,7 +1155,7 @@ bool wxVariantDataArrayString::Eq(wxVariantData& data) const
|
|||||||
bool wxVariantDataArrayString::Write(wxSTD ostream& str) const
|
bool wxVariantDataArrayString::Write(wxSTD ostream& str) const
|
||||||
{
|
{
|
||||||
// Not implemented
|
// Not implemented
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1171,7 +1171,7 @@ bool wxVariantDataArrayString::Write(wxString& str) const
|
|||||||
str += m_value[n];
|
str += m_value[n];
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1179,7 +1179,7 @@ bool wxVariantDataArrayString::Write(wxString& str) const
|
|||||||
bool wxVariantDataArrayString::Read(wxSTD istream& WXUNUSED(str))
|
bool wxVariantDataArrayString::Read(wxSTD istream& WXUNUSED(str))
|
||||||
{
|
{
|
||||||
// Not implemented
|
// Not implemented
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1192,7 +1192,7 @@ bool wxVariantDataArrayString::Read(wxString& str)
|
|||||||
m_value.Add(tk.GetNextToken());
|
m_value.Add(tk.GetNextToken());
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1261,23 +1261,23 @@ wxVariant::wxVariant(const wxList& val, const wxString& name) // List of variant
|
|||||||
|
|
||||||
wxVariant::wxVariant( void* val, const wxString& name)
|
wxVariant::wxVariant( void* val, const wxString& name)
|
||||||
{
|
{
|
||||||
m_data = new wxVariantDataVoidPtr(val);
|
m_data = new wxVariantDataVoidPtr(val);
|
||||||
m_name = name;
|
m_name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxVariant::wxVariant( wxObject* val, const wxString& name)
|
wxVariant::wxVariant( wxObject* val, const wxString& name)
|
||||||
{
|
{
|
||||||
m_data = new wxVariantDataWxObjectPtr(val);
|
m_data = new wxVariantDataWxObjectPtr(val);
|
||||||
m_name = name;
|
m_name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_DATETIME
|
#if wxUSE_DATETIME
|
||||||
wxVariant::wxVariant(const wxDateTime& val, const wxString& name) // Date
|
wxVariant::wxVariant(const wxDateTime& val, const wxString& name) // Date
|
||||||
{
|
{
|
||||||
m_data = new wxVariantDataDateTime(val);
|
m_data = new wxVariantDataDateTime(val);
|
||||||
m_name = name;
|
m_name = name;
|
||||||
}
|
}
|
||||||
#endif // wxUSE_DATETIME
|
#endif // wxUSE_DATETIME
|
||||||
|
|
||||||
#if wxUSE_ODBC
|
#if wxUSE_ODBC
|
||||||
wxVariant::wxVariant(const TIME_STRUCT* valptr, const wxString& name) // Date
|
wxVariant::wxVariant(const TIME_STRUCT* valptr, const wxString& name) // Date
|
||||||
@@ -1386,7 +1386,7 @@ bool wxVariant::operator== (double value) const
|
|||||||
{
|
{
|
||||||
double thisValue;
|
double thisValue;
|
||||||
if (!Convert(&thisValue))
|
if (!Convert(&thisValue))
|
||||||
return FALSE;
|
return false;
|
||||||
else
|
else
|
||||||
return (value == thisValue);
|
return (value == thisValue);
|
||||||
}
|
}
|
||||||
@@ -1414,7 +1414,7 @@ bool wxVariant::operator== (long value) const
|
|||||||
{
|
{
|
||||||
long thisValue;
|
long thisValue;
|
||||||
if (!Convert(&thisValue))
|
if (!Convert(&thisValue))
|
||||||
return FALSE;
|
return false;
|
||||||
else
|
else
|
||||||
return (value == thisValue);
|
return (value == thisValue);
|
||||||
}
|
}
|
||||||
@@ -1442,7 +1442,7 @@ bool wxVariant::operator== (char value) const
|
|||||||
{
|
{
|
||||||
char thisValue;
|
char thisValue;
|
||||||
if (!Convert(&thisValue))
|
if (!Convert(&thisValue))
|
||||||
return FALSE;
|
return false;
|
||||||
else
|
else
|
||||||
return (value == thisValue);
|
return (value == thisValue);
|
||||||
}
|
}
|
||||||
@@ -1471,7 +1471,7 @@ bool wxVariant::operator== (bool value) const
|
|||||||
{
|
{
|
||||||
bool thisValue;
|
bool thisValue;
|
||||||
if (!Convert(&thisValue))
|
if (!Convert(&thisValue))
|
||||||
return FALSE;
|
return false;
|
||||||
else
|
else
|
||||||
return (value == thisValue);
|
return (value == thisValue);
|
||||||
}
|
}
|
||||||
@@ -1500,7 +1500,7 @@ bool wxVariant::operator== (const wxString& value) const
|
|||||||
{
|
{
|
||||||
wxString thisValue;
|
wxString thisValue;
|
||||||
if (!Convert(&thisValue))
|
if (!Convert(&thisValue))
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
return value == thisValue;
|
return value == thisValue;
|
||||||
}
|
}
|
||||||
@@ -1621,7 +1621,7 @@ bool wxVariant::operator== (const wxDateTime& value) const
|
|||||||
{
|
{
|
||||||
wxDateTime thisValue;
|
wxDateTime thisValue;
|
||||||
if (!Convert(&thisValue))
|
if (!Convert(&thisValue))
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
return value.IsEqualTo(thisValue);
|
return value.IsEqualTo(thisValue);
|
||||||
}
|
}
|
||||||
@@ -1676,7 +1676,7 @@ bool wxVariant::operator==(const wxArrayString& WXUNUSED(value)) const
|
|||||||
{
|
{
|
||||||
wxFAIL_MSG( _T("TODO") );
|
wxFAIL_MSG( _T("TODO") );
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxVariant::operator!=(const wxArrayString& value) const
|
bool wxVariant::operator!=(const wxArrayString& value) const
|
||||||
@@ -1797,7 +1797,7 @@ bool wxVariant::IsType(const wxString& type) const
|
|||||||
|
|
||||||
bool wxVariant::IsValueKindOf(const wxClassInfo* type) const
|
bool wxVariant::IsValueKindOf(const wxClassInfo* type) const
|
||||||
{
|
{
|
||||||
wxClassInfo* info=m_data->GetValueClassInfo();
|
wxClassInfo* info=m_data->GetValueClassInfo();
|
||||||
return info ? info->IsKindOf(type) : false ;
|
return info ? info->IsKindOf(type) : false ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1869,7 +1869,7 @@ void* wxVariant::GetVoidPtr() const
|
|||||||
return (void*) ((wxVariantDataVoidPtr*) m_data)->GetValue();
|
return (void*) ((wxVariantDataVoidPtr*) m_data)->GetValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxObject* wxVariant::GetWxObjectPtr()
|
wxObject* wxVariant::GetWxObjectPtr()
|
||||||
{
|
{
|
||||||
wxASSERT(wxIsKindOf(m_data, wxVariantDataWxObjectPtr));
|
wxASSERT(wxIsKindOf(m_data, wxVariantDataWxObjectPtr));
|
||||||
return (wxObject*) ((wxVariantDataWxObjectPtr*) m_data)->GetValue();
|
return (wxObject*) ((wxVariantDataWxObjectPtr*) m_data)->GetValue();
|
||||||
@@ -1924,7 +1924,7 @@ void wxVariant::Insert(const wxVariant& value)
|
|||||||
list.Insert(new wxVariant(value));
|
list.Insert(new wxVariant(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns TRUE if the variant is a member of the list
|
// Returns true if the variant is a member of the list
|
||||||
bool wxVariant::Member(const wxVariant& value) const
|
bool wxVariant::Member(const wxVariant& value) const
|
||||||
{
|
{
|
||||||
wxList& list = GetList();
|
wxList& list = GetList();
|
||||||
@@ -1934,10 +1934,10 @@ bool wxVariant::Member(const wxVariant& value) const
|
|||||||
{
|
{
|
||||||
wxVariant* other = (wxVariant*) node->GetData();
|
wxVariant* other = (wxVariant*) node->GetData();
|
||||||
if (value == *other)
|
if (value == *other)
|
||||||
return TRUE;
|
return true;
|
||||||
node = node->GetNext();
|
node = node->GetNext();
|
||||||
}
|
}
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deletes the nth element of the list
|
// Deletes the nth element of the list
|
||||||
@@ -1950,7 +1950,7 @@ bool wxVariant::Delete(int item)
|
|||||||
wxVariant* variant = (wxVariant*) node->GetData();
|
wxVariant* variant = (wxVariant*) node->GetData();
|
||||||
delete variant;
|
delete variant;
|
||||||
list.Erase(node);
|
list.Erase(node);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear list
|
// Clear list
|
||||||
@@ -1986,9 +1986,9 @@ bool wxVariant::Convert(long* value) const
|
|||||||
else if (type == wxT("string"))
|
else if (type == wxT("string"))
|
||||||
*value = wxAtol((const wxChar*) ((wxVariantDataString*)GetData())->GetValue());
|
*value = wxAtol((const wxChar*) ((wxVariantDataString*)GetData())->GetValue());
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxVariant::Convert(bool* value) const
|
bool wxVariant::Convert(bool* value) const
|
||||||
@@ -2007,16 +2007,16 @@ bool wxVariant::Convert(bool* value) const
|
|||||||
wxString val(((wxVariantDataString*)GetData())->GetValue());
|
wxString val(((wxVariantDataString*)GetData())->GetValue());
|
||||||
val.MakeLower();
|
val.MakeLower();
|
||||||
if (val == wxT("true") || val == wxT("yes"))
|
if (val == wxT("true") || val == wxT("yes"))
|
||||||
*value = TRUE;
|
*value = true;
|
||||||
else if (val == wxT("false") || val == wxT("no"))
|
else if (val == wxT("false") || val == wxT("no"))
|
||||||
*value = FALSE;
|
*value = false;
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxVariant::Convert(double* value) const
|
bool wxVariant::Convert(double* value) const
|
||||||
@@ -2033,9 +2033,9 @@ bool wxVariant::Convert(double* value) const
|
|||||||
else if (type == wxT("string"))
|
else if (type == wxT("string"))
|
||||||
*value = (double) wxAtof((const wxChar*) ((wxVariantDataString*)GetData())->GetValue());
|
*value = (double) wxAtof((const wxChar*) ((wxVariantDataString*)GetData())->GetValue());
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxVariant::Convert(char* value) const
|
bool wxVariant::Convert(char* value) const
|
||||||
@@ -2050,15 +2050,15 @@ bool wxVariant::Convert(char* value) const
|
|||||||
*value = (char) (((wxVariantDataBool*)GetData())->GetValue());
|
*value = (char) (((wxVariantDataBool*)GetData())->GetValue());
|
||||||
#endif
|
#endif
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxVariant::Convert(wxString* value) const
|
bool wxVariant::Convert(wxString* value) const
|
||||||
{
|
{
|
||||||
*value = MakeString();
|
*value = MakeString();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_DATETIME
|
#if wxUSE_DATETIME
|
||||||
@@ -2068,7 +2068,7 @@ bool wxVariant::Convert(wxDateTime* value) const
|
|||||||
if (type == wxT("datetime"))
|
if (type == wxT("datetime"))
|
||||||
{
|
{
|
||||||
*value = ((wxVariantDataDateTime*)GetData())->GetValue();
|
*value = ((wxVariantDataDateTime*)GetData())->GetValue();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
// Fallback to string conversion
|
// Fallback to string conversion
|
||||||
wxString val;
|
wxString val;
|
||||||
|
@@ -34,26 +34,26 @@ wxFileInputStream::wxFileInputStream(const wxString& fileName)
|
|||||||
: wxInputStream()
|
: wxInputStream()
|
||||||
{
|
{
|
||||||
m_file = new wxFile(fileName, wxFile::read);
|
m_file = new wxFile(fileName, wxFile::read);
|
||||||
m_file_destroy = TRUE;
|
m_file_destroy = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFileInputStream::wxFileInputStream()
|
wxFileInputStream::wxFileInputStream()
|
||||||
: wxInputStream()
|
: wxInputStream()
|
||||||
{
|
{
|
||||||
m_file_destroy = FALSE;
|
m_file_destroy = false;
|
||||||
m_file = NULL;
|
m_file = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFileInputStream::wxFileInputStream(wxFile& file)
|
wxFileInputStream::wxFileInputStream(wxFile& file)
|
||||||
{
|
{
|
||||||
m_file = &file;
|
m_file = &file;
|
||||||
m_file_destroy = FALSE;
|
m_file_destroy = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFileInputStream::wxFileInputStream(int fd)
|
wxFileInputStream::wxFileInputStream(int fd)
|
||||||
{
|
{
|
||||||
m_file = new wxFile(fd);
|
m_file = new wxFile(fd);
|
||||||
m_file_destroy = TRUE;
|
m_file_destroy = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFileInputStream::~wxFileInputStream()
|
wxFileInputStream::~wxFileInputStream()
|
||||||
@@ -110,7 +110,7 @@ off_t wxFileInputStream::OnSysTell() const
|
|||||||
wxFileOutputStream::wxFileOutputStream(const wxString& fileName)
|
wxFileOutputStream::wxFileOutputStream(const wxString& fileName)
|
||||||
{
|
{
|
||||||
m_file = new wxFile(fileName, wxFile::write);
|
m_file = new wxFile(fileName, wxFile::write);
|
||||||
m_file_destroy = TRUE;
|
m_file_destroy = true;
|
||||||
|
|
||||||
if (!m_file->IsOpened())
|
if (!m_file->IsOpened())
|
||||||
{
|
{
|
||||||
@@ -126,20 +126,20 @@ wxFileOutputStream::wxFileOutputStream(const wxString& fileName)
|
|||||||
wxFileOutputStream::wxFileOutputStream(wxFile& file)
|
wxFileOutputStream::wxFileOutputStream(wxFile& file)
|
||||||
{
|
{
|
||||||
m_file = &file;
|
m_file = &file;
|
||||||
m_file_destroy = FALSE;
|
m_file_destroy = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFileOutputStream::wxFileOutputStream()
|
wxFileOutputStream::wxFileOutputStream()
|
||||||
: wxOutputStream()
|
: wxOutputStream()
|
||||||
{
|
{
|
||||||
m_file_destroy = FALSE;
|
m_file_destroy = false;
|
||||||
m_file = NULL;
|
m_file = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFileOutputStream::wxFileOutputStream(int fd)
|
wxFileOutputStream::wxFileOutputStream(int fd)
|
||||||
{
|
{
|
||||||
m_file = new wxFile(fd);
|
m_file = new wxFile(fd);
|
||||||
m_file_destroy = TRUE;
|
m_file_destroy = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFileOutputStream::~wxFileOutputStream()
|
wxFileOutputStream::~wxFileOutputStream()
|
||||||
@@ -199,26 +199,26 @@ wxFFileInputStream::wxFFileInputStream(const wxString& fileName)
|
|||||||
: wxInputStream()
|
: wxInputStream()
|
||||||
{
|
{
|
||||||
m_file = new wxFFile(fileName, _T("rb"));
|
m_file = new wxFFile(fileName, _T("rb"));
|
||||||
m_file_destroy = TRUE;
|
m_file_destroy = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFFileInputStream::wxFFileInputStream()
|
wxFFileInputStream::wxFFileInputStream()
|
||||||
: wxInputStream()
|
: wxInputStream()
|
||||||
{
|
{
|
||||||
m_file_destroy = FALSE;
|
m_file_destroy = false;
|
||||||
m_file = NULL;
|
m_file = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFFileInputStream::wxFFileInputStream(wxFFile& file)
|
wxFFileInputStream::wxFFileInputStream(wxFFile& file)
|
||||||
{
|
{
|
||||||
m_file = &file;
|
m_file = &file;
|
||||||
m_file_destroy = FALSE;
|
m_file_destroy = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFFileInputStream::wxFFileInputStream(FILE *file)
|
wxFFileInputStream::wxFFileInputStream(FILE *file)
|
||||||
{
|
{
|
||||||
m_file = new wxFFile(file);
|
m_file = new wxFFile(file);
|
||||||
m_file_destroy = TRUE;
|
m_file_destroy = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFFileInputStream::~wxFFileInputStream()
|
wxFFileInputStream::~wxFFileInputStream()
|
||||||
@@ -272,7 +272,7 @@ off_t wxFFileInputStream::OnSysTell() const
|
|||||||
wxFFileOutputStream::wxFFileOutputStream(const wxString& fileName)
|
wxFFileOutputStream::wxFFileOutputStream(const wxString& fileName)
|
||||||
{
|
{
|
||||||
m_file = new wxFFile(fileName, _T("w+b"));
|
m_file = new wxFFile(fileName, _T("w+b"));
|
||||||
m_file_destroy = TRUE;
|
m_file_destroy = true;
|
||||||
|
|
||||||
if (!m_file->IsOpened())
|
if (!m_file->IsOpened())
|
||||||
{
|
{
|
||||||
@@ -288,20 +288,20 @@ wxFFileOutputStream::wxFFileOutputStream(const wxString& fileName)
|
|||||||
wxFFileOutputStream::wxFFileOutputStream(wxFFile& file)
|
wxFFileOutputStream::wxFFileOutputStream(wxFFile& file)
|
||||||
{
|
{
|
||||||
m_file = &file;
|
m_file = &file;
|
||||||
m_file_destroy = FALSE;
|
m_file_destroy = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFFileOutputStream::wxFFileOutputStream()
|
wxFFileOutputStream::wxFFileOutputStream()
|
||||||
: wxOutputStream()
|
: wxOutputStream()
|
||||||
{
|
{
|
||||||
m_file_destroy = FALSE;
|
m_file_destroy = false;
|
||||||
m_file = NULL;
|
m_file = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFFileOutputStream::wxFFileOutputStream(FILE *file)
|
wxFFileOutputStream::wxFFileOutputStream(FILE *file)
|
||||||
{
|
{
|
||||||
m_file = new wxFFile(file);
|
m_file = new wxFFile(file);
|
||||||
m_file_destroy = TRUE;
|
m_file_destroy = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFFileOutputStream::~wxFFileOutputStream()
|
wxFFileOutputStream::~wxFFileOutputStream()
|
||||||
|
@@ -78,7 +78,7 @@
|
|||||||
#endif // wxUSE_CARET
|
#endif // wxUSE_CARET
|
||||||
|
|
||||||
#if wxUSE_SYSTEM_OPTIONS
|
#if wxUSE_SYSTEM_OPTIONS
|
||||||
#include "wx/sysopt.h"
|
#include "wx/sysopt.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -156,7 +156,7 @@ wxWindowBase::wxWindowBase()
|
|||||||
// no style bits
|
// no style bits
|
||||||
m_exStyle =
|
m_exStyle =
|
||||||
m_windowStyle = 0;
|
m_windowStyle = 0;
|
||||||
|
|
||||||
m_backgroundStyle = wxBG_STYLE_SYSTEM;
|
m_backgroundStyle = wxBG_STYLE_SYSTEM;
|
||||||
|
|
||||||
#if wxUSE_CONSTRAINTS
|
#if wxUSE_CONSTRAINTS
|
||||||
@@ -490,7 +490,7 @@ void wxWindowBase::Centre(int direction)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// move the window to this position (keeping the old size but using
|
// move the window to this position (keeping the old size but using
|
||||||
// SetSize() and not Move() to allow xNew and/or yNew to be -1)
|
// SetSize() and not Move() to allow xNew and/or yNew to be wxDefaultCoord)
|
||||||
SetSize(xNew, yNew, width, height, wxSIZE_ALLOW_MINUS_ONE);
|
SetSize(xNew, yNew, width, height, wxSIZE_ALLOW_MINUS_ONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -518,7 +518,7 @@ void wxWindowBase::FitInside()
|
|||||||
static bool wxHasRealChildren(const wxWindowBase* win)
|
static bool wxHasRealChildren(const wxWindowBase* win)
|
||||||
{
|
{
|
||||||
int realChildCount = 0;
|
int realChildCount = 0;
|
||||||
|
|
||||||
for ( wxWindowList::compatibility_iterator node = win->GetChildren().GetFirst();
|
for ( wxWindowList::compatibility_iterator node = win->GetChildren().GetFirst();
|
||||||
node;
|
node;
|
||||||
node = node->GetNext() )
|
node = node->GetNext() )
|
||||||
@@ -660,7 +660,7 @@ void wxWindowBase::SetBestFittingSize(const wxSize& size)
|
|||||||
|
|
||||||
// Merge the size with the best size if needed
|
// Merge the size with the best size if needed
|
||||||
wxSize best = GetBestFittingSize();
|
wxSize best = GetBestFittingSize();
|
||||||
|
|
||||||
// If the current size doesn't match then change it
|
// If the current size doesn't match then change it
|
||||||
if (GetSize() != best)
|
if (GetSize() != best)
|
||||||
SetSize(best);
|
SetSize(best);
|
||||||
@@ -1027,7 +1027,7 @@ wxColour wxWindowBase::GetForegroundColour() const
|
|||||||
|
|
||||||
bool wxWindowBase::SetBackgroundColour( const wxColour &colour )
|
bool wxWindowBase::SetBackgroundColour( const wxColour &colour )
|
||||||
{
|
{
|
||||||
if ( colour == m_backgroundColour )
|
if ( colour == m_backgroundColour )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_hasBgCol = colour.Ok();
|
m_hasBgCol = colour.Ok();
|
||||||
@@ -2089,10 +2089,10 @@ wxPoint wxWindowBase::ConvertPixelsToDialog(const wxPoint& pt)
|
|||||||
{
|
{
|
||||||
int charWidth = GetCharWidth();
|
int charWidth = GetCharWidth();
|
||||||
int charHeight = GetCharHeight();
|
int charHeight = GetCharHeight();
|
||||||
wxPoint pt2(-1, -1);
|
wxPoint pt2 = wxDefaultPosition;
|
||||||
if (pt.x != -1)
|
if (pt.x != wxDefaultCoord)
|
||||||
pt2.x = (int) ((pt.x * 4) / charWidth);
|
pt2.x = (int) ((pt.x * 4) / charWidth);
|
||||||
if (pt.y != -1)
|
if (pt.y != wxDefaultCoord)
|
||||||
pt2.y = (int) ((pt.y * 8) / charHeight);
|
pt2.y = (int) ((pt.y * 8) / charHeight);
|
||||||
|
|
||||||
return pt2;
|
return pt2;
|
||||||
@@ -2102,10 +2102,10 @@ wxPoint wxWindowBase::ConvertDialogToPixels(const wxPoint& pt)
|
|||||||
{
|
{
|
||||||
int charWidth = GetCharWidth();
|
int charWidth = GetCharWidth();
|
||||||
int charHeight = GetCharHeight();
|
int charHeight = GetCharHeight();
|
||||||
wxPoint pt2(-1, -1);
|
wxPoint pt2 = wxDefaultPosition;
|
||||||
if (pt.x != -1)
|
if (pt.x != wxDefaultCoord)
|
||||||
pt2.x = (int) ((pt.x * charWidth) / 4);
|
pt2.x = (int) ((pt.x * charWidth) / 4);
|
||||||
if (pt.y != -1)
|
if (pt.y != wxDefaultCoord)
|
||||||
pt2.y = (int) ((pt.y * charHeight) / 8);
|
pt2.y = (int) ((pt.y * charHeight) / 8);
|
||||||
|
|
||||||
return pt2;
|
return pt2;
|
||||||
@@ -2886,7 +2886,7 @@ wxAccStatus wxWindowAccessible::GetFocus(int* WXUNUSED(childId), wxAccessible**
|
|||||||
// Gets a variant representing the selected children
|
// Gets a variant representing the selected children
|
||||||
// of this object.
|
// of this object.
|
||||||
// Acceptable values:
|
// Acceptable values:
|
||||||
// - a null variant (IsNull() returns TRUE)
|
// - a null variant (IsNull() returns true)
|
||||||
// - a list variant (GetType() == wxT("list")
|
// - a list variant (GetType() == wxT("list")
|
||||||
// - an integer representing the selected child element,
|
// - an integer representing the selected child element,
|
||||||
// or 0 if this object is selected (GetType() == wxT("long")
|
// or 0 if this object is selected (GetType() == wxT("long")
|
||||||
|
@@ -130,11 +130,11 @@ bool WXDLLEXPORT wxOKlibc()
|
|||||||
(strcasecmp(cur_locale + strlen(cur_locale) - 4, "utf8")) ||
|
(strcasecmp(cur_locale + strlen(cur_locale) - 4, "utf8")) ||
|
||||||
(strcasecmp(cur_locale + strlen(cur_locale) - 5, "utf-8"))) {
|
(strcasecmp(cur_locale + strlen(cur_locale) - 5, "utf-8"))) {
|
||||||
// nope, don't use libc conversion
|
// nope, don't use libc conversion
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -180,10 +180,10 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
|
|||||||
{
|
{
|
||||||
static char s_szFlags[256] = "%";
|
static char s_szFlags[256] = "%";
|
||||||
size_t flagofs = 1;
|
size_t flagofs = 1;
|
||||||
bool adj_left = FALSE,
|
bool adj_left = false,
|
||||||
in_prec = FALSE,
|
in_prec = false,
|
||||||
prec_dot = FALSE,
|
prec_dot = false,
|
||||||
done = FALSE;
|
done = false;
|
||||||
int ilen = 0;
|
int ilen = 0;
|
||||||
size_t min_width = 0,
|
size_t min_width = 0,
|
||||||
max_width = wxSTRING_MAXLEN;
|
max_width = wxSTRING_MAXLEN;
|
||||||
@@ -194,7 +194,7 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
|
|||||||
if (in_prec && !prec_dot) \
|
if (in_prec && !prec_dot) \
|
||||||
{ \
|
{ \
|
||||||
s_szFlags[flagofs++] = '.'; \
|
s_szFlags[flagofs++] = '.'; \
|
||||||
prec_dot = TRUE; \
|
prec_dot = true; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define APPEND_CH(ch) \
|
#define APPEND_CH(ch) \
|
||||||
@@ -220,12 +220,12 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
|
|||||||
case wxT('\0'):
|
case wxT('\0'):
|
||||||
APPEND_CH(_T('\0'));
|
APPEND_CH(_T('\0'));
|
||||||
|
|
||||||
done = TRUE;
|
done = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxT('%'):
|
case wxT('%'):
|
||||||
APPEND_CH(_T('%'));
|
APPEND_CH(_T('%'));
|
||||||
done = TRUE;
|
done = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxT('#'):
|
case wxT('#'):
|
||||||
@@ -239,14 +239,14 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
|
|||||||
|
|
||||||
case wxT('-'):
|
case wxT('-'):
|
||||||
CHECK_PREC
|
CHECK_PREC
|
||||||
adj_left = TRUE;
|
adj_left = true;
|
||||||
s_szFlags[flagofs++] = ch;
|
s_szFlags[flagofs++] = ch;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxT('.'):
|
case wxT('.'):
|
||||||
CHECK_PREC
|
CHECK_PREC
|
||||||
in_prec = TRUE;
|
in_prec = true;
|
||||||
prec_dot = FALSE;
|
prec_dot = false;
|
||||||
max_width = 0;
|
max_width = 0;
|
||||||
// dot will be auto-added to s_szFlags if non-negative
|
// dot will be auto-added to s_szFlags if non-negative
|
||||||
// number follows
|
// number follows
|
||||||
@@ -372,7 +372,7 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
|
|||||||
APPEND_STR(tmp);
|
APPEND_STR(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
done = TRUE;
|
done = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxT('e'):
|
case wxT('e'):
|
||||||
@@ -400,7 +400,7 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
|
|||||||
APPEND_STR(tmp);
|
APPEND_STR(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
done = TRUE;
|
done = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxT('p'):
|
case wxT('p'):
|
||||||
@@ -415,7 +415,7 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
|
|||||||
wxConvLibc.cMB2WX(szScratch);
|
wxConvLibc.cMB2WX(szScratch);
|
||||||
APPEND_STR(tmp);
|
APPEND_STR(tmp);
|
||||||
|
|
||||||
done = TRUE;
|
done = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -447,7 +447,7 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
|
|||||||
for (i = 1; i < min_width; i++)
|
for (i = 1; i < min_width; i++)
|
||||||
APPEND_CH(_T(' '));
|
APPEND_CH(_T(' '));
|
||||||
|
|
||||||
done = TRUE;
|
done = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -517,7 +517,7 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
|
|||||||
for (i = len; i < min_width; i++)
|
for (i = len; i < min_width; i++)
|
||||||
APPEND_CH(_T(' '));
|
APPEND_CH(_T(' '));
|
||||||
|
|
||||||
done = TRUE;
|
done = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -537,14 +537,14 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
|
|||||||
long int *val = va_arg(argptr, long int *);
|
long int *val = va_arg(argptr, long int *);
|
||||||
*val = lenCur;
|
*val = lenCur;
|
||||||
}
|
}
|
||||||
done = TRUE;
|
done = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// bad format, leave unchanged
|
// bad format, leave unchanged
|
||||||
APPEND_CH(_T('%'));
|
APPEND_CH(_T('%'));
|
||||||
APPEND_CH(ch);
|
APPEND_CH(ch);
|
||||||
done = TRUE;
|
done = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -178,10 +178,10 @@ wxImage wxXPMDecoder::ReadFile(wxInputStream& stream)
|
|||||||
if ( (*q == '*') && (*(q + 1) == '/') )
|
if ( (*q == '*') && (*(q + 1) == '/') )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// memmove allows overlaps (unlike strcpy):
|
// memmove allows overlaps (unlike strcpy):
|
||||||
size_t cpylen = strlen(q + 2) + 1;
|
size_t cpylen = strlen(q + 2) + 1;
|
||||||
memmove(p, q + 2, cpylen);
|
memmove(p, q + 2, cpylen);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -676,7 +676,7 @@ wxImage wxXPMDecoder::ReadData(const char **xpm_data)
|
|||||||
/*
|
/*
|
||||||
* Read hints and initialize structures:
|
* Read hints and initialize structures:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
count = sscanf(xpm_data[0], "%u %u %u %u",
|
count = sscanf(xpm_data[0], "%u %u %u %u",
|
||||||
&width, &height, &colors_cnt, &chars_per_pixel);
|
&width, &height, &colors_cnt, &chars_per_pixel);
|
||||||
if ( count != 4 || width * height * colors_cnt == 0 )
|
if ( count != 4 || width * height * colors_cnt == 0 )
|
||||||
@@ -762,7 +762,7 @@ wxImage wxXPMDecoder::ReadData(const char **xpm_data)
|
|||||||
unsigned char *img_data = img.GetData();
|
unsigned char *img_data = img.GetData();
|
||||||
wxXPMColourMap::iterator entry;
|
wxXPMColourMap::iterator entry;
|
||||||
wxXPMColourMap::iterator end = clr_tbl.end();
|
wxXPMColourMap::iterator end = clr_tbl.end();
|
||||||
|
|
||||||
for (j = 0; j < height; j++)
|
for (j = 0; j < height; j++)
|
||||||
{
|
{
|
||||||
for (i = 0; i < width; i++, img_data += 3)
|
for (i = 0; i < width; i++, img_data += 3)
|
||||||
|
@@ -314,7 +314,7 @@ wxTypeInfo ( wxT_DELEGATE , to , from , wxEmptyString )
|
|||||||
{ m_eventClass = eventClass ; m_eventType = eventType ; m_lastEventType = lastEventType; }
|
{ m_eventClass = eventClass ; m_eventType = eventType ; m_lastEventType = lastEventType; }
|
||||||
|
|
||||||
void wxTypeInfo::Register()
|
void wxTypeInfo::Register()
|
||||||
{
|
{
|
||||||
if ( ms_typeTable == NULL )
|
if ( ms_typeTable == NULL )
|
||||||
ms_typeTable = new wxTypeInfoMap() ;
|
ms_typeTable = new wxTypeInfoMap() ;
|
||||||
|
|
||||||
@@ -474,7 +474,7 @@ wxObjectStreamingCallback wxClassInfo::GetStreamingCallback() const
|
|||||||
return retval ;
|
return retval ;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxClassInfo::BeforeWriteObject( const wxObject *obj, wxWriter *streamer , wxPersister *persister , wxxVariantArray &metadata) const
|
bool wxClassInfo::BeforeWriteObject( const wxObject *obj, wxWriter *streamer , wxPersister *persister , wxxVariantArray &metadata) const
|
||||||
{
|
{
|
||||||
wxObjectStreamingCallback sb = GetStreamingCallback() ;
|
wxObjectStreamingCallback sb = GetStreamingCallback() ;
|
||||||
if ( sb )
|
if ( sb )
|
||||||
@@ -523,13 +523,13 @@ void wxClassInfo::AddToPropertyCollection(wxObject *object, const wxChar *proper
|
|||||||
accessor->AddToPropertyCollection( object , value ) ;
|
accessor->AddToPropertyCollection( object , value ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
// void wxClassInfo::GetProperties( wxPropertyInfoMap &map ) const
|
// void wxClassInfo::GetProperties( wxPropertyInfoMap &map ) const
|
||||||
// The map parameter (the name map that is) seems something special
|
// The map parameter (the name map that is) seems something special
|
||||||
// to MSVC and so we use a other name.
|
// to MSVC and so we use a other name.
|
||||||
void wxClassInfo::GetProperties( wxPropertyInfoMap &infomap ) const
|
void wxClassInfo::GetProperties( wxPropertyInfoMap &infomap ) const
|
||||||
{
|
{
|
||||||
const wxPropertyInfo *pi = GetFirstProperty() ;
|
const wxPropertyInfo *pi = GetFirstProperty() ;
|
||||||
while( pi )
|
while( pi )
|
||||||
{
|
{
|
||||||
if ( infomap.find( pi->GetName() ) == infomap.end() )
|
if ( infomap.find( pi->GetName() ) == infomap.end() )
|
||||||
infomap[pi->GetName()] = (wxPropertyInfo*) pi ;
|
infomap[pi->GetName()] = (wxPropertyInfo*) pi ;
|
||||||
@@ -610,13 +610,13 @@ wxxVariant wxDynamicObject::GetProperty (const wxChar *propertyName) const
|
|||||||
return m_data->m_properties[propertyName] ;
|
return m_data->m_properties[propertyName] ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDynamicObject::RemoveProperty( const wxChar *propertyName )
|
void wxDynamicObject::RemoveProperty( const wxChar *propertyName )
|
||||||
{
|
{
|
||||||
wxASSERT_MSG(m_classInfo->FindPropertyInfoInThisClass(propertyName),wxT("Removing Unknown Property in a Dynamic Object") ) ;
|
wxASSERT_MSG(m_classInfo->FindPropertyInfoInThisClass(propertyName),wxT("Removing Unknown Property in a Dynamic Object") ) ;
|
||||||
m_data->m_properties.erase( propertyName ) ;
|
m_data->m_properties.erase( propertyName ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDynamicObject::RenameProperty( const wxChar *oldPropertyName , const wxChar *newPropertyName )
|
void wxDynamicObject::RenameProperty( const wxChar *oldPropertyName , const wxChar *newPropertyName )
|
||||||
{
|
{
|
||||||
wxASSERT_MSG(m_classInfo->FindPropertyInfoInThisClass(oldPropertyName),wxT("Renaming Unknown Property in a Dynamic Object") ) ;
|
wxASSERT_MSG(m_classInfo->FindPropertyInfoInThisClass(oldPropertyName),wxT("Renaming Unknown Property in a Dynamic Object") ) ;
|
||||||
wxxVariant value = m_data->m_properties[oldPropertyName] ;
|
wxxVariant value = m_data->m_properties[oldPropertyName] ;
|
||||||
@@ -701,7 +701,7 @@ void wxDynamicClassInfo::AddHandler( const wxChar *handlerName , wxObjectEventFu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// removes an existing runtime-property
|
// removes an existing runtime-property
|
||||||
void wxDynamicClassInfo::RemoveProperty( const wxChar *propertyName )
|
void wxDynamicClassInfo::RemoveProperty( const wxChar *propertyName )
|
||||||
{
|
{
|
||||||
for ( wxDynamicObjectList::iterator iter = m_data->m_dynamicObjects.begin() ; iter != m_data->m_dynamicObjects.end() ; ++iter )
|
for ( wxDynamicObjectList::iterator iter = m_data->m_dynamicObjects.begin() ; iter != m_data->m_dynamicObjects.end() ; ++iter )
|
||||||
(*iter)->RemoveProperty( propertyName ) ;
|
(*iter)->RemoveProperty( propertyName ) ;
|
||||||
@@ -709,13 +709,13 @@ void wxDynamicClassInfo::RemoveProperty( const wxChar *propertyName )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// removes an existing runtime-handler
|
// removes an existing runtime-handler
|
||||||
void wxDynamicClassInfo::RemoveHandler( const wxChar *handlerName )
|
void wxDynamicClassInfo::RemoveHandler( const wxChar *handlerName )
|
||||||
{
|
{
|
||||||
delete FindHandlerInfoInThisClass(handlerName) ;
|
delete FindHandlerInfoInThisClass(handlerName) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
// renames an existing runtime-property
|
// renames an existing runtime-property
|
||||||
void wxDynamicClassInfo::RenameProperty( const wxChar *oldPropertyName , const wxChar *newPropertyName )
|
void wxDynamicClassInfo::RenameProperty( const wxChar *oldPropertyName , const wxChar *newPropertyName )
|
||||||
{
|
{
|
||||||
wxPropertyInfo* pi = FindPropertyInfoInThisClass(oldPropertyName) ;
|
wxPropertyInfo* pi = FindPropertyInfoInThisClass(oldPropertyName) ;
|
||||||
wxASSERT_MSG( pi ,wxT("not existing property") ) ;
|
wxASSERT_MSG( pi ,wxT("not existing property") ) ;
|
||||||
@@ -726,7 +726,7 @@ void wxDynamicClassInfo::RenameProperty( const wxChar *oldPropertyName , const w
|
|||||||
}
|
}
|
||||||
|
|
||||||
// renames an existing runtime-handler
|
// renames an existing runtime-handler
|
||||||
void wxDynamicClassInfo::RenameHandler( const wxChar *oldHandlerName , const wxChar *newHandlerName )
|
void wxDynamicClassInfo::RenameHandler( const wxChar *oldHandlerName , const wxChar *newHandlerName )
|
||||||
{
|
{
|
||||||
wxASSERT_MSG(FindHandlerInfoInThisClass(oldHandlerName),wxT("not existing handler") ) ;
|
wxASSERT_MSG(FindHandlerInfoInThisClass(oldHandlerName),wxT("not existing handler") ) ;
|
||||||
FindHandlerInfoInThisClass(oldHandlerName)->m_name = newHandlerName ;
|
FindHandlerInfoInThisClass(oldHandlerName)->m_name = newHandlerName ;
|
||||||
|
@@ -288,7 +288,7 @@ void wxWriter::WriteOneProperty( const wxObject *obj , const wxClassInfo* ci , c
|
|||||||
if ( value.GetAsString() == pi->GetDefaultValue().GetAsString() )
|
if ( value.GetAsString() == pi->GetDefaultValue().GetAsString() )
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
// avoid streaming out null objects
|
// avoid streaming out null objects
|
||||||
const wxClassTypeInfo* cti = dynamic_cast< const wxClassTypeInfo* > ( pi->GetTypeInfo() ) ;
|
const wxClassTypeInfo* cti = dynamic_cast< const wxClassTypeInfo* > ( pi->GetTypeInfo() ) ;
|
||||||
|
|
||||||
@@ -582,7 +582,7 @@ void wxRuntimeDepersister::SetConnect(int eventSourceObjectID,
|
|||||||
handlerInfo->GetEventFunction() , NULL /*user data*/ ,
|
handlerInfo->GetEventFunction() , NULL /*user data*/ ,
|
||||||
ehsink ) ;
|
ehsink ) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -233,7 +233,7 @@ int wxXmlReader::ReadComponent(wxXmlNode *node, wxDepersister *callbacks)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxLogError( _("Forward hrefs are not supported") ) ;
|
wxLogError( _("Forward hrefs are not supported") ) ;
|
||||||
return wxInvalidObjectID ;
|
return wxInvalidObjectID ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( !node->GetPropVal(wxT("id") , &ObjectIdString ) )
|
if ( !node->GetPropVal(wxT("id") , &ObjectIdString ) )
|
||||||
@@ -255,7 +255,7 @@ int wxXmlReader::ReadComponent(wxXmlNode *node, wxDepersister *callbacks)
|
|||||||
|
|
||||||
if ( children != NULL && children->GetType() == wxXML_TEXT_NODE )
|
if ( children != NULL && children->GetType() == wxXML_TEXT_NODE )
|
||||||
{
|
{
|
||||||
wxLogError(_("objects cannot have XML Text Nodes") ) ;
|
wxLogError(_("objects cannot have XML Text Nodes") ) ;
|
||||||
return wxInvalidObjectID;
|
return wxInvalidObjectID;
|
||||||
}
|
}
|
||||||
if (!node->GetPropVal(wxT("id"), &ObjectIdString))
|
if (!node->GetPropVal(wxT("id"), &ObjectIdString))
|
||||||
@@ -268,7 +268,7 @@ int wxXmlReader::ReadComponent(wxXmlNode *node, wxDepersister *callbacks)
|
|||||||
// is this object already has been streamed in, return it here
|
// is this object already has been streamed in, return it here
|
||||||
if ( HasObjectClassInfo( objectID ) )
|
if ( HasObjectClassInfo( objectID ) )
|
||||||
{
|
{
|
||||||
wxLogError ( wxString::Format(_("Doubly used id : %d"), objectID ) ) ;
|
wxLogError ( wxString::Format(_("Doubly used id : %d"), objectID ) ) ;
|
||||||
return wxInvalidObjectID ;
|
return wxInvalidObjectID ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -108,9 +108,9 @@ size_t wxZipInputStream::OnSysRead(void *buffer, size_t bufsize)
|
|||||||
|
|
||||||
off_t wxZipInputStream::OnSysSeek(off_t seek, wxSeekMode mode)
|
off_t wxZipInputStream::OnSysSeek(off_t seek, wxSeekMode mode)
|
||||||
{
|
{
|
||||||
// NB: since ZIP files don't natively support seeking, we have to
|
// NB: since ZIP files don't natively support seeking, we have to
|
||||||
// implement a brute force workaround -- reading all the data
|
// implement a brute force workaround -- reading all the data
|
||||||
// between current and the new position (or between beginning of
|
// between current and the new position (or between beginning of
|
||||||
// the file and new position...)
|
// the file and new position...)
|
||||||
|
|
||||||
off_t nextpos;
|
off_t nextpos;
|
||||||
@@ -138,7 +138,7 @@ off_t wxZipInputStream::OnSysSeek(off_t seek, wxSeekMode mode)
|
|||||||
}
|
}
|
||||||
toskip = nextpos;
|
toskip = nextpos;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( toskip > 0 )
|
if ( toskip > 0 )
|
||||||
{
|
{
|
||||||
const size_t BUFSIZE = 4096;
|
const size_t BUFSIZE = 4096;
|
||||||
|
@@ -218,7 +218,7 @@ wxZlibOutputStream::wxZlibOutputStream(wxOutputStream& stream,
|
|||||||
memset(m_deflate, 0, sizeof(z_stream_s));
|
memset(m_deflate, 0, sizeof(z_stream_s));
|
||||||
m_deflate->next_out = m_z_buffer;
|
m_deflate->next_out = m_z_buffer;
|
||||||
m_deflate->avail_out = m_z_size;
|
m_deflate->avail_out = m_z_size;
|
||||||
|
|
||||||
// see zlib.h for documentation on windowBits
|
// see zlib.h for documentation on windowBits
|
||||||
int windowBits = MAX_WBITS;
|
int windowBits = MAX_WBITS;
|
||||||
switch (flags) {
|
switch (flags) {
|
||||||
@@ -228,7 +228,7 @@ wxZlibOutputStream::wxZlibOutputStream(wxOutputStream& stream,
|
|||||||
default: wxFAIL_MSG(wxT("Invalid zlib flag"));
|
default: wxFAIL_MSG(wxT("Invalid zlib flag"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (deflateInit2(m_deflate, level, Z_DEFLATED, windowBits,
|
if (deflateInit2(m_deflate, level, Z_DEFLATED, windowBits,
|
||||||
8, Z_DEFAULT_STRATEGY) == Z_OK)
|
8, Z_DEFAULT_STRATEGY) == Z_OK)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -322,10 +322,10 @@ size_t wxZlibOutputStream::OnSysWrite(const void *buffer, size_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* static */ bool wxZlibOutputStream::CanHandleGZip()
|
/* static */ bool wxZlibOutputStream::CanHandleGZip()
|
||||||
{
|
{
|
||||||
return wxZlibInputStream::CanHandleGZip();
|
return wxZlibInputStream::CanHandleGZip();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// wxUSE_ZLIB && wxUSE_STREAMS
|
// wxUSE_ZLIB && wxUSE_STREAMS
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user