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