Source cleaning: whitespaces, -1/wxID_ANY/wxNOT_FOUND, TRUE/true, FALSE/false.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-09-17 17:57:44 +00:00
parent 9133965ef5
commit f644b28c11
9 changed files with 206 additions and 206 deletions

View File

@@ -390,7 +390,7 @@ public:
// count of items in the list // count of items in the list
size_t GetCount() const { return m_count; } size_t GetCount() const { return m_count; }
// return TRUE if this list is empty // return true if this list is empty
bool IsEmpty() const { return m_count == 0; } bool IsEmpty() const { return m_count == 0; }
// operations // operations
@@ -486,10 +486,10 @@ protected:
// removes node from the list but doesn't delete it (returns pointer // removes node from the list but doesn't delete it (returns pointer
// to the node or NULL if it wasn't found in the list) // to the node or NULL if it wasn't found in the list)
wxNodeBase *DetachNode(wxNodeBase *node); wxNodeBase *DetachNode(wxNodeBase *node);
// delete element from list, returns FALSE if node not found // delete element from list, returns false if node not found
bool DeleteNode(wxNodeBase *node); bool DeleteNode(wxNodeBase *node);
// finds object pointer and deletes node (and object if DeleteContents // finds object pointer and deletes node (and object if DeleteContents
// is on), returns FALSE if object not found // is on), returns false if object not found
bool DeleteObject(void *object); bool DeleteObject(void *object);
// search (all return NULL if item not found) // search (all return NULL if item not found)
@@ -967,7 +967,7 @@ private:
#define WX_DECLARE_LIST_WITH_DECL(elementtype, listname, decl) \ #define WX_DECLARE_LIST_WITH_DECL(elementtype, listname, decl) \
typedef elementtype _WX_LIST_ITEM_TYPE_##listname; \ typedef elementtype _WX_LIST_ITEM_TYPE_##listname; \
WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node, decl) WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node, decl)
#define WX_DECLARE_EXPORTED_LIST(elementtype, listname) \ #define WX_DECLARE_EXPORTED_LIST(elementtype, listname) \
WX_DECLARE_LIST_WITH_DECL(elementtype, listname, class WXDLLEXPORT) WX_DECLARE_LIST_WITH_DECL(elementtype, listname, class WXDLLEXPORT)
@@ -1089,20 +1089,20 @@ public:
// copying the string list: the strings are copied, too (extremely // copying the string list: the strings are copied, too (extremely
// inefficient!) // inefficient!)
wxStringList(const wxStringList& other) : wxStringListBase() { DeleteContents(TRUE); DoCopy(other); } wxStringList(const wxStringList& other) : wxStringListBase() { DeleteContents(true); DoCopy(other); }
wxStringList& operator=(const wxStringList& other) wxStringList& operator=(const wxStringList& other)
{ Clear(); DoCopy(other); return *this; } { Clear(); DoCopy(other); return *this; }
// operations // operations
// makes a copy of the string // makes a copy of the string
wxNode *Add(const wxChar *s); wxNode *Add(const wxChar *s);
// Append to beginning of list // Append to beginning of list
wxNode *Prepend(const wxChar *s); wxNode *Prepend(const wxChar *s);
bool Delete(const wxChar *s); bool Delete(const wxChar *s);
wxChar **ListToArray(bool new_copies = FALSE) const; wxChar **ListToArray(bool new_copies = false) const;
bool Member(const wxChar *s) const; bool Member(const wxChar *s) const;
// alphabetic sort // alphabetic sort

View File

@@ -441,31 +441,31 @@ END_DECLARE_EVENT_TYPES()
typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&); typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&);
#define EVT_LIST_BEGIN_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ), #define EVT_LIST_BEGIN_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_BEGIN_DRAG, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ),
#define EVT_LIST_BEGIN_RDRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ), #define EVT_LIST_BEGIN_RDRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_BEGIN_RDRAG, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ),
#define EVT_LIST_BEGIN_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ), #define EVT_LIST_BEGIN_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ),
#define EVT_LIST_END_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ), #define EVT_LIST_END_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_END_LABEL_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ),
#define EVT_LIST_DELETE_ITEM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ), #define EVT_LIST_DELETE_ITEM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_DELETE_ITEM, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ),
#define EVT_LIST_DELETE_ALL_ITEMS(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ), #define EVT_LIST_DELETE_ALL_ITEMS(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ),
#define EVT_LIST_GET_INFO(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ), #define EVT_LIST_GET_INFO(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_GET_INFO, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ),
#define EVT_LIST_SET_INFO(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ), #define EVT_LIST_SET_INFO(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_SET_INFO, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ),
#define EVT_LIST_KEY_DOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ), #define EVT_LIST_KEY_DOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_KEY_DOWN, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ),
#define EVT_LIST_INSERT_ITEM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_INSERT_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ), #define EVT_LIST_INSERT_ITEM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_INSERT_ITEM, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ),
#define EVT_LIST_COL_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_COL_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ), #define EVT_LIST_COL_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_COL_CLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ),
#define EVT_LIST_COL_RIGHT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_COL_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ), #define EVT_LIST_COL_RIGHT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_COL_RIGHT_CLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ),
#define EVT_LIST_COL_BEGIN_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ), #define EVT_LIST_COL_BEGIN_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ),
#define EVT_LIST_COL_DRAGGING(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_COL_DRAGGING, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ), #define EVT_LIST_COL_DRAGGING(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_COL_DRAGGING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ),
#define EVT_LIST_COL_END_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_COL_END_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ), #define EVT_LIST_COL_END_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_COL_END_DRAG, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ),
#define EVT_LIST_ITEM_SELECTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ), #define EVT_LIST_ITEM_SELECTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_SELECTED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ),
#define EVT_LIST_ITEM_DESELECTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_DESELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ), #define EVT_LIST_ITEM_DESELECTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_DESELECTED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), NULL ),
#define EVT_LIST_ITEM_RIGHT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), (wxObject *) NULL ), #define EVT_LIST_ITEM_RIGHT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_LIST_ITEM_MIDDLE_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), (wxObject *) NULL ), #define EVT_LIST_ITEM_MIDDLE_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_LIST_ITEM_ACTIVATED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), (wxObject *) NULL ), #define EVT_LIST_ITEM_ACTIVATED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_LIST_ITEM_FOCUSED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_FOCUSED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), (wxObject *) NULL ), #define EVT_LIST_ITEM_FOCUSED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_FOCUSED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_LIST_CACHE_HINT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_CACHE_HINT, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), (wxObject *) NULL ), #define EVT_LIST_CACHE_HINT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_CACHE_HINT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxListEventFunction, & fn ), (wxObject *) NULL ),
#endif // wxUSE_LISTCTRL #endif // wxUSE_LISTCTRL

View File

@@ -65,12 +65,12 @@ public:
// multiple selection logic // multiple selection logic
virtual bool IsSelected(int n) const = 0; virtual bool IsSelected(int n) const = 0;
virtual void SetSelection(int n, bool select = TRUE) = 0; virtual void SetSelection(int n, bool select = true) = 0;
virtual void Select(int n) { SetSelection(n, TRUE); } virtual void Select(int n) { SetSelection(n, true); }
void Deselect(int n) { SetSelection(n, FALSE); } void Deselect(int n) { SetSelection(n, false); }
void DeselectAll(int itemToLeaveSelected = -1); void DeselectAll(int itemToLeaveSelected = -1);
virtual bool SetStringSelection(const wxString& s, bool select = TRUE); virtual bool SetStringSelection(const wxString& s, bool select = true);
// works for single as well as multiple selection listboxes (unlike // works for single as well as multiple selection listboxes (unlike
// GetSelection which only works for listboxes with single selection) // GetSelection which only works for listboxes with single selection)
@@ -89,14 +89,14 @@ public:
// listbox and ensures that it is visible i.e. not scrolled out of view // listbox and ensures that it is visible i.e. not scrolled out of view
void AppendAndEnsureVisible(const wxString& s); void AppendAndEnsureVisible(const wxString& s);
// return TRUE if the listbox allows multiple selection // return true if the listbox allows multiple selection
bool HasMultipleSelection() const bool HasMultipleSelection() const
{ {
return (m_windowStyle & wxLB_MULTIPLE) || return (m_windowStyle & wxLB_MULTIPLE) ||
(m_windowStyle & wxLB_EXTENDED); (m_windowStyle & wxLB_EXTENDED);
} }
// return TRUE if this listbox is sorted // return true if this listbox is sorted
bool IsSorted() const { return (m_windowStyle & wxLB_SORT) != 0; } bool IsSorted() const { return (m_windowStyle & wxLB_SORT) != 0; }
// emulate selecting or deselecting the item event.GetInt() (depending on // emulate selecting or deselecting the item event.GetInt() (depending on

View File

@@ -41,7 +41,7 @@ class WXDLLEXPORT wxListView : public wxListCtrl
public: public:
wxListView() { } wxListView() { }
wxListView( wxWindow *parent, wxListView( wxWindow *parent,
wxWindowID winid = -1, wxWindowID winid = wxID_ANY,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxLC_REPORT, long style = wxLC_REPORT,
@@ -55,7 +55,7 @@ public:
// --------------------- // ---------------------
// [de]select an item // [de]select an item
void Select(long n, bool on = TRUE) void Select(long n, bool on = true)
{ {
SetItemState(n, on ? wxLIST_STATE_SELECTED : 0, wxLIST_STATE_SELECTED); SetItemState(n, on ? wxLIST_STATE_SELECTED : 0, wxLIST_STATE_SELECTED);
} }
@@ -79,7 +79,7 @@ public:
long GetFirstSelected() const long GetFirstSelected() const
{ return GetNextSelected(-1); } { return GetNextSelected(-1); }
// return TRUE if the item is selected // return true if the item is selected
bool IsSelected(long index) bool IsSelected(long index)
{ return GetItemState(index, wxLIST_STATE_SELECTED) != 0; } { return GetItemState(index, wxLIST_STATE_SELECTED) != 0; }

View File

@@ -56,7 +56,7 @@ wxIndividualLayoutConstraint::wxIndividualLayoutConstraint()
value = 0; value = 0;
percent = 0; percent = 0;
otherEdge = wxTop; otherEdge = wxTop;
done = FALSE; done = false;
otherWin = (wxWindowBase *) NULL; otherWin = (wxWindowBase *) NULL;
} }
@@ -145,10 +145,10 @@ bool wxIndividualLayoutConstraint::ResetIfWin(wxWindowBase *otherW)
percent = 0; percent = 0;
otherEdge = wxTop; otherEdge = wxTop;
otherWin = (wxWindowBase *) NULL; otherWin = (wxWindowBase *) NULL;
return TRUE; return true;
} }
return FALSE; return false;
} }
// Try to satisfy constraint // Try to satisfy constraint
@@ -156,8 +156,8 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
{ {
if (relationship == wxAbsolute) if (relationship == wxAbsolute)
{ {
done = TRUE; done = true;
return TRUE; return true;
} }
switch (myEdge) switch (myEdge)
@@ -175,11 +175,11 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (edgePos != -1) if (edgePos != -1)
{ {
value = edgePos - margin; value = edgePos - margin;
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxRightOf: case wxRightOf:
{ {
@@ -187,11 +187,11 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (edgePos != -1) if (edgePos != -1)
{ {
value = edgePos + margin; value = edgePos + margin;
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxPercentOf: case wxPercentOf:
{ {
@@ -199,11 +199,11 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (edgePos != -1) if (edgePos != -1)
{ {
value = (int)(edgePos*(((float)percent)*0.01) + margin); value = (int)(edgePos*(((float)percent)*0.01) + margin);
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxUnconstrained: case wxUnconstrained:
{ {
@@ -213,24 +213,24 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (constraints->right.GetDone() && constraints->width.GetDone()) if (constraints->right.GetDone() && constraints->width.GetDone())
{ {
value = (constraints->right.GetValue() - constraints->width.GetValue() + margin); value = (constraints->right.GetValue() - constraints->width.GetValue() + margin);
done = TRUE; done = true;
return TRUE; return true;
} }
else if (constraints->centreX.GetDone() && constraints->width.GetDone()) else if (constraints->centreX.GetDone() && constraints->width.GetDone())
{ {
value = (int)(constraints->centreX.GetValue() - (constraints->width.GetValue()/2) + margin); value = (int)(constraints->centreX.GetValue() - (constraints->width.GetValue()/2) + margin);
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxAsIs: case wxAsIs:
{ {
int y; int y;
win->GetPosition(&value, &y); win->GetPosition(&value, &y);
done = TRUE; done = true;
return TRUE; return true;
} }
default: default:
break; break;
@@ -250,11 +250,11 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (edgePos != -1) if (edgePos != -1)
{ {
value = edgePos - margin; value = edgePos - margin;
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxRightOf: case wxRightOf:
{ {
@@ -262,11 +262,11 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (edgePos != -1) if (edgePos != -1)
{ {
value = edgePos + margin; value = edgePos + margin;
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxPercentOf: case wxPercentOf:
{ {
@@ -274,11 +274,11 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (edgePos != -1) if (edgePos != -1)
{ {
value = (int)(edgePos*(((float)percent)*0.01) - margin); value = (int)(edgePos*(((float)percent)*0.01) - margin);
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxUnconstrained: case wxUnconstrained:
{ {
@@ -288,17 +288,17 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (constraints->left.GetDone() && constraints->width.GetDone()) if (constraints->left.GetDone() && constraints->width.GetDone())
{ {
value = (constraints->left.GetValue() + constraints->width.GetValue() - margin); value = (constraints->left.GetValue() + constraints->width.GetValue() - margin);
done = TRUE; done = true;
return TRUE; return true;
} }
else if (constraints->centreX.GetDone() && constraints->width.GetDone()) else if (constraints->centreX.GetDone() && constraints->width.GetDone())
{ {
value = (int)(constraints->centreX.GetValue() + (constraints->width.GetValue()/2) - margin); value = (int)(constraints->centreX.GetValue() + (constraints->width.GetValue()/2) - margin);
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxAsIs: case wxAsIs:
{ {
@@ -307,8 +307,8 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
win->GetSize(&w, &h); win->GetSize(&w, &h);
win->GetPosition(&x, &y); win->GetPosition(&x, &y);
value = x + w; value = x + w;
done = TRUE; done = true;
return TRUE; return true;
} }
default: default:
break; break;
@@ -328,11 +328,11 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (edgePos != -1) if (edgePos != -1)
{ {
value = edgePos - margin; value = edgePos - margin;
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxBelow: case wxBelow:
{ {
@@ -340,11 +340,11 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (edgePos != -1) if (edgePos != -1)
{ {
value = edgePos + margin; value = edgePos + margin;
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxPercentOf: case wxPercentOf:
{ {
@@ -352,11 +352,11 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (edgePos != -1) if (edgePos != -1)
{ {
value = (int)(edgePos*(((float)percent)*0.01) + margin); value = (int)(edgePos*(((float)percent)*0.01) + margin);
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxUnconstrained: case wxUnconstrained:
{ {
@@ -366,24 +366,24 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (constraints->bottom.GetDone() && constraints->height.GetDone()) if (constraints->bottom.GetDone() && constraints->height.GetDone())
{ {
value = (constraints->bottom.GetValue() - constraints->height.GetValue() + margin); value = (constraints->bottom.GetValue() - constraints->height.GetValue() + margin);
done = TRUE; done = true;
return TRUE; return true;
} }
else if (constraints->centreY.GetDone() && constraints->height.GetDone()) else if (constraints->centreY.GetDone() && constraints->height.GetDone())
{ {
value = (constraints->centreY.GetValue() - (constraints->height.GetValue()/2) + margin); value = (constraints->centreY.GetValue() - (constraints->height.GetValue()/2) + margin);
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxAsIs: case wxAsIs:
{ {
int x; int x;
win->GetPosition(&x, &value); win->GetPosition(&x, &value);
done = TRUE; done = true;
return TRUE; return true;
} }
default: default:
break; break;
@@ -403,11 +403,11 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (edgePos != -1) if (edgePos != -1)
{ {
value = edgePos + margin; value = edgePos + margin;
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxBelow: case wxBelow:
{ {
@@ -415,11 +415,11 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (edgePos != -1) if (edgePos != -1)
{ {
value = edgePos - margin; value = edgePos - margin;
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxPercentOf: case wxPercentOf:
{ {
@@ -427,11 +427,11 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (edgePos != -1) if (edgePos != -1)
{ {
value = (int)(edgePos*(((float)percent)*0.01) - margin); value = (int)(edgePos*(((float)percent)*0.01) - margin);
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxUnconstrained: case wxUnconstrained:
{ {
@@ -441,17 +441,17 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (constraints->top.GetDone() && constraints->height.GetDone()) if (constraints->top.GetDone() && constraints->height.GetDone())
{ {
value = (constraints->top.GetValue() + constraints->height.GetValue() - margin); value = (constraints->top.GetValue() + constraints->height.GetValue() - margin);
done = TRUE; done = true;
return TRUE; return true;
} }
else if (constraints->centreY.GetDone() && constraints->height.GetDone()) else if (constraints->centreY.GetDone() && constraints->height.GetDone())
{ {
value = (constraints->centreY.GetValue() + (constraints->height.GetValue()/2) - margin); value = (constraints->centreY.GetValue() + (constraints->height.GetValue()/2) - margin);
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxAsIs: case wxAsIs:
{ {
@@ -460,8 +460,8 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
win->GetSize(&w, &h); win->GetSize(&w, &h);
win->GetPosition(&x, &y); win->GetPosition(&x, &y);
value = h + y; value = h + y;
done = TRUE; done = true;
return TRUE; return true;
} }
default: default:
break; break;
@@ -481,11 +481,11 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (edgePos != -1) if (edgePos != -1)
{ {
value = edgePos - margin; value = edgePos - margin;
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxRightOf: case wxRightOf:
{ {
@@ -493,11 +493,11 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (edgePos != -1) if (edgePos != -1)
{ {
value = edgePos + margin; value = edgePos + margin;
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxPercentOf: case wxPercentOf:
{ {
@@ -505,11 +505,11 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (edgePos != -1) if (edgePos != -1)
{ {
value = (int)(edgePos*(((float)percent)*0.01) + margin); value = (int)(edgePos*(((float)percent)*0.01) + margin);
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxUnconstrained: case wxUnconstrained:
{ {
@@ -519,17 +519,17 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (constraints->left.GetDone() && constraints->width.GetDone()) if (constraints->left.GetDone() && constraints->width.GetDone())
{ {
value = (int)(constraints->left.GetValue() + (constraints->width.GetValue()/2) + margin); value = (int)(constraints->left.GetValue() + (constraints->width.GetValue()/2) + margin);
done = TRUE; done = true;
return TRUE; return true;
} }
else if (constraints->right.GetDone() && constraints->width.GetDone()) else if (constraints->right.GetDone() && constraints->width.GetDone())
{ {
value = (int)(constraints->left.GetValue() - (constraints->width.GetValue()/2) + margin); value = (int)(constraints->left.GetValue() - (constraints->width.GetValue()/2) + margin);
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
default: default:
break; break;
@@ -549,11 +549,11 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (edgePos != -1) if (edgePos != -1)
{ {
value = edgePos - margin; value = edgePos - margin;
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxBelow: case wxBelow:
{ {
@@ -561,11 +561,11 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (edgePos != -1) if (edgePos != -1)
{ {
value = edgePos + margin; value = edgePos + margin;
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxPercentOf: case wxPercentOf:
{ {
@@ -573,11 +573,11 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (edgePos != -1) if (edgePos != -1)
{ {
value = (int)(edgePos*(((float)percent)*0.01) + margin); value = (int)(edgePos*(((float)percent)*0.01) + margin);
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxUnconstrained: case wxUnconstrained:
{ {
@@ -587,17 +587,17 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (constraints->bottom.GetDone() && constraints->height.GetDone()) if (constraints->bottom.GetDone() && constraints->height.GetDone())
{ {
value = (int)(constraints->bottom.GetValue() - (constraints->height.GetValue()/2) + margin); value = (int)(constraints->bottom.GetValue() - (constraints->height.GetValue()/2) + margin);
done = TRUE; done = true;
return TRUE; return true;
} }
else if (constraints->top.GetDone() && constraints->height.GetDone()) else if (constraints->top.GetDone() && constraints->height.GetDone())
{ {
value = (int)(constraints->top.GetValue() + (constraints->height.GetValue()/2) + margin); value = (int)(constraints->top.GetValue() + (constraints->height.GetValue()/2) + margin);
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
default: default:
break; break;
@@ -614,11 +614,11 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (edgePos != -1) if (edgePos != -1)
{ {
value = (int)(edgePos*(((float)percent)*0.01)); value = (int)(edgePos*(((float)percent)*0.01));
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxAsIs: case wxAsIs:
{ {
@@ -626,10 +626,10 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
{ {
int h; int h;
win->GetSize(&value, &h); win->GetSize(&value, &h);
done = TRUE; done = true;
return TRUE; return true;
} }
else return FALSE; else return false;
} }
case wxUnconstrained: case wxUnconstrained:
{ {
@@ -639,23 +639,23 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (constraints->left.GetDone() && constraints->right.GetDone()) if (constraints->left.GetDone() && constraints->right.GetDone())
{ {
value = constraints->right.GetValue() - constraints->left.GetValue(); value = constraints->right.GetValue() - constraints->left.GetValue();
done = TRUE; done = true;
return TRUE; return true;
} }
else if (constraints->centreX.GetDone() && constraints->left.GetDone()) else if (constraints->centreX.GetDone() && constraints->left.GetDone())
{ {
value = (int)(2*(constraints->centreX.GetValue() - constraints->left.GetValue())); value = (int)(2*(constraints->centreX.GetValue() - constraints->left.GetValue()));
done = TRUE; done = true;
return TRUE; return true;
} }
else if (constraints->centreX.GetDone() && constraints->right.GetDone()) else if (constraints->centreX.GetDone() && constraints->right.GetDone())
{ {
value = (int)(2*(constraints->right.GetValue() - constraints->centreX.GetValue())); value = (int)(2*(constraints->right.GetValue() - constraints->centreX.GetValue()));
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
default: default:
break; break;
@@ -672,11 +672,11 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (edgePos != -1) if (edgePos != -1)
{ {
value = (int)(edgePos*(((float)percent)*0.01)); value = (int)(edgePos*(((float)percent)*0.01));
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
case wxAsIs: case wxAsIs:
{ {
@@ -684,10 +684,10 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
{ {
int w; int w;
win->GetSize(&w, &value); win->GetSize(&w, &value);
done = TRUE; done = true;
return TRUE; return true;
} }
else return FALSE; else return false;
} }
case wxUnconstrained: case wxUnconstrained:
{ {
@@ -697,23 +697,23 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
if (constraints->top.GetDone() && constraints->bottom.GetDone()) if (constraints->top.GetDone() && constraints->bottom.GetDone())
{ {
value = constraints->bottom.GetValue() - constraints->top.GetValue(); value = constraints->bottom.GetValue() - constraints->top.GetValue();
done = TRUE; done = true;
return TRUE; return true;
} }
else if (constraints->top.GetDone() && constraints->centreY.GetDone()) else if (constraints->top.GetDone() && constraints->centreY.GetDone())
{ {
value = (int)(2*(constraints->centreY.GetValue() - constraints->top.GetValue())); value = (int)(2*(constraints->centreY.GetValue() - constraints->top.GetValue()));
done = TRUE; done = true;
return TRUE; return true;
} }
else if (constraints->bottom.GetDone() && constraints->centreY.GetDone()) else if (constraints->bottom.GetDone() && constraints->centreY.GetDone())
{ {
value = (int)(2*(constraints->bottom.GetValue() - constraints->centreY.GetValue())); value = (int)(2*(constraints->bottom.GetValue() - constraints->centreY.GetValue()));
done = TRUE; done = true;
return TRUE; return true;
} }
else else
return FALSE; return false;
} }
default: default:
break; break;
@@ -723,7 +723,7 @@ bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constr
default: default:
break; break;
} }
return FALSE; return false;
} }
// Get the value of this edge or dimension, or if this is not determinable, -1. // Get the value of this edge or dimension, or if this is not determinable, -1.
@@ -969,42 +969,42 @@ bool wxLayoutConstraints::SatisfyConstraints(wxWindowBase *win, int *nChanges)
int noChanges = 0; int noChanges = 0;
bool done = width.GetDone(); bool done = width.GetDone();
bool newDone = (done ? TRUE : width.SatisfyConstraint(this, win)); bool newDone = (done ? true : width.SatisfyConstraint(this, win));
if (newDone != done) if (newDone != done)
noChanges ++; noChanges ++;
done = height.GetDone(); done = height.GetDone();
newDone = (done ? TRUE : height.SatisfyConstraint(this, win)); newDone = (done ? true : height.SatisfyConstraint(this, win));
if (newDone != done) if (newDone != done)
noChanges ++; noChanges ++;
done = left.GetDone(); done = left.GetDone();
newDone = (done ? TRUE : left.SatisfyConstraint(this, win)); newDone = (done ? true : left.SatisfyConstraint(this, win));
if (newDone != done) if (newDone != done)
noChanges ++; noChanges ++;
done = top.GetDone(); done = top.GetDone();
newDone = (done ? TRUE : top.SatisfyConstraint(this, win)); newDone = (done ? true : top.SatisfyConstraint(this, win));
if (newDone != done) if (newDone != done)
noChanges ++; noChanges ++;
done = right.GetDone(); done = right.GetDone();
newDone = (done ? TRUE : right.SatisfyConstraint(this, win)); newDone = (done ? true : right.SatisfyConstraint(this, win));
if (newDone != done) if (newDone != done)
noChanges ++; noChanges ++;
done = bottom.GetDone(); done = bottom.GetDone();
newDone = (done ? TRUE : bottom.SatisfyConstraint(this, win)); newDone = (done ? true : bottom.SatisfyConstraint(this, win));
if (newDone != done) if (newDone != done)
noChanges ++; noChanges ++;
done = centreX.GetDone(); done = centreX.GetDone();
newDone = (done ? TRUE : centreX.SatisfyConstraint(this, win)); newDone = (done ? true : centreX.SatisfyConstraint(this, win));
if (newDone != done) if (newDone != done)
noChanges ++; noChanges ++;
done = centreY.GetDone(); done = centreY.GetDone();
newDone = (done ? TRUE : centreY.SatisfyConstraint(this, win)); newDone = (done ? true : centreY.SatisfyConstraint(this, win));
if (newDone != done) if (newDone != done)
noChanges ++; noChanges ++;

View File

@@ -79,12 +79,12 @@ void wxListBoxBase::Set(int nItems, const wxString* items, void **clientData)
bool wxListBoxBase::SetStringSelection(const wxString& s, bool select) bool wxListBoxBase::SetStringSelection(const wxString& s, bool select)
{ {
int sel = FindString(s); int sel = FindString(s);
wxCHECK_MSG( sel != -1, FALSE, wxCHECK_MSG( sel != wxNOT_FOUND, false,
wxT("invalid string in SetStringSelection") ); wxT("invalid string in SetStringSelection") );
SetSelection(sel, select); SetSelection(sel, select);
return TRUE; return true;
} }
void wxListBoxBase::DeselectAll(int itemToLeaveSelected) void wxListBoxBase::DeselectAll(int itemToLeaveSelected)
@@ -105,7 +105,7 @@ void wxListBoxBase::DeselectAll(int itemToLeaveSelected)
else // single selection else // single selection
{ {
int sel = GetSelection(); int sel = GetSelection();
if ( sel != -1 && sel != itemToLeaveSelected ) if ( sel != wxNOT_FOUND && sel != itemToLeaveSelected )
{ {
Deselect(sel); Deselect(sel);
} }
@@ -130,7 +130,7 @@ void wxListBoxBase::SetFirstItem(const wxString& s)
{ {
int n = FindString(s); int n = FindString(s);
wxCHECK_RET( n != -1, wxT("invalid string in wxListBox::SetFirstItem") ); wxCHECK_RET( n != wxNOT_FOUND, wxT("invalid string in wxListBox::SetFirstItem") );
DoSetFirstItem(n); DoSetFirstItem(n);
} }

View File

@@ -147,7 +147,7 @@ void wxListBase::Init(wxKeyType keyType)
m_nodeFirst = m_nodeFirst =
m_nodeLast = (wxNodeBase *) NULL; m_nodeLast = (wxNodeBase *) NULL;
m_count = 0; m_count = 0;
m_destroy = FALSE; m_destroy = false;
m_keyType = keyType; m_keyType = keyType;
} }
@@ -408,11 +408,11 @@ wxNodeBase *wxListBase::DetachNode(wxNodeBase *node)
bool wxListBase::DeleteNode(wxNodeBase *node) bool wxListBase::DeleteNode(wxNodeBase *node)
{ {
if ( !DetachNode(node) ) if ( !DetachNode(node) )
return FALSE; return false;
DoDeleteNode(node); DoDeleteNode(node);
return TRUE; return true;
} }
bool wxListBase::DeleteObject(void *object) bool wxListBase::DeleteObject(void *object)
@@ -422,12 +422,12 @@ bool wxListBase::DeleteObject(void *object)
if ( current->GetData() == object ) if ( current->GetData() == object )
{ {
DeleteNode(current); DeleteNode(current);
return TRUE; return true;
} }
} }
// not found // not found
return FALSE; return false;
} }
void wxListBase::Clear() void wxListBase::Clear()
@@ -624,12 +624,12 @@ bool wxStringList::Delete(const wxChar *s)
if ( wxStrcmp(current->GetData(), s) == 0 ) if ( wxStrcmp(current->GetData(), s) == 0 )
{ {
DeleteNode(current); DeleteNode(current);
return TRUE; return true;
} }
} }
// not found // not found
return FALSE; return false;
} }
void wxStringList::DoCopy(const wxStringList& other) void wxStringList::DoCopy(const wxStringList& other)
@@ -645,14 +645,14 @@ void wxStringList::DoCopy(const wxStringList& other)
wxStringList::wxStringList() wxStringList::wxStringList()
{ {
DeleteContents(TRUE); DeleteContents(true);
} }
// Variable argument list, terminated by a zero // Variable argument list, terminated by a zero
// Makes new storage for the strings // Makes new storage for the strings
wxStringList::wxStringList (const wxChar *first, ...) wxStringList::wxStringList (const wxChar *first, ...)
{ {
DeleteContents(TRUE); DeleteContents(true);
if ( !first ) if ( !first )
return; return;
@@ -677,7 +677,7 @@ wxStringList::wxStringList (const wxChar *first, ...)
va_end(ap); va_end(ap);
} }
// Only makes new strings if arg is TRUE // Only makes new strings if arg is true
wxChar **wxStringList::ListToArray(bool new_copies) const wxChar **wxStringList::ListToArray(bool new_copies) const
{ {
wxChar **string_array = new wxChar *[GetCount()]; wxChar **string_array = new wxChar *[GetCount()];
@@ -702,10 +702,10 @@ bool wxStringList::Member(const wxChar *s) const
{ {
const wxChar *s1 = node->GetData(); const wxChar *s1 = node->GetData();
if (s == s1 || wxStrcmp (s, s1) == 0) if (s == s1 || wxStrcmp (s, s1) == 0)
return TRUE; return true;
} }
return FALSE; return false;
} }
#ifdef __WXWINCE__ #ifdef __WXWINCE__
@@ -748,7 +748,7 @@ wxNode *wxStringList::Add(const wxChar *s)
{ {
return (wxNode *)wxStringListBase::Append(MYcopystring(s)); return (wxNode *)wxStringListBase::Append(MYcopystring(s));
} }
wxNode *wxStringList::Prepend(const wxChar *s) wxNode *wxStringList::Prepend(const wxChar *s)
{ {
return (wxNode *)wxStringListBase::Insert(MYcopystring(s)); return (wxNode *)wxStringListBase::Insert(MYcopystring(s));

View File

@@ -394,9 +394,9 @@ wxLog *wxLog::GetActiveTarget()
if ( ms_bAutoCreate && ms_pLogger == NULL ) { if ( ms_bAutoCreate && ms_pLogger == NULL ) {
// prevent infinite recursion if someone calls wxLogXXX() from // prevent infinite recursion if someone calls wxLogXXX() from
// wxApp::CreateLogTarget() // wxApp::CreateLogTarget()
static bool s_bInGetActiveTarget = FALSE; static bool s_bInGetActiveTarget = false;
if ( !s_bInGetActiveTarget ) { if ( !s_bInGetActiveTarget ) {
s_bInGetActiveTarget = TRUE; s_bInGetActiveTarget = true;
// ask the application to create a log target for us // ask the application to create a log target for us
if ( wxTheApp != NULL ) if ( wxTheApp != NULL )
@@ -404,7 +404,7 @@ wxLog *wxLog::GetActiveTarget()
else else
ms_pLogger = new wxLogStderr; ms_pLogger = new wxLogStderr;
s_bInGetActiveTarget = FALSE; s_bInGetActiveTarget = false;
// do nothing if it fails - what can we do? // do nothing if it fails - what can we do?
} }
@@ -429,7 +429,7 @@ wxLog *wxLog::SetActiveTarget(wxLog *pLogger)
void wxLog::DontCreateOnDemand() void wxLog::DontCreateOnDemand()
{ {
ms_bAutoCreate = FALSE; ms_bAutoCreate = false;
// this is usually called at the end of the program and we assume that it // this is usually called at the end of the program and we assume that it
// is *always* called at the end - so we free memory here to avoid false // is *always* called at the end - so we free memory here to avoid false
@@ -591,7 +591,7 @@ void wxLogStream::DoLogString(const wxChar *szString, time_t WXUNUSED(t))
wxLogChain::wxLogChain(wxLog *logger) wxLogChain::wxLogChain(wxLog *logger)
{ {
m_bPassMessages = TRUE; m_bPassMessages = true;
m_logNew = logger; m_logNew = logger;
m_logOld = wxLog::SetActiveTarget(this); m_logOld = wxLog::SetActiveTarget(this);
@@ -666,9 +666,9 @@ wxLogPassThrough::wxLogPassThrough()
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
wxLog *wxLog::ms_pLogger = (wxLog *)NULL; wxLog *wxLog::ms_pLogger = (wxLog *)NULL;
bool wxLog::ms_doLog = TRUE; bool wxLog::ms_doLog = true;
bool wxLog::ms_bAutoCreate = TRUE; bool wxLog::ms_bAutoCreate = true;
bool wxLog::ms_bVerbose = FALSE; bool wxLog::ms_bVerbose = false;
wxLogLevel wxLog::ms_logLevel = wxLOG_Max; // log everything by default wxLogLevel wxLog::ms_logLevel = wxLOG_Max; // log everything by default

View File

@@ -508,41 +508,41 @@ wxULongLongWx& wxULongLongWx::operator--()
bool wxLongLongWx::operator<(const wxLongLongWx& ll) const bool wxLongLongWx::operator<(const wxLongLongWx& ll) const
{ {
if ( m_hi < ll.m_hi ) if ( m_hi < ll.m_hi )
return TRUE; return true;
else if ( m_hi == ll.m_hi ) else if ( m_hi == ll.m_hi )
return m_lo < ll.m_lo; return m_lo < ll.m_lo;
else else
return FALSE; return false;
} }
bool wxULongLongWx::operator<(const wxULongLongWx& ll) const bool wxULongLongWx::operator<(const wxULongLongWx& ll) const
{ {
if ( m_hi < ll.m_hi ) if ( m_hi < ll.m_hi )
return TRUE; return true;
else if ( m_hi == ll.m_hi ) else if ( m_hi == ll.m_hi )
return m_lo < ll.m_lo; return m_lo < ll.m_lo;
else else
return FALSE; return false;
} }
bool wxLongLongWx::operator>(const wxLongLongWx& ll) const bool wxLongLongWx::operator>(const wxLongLongWx& ll) const
{ {
if ( m_hi > ll.m_hi ) if ( m_hi > ll.m_hi )
return TRUE; return true;
else if ( m_hi == ll.m_hi ) else if ( m_hi == ll.m_hi )
return m_lo > ll.m_lo; return m_lo > ll.m_lo;
else else
return FALSE; return false;
} }
bool wxULongLongWx::operator>(const wxULongLongWx& ll) const bool wxULongLongWx::operator>(const wxULongLongWx& ll) const
{ {
if ( m_hi > ll.m_hi ) if ( m_hi > ll.m_hi )
return TRUE; return true;
else if ( m_hi == ll.m_hi ) else if ( m_hi == ll.m_hi )
return m_lo > ll.m_lo; return m_lo > ll.m_lo;
else else
return FALSE; return false;
} }
// bitwise operators // bitwise operators
@@ -796,7 +796,7 @@ void wxLongLongWx::Divide(const wxLongLongWx& divisorIn,
// //
// with 0 <= abs(remainder) < abs(divisor) // with 0 <= abs(remainder) < abs(divisor)
bool negRemainder = dividend.m_hi < 0; bool negRemainder = dividend.m_hi < 0;
bool negQuotient = FALSE; // assume positive bool negQuotient = false; // assume positive
if ( dividend.m_hi < 0 ) if ( dividend.m_hi < 0 )
{ {
negQuotient = !negQuotient; negQuotient = !negQuotient;
@@ -1078,11 +1078,11 @@ wxLongLongWx::ToString() const
if ( ll < 0 ) if ( ll < 0 )
{ {
ll.Negate(); ll.Negate();
neg = TRUE; neg = true;
} }
else else
{ {
neg = FALSE; neg = false;
} }
while ( ll != 0 ) while ( ll != 0 )