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:
@@ -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();
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 1998-01-01
|
// Created: 1998-01-01
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Stefan Csomor
|
// Copyright: (c) Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// 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:
|
||||||
// Created: 1998-01-01
|
// Created: 1998-01-01
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Stefan Csomor
|
// Copyright: (c) Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "wx/stubs/textctrl.h"
|
#include "wx/stubs/textctrl.h"
|
||||||
@@ -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)
|
||||||
@@ -271,22 +271,22 @@ bool wxTreeCtrl::ExpandItem(long item, int action)
|
|||||||
{
|
{
|
||||||
case wxTREE_EXPAND_EXPAND:
|
case wxTREE_EXPAND_EXPAND:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxTREE_EXPAND_COLLAPSE:
|
case wxTREE_EXPAND_COLLAPSE:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxTREE_EXPAND_COLLAPSE_RESET:
|
case wxTREE_EXPAND_COLLAPSE_RESET:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxTREE_EXPAND_TOGGLE:
|
case wxTREE_EXPAND_TOGGLE:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
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 ) {
|
||||||
wxTreeEvent event(wxEVT_NULL, m_windowId);
|
wxTreeEvent event(wxEVT_NULL, m_windowId);
|
||||||
@@ -294,22 +294,22 @@ bool wxTreeCtrl::ExpandItem(long item, int action)
|
|||||||
event.m_item.m_mask =
|
event.m_item.m_mask =
|
||||||
event.m_item.m_stateMask = 0xffff; // get all
|
event.m_item.m_stateMask = 0xffff; // get all
|
||||||
GetItem(event.m_item);
|
GetItem(event.m_item);
|
||||||
|
|
||||||
bool bIsExpanded = (event.m_item.m_state & wxTREE_STATE_EXPANDED) != 0;
|
bool bIsExpanded = (event.m_item.m_state & wxTREE_STATE_EXPANDED) != 0;
|
||||||
|
|
||||||
event.m_code = action;
|
event.m_code = action;
|
||||||
event.SetEventObject(this);
|
event.SetEventObject(this);
|
||||||
|
|
||||||
// @@@ return values of {EXPAND|COLLAPS}ING event handler is discarded
|
// @@@ return values of {EXPAND|COLLAPS}ING event handler is discarded
|
||||||
event.SetEventType(bIsExpanded ? wxEVT_COMMAND_TREE_ITEM_EXPANDING
|
event.SetEventType(bIsExpanded ? wxEVT_COMMAND_TREE_ITEM_EXPANDING
|
||||||
: wxEVT_COMMAND_TREE_ITEM_COLLAPSING);
|
: wxEVT_COMMAND_TREE_ITEM_COLLAPSING);
|
||||||
GetEventHandler()->ProcessEvent(event);
|
GetEventHandler()->ProcessEvent(event);
|
||||||
|
|
||||||
event.SetEventType(bIsExpanded ? wxEVT_COMMAND_TREE_ITEM_EXPANDED
|
event.SetEventType(bIsExpanded ? wxEVT_COMMAND_TREE_ITEM_EXPANDED
|
||||||
: wxEVT_COMMAND_TREE_ITEM_COLLAPSED);
|
: wxEVT_COMMAND_TREE_ITEM_COLLAPSED);
|
||||||
GetEventHandler()->ProcessEvent(event);
|
GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
return bOk;
|
return 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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;
|
||||||
|
Reference in New Issue
Block a user