X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/68204d23c26d9fb8c813009dc2b24f5d1c8a279b..bbd92d1dbea02db8c28e9c17bfacc0563d855b25:/src/mac/carbon/treectrl.cpp diff --git a/src/mac/carbon/treectrl.cpp b/src/mac/carbon/treectrl.cpp index 75dad9de67..82a90b0854 100644 --- a/src/mac/carbon/treectrl.cpp +++ b/src/mac/carbon/treectrl.cpp @@ -6,7 +6,7 @@ // Created: 1998-01-01 // RCS-ID: $Id$ // Copyright: (c) Stefan Csomor -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" @@ -29,19 +29,22 @@ wxTreeCtrl::wxTreeCtrl() bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style, const wxValidator& validator, const wxString& name) + long style, const wxValidator& wxVALIDATOR_PARAM(validator), + const wxString& name) { m_imageListNormal = NULL; m_imageListState = NULL; m_textCtrl = NULL; SetName(name); +#if wxUSE_VALIDATORS SetValidator(validator); +#endif SetParent(parent); m_windowStyle = style; - m_windowId = (id == -1) ? NewControlId() : id; + m_windowId = (id == wxID_ANY) ? NewControlId() : id; if (parent) parent->AddChild(this); @@ -57,7 +60,7 @@ wxTreeCtrl::~wxTreeCtrl() } // Attributes -int wxTreeCtrl::GetCount() const +unsigned int wxTreeCtrl::GetCount() const { // TODO return 0; @@ -305,13 +308,13 @@ bool wxTreeCtrl::ExpandItem(long item, int action) bIsExpanded ? wxEVT_COMMAND_TREE_ITEM_EXPANDING : wxEVT_COMMAND_TREE_ITEM_COLLAPSING); - GetEventHandler()->ProcessEvent(event); + HandleWindowEvent(event); event.SetEventType( bIsExpanded ? wxEVT_COMMAND_TREE_ITEM_EXPANDED : wxEVT_COMMAND_TREE_ITEM_COLLAPSED); - GetEventHandler()->ProcessEvent(event); + HandleWindowEvent(event); } return bOk; @@ -413,4 +416,3 @@ wxTreeEvent::wxTreeEvent(wxEventType commandType, int id) m_code = 0; m_oldItem = 0; } -