Line-up interfaces to use size_t for GetCount()s.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-03-12 13:15:53 +00:00
parent 78fc4e5509
commit 3b38e2a022
4 changed files with 36 additions and 38 deletions

View File

@@ -1492,7 +1492,7 @@ public:
virtual void ClearStyleStack(); virtual void ClearStyleStack();
/// Get the size of the style stack, for example to check correct nesting /// Get the size of the style stack, for example to check correct nesting
virtual int GetStyleStackSize() const { return m_attributeStack.GetCount(); } virtual size_t GetStyleStackSize() const { return m_attributeStack.GetCount(); }
/// Begin using bold /// Begin using bold
bool BeginBold(); bool BeginBold();

View File

@@ -41,7 +41,7 @@ bool wxTreeCtrl::Create(wxWindow *parent,
m_windowStyle = style; m_windowStyle = style;
m_windowId = (id == -1) ? NewControlId() : id; m_windowId = (id == wxID_ANY) ? NewControlId() : id;
if (parent) if (parent)
parent->AddChild(this); parent->AddChild(this);
@@ -57,7 +57,7 @@ wxTreeCtrl::~wxTreeCtrl()
} }
// Attributes // Attributes
int wxTreeCtrl::GetCount() const size_t wxTreeCtrl::GetCount() const
{ {
// TODO // TODO
return 0; return 0;
@@ -413,4 +413,3 @@ wxTreeEvent::wxTreeEvent(wxEventType commandType, int id)
m_code = 0; m_code = 0;
m_oldItem = 0; m_oldItem = 0;
} }

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: treectrl.cpp // Name: src/mac/classic/treectrl.cpp
// Purpose: wxTreeCtrl. See also Robert's generic wxTreeCtrl. // Purpose: wxTreeCtrl. See also Robert's generic wxTreeCtrl.
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
@@ -37,13 +37,13 @@ bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, con
SetParent(parent); SetParent(parent);
m_windowId = (id == -1) ? NewControlId() : id; m_windowId = (id == wxID_ANY) ? NewControlId() : id;
if (parent) parent->AddChild(this); if (parent) parent->AddChild(this);
// TODO create tree control // TODO create tree control
return FALSE; return false;
} }
wxTreeCtrl::~wxTreeCtrl() wxTreeCtrl::~wxTreeCtrl()
@@ -55,7 +55,7 @@ wxTreeCtrl::~wxTreeCtrl()
} }
// Attributes // Attributes
int wxTreeCtrl::GetCount() const size_t wxTreeCtrl::GetCount() const
{ {
// TODO // TODO
return 0; return 0;
@@ -107,7 +107,7 @@ long wxTreeCtrl::GetNextItem(long item, int code) const
bool wxTreeCtrl::ItemHasChildren(long item) const bool wxTreeCtrl::ItemHasChildren(long item) const
{ {
// TODO // TODO
return FALSE; return false;
} }
long wxTreeCtrl::GetChild(long item) const long wxTreeCtrl::GetChild(long item) const
@@ -149,13 +149,13 @@ long wxTreeCtrl::GetRootItem() const
bool wxTreeCtrl::GetItem(wxTreeItem& info) const bool wxTreeCtrl::GetItem(wxTreeItem& info) const
{ {
// TODO // TODO
return FALSE; return false;
} }
bool wxTreeCtrl::SetItem(wxTreeItem& info) bool wxTreeCtrl::SetItem(wxTreeItem& info)
{ {
// TODO // TODO
return FALSE; return false;
} }
int wxTreeCtrl::GetItemState(long item, long stateMask) const int wxTreeCtrl::GetItemState(long item, long stateMask) const
@@ -208,7 +208,7 @@ wxString wxTreeCtrl::GetItemText(long item) const
info.m_itemId = item; info.m_itemId = item;
if (!GetItem(info)) if (!GetItem(info))
return wxString(""); return wxEmptyString;
return info.m_text; return info.m_text;
} }
@@ -249,7 +249,7 @@ bool wxTreeCtrl::SetItemData(long item, long data)
bool wxTreeCtrl::GetItemRect(long item, wxRect& rect, bool textOnly) const bool wxTreeCtrl::GetItemRect(long item, wxRect& rect, bool textOnly) const
{ {
// TODO // TODO
return FALSE; return false;
} }
wxTextCtrl* wxTreeCtrl::GetEditControl() const wxTextCtrl* wxTreeCtrl::GetEditControl() const
@@ -261,7 +261,7 @@ wxTextCtrl* wxTreeCtrl::GetEditControl() const
bool wxTreeCtrl::DeleteItem(long item) bool wxTreeCtrl::DeleteItem(long item)
{ {
// TODO // TODO
return FALSE; return false;
} }
bool wxTreeCtrl::ExpandItem(long item, int action) bool wxTreeCtrl::ExpandItem(long item, int action)
@@ -285,7 +285,7 @@ bool wxTreeCtrl::ExpandItem(long item, int action)
wxFAIL_MSG("unknown action in wxTreeCtrl::ExpandItem"); wxFAIL_MSG("unknown action in wxTreeCtrl::ExpandItem");
} }
bool bOk = FALSE; // TODO expand item bool bOk = false; // TODO expand item
// May not send messages, so emulate them // May not send messages, so emulate them
if ( bOk ) { if ( bOk ) {
@@ -341,19 +341,19 @@ long wxTreeCtrl::InsertItem(long parent, const wxString& label, int image, int s
bool wxTreeCtrl::SelectItem(long item) bool wxTreeCtrl::SelectItem(long item)
{ {
// TODO // TODO
return FALSE; return false;
} }
bool wxTreeCtrl::ScrollTo(long item) bool wxTreeCtrl::ScrollTo(long item)
{ {
// TODO // TODO
return FALSE; return false;
} }
bool wxTreeCtrl::DeleteAllItems() bool wxTreeCtrl::DeleteAllItems()
{ {
// TODO // TODO
return FALSE; return false;
} }
wxTextCtrl* wxTreeCtrl::EditLabel(long item, wxClassInfo* textControlClass) wxTextCtrl* wxTreeCtrl::EditLabel(long item, wxClassInfo* textControlClass)
@@ -366,7 +366,7 @@ wxTextCtrl* wxTreeCtrl::EditLabel(long item, wxClassInfo* textControlClass)
bool wxTreeCtrl::EndEditLabel(bool cancel) bool wxTreeCtrl::EndEditLabel(bool cancel)
{ {
// TODO // TODO
return FALSE; return false;
} }
long wxTreeCtrl::HitTest(const wxPoint& point, int& flags) long wxTreeCtrl::HitTest(const wxPoint& point, int& flags)
@@ -378,13 +378,13 @@ long wxTreeCtrl::HitTest(const wxPoint& point, int& flags)
bool wxTreeCtrl::SortChildren(long item) bool wxTreeCtrl::SortChildren(long item)
{ {
// TODO // TODO
return FALSE; return false;
} }
bool wxTreeCtrl::EnsureVisible(long item) bool wxTreeCtrl::EnsureVisible(long item)
{ {
// TODO // TODO
return FALSE; return false;
} }
// Tree item structure // Tree item structure
@@ -409,4 +409,3 @@ wxTreeEvent::wxTreeEvent(wxEventType commandType, int id):
m_code = 0; m_code = 0;
m_oldItem = 0; m_oldItem = 0;
} }

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: hid.cpp // Name: src/mac/corefoundation/hid.cpp
// Purpose: DARWIN HID layer for WX Implementation // Purpose: DARWIN HID layer for WX Implementation
// Author: Ryan Norton // Author: Ryan Norton
// Modified by: // Modified by:
@@ -208,7 +208,7 @@ USB Product Name
return true; return true;
}//end Create() }//end Create()
int wxHIDDevice::GetCount (int nClass, int nType) size_t wxHIDDevice::GetCount (int nClass, int nType)
{ {
mach_port_t m_pPort; mach_port_t m_pPort;
@@ -248,7 +248,7 @@ int wxHIDDevice::GetCount (int nClass, int nType)
//Now we iterate through them //Now we iterate through them
io_object_t pObject; io_object_t pObject;
int nCount = 0; size_t nCount = 0;
while ( (pObject = IOIteratorNext(pIterator)) != 0) while ( (pObject = IOIteratorNext(pIterator)) != 0)
++nCount; ++nCount;