/////////////////////////////////////////////////////////////////////////////
-// Name: treectrl.cpp
+// Name: src/mac/classic/treectrl.cpp
// Purpose: wxTreeCtrl. See also Robert's generic wxTreeCtrl.
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/stubs/textctrl.h"
SetParent(parent);
- m_windowId = (id == -1) ? NewControlId() : id;
+ m_windowId = (id == wxID_ANY) ? NewControlId() : id;
if (parent) parent->AddChild(this);
// TODO create tree control
- return FALSE;
+ return false;
}
wxTreeCtrl::~wxTreeCtrl()
}
// Attributes
-int wxTreeCtrl::GetCount() const
+size_t wxTreeCtrl::GetCount() const
{
// TODO
return 0;
bool wxTreeCtrl::ItemHasChildren(long item) const
{
// TODO
- return FALSE;
+ return false;
}
long wxTreeCtrl::GetChild(long item) const
bool wxTreeCtrl::GetItem(wxTreeItem& info) const
{
// TODO
- return FALSE;
+ return false;
}
bool wxTreeCtrl::SetItem(wxTreeItem& info)
{
// TODO
- return FALSE;
+ return false;
}
int wxTreeCtrl::GetItemState(long item, long stateMask) const
info.m_itemId = item;
if (!GetItem(info))
- return wxString("");
+ return wxEmptyString;
return info.m_text;
}
bool wxTreeCtrl::GetItemRect(long item, wxRect& rect, bool textOnly) const
{
// TODO
- return FALSE;
+ return false;
}
wxTextCtrl* wxTreeCtrl::GetEditControl() const
bool wxTreeCtrl::DeleteItem(long item)
{
// TODO
- return FALSE;
+ return false;
}
bool wxTreeCtrl::ExpandItem(long item, int action)
{
case wxTREE_EXPAND_EXPAND:
break;
-
+
case wxTREE_EXPAND_COLLAPSE:
break;
-
+
case wxTREE_EXPAND_COLLAPSE_RESET:
break;
-
+
case wxTREE_EXPAND_TOGGLE:
break;
-
+
default:
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
if ( bOk ) {
wxTreeEvent event(wxEVT_NULL, m_windowId);
event.m_item.m_mask =
event.m_item.m_stateMask = 0xffff; // get all
GetItem(event.m_item);
-
+
bool bIsExpanded = (event.m_item.m_state & wxTREE_STATE_EXPANDED) != 0;
-
+
event.m_code = action;
event.SetEventObject(this);
-
+
// @@@ return values of {EXPAND|COLLAPS}ING event handler is discarded
event.SetEventType(bIsExpanded ? wxEVT_COMMAND_TREE_ITEM_EXPANDING
: wxEVT_COMMAND_TREE_ITEM_COLLAPSING);
GetEventHandler()->ProcessEvent(event);
-
+
event.SetEventType(bIsExpanded ? wxEVT_COMMAND_TREE_ITEM_EXPANDED
: wxEVT_COMMAND_TREE_ITEM_COLLAPSED);
GetEventHandler()->ProcessEvent(event);
}
-
+
return bOk;
}
bool wxTreeCtrl::SelectItem(long item)
{
// TODO
- return FALSE;
+ return false;
}
bool wxTreeCtrl::ScrollTo(long item)
{
// TODO
- return FALSE;
+ return false;
}
bool wxTreeCtrl::DeleteAllItems()
{
// TODO
- return FALSE;
+ return false;
}
wxTextCtrl* wxTreeCtrl::EditLabel(long item, wxClassInfo* textControlClass)
bool wxTreeCtrl::EndEditLabel(bool cancel)
{
// TODO
- return FALSE;
+ return false;
}
long wxTreeCtrl::HitTest(const wxPoint& point, int& flags)
bool wxTreeCtrl::SortChildren(long item)
{
// TODO
- return FALSE;
+ return false;
}
bool wxTreeCtrl::EnsureVisible(long item)
{
// TODO
- return FALSE;
+ return false;
}
// Tree item structure
m_code = 0;
m_oldItem = 0;
}
-