Source cleaning: whitespaces, tabs, -1/wxID_ANY/wxDefaultCoord/wxNOT_FOUND, TRUE/true, FALSE/false.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d1da887276
commit
318c5e9fa5
@ -6,7 +6,7 @@
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
////////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
#ifndef _WX_EXPRH__
|
||||
@ -65,4 +65,4 @@ void syntax_error();
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* _WX_EXPRH__ */
|
||||
/* _WX_EXPRH__ */
|
||||
|
@ -6,7 +6,7 @@
|
||||
// Created: 04/01/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PROP_H_
|
||||
@ -52,7 +52,7 @@ public:
|
||||
// Set the name of the sheet
|
||||
inline virtual void SetName(const wxString& name) { m_name=name; }
|
||||
inline virtual wxString GetName() const { return m_name; }
|
||||
|
||||
|
||||
// Does this sheet contain a property with this name
|
||||
virtual bool HasProperty(const wxString& name) const;
|
||||
|
||||
@ -74,16 +74,16 @@ public:
|
||||
|
||||
virtual void UpdateAllViews(wxPropertyView *thisView = NULL);
|
||||
inline virtual wxList& GetProperties() const { return (wxList&) m_properties; }
|
||||
|
||||
|
||||
// Sets/clears the modified flag for each property value
|
||||
virtual void SetAllModified(bool flag = TRUE);
|
||||
virtual void SetAllModified(bool flag = true);
|
||||
|
||||
protected:
|
||||
wxObject* m_viewedObject;
|
||||
wxList m_properties;
|
||||
wxPropertyView* m_propertyView;
|
||||
wxString m_name;
|
||||
|
||||
wxString m_name;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxPropertySheet)
|
||||
};
|
||||
@ -102,7 +102,7 @@ public:
|
||||
|
||||
// Update this view of the viewed object, called e.g. by
|
||||
// the object itself.
|
||||
virtual bool OnUpdateView() {return FALSE;};
|
||||
virtual bool OnUpdateView() {return false;};
|
||||
|
||||
// Override this to do something as soon as the property changed,
|
||||
// if the view and validators support it.
|
||||
@ -116,7 +116,7 @@ public:
|
||||
inline virtual void SetPropertySheet(wxPropertySheet *sheet) { m_propertySheet = sheet; }
|
||||
inline virtual wxPropertySheet *GetPropertySheet() const { return m_propertySheet; }
|
||||
|
||||
inline virtual bool OnClose() { return FALSE; }
|
||||
inline virtual bool OnClose() { return false; }
|
||||
inline long GetFlags(void) { return m_buttonFlags; }
|
||||
|
||||
protected:
|
||||
@ -125,7 +125,7 @@ protected:
|
||||
wxProperty* m_currentProperty;
|
||||
wxList m_validatorRegistryList;
|
||||
wxPropertyValidator* m_currentValidator;
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxPropertyView)
|
||||
};
|
||||
@ -153,7 +153,7 @@ public:
|
||||
protected:
|
||||
long m_validatorFlags;
|
||||
wxProperty* m_validatorProperty;
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxPropertyValidator)
|
||||
};
|
||||
@ -170,7 +170,7 @@ public:
|
||||
virtual void RegisterValidator(const wxString& roleName, wxPropertyValidator *validator);
|
||||
virtual wxPropertyValidator *GetValidator(const wxString& roleName);
|
||||
void ClearRegistry();
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxPropertyValidatorRegistry)
|
||||
};
|
||||
@ -255,7 +255,7 @@ class WXDLLIMPEXP_DEPRECATED wxPropertyValue: public wxObject
|
||||
// Get last expr in list
|
||||
virtual inline wxPropertyValue *GetLast(void) const
|
||||
{ return ((m_type == wxPropertyValueList) ? m_last : (wxPropertyValue*)NULL); }
|
||||
|
||||
|
||||
// Delete this node from the list
|
||||
virtual void Delete(wxPropertyValue *node);
|
||||
|
||||
@ -266,8 +266,8 @@ class WXDLLIMPEXP_DEPRECATED wxPropertyValue: public wxObject
|
||||
virtual inline wxObject *GetClientData(void) { return m_clientData; }
|
||||
|
||||
virtual wxString GetStringRepresentation(void);
|
||||
|
||||
inline void SetModified(bool flag = TRUE) { m_modifiedFlag = flag; }
|
||||
|
||||
inline void SetModified(bool flag = true) { m_modifiedFlag = flag; }
|
||||
inline bool GetModified(void) { return m_modifiedFlag; }
|
||||
|
||||
// Operators
|
||||
@ -336,7 +336,7 @@ class WXDLLIMPEXP_DEPRECATED wxProperty: public wxObject
|
||||
void operator=(const wxPropertyValue& val);
|
||||
virtual inline void SetWindow(wxWindow *win) { m_propertyWindow = win; }
|
||||
virtual inline wxWindow *GetWindow(void) const { return m_propertyWindow; }
|
||||
|
||||
|
||||
inline void Enable(bool en) { m_enabled = en; }
|
||||
inline bool IsEnabled(void) const { return m_enabled; }
|
||||
};
|
||||
|
@ -6,7 +6,7 @@
|
||||
// Created: 04/01/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PROPFORM_H_
|
||||
@ -129,7 +129,7 @@ class WXDLLIMPEXP_DEPRECATED wxPropertyFormValidator: public wxPropertyValidator
|
||||
~wxPropertyFormValidator(void) {}
|
||||
|
||||
// Called to check value is OK (e.g. when OK is pressed)
|
||||
// Return FALSE if value didn't check out; signal to restore old value.
|
||||
// Return false if value didn't check out; signal to restore old value.
|
||||
virtual bool OnCheckValue( wxProperty *WXUNUSED(property), wxPropertyFormView *WXUNUSED(view),
|
||||
wxWindow *WXUNUSED(parentWindow) ) { return true; }
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
// Created: 04/01/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
@ -190,7 +190,7 @@ public:
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxPropertyListView)
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
|
||||
virtual void ShowView(wxPropertySheet *propertySheet, wxWindow *window)
|
||||
{ wxPropertyView::ShowView(propertySheet, window); };
|
||||
};
|
||||
@ -265,7 +265,7 @@ public:
|
||||
virtual void OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||
|
||||
// Called when TICK is pressed or focus is lost.
|
||||
// Return FALSE if value didn't check out; signal to restore old value.
|
||||
// Return false if value didn't check out; signal to restore old value.
|
||||
inline virtual bool OnCheckValue(
|
||||
wxProperty *WXUNUSED(property), wxPropertyListView *WXUNUSED(view), wxWindow *WXUNUSED(parentWindow) )
|
||||
{ return true; }
|
||||
@ -276,7 +276,7 @@ public:
|
||||
virtual bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||
|
||||
virtual bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxPropertyListValidator)
|
||||
};
|
||||
@ -399,7 +399,7 @@ public:
|
||||
bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||
|
||||
// Called when TICK is pressed or focus is lost.
|
||||
// Return FALSE if value didn't check out; signal to restore old value.
|
||||
// Return false if value didn't check out; signal to restore old value.
|
||||
bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||
|
||||
// Called when TICK is pressed or focus is lost or view wants to update
|
||||
@ -410,7 +410,7 @@ public:
|
||||
protected:
|
||||
float m_realMin;
|
||||
float m_realMax;
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxRealListValidator)
|
||||
};
|
||||
@ -428,7 +428,7 @@ public:
|
||||
bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||
|
||||
// Called when TICK is pressed or focus is lost.
|
||||
// Return FALSE if value didn't check out; signal to restore old value.
|
||||
// Return false if value didn't check out; signal to restore old value.
|
||||
bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||
|
||||
// Called when TICK is pressed or focus is lost or view wants to update
|
||||
@ -439,7 +439,7 @@ public:
|
||||
protected:
|
||||
long m_integerMin;
|
||||
long m_integerMax;
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxIntegerListValidator)
|
||||
};
|
||||
@ -455,7 +455,7 @@ public:
|
||||
bool OnClearDetailControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||
|
||||
// Called when TICK is pressed or focus is lost.
|
||||
// Return FALSE if value didn't check out; signal to restore old value.
|
||||
// Return false if value didn't check out; signal to restore old value.
|
||||
bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||
|
||||
// Called when TICK is pressed or focus is lost or view wants to update
|
||||
@ -467,7 +467,7 @@ public:
|
||||
// Called when the property is double clicked. Extra functionality can be provided,
|
||||
// cycling through possible values.
|
||||
virtual bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxBoolListValidator)
|
||||
};
|
||||
@ -488,7 +488,7 @@ public:
|
||||
bool OnClearDetailControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||
|
||||
// Called when TICK is pressed or focus is lost.
|
||||
// Return FALSE if value didn't check out; signal to restore old value.
|
||||
// Return false if value didn't check out; signal to restore old value.
|
||||
bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||
|
||||
// Called when TICK is pressed or focus is lost or view wants to update
|
||||
@ -503,7 +503,7 @@ public:
|
||||
|
||||
protected:
|
||||
wxStringList* m_strings;
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxStringListValidator)
|
||||
};
|
||||
@ -515,7 +515,7 @@ public:
|
||||
~wxFilenameListValidator();
|
||||
|
||||
// Called when TICK is pressed or focus is lost.
|
||||
// Return FALSE if value didn't check out; signal to restore old value.
|
||||
// Return false if value didn't check out; signal to restore old value.
|
||||
bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||
|
||||
// Called when TICK is pressed or focus is lost or view wants to update
|
||||
@ -555,7 +555,7 @@ public:
|
||||
|
||||
// Called when the edit (...) button is pressed.
|
||||
void OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxColourListValidator)
|
||||
};
|
||||
@ -569,7 +569,7 @@ public:
|
||||
bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||
|
||||
// Called when TICK is pressed or focus is lost.
|
||||
// Return FALSE if value didn't check out; signal to restore old value.
|
||||
// Return false if value didn't check out; signal to restore old value.
|
||||
bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||
|
||||
// Called when TICK is pressed or focus is lost or view wants to update
|
||||
@ -585,7 +585,7 @@ public:
|
||||
|
||||
// Called when the edit (...) button is pressed.
|
||||
void OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxListOfStringsListValidator)
|
||||
};
|
||||
|
@ -108,7 +108,7 @@ class WXDLLIMPEXP_DEPRECATED wxItemResource: public wxObject
|
||||
inline void SetBackgroundColour(const wxColour& col) { m_backgroundColour = col; }
|
||||
inline void SetLabelColour(const wxColour& col) { m_labelColour = col; }
|
||||
inline void SetButtonColour(const wxColour& col) { m_buttonColour = col; }
|
||||
|
||||
|
||||
inline wxColour& GetBackgroundColour() const { return (wxColour&) m_backgroundColour; }
|
||||
inline wxColour& GetLabelColour() const { return (wxColour&) m_labelColour; }
|
||||
inline wxColour& GetButtonColour() const { return (wxColour&) m_buttonColour; }
|
||||
@ -138,16 +138,16 @@ class WXDLLIMPEXP_DEPRECATED wxItemResource: public wxObject
|
||||
/*
|
||||
* Resource table (normally only one of these)
|
||||
*/
|
||||
|
||||
|
||||
class WXDLLIMPEXP_DEPRECATED wxResourceTable: public wxHashTable
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxResourceTable)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
public:
|
||||
wxHashTable identifiers;
|
||||
|
||||
|
||||
wxResourceTable();
|
||||
~wxResourceTable();
|
||||
|
||||
|
@ -118,8 +118,8 @@ protected:
|
||||
const wxString& shortHelp = wxEmptyString,
|
||||
const wxString& longHelp = wxEmptyString,
|
||||
wxObject *clientData = NULL,
|
||||
wxCoord xPos = -1,
|
||||
wxCoord yPos = -1
|
||||
wxCoord xPos = wxDefaultCoord,
|
||||
wxCoord yPos = wxDefaultCoord
|
||||
);
|
||||
|
||||
virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
|
||||
|
@ -84,7 +84,7 @@ protected:
|
||||
long m_topMargin;
|
||||
long m_leftMargin;
|
||||
bool m_orientation; // true for top-to-bottom, false for left-to-right
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_ABSTRACT_CLASS(wxTreeLayout)
|
||||
};
|
||||
@ -138,7 +138,7 @@ private:
|
||||
wxStoredNode* m_nodes;
|
||||
int m_num;
|
||||
int m_maxNodes;
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxTreeLayoutStored)
|
||||
DECLARE_NO_COPY_CLASS(wxTreeLayoutStored)
|
||||
|
@ -48,7 +48,7 @@
|
||||
#define WXEXPR_ERROR_GENERAL 1
|
||||
#define WXEXPR_ERROR_SYNTAX 2
|
||||
|
||||
// Error handler function definition. If app returns TRUE,
|
||||
// Error handler function definition. If app returns true,
|
||||
// carry on processing.
|
||||
typedef bool (*wxExprErrorHandler) (int errorType, char *msg);
|
||||
|
||||
|
@ -30,7 +30,7 @@ public:
|
||||
MyPanel(wxWindow *parent, wxWindowID id, const wxPoint& pos,
|
||||
const wxSize& size, int style, const wxString &name);
|
||||
void OnClick(wxMouseEvent &event);
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
@ -43,7 +43,7 @@ public:
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
void OnTestDialog(wxCommandEvent& event);
|
||||
|
||||
|
||||
wxWindow *panel;
|
||||
|
||||
private:
|
||||
@ -55,7 +55,7 @@ class MyDialog : public wxDialog
|
||||
public:
|
||||
void OnOk(wxCommandEvent& event);
|
||||
void OnCancel(wxCommandEvent& event);
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Name: treelay.cpp
|
||||
// Purpose: wxTreeLayout sample
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Modified by:
|
||||
// Created: 7/4/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1998 Julian Smart
|
||||
@ -109,7 +109,7 @@ int MyApp::OnExit()
|
||||
void MyApp::TreeTest(wxTreeLayoutStored& tree, wxDC& dc)
|
||||
{
|
||||
tree.Initialize(200);
|
||||
|
||||
|
||||
tree.AddChild(_T("animal"));
|
||||
tree.AddChild(_T("mammal"), _T("animal"));
|
||||
tree.AddChild(_T("insect"), _T("animal"));
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Name: treelay.h
|
||||
// Purpose: wxTreeLayout sample
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Modified by:
|
||||
// Created: 7/4/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1998 Julian Smart
|
||||
|
@ -49,20 +49,20 @@ wxPropertyValue::wxPropertyValue(void)
|
||||
m_last = NULL;
|
||||
m_value.first = NULL;
|
||||
m_clientData = NULL;
|
||||
m_modifiedFlag = FALSE;
|
||||
m_modifiedFlag = false;
|
||||
}
|
||||
|
||||
wxPropertyValue::wxPropertyValue(const wxPropertyValue& copyFrom)
|
||||
: wxObject()
|
||||
{
|
||||
m_value.string = (wxChar*) NULL;
|
||||
m_modifiedFlag = FALSE;
|
||||
m_modifiedFlag = false;
|
||||
Copy((wxPropertyValue& )copyFrom);
|
||||
}
|
||||
|
||||
wxPropertyValue::wxPropertyValue(const wxChar *val)
|
||||
{
|
||||
m_modifiedFlag = FALSE;
|
||||
m_modifiedFlag = false;
|
||||
m_type = wxPropertyValueString;
|
||||
|
||||
m_value.string = copystring(val);
|
||||
@ -73,7 +73,7 @@ wxPropertyValue::wxPropertyValue(const wxChar *val)
|
||||
|
||||
wxPropertyValue::wxPropertyValue(const wxString& val)
|
||||
{
|
||||
m_modifiedFlag = FALSE;
|
||||
m_modifiedFlag = false;
|
||||
m_type = wxPropertyValueString;
|
||||
|
||||
m_value.string = copystring(val.c_str());
|
||||
@ -84,7 +84,7 @@ wxPropertyValue::wxPropertyValue(const wxString& val)
|
||||
|
||||
wxPropertyValue::wxPropertyValue(long the_integer)
|
||||
{
|
||||
m_modifiedFlag = FALSE;
|
||||
m_modifiedFlag = false;
|
||||
m_type = wxPropertyValueInteger;
|
||||
m_value.integer = the_integer;
|
||||
m_clientData = NULL;
|
||||
@ -93,7 +93,7 @@ wxPropertyValue::wxPropertyValue(long the_integer)
|
||||
|
||||
wxPropertyValue::wxPropertyValue(bool val)
|
||||
{
|
||||
m_modifiedFlag = FALSE;
|
||||
m_modifiedFlag = false;
|
||||
m_type = wxPropertyValuebool;
|
||||
m_value.integer = val;
|
||||
m_clientData = NULL;
|
||||
@ -102,7 +102,7 @@ wxPropertyValue::wxPropertyValue(bool val)
|
||||
|
||||
wxPropertyValue::wxPropertyValue(float the_real)
|
||||
{
|
||||
m_modifiedFlag = FALSE;
|
||||
m_modifiedFlag = false;
|
||||
m_type = wxPropertyValueReal;
|
||||
m_value.real = the_real;
|
||||
m_clientData = NULL;
|
||||
@ -111,7 +111,7 @@ wxPropertyValue::wxPropertyValue(float the_real)
|
||||
|
||||
wxPropertyValue::wxPropertyValue(double the_real)
|
||||
{
|
||||
m_modifiedFlag = FALSE;
|
||||
m_modifiedFlag = false;
|
||||
m_type = wxPropertyValueReal;
|
||||
m_value.real = (float)the_real;
|
||||
m_clientData = NULL;
|
||||
@ -121,7 +121,7 @@ wxPropertyValue::wxPropertyValue(double the_real)
|
||||
// Pointer versions: we have a pointer to the real C++ value.
|
||||
wxPropertyValue::wxPropertyValue(wxChar **val)
|
||||
{
|
||||
m_modifiedFlag = FALSE;
|
||||
m_modifiedFlag = false;
|
||||
m_type = wxPropertyValueStringPtr;
|
||||
|
||||
m_value.stringPtr = val;
|
||||
@ -132,7 +132,7 @@ wxPropertyValue::wxPropertyValue(wxChar **val)
|
||||
|
||||
wxPropertyValue::wxPropertyValue(long *val)
|
||||
{
|
||||
m_modifiedFlag = FALSE;
|
||||
m_modifiedFlag = false;
|
||||
m_type = wxPropertyValueIntegerPtr;
|
||||
m_value.integerPtr = val;
|
||||
m_clientData = NULL;
|
||||
@ -141,7 +141,7 @@ wxPropertyValue::wxPropertyValue(long *val)
|
||||
|
||||
wxPropertyValue::wxPropertyValue(bool *val)
|
||||
{
|
||||
m_modifiedFlag = FALSE;
|
||||
m_modifiedFlag = false;
|
||||
m_type = wxPropertyValueboolPtr;
|
||||
m_value.boolPtr = val;
|
||||
m_clientData = NULL;
|
||||
@ -150,7 +150,7 @@ wxPropertyValue::wxPropertyValue(bool *val)
|
||||
|
||||
wxPropertyValue::wxPropertyValue(float *val)
|
||||
{
|
||||
m_modifiedFlag = FALSE;
|
||||
m_modifiedFlag = false;
|
||||
m_type = wxPropertyValueRealPtr;
|
||||
m_value.realPtr = val;
|
||||
m_clientData = NULL;
|
||||
@ -159,7 +159,7 @@ wxPropertyValue::wxPropertyValue(float *val)
|
||||
|
||||
wxPropertyValue::wxPropertyValue(wxList *the_list)
|
||||
{
|
||||
m_modifiedFlag = FALSE;
|
||||
m_modifiedFlag = false;
|
||||
m_type = wxPropertyValueList;
|
||||
m_clientData = NULL;
|
||||
m_last = NULL;
|
||||
@ -178,7 +178,7 @@ wxPropertyValue::wxPropertyValue(wxList *the_list)
|
||||
|
||||
wxPropertyValue::wxPropertyValue(wxStringList *the_list)
|
||||
{
|
||||
m_modifiedFlag = FALSE;
|
||||
m_modifiedFlag = false;
|
||||
m_type = wxPropertyValueList;
|
||||
m_clientData = NULL;
|
||||
m_last = NULL;
|
||||
@ -228,7 +228,7 @@ wxPropertyValue::~wxPropertyValue(void)
|
||||
|
||||
void wxPropertyValue::Append(wxPropertyValue *expr)
|
||||
{
|
||||
m_modifiedFlag = TRUE;
|
||||
m_modifiedFlag = true;
|
||||
if (!m_value.first)
|
||||
m_value.first = expr;
|
||||
|
||||
@ -239,7 +239,7 @@ void wxPropertyValue::Append(wxPropertyValue *expr)
|
||||
|
||||
void wxPropertyValue::Insert(wxPropertyValue *expr)
|
||||
{
|
||||
m_modifiedFlag = TRUE;
|
||||
m_modifiedFlag = true;
|
||||
expr->m_next = m_value.first;
|
||||
m_value.first = expr;
|
||||
|
||||
@ -280,7 +280,7 @@ void wxPropertyValue::Delete(wxPropertyValue *node)
|
||||
else
|
||||
m_last = NULL;
|
||||
}
|
||||
m_modifiedFlag = TRUE;
|
||||
m_modifiedFlag = true;
|
||||
delete expr;
|
||||
}
|
||||
|
||||
@ -290,7 +290,7 @@ void wxPropertyValue::ClearList(void)
|
||||
{
|
||||
wxPropertyValue *val = GetFirst();
|
||||
if (val)
|
||||
m_modifiedFlag = TRUE;
|
||||
m_modifiedFlag = true;
|
||||
|
||||
while (val)
|
||||
{
|
||||
@ -383,8 +383,8 @@ void wxPropertyValue::Copy(wxPropertyValue& copyFrom)
|
||||
case wxPropertyValueStringPtr:
|
||||
{
|
||||
wxChar** s = copyFrom.StringValuePtr();
|
||||
|
||||
#if 0
|
||||
|
||||
#if 0
|
||||
// what is this? are you trying to assign a bool or a string? VA can't figure it out..
|
||||
#if defined(__VISAGECPP__) || defined( __VISUALC__ )
|
||||
(*this) = s;
|
||||
@ -394,7 +394,7 @@ void wxPropertyValue::Copy(wxPropertyValue& copyFrom)
|
||||
#endif // if 0
|
||||
|
||||
(*this) = (bool)(s != 0);
|
||||
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
@ -477,7 +477,7 @@ void wxPropertyValue::WritePropertyClause(wxString& stream) // Write this expre
|
||||
node->WritePropertyType(stream);
|
||||
stream.Append( wxT("(") );
|
||||
node = node->m_next;
|
||||
bool first = TRUE;
|
||||
bool first = true;
|
||||
while (node)
|
||||
{
|
||||
if (!first)
|
||||
@ -486,7 +486,7 @@ void wxPropertyValue::WritePropertyClause(wxString& stream) // Write this expre
|
||||
node = node->m_next;
|
||||
if (node)
|
||||
stream.Append( wxT(",\n" ) );
|
||||
first = FALSE;
|
||||
first = false;
|
||||
}
|
||||
stream.Append( wxT(").\n\n") );
|
||||
}
|
||||
@ -591,7 +591,7 @@ wxString wxPropertyValue::GetStringRepresentation(void)
|
||||
|
||||
void wxPropertyValue::operator=(const wxPropertyValue& val)
|
||||
{
|
||||
m_modifiedFlag = TRUE;
|
||||
m_modifiedFlag = true;
|
||||
Copy((wxPropertyValue&)val);
|
||||
}
|
||||
|
||||
@ -600,7 +600,7 @@ void wxPropertyValue::operator=(const wxString& val1)
|
||||
{
|
||||
const wxChar *val = (const wxChar *)val1;
|
||||
|
||||
m_modifiedFlag = TRUE;
|
||||
m_modifiedFlag = true;
|
||||
|
||||
wxPropertyValueType oldType = m_type;
|
||||
if (oldType == wxPropertyValueString)
|
||||
@ -643,7 +643,7 @@ void wxPropertyValue::operator=(const long val)
|
||||
m_value.string = NULL;
|
||||
}
|
||||
|
||||
m_modifiedFlag = TRUE;
|
||||
m_modifiedFlag = true;
|
||||
if (m_type == wxPropertyValueNull)
|
||||
m_type = wxPropertyValueInteger;
|
||||
|
||||
@ -669,7 +669,7 @@ void wxPropertyValue::operator=(const bool val)
|
||||
m_value.string = NULL;
|
||||
}
|
||||
|
||||
m_modifiedFlag = TRUE;
|
||||
m_modifiedFlag = true;
|
||||
if (m_type == wxPropertyValueNull)
|
||||
m_type = wxPropertyValuebool;
|
||||
|
||||
@ -691,7 +691,7 @@ void wxPropertyValue::operator=(const float val)
|
||||
m_value.string = NULL;
|
||||
}
|
||||
|
||||
m_modifiedFlag = TRUE;
|
||||
m_modifiedFlag = true;
|
||||
if (m_type == wxPropertyValueNull)
|
||||
m_type = wxPropertyValueReal;
|
||||
|
||||
@ -717,7 +717,7 @@ void wxPropertyValue::operator=(const wxChar **val)
|
||||
m_value.string = NULL;
|
||||
}
|
||||
|
||||
m_modifiedFlag = TRUE;
|
||||
m_modifiedFlag = true;
|
||||
m_type = wxPropertyValueStringPtr;
|
||||
|
||||
if (val)
|
||||
@ -732,7 +732,7 @@ void wxPropertyValue::operator=(const wxChar **val)
|
||||
|
||||
void wxPropertyValue::operator=(const long *val)
|
||||
{
|
||||
m_modifiedFlag = TRUE;
|
||||
m_modifiedFlag = true;
|
||||
m_type = wxPropertyValueIntegerPtr;
|
||||
m_value.integerPtr = (long *)val;
|
||||
m_clientData = NULL;
|
||||
@ -741,7 +741,7 @@ void wxPropertyValue::operator=(const long *val)
|
||||
|
||||
void wxPropertyValue::operator=(const bool *val)
|
||||
{
|
||||
m_modifiedFlag = TRUE;
|
||||
m_modifiedFlag = true;
|
||||
m_type = wxPropertyValueboolPtr;
|
||||
m_value.boolPtr = (bool *)val;
|
||||
m_clientData = NULL;
|
||||
@ -750,7 +750,7 @@ void wxPropertyValue::operator=(const bool *val)
|
||||
|
||||
void wxPropertyValue::operator=(const float *val)
|
||||
{
|
||||
m_modifiedFlag = TRUE;
|
||||
m_modifiedFlag = true;
|
||||
m_type = wxPropertyValueRealPtr;
|
||||
m_value.realPtr = (float *)val;
|
||||
m_clientData = NULL;
|
||||
@ -805,7 +805,7 @@ bool wxPropertyValue::BoolValue(void) const {
|
||||
return (m_value.integer != 0);
|
||||
else if (m_type == wxPropertyValueboolPtr)
|
||||
return (*(m_value.boolPtr) != 0);
|
||||
else return FALSE;
|
||||
else return false;
|
||||
}
|
||||
|
||||
bool *wxPropertyValue::BoolValuePtr(void) const
|
||||
@ -837,7 +837,7 @@ wxProperty::wxProperty(void)
|
||||
m_propertyRole = wxEmptyString;
|
||||
m_propertyValidator = NULL;
|
||||
m_propertyWindow = NULL;
|
||||
m_enabled = TRUE;
|
||||
m_enabled = true;
|
||||
}
|
||||
|
||||
wxProperty::wxProperty(wxProperty& copyFrom)
|
||||
@ -855,7 +855,7 @@ wxProperty::wxProperty(wxString nm, wxString role, wxPropertyValidator *ed):m_na
|
||||
{
|
||||
m_propertyValidator = ed;
|
||||
m_propertyWindow = NULL;
|
||||
m_enabled = TRUE;
|
||||
m_enabled = true;
|
||||
}
|
||||
|
||||
wxProperty::wxProperty(wxString nm, const wxPropertyValue& val, wxString role, wxPropertyValidator *ed):
|
||||
@ -863,7 +863,7 @@ wxProperty::wxProperty(wxString nm, const wxPropertyValue& val, wxString role, w
|
||||
{
|
||||
m_propertyValidator = ed;
|
||||
m_propertyWindow = NULL;
|
||||
m_enabled = TRUE;
|
||||
m_enabled = true;
|
||||
}
|
||||
|
||||
wxProperty::~wxProperty(void)
|
||||
@ -1003,9 +1003,9 @@ bool wxPropertySheet::SetProperty(const wxString& name, const wxPropertyValue& v
|
||||
wxProperty* prop = GetProperty(name);
|
||||
if(prop){
|
||||
prop->SetValue(value);
|
||||
return TRUE;
|
||||
return true;
|
||||
}else{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1018,11 +1018,11 @@ void wxPropertySheet::RemoveProperty(const wxString& name)
|
||||
delete prop;
|
||||
m_properties.Erase(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool wxPropertySheet::HasProperty(const wxString& name) const
|
||||
{
|
||||
return (GetProperty(name)?TRUE:FALSE);
|
||||
return (GetProperty(name)?true:false);
|
||||
}
|
||||
|
||||
// Clear all properties
|
||||
@ -1111,14 +1111,14 @@ bool wxPropertyValidator::StringToFloat (wxChar *s, float *number) {
|
||||
}
|
||||
|
||||
bool wxPropertyValidator::StringToDouble (wxChar *s, double *number) {
|
||||
bool ok = TRUE;
|
||||
bool ok = true;
|
||||
wxChar *value_ptr;
|
||||
*number = wxStrtod (s, &value_ptr);
|
||||
if (value_ptr) {
|
||||
int len = wxStrlen (value_ptr);
|
||||
for (int i = 0; i < len; i++) {
|
||||
ok = (wxIsspace (value_ptr[i]) != 0);
|
||||
if (!ok) return FALSE;
|
||||
if (!ok) return false;
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
@ -1132,14 +1132,14 @@ bool wxPropertyValidator::StringToInt (wxChar *s, int *number) {
|
||||
}
|
||||
|
||||
bool wxPropertyValidator::StringToLong (wxChar *s, long *number) {
|
||||
bool ok = TRUE;
|
||||
bool ok = true;
|
||||
wxChar *value_ptr;
|
||||
*number = wxStrtol (s, &value_ptr, 10);
|
||||
if (value_ptr) {
|
||||
int len = wxStrlen (value_ptr);
|
||||
for (int i = 0; i < len; i++) {
|
||||
ok = (wxIsspace (value_ptr[i]) != 0);
|
||||
if (!ok) return FALSE;
|
||||
if (!ok) return false;
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
|
@ -680,7 +680,7 @@ bool wxStringFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyForm
|
||||
else if (m_propertyWindow->IsKindOf(CLASSINFO(wxListBox)))
|
||||
{
|
||||
wxListBox *lbox = (wxListBox *)m_propertyWindow;
|
||||
if (lbox->GetSelection() > -1)
|
||||
if (lbox->GetSelection() != wxNOT_FOUND)
|
||||
property->GetValue() = lbox->GetStringSelection();
|
||||
}
|
||||
/*
|
||||
@ -688,14 +688,14 @@ bool wxStringFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyForm
|
||||
{
|
||||
wxRadioBox *rbox = (wxRadioBox *)m_propertyWindow;
|
||||
int n = 0;
|
||||
if ((n = rbox->GetSelection()) > -1)
|
||||
if ((n = rbox->GetSelection()) != wxNOT_FOUND)
|
||||
property->GetValue() = rbox->GetString(n);
|
||||
}
|
||||
*/
|
||||
else if (m_propertyWindow->IsKindOf(CLASSINFO(wxChoice)))
|
||||
{
|
||||
wxChoice *choice = (wxChoice *)m_propertyWindow;
|
||||
if (choice->GetSelection() > -1)
|
||||
if (choice->GetSelection() != wxNOT_FOUND)
|
||||
property->GetValue() = choice->GetStringSelection();
|
||||
}
|
||||
else
|
||||
|
@ -215,7 +215,7 @@ int wxPropertyListView::FindListIndexForProperty(wxProperty *property)
|
||||
if (property == (wxProperty *)m_propertyScrollingList->wxListBox::GetClientData(i))
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
return wxNOT_FOUND;
|
||||
}
|
||||
|
||||
wxString wxPropertyListView::MakeNameValueString(wxString name, wxString value)
|
||||
@ -258,7 +258,7 @@ bool wxPropertyListView::ShowProperty(wxProperty *property, bool select)
|
||||
if (select)
|
||||
{
|
||||
int sel = FindListIndexForProperty(property);
|
||||
if (sel > -1)
|
||||
if (sel != wxNOT_FOUND)
|
||||
m_propertyScrollingList->SetSelection(sel);
|
||||
}
|
||||
return true;
|
||||
@ -400,7 +400,7 @@ bool wxPropertyListView::EditProperty(wxProperty *WXUNUSED(property))
|
||||
void wxPropertyListView::OnPropertySelect(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
int sel = m_propertyScrollingList->GetSelection();
|
||||
if (sel > -1)
|
||||
if (sel != wxNOT_FOUND)
|
||||
{
|
||||
wxProperty *newSel = (wxProperty *)m_propertyScrollingList->wxListBox::GetClientData(sel);
|
||||
if (newSel && newSel != m_currentProperty)
|
||||
@ -1711,7 +1711,7 @@ bool wxListOfStringsListValidator::EditStringList(wxWindow *parent, wxStringList
|
||||
void wxPropertyStringListEditorDialog::OnStrings(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
int sel = m_listBox->GetSelection();
|
||||
if (sel > -1)
|
||||
if (sel != wxNOT_FOUND)
|
||||
{
|
||||
m_currentSelection = sel;
|
||||
|
||||
@ -1722,7 +1722,7 @@ void wxPropertyStringListEditorDialog::OnStrings(wxCommandEvent& WXUNUSED(event)
|
||||
void wxPropertyStringListEditorDialog::OnDelete(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
int sel = m_listBox->GetSelection();
|
||||
if (sel == -1)
|
||||
if (sel == wxNOT_FOUND)
|
||||
return;
|
||||
|
||||
wxNode *node = (wxNode *)m_listBox->wxListBox::GetClientData(sel);
|
||||
|
@ -96,7 +96,7 @@ static inline wxChar* copystring(const wxChar* s)
|
||||
|
||||
// Forward (private) declarations
|
||||
bool wxResourceInterpretResources(wxResourceTable& table, wxExprDatabase& db);
|
||||
wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, wxExpr *expr, bool isPanel = FALSE);
|
||||
wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, wxExpr *expr, bool isPanel = false);
|
||||
wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr);
|
||||
wxItemResource *wxResourceInterpretMenu(wxResourceTable& table, wxExpr *expr);
|
||||
wxItemResource *wxResourceInterpretMenuBar(wxResourceTable& table, wxExpr *expr);
|
||||
@ -137,7 +137,7 @@ class wxResourceModule: public wxModule
|
||||
{
|
||||
public:
|
||||
wxResourceModule() : wxModule() {}
|
||||
virtual bool OnInit() { wxInitializeResourceSystem(); return TRUE; }
|
||||
virtual bool OnInit() { wxInitializeResourceSystem(); return true; }
|
||||
virtual void OnExit() { wxCleanUpResourceSystem(); }
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxResourceModule)
|
||||
@ -228,10 +228,10 @@ bool wxResourceTable::DeleteResource(const wxString& name)
|
||||
}
|
||||
|
||||
delete item;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxResourceTable::ParseResourceFile( wxInputStream *is )
|
||||
@ -239,7 +239,7 @@ bool wxResourceTable::ParseResourceFile( wxInputStream *is )
|
||||
wxExprDatabase db;
|
||||
int len = is->GetSize() ;
|
||||
|
||||
bool eof = FALSE;
|
||||
bool eof = false;
|
||||
while ( is->TellI() + 10 < len) // it's a hack because the streams dont support EOF
|
||||
{
|
||||
wxResourceReadOneResource(is, db, &eof, this) ;
|
||||
@ -253,8 +253,8 @@ bool wxResourceTable::ParseResourceFile(const wxString& filename)
|
||||
|
||||
FILE *fd = wxFopen(filename, wxT("r"));
|
||||
if (!fd)
|
||||
return FALSE;
|
||||
bool eof = FALSE;
|
||||
return false;
|
||||
bool eof = false;
|
||||
while (wxResourceReadOneResource(fd, db, &eof, this) && !eof)
|
||||
{
|
||||
// Loop
|
||||
@ -269,7 +269,7 @@ bool wxResourceTable::ParseResourceData(const wxString& data)
|
||||
if (!db.ReadFromString(data))
|
||||
{
|
||||
wxLogWarning(_("Ill-formed resource file syntax."));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return wxResourceInterpretResources(*this, db);
|
||||
@ -286,7 +286,7 @@ bool wxResourceTable::RegisterResourceBitmapData(const wxString& name, char bits
|
||||
item->SetValue2((long)width);
|
||||
item->SetValue3((long)height);
|
||||
AddResource(item);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxResourceTable::RegisterResourceBitmapData(const wxString& name, char **data)
|
||||
@ -298,12 +298,12 @@ bool wxResourceTable::RegisterResourceBitmapData(const wxString& name, char **da
|
||||
item->SetName(name);
|
||||
item->SetValue1((long)data);
|
||||
AddResource(item);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxResourceTable::SaveResource(const wxString& WXUNUSED(filename))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void wxResourceTable::ClearTable()
|
||||
@ -443,7 +443,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, const wxItemResource* c
|
||||
((wxScrollBar *)control)->SetViewLength((int)(long)childResource->GetValue5());
|
||||
*/
|
||||
((wxScrollBar *)control)->SetScrollbar((int)childResource->GetValue1(),(int)childResource->GetValue2(),
|
||||
(int)childResource->GetValue3(),(int)(long)childResource->GetValue5(),FALSE);
|
||||
(int)childResource->GetValue3(),(int)(long)childResource->GetValue5(),false);
|
||||
|
||||
}
|
||||
#endif
|
||||
@ -572,7 +572,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, const wxItemResource* c
|
||||
// Force the layout algorithm since the size changes the layout
|
||||
if (control->IsKindOf(CLASSINFO(wxRadioBox)))
|
||||
{
|
||||
control->SetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT);
|
||||
control->SetSize(wxDefaultCoord, wxDefaultCoord, wxDefaultCoord, wxDefaultCoord, wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -596,7 +596,7 @@ bool wxResourceInterpretResources(wxResourceTable& table, wxExprDatabase& db)
|
||||
if (functor == wxT("dialog"))
|
||||
item = wxResourceInterpretDialog(table, clause);
|
||||
else if (functor == wxT("panel"))
|
||||
item = wxResourceInterpretDialog(table, clause, TRUE);
|
||||
item = wxResourceInterpretDialog(table, clause, true);
|
||||
else if (functor == wxT("menubar"))
|
||||
item = wxResourceInterpretMenuBar(table, clause);
|
||||
else if (functor == wxT("menu"))
|
||||
@ -617,7 +617,7 @@ bool wxResourceInterpretResources(wxResourceTable& table, wxExprDatabase& db)
|
||||
}
|
||||
node = node->GetNext();
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static const wxChar *g_ValidControlClasses[] =
|
||||
@ -649,9 +649,9 @@ static bool wxIsValidControlClass(const wxString& c)
|
||||
for ( size_t i = 0; i < WXSIZEOF(g_ValidControlClasses); i++ )
|
||||
{
|
||||
if ( c == g_ValidControlClasses[i] )
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, wxExpr *expr, bool isPanel)
|
||||
@ -672,7 +672,7 @@ wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, wxExpr *expr,
|
||||
if (isPanel)
|
||||
windowStyle = 0;
|
||||
|
||||
int x = 0; int y = 0; int width = -1; int height = -1;
|
||||
int x = 0; int y = 0; int width = wxDefaultCoord; int height = wxDefaultCoord;
|
||||
int isModal = 0;
|
||||
wxExpr *labelFontExpr = (wxExpr *) NULL;
|
||||
wxExpr *buttonFontExpr = (wxExpr *) NULL;
|
||||
@ -716,7 +716,7 @@ wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, wxExpr *expr,
|
||||
#pragma message disable CODCAUUNR
|
||||
#endif
|
||||
if (windowStyle & wxDIALOG_MODAL) // Uses style in wxWin 2
|
||||
dialogItem->SetValue1(TRUE);
|
||||
dialogItem->SetValue1(true);
|
||||
#ifdef __VMS
|
||||
#pragma message enable CODCAUUNR
|
||||
#endif
|
||||
@ -726,9 +726,9 @@ wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, wxExpr *expr,
|
||||
dialogItem->SetSize(x, y, width, height);
|
||||
|
||||
// Check for wxWin 1.68-style specifications
|
||||
if (style.Find(wxT("VERTICAL_LABEL")) != -1)
|
||||
if (style.Find(wxT("VERTICAL_LABEL")) != wxNOT_FOUND)
|
||||
dialogItem->SetResourceStyle(dialogItem->GetResourceStyle() | wxRESOURCE_VERTICAL_LABEL);
|
||||
else if (style.Find(wxT("HORIZONTAL_LABEL")) != -1)
|
||||
else if (style.Find(wxT("HORIZONTAL_LABEL")) != wxNOT_FOUND)
|
||||
dialogItem->SetResourceStyle(dialogItem->GetResourceStyle() | wxRESOURCE_HORIZONTAL_LABEL);
|
||||
|
||||
if (backColourHex != wxT(""))
|
||||
@ -808,7 +808,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr)
|
||||
wxString name;
|
||||
int id = 0;
|
||||
long windowStyle = 0;
|
||||
int x = 0; int y = 0; int width = -1; int height = -1;
|
||||
int x = 0; int y = 0; int width = wxDefaultCoord; int height = wxDefaultCoord;
|
||||
int count = 0;
|
||||
|
||||
wxExpr *expr1 = expr->Nth(0);
|
||||
@ -893,9 +893,9 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr)
|
||||
controlItem->SetId(id);
|
||||
|
||||
// Check for wxWin 1.68-style specifications
|
||||
if (style.Find(wxT("VERTICAL_LABEL")) != -1)
|
||||
if (style.Find(wxT("VERTICAL_LABEL")) != wxNOT_FOUND)
|
||||
controlItem->SetResourceStyle(controlItem->GetResourceStyle() | wxRESOURCE_VERTICAL_LABEL);
|
||||
else if (style.Find(wxT("HORIZONTAL_LABEL")) != -1)
|
||||
else if (style.Find(wxT("HORIZONTAL_LABEL")) != wxNOT_FOUND)
|
||||
controlItem->SetResourceStyle(controlItem->GetResourceStyle() | wxRESOURCE_HORIZONTAL_LABEL);
|
||||
|
||||
if (controlType == wxT("wxButton"))
|
||||
@ -1532,7 +1532,7 @@ bool wxReallocateResourceBuffer()
|
||||
{
|
||||
wxResourceBufferSize = 1000;
|
||||
wxResourceBuffer = new char[wxResourceBufferSize];
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
if (wxResourceBuffer)
|
||||
{
|
||||
@ -1543,7 +1543,7 @@ bool wxReallocateResourceBuffer()
|
||||
wxResourceBuffer = tmp;
|
||||
wxResourceBufferSize = newSize;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool wxEatWhiteSpace(FILE *fd)
|
||||
@ -1566,7 +1566,7 @@ static bool wxEatWhiteSpace(FILE *fd)
|
||||
if (ch == EOF)
|
||||
{
|
||||
ungetc(prev_ch, fd);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ch == '*')
|
||||
@ -1590,17 +1590,17 @@ static bool wxEatWhiteSpace(FILE *fd)
|
||||
{
|
||||
ungetc(prev_ch, fd);
|
||||
ungetc(ch, fd);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ungetc(ch, fd);
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
static bool wxEatWhiteSpace(wxInputStream *is)
|
||||
{
|
||||
@ -1608,7 +1608,7 @@ static bool wxEatWhiteSpace(wxInputStream *is)
|
||||
if ((ch != ' ') && (ch != '/') && (ch != ' ') && (ch != 10) && (ch != 13) && (ch != 9))
|
||||
{
|
||||
is->Ungetch(ch);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Eat whitespace
|
||||
@ -1620,17 +1620,17 @@ static bool wxEatWhiteSpace(wxInputStream *is)
|
||||
ch = is->GetC();
|
||||
if (ch == '*')
|
||||
{
|
||||
bool finished = FALSE;
|
||||
bool finished = false;
|
||||
while (!finished)
|
||||
{
|
||||
ch = is->GetC();
|
||||
if (ch == EOF)
|
||||
return FALSE;
|
||||
return false;
|
||||
if (ch == '*')
|
||||
{
|
||||
int newCh = is->GetC();
|
||||
if (newCh == '/')
|
||||
finished = TRUE;
|
||||
finished = true;
|
||||
else
|
||||
{
|
||||
is->Ungetch(ch);
|
||||
@ -1639,7 +1639,7 @@ static bool wxEatWhiteSpace(wxInputStream *is)
|
||||
}
|
||||
}
|
||||
else // False alarm
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
is->Ungetch(ch);
|
||||
@ -1665,7 +1665,7 @@ bool wxGetResourceToken(FILE *fd)
|
||||
if (ch == EOF)
|
||||
{
|
||||
wxResourceBuffer[wxResourceBufferCount] = 0;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
// Escaped characters
|
||||
else if (ch == '\\')
|
||||
@ -1704,9 +1704,9 @@ bool wxGetResourceToken(FILE *fd)
|
||||
}
|
||||
wxResourceBuffer[wxResourceBufferCount] = 0;
|
||||
if (ch == EOF)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxGetResourceToken(wxInputStream *is)
|
||||
@ -1728,7 +1728,7 @@ bool wxGetResourceToken(wxInputStream *is)
|
||||
if (ch == EOF)
|
||||
{
|
||||
wxResourceBuffer[wxResourceBufferCount] = 0;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
// Escaped characters
|
||||
else if (ch == '\\')
|
||||
@ -1769,9 +1769,9 @@ bool wxGetResourceToken(wxInputStream *is)
|
||||
}
|
||||
wxResourceBuffer[wxResourceBufferCount] = 0;
|
||||
if (ch == EOF)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1788,8 +1788,8 @@ bool wxResourceReadOneResource(FILE *fd, wxExprDatabase& db, bool *eof, wxResour
|
||||
// static or #define
|
||||
if (!wxGetResourceToken(fd))
|
||||
{
|
||||
*eof = TRUE;
|
||||
return FALSE;
|
||||
*eof = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (strcmp(wxResourceBuffer, "#define") == 0)
|
||||
@ -1808,12 +1808,12 @@ bool wxResourceReadOneResource(FILE *fd, wxExprDatabase& db, bool *eof, wxResour
|
||||
wxLogWarning(_("#define %s must be an integer."), name);
|
||||
delete[] name;
|
||||
delete[] value;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
delete[] name;
|
||||
delete[] value;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if (strcmp(wxResourceBuffer, "#include") == 0)
|
||||
{
|
||||
@ -1830,7 +1830,7 @@ bool wxResourceReadOneResource(FILE *fd, wxExprDatabase& db, bool *eof, wxResour
|
||||
wxLogWarning(_("Could not find resource include file %s."), actualName);
|
||||
}
|
||||
delete[] name;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if (strcmp(wxResourceBuffer, "static") != 0)
|
||||
{
|
||||
@ -1839,35 +1839,35 @@ bool wxResourceReadOneResource(FILE *fd, wxExprDatabase& db, bool *eof, wxResour
|
||||
wxStrncat(buf, wxConvCurrent->cMB2WX(wxResourceBuffer), 30);
|
||||
wxStrcat(buf, _(", expected static, #include or #define\nwhilst parsing resource."));
|
||||
wxLogWarning(buf);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// char
|
||||
if (!wxGetResourceToken(fd))
|
||||
{
|
||||
wxLogWarning(_("Unexpected end of file whilst parsing resource."));
|
||||
*eof = TRUE;
|
||||
return FALSE;
|
||||
*eof = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (strcmp(wxResourceBuffer, "char") != 0)
|
||||
{
|
||||
wxLogWarning(_("Expected 'char' whilst parsing resource."));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// *name
|
||||
if (!wxGetResourceToken(fd))
|
||||
{
|
||||
wxLogWarning(_("Unexpected end of file whilst parsing resource."));
|
||||
*eof = TRUE;
|
||||
return FALSE;
|
||||
*eof = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (wxResourceBuffer[0] != '*')
|
||||
{
|
||||
wxLogWarning(_("Expected '*' whilst parsing resource."));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
wxChar nameBuf[100];
|
||||
wxMB2WX(nameBuf, wxResourceBuffer+1, 99);
|
||||
@ -1877,37 +1877,37 @@ bool wxResourceReadOneResource(FILE *fd, wxExprDatabase& db, bool *eof, wxResour
|
||||
if (!wxGetResourceToken(fd))
|
||||
{
|
||||
wxLogWarning(_("Unexpected end of file whilst parsing resource."));
|
||||
*eof = TRUE;
|
||||
return FALSE;
|
||||
*eof = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (strcmp(wxResourceBuffer, "=") != 0)
|
||||
{
|
||||
wxLogWarning(_("Expected '=' whilst parsing resource."));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// String
|
||||
if (!wxGetResourceToken(fd))
|
||||
{
|
||||
wxLogWarning(_("Unexpected end of file whilst parsing resource."));
|
||||
*eof = TRUE;
|
||||
return FALSE;
|
||||
*eof = true;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!db.ReadPrologFromString(wxResourceBuffer))
|
||||
{
|
||||
wxLogWarning(_("%s: ill-formed resource file syntax."), nameBuf);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Semicolon
|
||||
if (!wxGetResourceToken(fd))
|
||||
{
|
||||
*eof = TRUE;
|
||||
*eof = true;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxResourceReadOneResource(wxInputStream *fd, wxExprDatabase& db, bool *eof, wxResourceTable *table)
|
||||
@ -1918,8 +1918,8 @@ bool wxResourceReadOneResource(wxInputStream *fd, wxExprDatabase& db, bool *eof,
|
||||
// static or #define
|
||||
if (!wxGetResourceToken(fd))
|
||||
{
|
||||
*eof = TRUE;
|
||||
return FALSE;
|
||||
*eof = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (strcmp(wxResourceBuffer, "#define") == 0)
|
||||
@ -1938,12 +1938,12 @@ bool wxResourceReadOneResource(wxInputStream *fd, wxExprDatabase& db, bool *eof,
|
||||
wxLogWarning(_("#define %s must be an integer."), name);
|
||||
delete[] name;
|
||||
delete[] value;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
delete[] name;
|
||||
delete[] value;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if (strcmp(wxResourceBuffer, "#include") == 0)
|
||||
{
|
||||
@ -1960,7 +1960,7 @@ bool wxResourceReadOneResource(wxInputStream *fd, wxExprDatabase& db, bool *eof,
|
||||
wxLogWarning(_("Could not find resource include file %s."), actualName);
|
||||
}
|
||||
delete[] name;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if (strcmp(wxResourceBuffer, "static") != 0)
|
||||
{
|
||||
@ -1969,35 +1969,35 @@ bool wxResourceReadOneResource(wxInputStream *fd, wxExprDatabase& db, bool *eof,
|
||||
wxStrncat(buf, wxConvLibc.cMB2WX(wxResourceBuffer), 30);
|
||||
wxStrcat(buf, _(", expected static, #include or #define\nwhilst parsing resource."));
|
||||
wxLogWarning(buf);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// char
|
||||
if (!wxGetResourceToken(fd))
|
||||
{
|
||||
wxLogWarning(_("Unexpected end of file whilst parsing resource."));
|
||||
*eof = TRUE;
|
||||
return FALSE;
|
||||
*eof = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (strcmp(wxResourceBuffer, "char") != 0)
|
||||
{
|
||||
wxLogWarning(_("Expected 'char' whilst parsing resource."));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// *name
|
||||
if (!wxGetResourceToken(fd))
|
||||
{
|
||||
wxLogWarning(_("Unexpected end of file whilst parsing resource."));
|
||||
*eof = TRUE;
|
||||
return FALSE;
|
||||
*eof = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (wxResourceBuffer[0] != '*')
|
||||
{
|
||||
wxLogWarning(_("Expected '*' whilst parsing resource."));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
char nameBuf[100];
|
||||
strncpy(nameBuf, wxResourceBuffer+1, 99);
|
||||
@ -2006,37 +2006,37 @@ bool wxResourceReadOneResource(wxInputStream *fd, wxExprDatabase& db, bool *eof,
|
||||
if (!wxGetResourceToken(fd))
|
||||
{
|
||||
wxLogWarning(_("Unexpected end of file whilst parsing resource."));
|
||||
*eof = TRUE;
|
||||
return FALSE;
|
||||
*eof = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (strcmp(wxResourceBuffer, "=") != 0)
|
||||
{
|
||||
wxLogWarning(_("Expected '=' whilst parsing resource."));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// String
|
||||
if (!wxGetResourceToken(fd))
|
||||
{
|
||||
wxLogWarning(_("Unexpected end of file whilst parsing resource."));
|
||||
*eof = TRUE;
|
||||
return FALSE;
|
||||
*eof = true;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!db.ReadPrologFromString(wxResourceBuffer))
|
||||
{
|
||||
wxLogWarning(_("%s: ill-formed resource file syntax."), nameBuf);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Semicolon
|
||||
if (!wxGetResourceToken(fd))
|
||||
{
|
||||
*eof = TRUE;
|
||||
*eof = true;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2353,13 +2353,13 @@ long wxParseWindowStyle(const wxString& bitListString)
|
||||
word = wxResourceParseWord(WXSTRINGCAST bitListString, &i);
|
||||
while (word != NULL)
|
||||
{
|
||||
bool found = FALSE;
|
||||
bool found = false;
|
||||
int j;
|
||||
for (j = 0; j < wxResourceBitListCount; j++)
|
||||
if (wxStrcmp(wxResourceBitListTable[j].word, word) == 0)
|
||||
{
|
||||
bitList |= wxResourceBitListTable[j].bits;
|
||||
found = TRUE;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
if (!found)
|
||||
@ -2811,7 +2811,7 @@ bool wxResourceAddIdentifier(const wxString& name, int value, wxResourceTable *t
|
||||
table = wxDefaultResourceTable;
|
||||
|
||||
table->identifiers.Put(name, (wxObject *)(long)value);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
int wxResourceGetIdentifier(const wxString& name, wxResourceTable *table)
|
||||
@ -2834,7 +2834,7 @@ bool wxResourceParseIncludeFile(const wxString& f, wxResourceTable *table)
|
||||
FILE *fd = wxFopen(f, wxT("r"));
|
||||
if (!fd)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
while (wxGetResourceToken(fd))
|
||||
{
|
||||
@ -2854,7 +2854,7 @@ bool wxResourceParseIncludeFile(const wxString& f, wxResourceTable *table)
|
||||
}
|
||||
}
|
||||
fclose(fd);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2898,7 +2898,7 @@ bool wxEatWhiteSpaceString(char *s)
|
||||
if (ch == EOF)
|
||||
{
|
||||
ungetc_string();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ch == '*')
|
||||
@ -2916,17 +2916,17 @@ bool wxEatWhiteSpaceString(char *s)
|
||||
{
|
||||
ungetc_string();
|
||||
ungetc_string();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ungetc_string();
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxGetResourceTokenString(char *s)
|
||||
@ -2948,7 +2948,7 @@ bool wxGetResourceTokenString(char *s)
|
||||
if (ch == EOF)
|
||||
{
|
||||
wxResourceBuffer[wxResourceBufferCount] = 0;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
// Escaped characters
|
||||
else if (ch == '\\')
|
||||
@ -2987,9 +2987,9 @@ bool wxGetResourceTokenString(char *s)
|
||||
}
|
||||
wxResourceBuffer[wxResourceBufferCount] = 0;
|
||||
if (ch == EOF)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -3006,8 +3006,8 @@ bool wxResourceReadOneResourceString(char *s, wxExprDatabase& db, bool *eof, wxR
|
||||
// static or #define
|
||||
if (!wxGetResourceTokenString(s))
|
||||
{
|
||||
*eof = TRUE;
|
||||
return FALSE;
|
||||
*eof = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (strcmp(wxResourceBuffer, "#define") == 0)
|
||||
@ -3026,12 +3026,12 @@ bool wxResourceReadOneResourceString(char *s, wxExprDatabase& db, bool *eof, wxR
|
||||
wxLogWarning(_("#define %s must be an integer."), name);
|
||||
delete[] name;
|
||||
delete[] value;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
delete[] name;
|
||||
delete[] value;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
else if (strcmp(wxResourceBuffer, "#include") == 0)
|
||||
@ -3051,7 +3051,7 @@ bool wxResourceReadOneResourceString(char *s, wxExprDatabase& db, bool *eof, wxR
|
||||
wxLogWarning(buf);
|
||||
}
|
||||
delete[] name;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
else if (strcmp(wxResourceBuffer, "static") != 0)
|
||||
@ -3061,35 +3061,35 @@ bool wxResourceReadOneResourceString(char *s, wxExprDatabase& db, bool *eof, wxR
|
||||
wxStrncat(buf, wxConvCurrent->cMB2WX(wxResourceBuffer), 30);
|
||||
wxStrcat(buf, _(", expected static, #include or #define\nwhilst parsing resource."));
|
||||
wxLogWarning(buf);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// char
|
||||
if (!wxGetResourceTokenString(s))
|
||||
{
|
||||
wxLogWarning(_("Unexpected end of file whilst parsing resource."));
|
||||
*eof = TRUE;
|
||||
return FALSE;
|
||||
*eof = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (strcmp(wxResourceBuffer, "char") != 0)
|
||||
{
|
||||
wxLogWarning(_("Expected 'char' whilst parsing resource."));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// *name
|
||||
if (!wxGetResourceTokenString(s))
|
||||
{
|
||||
wxLogWarning(_("Unexpected end of file whilst parsing resource."));
|
||||
*eof = TRUE;
|
||||
return FALSE;
|
||||
*eof = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (wxResourceBuffer[0] != '*')
|
||||
{
|
||||
wxLogWarning(_("Expected '*' whilst parsing resource."));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
wxChar nameBuf[100];
|
||||
wxMB2WX(nameBuf, wxResourceBuffer+1, 99);
|
||||
@ -3099,37 +3099,37 @@ bool wxResourceReadOneResourceString(char *s, wxExprDatabase& db, bool *eof, wxR
|
||||
if (!wxGetResourceTokenString(s))
|
||||
{
|
||||
wxLogWarning(_("Unexpected end of file whilst parsing resource."));
|
||||
*eof = TRUE;
|
||||
return FALSE;
|
||||
*eof = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (strcmp(wxResourceBuffer, "=") != 0)
|
||||
{
|
||||
wxLogWarning(_("Expected '=' whilst parsing resource."));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// String
|
||||
if (!wxGetResourceTokenString(s))
|
||||
{
|
||||
wxLogWarning(_("Unexpected end of file whilst parsing resource."));
|
||||
*eof = TRUE;
|
||||
return FALSE;
|
||||
*eof = true;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!db.ReadPrologFromString(wxResourceBuffer))
|
||||
{
|
||||
wxLogWarning(_("%s: ill-formed resource file syntax."), nameBuf);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Semicolon
|
||||
if (!wxGetResourceTokenString(s))
|
||||
{
|
||||
*eof = TRUE;
|
||||
*eof = true;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxResourceParseString(const wxString& s, wxResourceTable *WXUNUSED(table))
|
||||
@ -3147,7 +3147,7 @@ bool wxResourceParseString(char *s, wxResourceTable *table)
|
||||
table = wxDefaultResourceTable;
|
||||
|
||||
if (!s)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
// Turn backslashes into spaces
|
||||
if (s)
|
||||
@ -3165,7 +3165,7 @@ bool wxResourceParseString(char *s, wxResourceTable *table)
|
||||
wxExprDatabase db;
|
||||
wxResourceStringPtr = 0;
|
||||
|
||||
bool eof = FALSE;
|
||||
bool eof = false;
|
||||
while (wxResourceReadOneResourceString(s, db, &eof, table) && !eof)
|
||||
{
|
||||
// Loop
|
||||
@ -3186,7 +3186,7 @@ bool wxLoadFromResource(wxWindow* thisWindow, wxWindow *parent, const wxString&
|
||||
// if (!resource || (resource->GetType() != wxTYPE_DIALOG_BOX))
|
||||
if (!resource || (resource->GetType() == wxT("")) ||
|
||||
! ((resource->GetType() == wxT("wxDialog")) || (resource->GetType() == wxT("wxPanel"))))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
wxString title(resource->GetTitle());
|
||||
long theWindowStyle = resource->GetStyle();
|
||||
@ -3204,8 +3204,8 @@ bool wxLoadFromResource(wxWindow* thisWindow, wxWindow *parent, const wxString&
|
||||
{
|
||||
wxDialog *dialogBox = (wxDialog *)thisWindow;
|
||||
long modalStyle = isModal ? wxDIALOG_MODAL : 0;
|
||||
if (!dialogBox->Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), theWindowStyle|modalStyle, name))
|
||||
return FALSE;
|
||||
if (!dialogBox->Create(parent, wxID_ANY, title, wxPoint(x, y), wxSize(width, height), theWindowStyle|modalStyle, name))
|
||||
return false;
|
||||
|
||||
// Only reset the client size if we know we're not going to do it again below.
|
||||
if ((resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) == 0)
|
||||
@ -3214,13 +3214,13 @@ bool wxLoadFromResource(wxWindow* thisWindow, wxWindow *parent, const wxString&
|
||||
else if (thisWindow->IsKindOf(CLASSINFO(wxPanel)))
|
||||
{
|
||||
wxPanel* panel = (wxPanel *)thisWindow;
|
||||
if (!panel->Create(parent, -1, wxPoint(x, y), wxSize(width, height), theWindowStyle | wxTAB_TRAVERSAL, name))
|
||||
return FALSE;
|
||||
if (!panel->Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), theWindowStyle | wxTAB_TRAVERSAL, name))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!((wxWindow *)thisWindow)->Create(parent, -1, wxPoint(x, y), wxSize(width, height), theWindowStyle, name))
|
||||
return FALSE;
|
||||
if (!((wxWindow *)thisWindow)->Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), theWindowStyle, name))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3264,7 +3264,7 @@ bool wxLoadFromResource(wxWindow* thisWindow, wxWindow *parent, const wxString&
|
||||
|
||||
node = node->GetNext();
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxControl *wxCreateItem(wxWindow* thisWindow, const wxItemResource *resource, const wxItemResource* parentResource, const wxResourceTable *table)
|
||||
|
@ -145,7 +145,7 @@ void wxToolBarSimple::Init()
|
||||
m_currentTool = -1;
|
||||
|
||||
m_xPos =
|
||||
m_yPos = -1;
|
||||
m_yPos = wxDefaultCoord;
|
||||
|
||||
m_toolPacking = 1;
|
||||
m_toolSeparation = 5;
|
||||
@ -194,11 +194,11 @@ bool wxToolBarSimple::DoInsertTool(size_t WXUNUSED(pos),
|
||||
_T("generic wxToolBarSimple doesn't support controls") );
|
||||
|
||||
tool->m_x = m_xPos;
|
||||
if ( tool->m_x == -1 )
|
||||
if ( tool->m_x == wxDefaultCoord )
|
||||
tool->m_x = m_xMargin;
|
||||
|
||||
tool->m_y = m_yPos;
|
||||
if ( tool->m_y == -1 )
|
||||
if ( tool->m_y == wxDefaultCoord )
|
||||
tool->m_y = m_yMargin;
|
||||
|
||||
tool->SetSize(GetToolSize());
|
||||
@ -851,7 +851,7 @@ int wxToolBarSimple::CalcScrollInc(wxScrollEvent& event)
|
||||
else
|
||||
nScrollInc = pos - m_yScrollPosition;
|
||||
}
|
||||
|
||||
|
||||
if (orient == wxHORIZONTAL)
|
||||
{
|
||||
int w, h;
|
||||
@ -968,15 +968,15 @@ void wxToolBarSimple::Scroll (int x_pos, int y_pos)
|
||||
{
|
||||
int old_x, old_y;
|
||||
ViewStart (&old_x, &old_y);
|
||||
if (((x_pos == -1) || (x_pos == old_x)) && ((y_pos == -1) || (y_pos == old_y)))
|
||||
if (((x_pos == wxDefaultCoord) || (x_pos == old_x)) && ((y_pos == wxDefaultCoord) || (y_pos == old_y)))
|
||||
return;
|
||||
|
||||
if (x_pos > -1)
|
||||
if (x_pos != wxDefaultCoord)
|
||||
{
|
||||
m_xScrollPosition = x_pos;
|
||||
SetScrollPos (wxHORIZONTAL, x_pos, true);
|
||||
}
|
||||
if (y_pos > -1)
|
||||
if (y_pos != wxDefaultCoord)
|
||||
{
|
||||
m_yScrollPosition = y_pos;
|
||||
SetScrollPos (wxVERTICAL, y_pos, true);
|
||||
|
@ -50,12 +50,12 @@ wxTreeLayout::wxTreeLayout()
|
||||
|
||||
void wxTreeLayout::DoLayout(wxDC& dc, long topId)
|
||||
{
|
||||
if (topId != -1)
|
||||
if (topId != wxID_ANY)
|
||||
SetTopNode(topId);
|
||||
|
||||
long actualTopId = GetTopNode();
|
||||
long id = actualTopId;
|
||||
while (id != -1)
|
||||
while (id != wxID_ANY)
|
||||
{
|
||||
SetNodeX(id, 0);
|
||||
SetNodeY(id, 0);
|
||||
@ -77,7 +77,7 @@ void wxTreeLayout::Draw(wxDC& dc)
|
||||
void wxTreeLayout::DrawNodes(wxDC& dc)
|
||||
{
|
||||
long id = GetTopNode();
|
||||
while (id != -1)
|
||||
while (id != wxID_ANY)
|
||||
{
|
||||
if (NodeActive(id))
|
||||
DrawNode(id, dc);
|
||||
@ -88,9 +88,9 @@ void wxTreeLayout::DrawNodes(wxDC& dc)
|
||||
void wxTreeLayout::DrawBranches(wxDC& dc)
|
||||
{
|
||||
long id = GetTopNode();
|
||||
while (id != -1)
|
||||
while (id != wxID_ANY)
|
||||
{
|
||||
if (GetNodeParent(id) > -1)
|
||||
if (GetNodeParent(id) != wxID_ANY)
|
||||
{
|
||||
long parent = GetNodeParent(id);
|
||||
if (NodeActive(parent))
|
||||
@ -155,7 +155,7 @@ void wxTreeLayout::CalcLayout(long nodeId, int level, wxDC& dc)
|
||||
long x = 0;
|
||||
long y = 0;
|
||||
long parentId = GetNodeParent(nodeId);
|
||||
if (parentId != -1)
|
||||
if (parentId != wxID_ANY)
|
||||
GetNodeSize(parentId, &x, &y, dc);
|
||||
SetNodeX(nodeId, (long)(GetNodeX(parentId) + m_xSpacing + x));
|
||||
}
|
||||
@ -204,7 +204,7 @@ void wxTreeLayout::CalcLayout(long nodeId, int level, wxDC& dc)
|
||||
long x = 0;
|
||||
long y = 0;
|
||||
long parentId = GetNodeParent(nodeId);
|
||||
if (parentId != -1)
|
||||
if (parentId != wxID_ANY)
|
||||
GetNodeSize(parentId, &x, &y, dc);
|
||||
SetNodeY(nodeId, (long)(GetNodeY(parentId) + m_ySpacing + y));
|
||||
}
|
||||
@ -274,7 +274,7 @@ void wxTreeLayoutStored::Initialize(int n)
|
||||
{
|
||||
m_nodes[i].m_name = wxT("");
|
||||
m_nodes[i].m_active = false;
|
||||
m_nodes[i].m_parentId = -1;
|
||||
m_nodes[i].m_parentId = wxID_ANY;
|
||||
m_nodes[i].m_x = 0;
|
||||
m_nodes[i].m_y = 0;
|
||||
}
|
||||
@ -311,17 +311,17 @@ long wxTreeLayoutStored::AddChild(const wxString& name, long parent)
|
||||
{
|
||||
i = parent;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
m_parentNode = m_num;
|
||||
}
|
||||
|
||||
|
||||
m_nodes[m_num].m_parentId = i;
|
||||
m_nodes[m_num].m_name = name;
|
||||
m_nodes[m_num].m_x = m_nodes[m_num].m_y = 0;
|
||||
m_nodes[m_num].m_clientData = 0;
|
||||
m_num ++;
|
||||
|
||||
|
||||
return (m_num - 1);
|
||||
}
|
||||
else
|
||||
@ -340,7 +340,7 @@ long wxTreeLayoutStored::NameToId(const wxString& name)
|
||||
void wxTreeLayoutStored::GetChildren(long id, wxList& list)
|
||||
{
|
||||
long currentId = GetTopNode();
|
||||
while (currentId != -1)
|
||||
while (currentId != wxID_ANY)
|
||||
{
|
||||
if (id == GetNodeParent(currentId))
|
||||
list.Append((wxObject *)currentId);
|
||||
@ -399,24 +399,24 @@ wxString wxTreeLayoutStored::GetNodeName(long id)
|
||||
|
||||
long wxTreeLayoutStored::GetNodeParent(long id)
|
||||
{
|
||||
if (id != -1)
|
||||
if (id != wxID_ANY)
|
||||
{
|
||||
wxASSERT(id < m_num);
|
||||
|
||||
return m_nodes[id].m_parentId;
|
||||
}
|
||||
else
|
||||
return -1;
|
||||
return wxNOT_FOUND;
|
||||
}
|
||||
|
||||
long wxTreeLayoutStored::GetNextNode(long id)
|
||||
{
|
||||
wxASSERT(id < m_num);
|
||||
|
||||
if ((id != -1) && (id < (m_num - 1)))
|
||||
if ((id != wxID_ANY) && (id < (m_num - 1)))
|
||||
return id + 1;
|
||||
else
|
||||
return -1;
|
||||
return wxNOT_FOUND;
|
||||
}
|
||||
|
||||
void wxTreeLayoutStored::SetClientData(long id, long clientData)
|
||||
|
@ -146,7 +146,7 @@ wxExpr::wxExpr(wxExprType the_type, const wxString& word_or_string)
|
||||
break;
|
||||
case wxExprReal:
|
||||
case wxExprInteger:
|
||||
case wxExprNull:
|
||||
case wxExprNull:
|
||||
break;
|
||||
}
|
||||
client_data = NULL;
|
||||
@ -171,7 +171,7 @@ wxExpr::wxExpr(wxExprType the_type, wxChar *word_or_string, bool allocate)
|
||||
break;
|
||||
case wxExprReal:
|
||||
case wxExprInteger:
|
||||
case wxExprNull:
|
||||
case wxExprNull:
|
||||
break;
|
||||
}
|
||||
client_data = NULL;
|
||||
@ -304,7 +304,7 @@ wxExpr *wxExpr::Copy(void) const
|
||||
}
|
||||
return new_list;
|
||||
}
|
||||
case wxExprNull:
|
||||
case wxExprNull:
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
@ -327,7 +327,7 @@ wxExpr *wxExpr::GetAttributeValueNode(const wxString& word) const // Use only fo
|
||||
if ((firstNode->type == wxExprWord) && (firstNode->value.word[0] == '='))
|
||||
{
|
||||
wxExpr *secondNode = firstNode->next;
|
||||
if ((secondNode->type == wxExprWord) &&
|
||||
if ((secondNode->type == wxExprWord) &&
|
||||
(wxStrcmp((const wxChar *)word, secondNode->value.word) == 0))
|
||||
{
|
||||
return expr;
|
||||
@ -366,9 +366,9 @@ wxString wxExpr::Functor(void) const // Use only for a clause
|
||||
bool wxExpr::IsFunctor(const wxString& f) const // Use only for a clause
|
||||
{
|
||||
if ((type != wxExprList) || !value.first)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
return (value.first->type == wxExprWord &&
|
||||
return (value.first->type == wxExprWord &&
|
||||
(wxStrcmp((const wxChar *)f, value.first->value.word) == 0));
|
||||
}
|
||||
|
||||
@ -437,7 +437,7 @@ void wxExpr::DeleteAttributeValue(const wxString& attribute)
|
||||
if ((firstNode->type == wxExprWord) && (firstNode->value.word[0] == '='))
|
||||
{
|
||||
wxExpr *secondNode = firstNode->next;
|
||||
if ((secondNode->type == wxExprWord) &&
|
||||
if ((secondNode->type == wxExprWord) &&
|
||||
(wxStrcmp((const wxChar *)attribute, secondNode->value.word) == 0))
|
||||
{
|
||||
wxExpr *nextExpr = expr->next;
|
||||
@ -641,10 +641,10 @@ bool wxExpr::GetAttributeValue(const wxString& att, int& var) const
|
||||
if (expr && (expr->Type() == wxExprInteger || expr->Type() == wxExprReal))
|
||||
{
|
||||
var = (int)(expr->IntegerValue());
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxExpr::GetAttributeValue(const wxString& att, long& var) const
|
||||
@ -654,10 +654,10 @@ bool wxExpr::GetAttributeValue(const wxString& att, long& var) const
|
||||
if (expr && (expr->Type() == wxExprInteger || expr->Type() == wxExprReal))
|
||||
{
|
||||
var = expr->IntegerValue();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxExpr::GetAttributeValue(const wxString& att, float& var) const
|
||||
@ -666,10 +666,10 @@ bool wxExpr::GetAttributeValue(const wxString& att, float& var) const
|
||||
if (expr && (expr->Type() == wxExprInteger || expr->Type() == wxExprReal))
|
||||
{
|
||||
var = (float) expr->RealValue();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxExpr::GetAttributeValue(const wxString& att, double& var) const
|
||||
@ -678,10 +678,10 @@ bool wxExpr::GetAttributeValue(const wxString& att, double& var) const
|
||||
if (expr && (expr->Type() == wxExprInteger || expr->Type() == wxExprReal))
|
||||
{
|
||||
var = expr->RealValue();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxExpr::GetAttributeValue(const wxString& att, wxString& var) const // Word OR string -> string
|
||||
@ -690,15 +690,15 @@ bool wxExpr::GetAttributeValue(const wxString& att, wxString& var) const // Wor
|
||||
if (expr && expr->Type() == wxExprWord)
|
||||
{
|
||||
var = expr->WordValue();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if (expr && expr->Type() == wxExprString)
|
||||
{
|
||||
var = expr->StringValue();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxExpr::GetAttributeValue(const wxString& att, wxExpr **var) const
|
||||
@ -707,10 +707,10 @@ bool wxExpr::GetAttributeValue(const wxString& att, wxExpr **var) const
|
||||
if (expr)
|
||||
{
|
||||
*var = expr;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxExpr::GetAttributeValueStringList(const wxString& att, wxList *var) const
|
||||
@ -726,10 +726,10 @@ bool wxExpr::GetAttributeValueStringList(const wxString& att, wxList *var) const
|
||||
|
||||
string_expr = string_expr->next;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Compatibility
|
||||
@ -755,16 +755,16 @@ void wxExpr::WriteClause(FILE* stream) // Write this expression as a top-level
|
||||
node->WriteExpr(stream);
|
||||
fprintf( stream, "(" );
|
||||
node = node->next;
|
||||
bool first = TRUE;
|
||||
bool first = true;
|
||||
while (node)
|
||||
{
|
||||
if (!first)
|
||||
fprintf( stream, " " );
|
||||
node->WriteExpr(stream);
|
||||
node = node->next;
|
||||
if (node)
|
||||
if (node)
|
||||
fprintf( stream, ",\n" );
|
||||
first = FALSE;
|
||||
first = false;
|
||||
}
|
||||
fprintf( stream, ").\n\n" );
|
||||
}
|
||||
@ -817,18 +817,18 @@ void wxExpr::WriteExpr(FILE* stream) // Write as any other subexpression
|
||||
}
|
||||
case wxExprWord:
|
||||
{
|
||||
bool quote_it = FALSE;
|
||||
bool quote_it = false;
|
||||
const wxWX2MBbuf val = wxConvLibc.cWX2MB(value.word);
|
||||
size_t len = strlen(val);
|
||||
if ((len == 0) || (len > 0 && (val[(size_t) 0] > 64 && val[(size_t) 0] < 91)))
|
||||
quote_it = TRUE;
|
||||
quote_it = true;
|
||||
else
|
||||
{
|
||||
size_t i;
|
||||
for (i = 0; i < len; i++)
|
||||
if ((!isalpha(val[i])) && (!isdigit(val[i])) &&
|
||||
(val[i] != '_'))
|
||||
{ quote_it = TRUE; i = len; }
|
||||
{ quote_it = true; i = len; }
|
||||
}
|
||||
|
||||
if (quote_it)
|
||||
@ -864,8 +864,8 @@ void wxExpr::WriteExpr(FILE* stream) // Write as any other subexpression
|
||||
{
|
||||
expr->WriteExpr(stream);
|
||||
expr = expr->next;
|
||||
if (expr)
|
||||
fprintf( stream, ", " );
|
||||
if (expr)
|
||||
fprintf( stream, ", " );
|
||||
}
|
||||
fprintf( stream, "]" );
|
||||
}
|
||||
@ -879,7 +879,7 @@ void wxExpr::WriteExpr(FILE* stream) // Write as any other subexpression
|
||||
/*
|
||||
* wxExpr 'database' (list of expressions)
|
||||
*/
|
||||
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxExprDatabase, wxList)
|
||||
|
||||
wxExprDatabase::wxExprDatabase(wxExprErrorHandler handler)
|
||||
@ -924,7 +924,7 @@ wxExpr *wxExprDatabase::FindClause(long id) // Find a term based on an integer
|
||||
while (position && !found)
|
||||
{
|
||||
wxExpr *term = (wxExpr *)position->GetData();
|
||||
|
||||
|
||||
if (term->Type() == wxExprList)
|
||||
{
|
||||
wxExpr *value = term->AttributeValue(wxT("id"));
|
||||
@ -943,7 +943,7 @@ wxExpr *wxExprDatabase::FindClause(const wxString& word, const wxString& val)
|
||||
while (position && !found)
|
||||
{
|
||||
wxExpr *term = (wxExpr *)position->GetData();
|
||||
|
||||
|
||||
if (term->Type() == wxExprList)
|
||||
{
|
||||
wxExpr *value = term->AttributeValue(word);
|
||||
@ -962,7 +962,7 @@ wxExpr *wxExprDatabase::FindClause(const wxString& word, long val)
|
||||
while (position && !found)
|
||||
{
|
||||
wxExpr *term = (wxExpr *)position->GetData();
|
||||
|
||||
|
||||
if (term->Type() == wxExprList)
|
||||
{
|
||||
wxExpr *value = term->AttributeValue(word);
|
||||
@ -980,7 +980,7 @@ wxExpr *wxExprDatabase::FindClause(const wxString& word, double val)
|
||||
while (position && !found)
|
||||
{
|
||||
wxExpr *term = (wxExpr *)position->GetData();
|
||||
|
||||
|
||||
if (term->Type() == wxExprList)
|
||||
{
|
||||
wxExpr *value = term->AttributeValue(word);
|
||||
@ -998,7 +998,7 @@ wxExpr *wxExprDatabase::FindClauseByFunctor(const wxString& functor)
|
||||
while (position && !found)
|
||||
{
|
||||
wxExpr *term = (wxExpr *)position->GetData();
|
||||
|
||||
|
||||
if (term->Type() == wxExprList)
|
||||
{
|
||||
if (term->Functor() == functor)
|
||||
@ -1086,7 +1086,7 @@ bool wxExprDatabase::Read(const wxString& filename)
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1105,10 +1105,10 @@ bool wxExprDatabase::ReadFromString(const wxString& buffer)
|
||||
bool wxExprDatabase::Write(const wxString& fileName)
|
||||
{
|
||||
FILE *stream = wxFopen( fileName, _T("w+"));
|
||||
|
||||
|
||||
if (!stream)
|
||||
return FALSE;
|
||||
|
||||
return false;
|
||||
|
||||
bool success = Write(stream);
|
||||
fclose(stream);
|
||||
return success;
|
||||
@ -1141,12 +1141,12 @@ bool wxExprIsFunctor(wxExpr *expr, const wxString& functor)
|
||||
|
||||
if (first_expr && (first_expr->Type() == wxExprWord) &&
|
||||
(first_expr->WordValue() == functor))
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1213,11 +1213,11 @@ char *wxmake_string(char *str)
|
||||
size_t len, i;
|
||||
const wxMB2WXbuf sbuf = wxConvLibc.cMB2WX(str);
|
||||
|
||||
// str++; /* skip leading quote */
|
||||
len = wxStrlen(sbuf) - 1; /* ignore trailing quote */
|
||||
|
||||
// str++; /* skip leading quote */
|
||||
len = wxStrlen(sbuf) - 1; /* ignore trailing quote */
|
||||
|
||||
s = new wxChar[len + 1];
|
||||
|
||||
|
||||
t = s;
|
||||
for(i=1; i<len; i++) // 1 since we want to skip leading quote
|
||||
{
|
||||
@ -1237,7 +1237,7 @@ char *wxmake_string(char *str)
|
||||
|
||||
*t = wxT('\0');
|
||||
|
||||
wxExpr *x = new wxExpr(wxExprString, s, FALSE);
|
||||
wxExpr *x = new wxExpr(wxExprString, s, false);
|
||||
return (char *)x;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user