/////////////////////////////////////////////////////////////////////////////
// Name: treectrl.cpp
// Purpose: wxTreeCtrl. See also Robert's generic wxTreeCtrl.
/////////////////////////////////////////////////////////////////////////////
// Name: treectrl.cpp
// Purpose: wxTreeCtrl. See also Robert's generic wxTreeCtrl.
IMPLEMENT_DYNAMIC_CLASS(wxTreeCtrl, wxControl)
IMPLEMENT_DYNAMIC_CLASS(wxTreeItem, wxObject)
IMPLEMENT_DYNAMIC_CLASS(wxTreeCtrl, wxControl)
IMPLEMENT_DYNAMIC_CLASS(wxTreeItem, wxObject)
- wxFAIL_MSG("unknown action in wxTreeCtrl::ExpandItem");
- }
-
- 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_itemId = item;
- 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;
+ wxFAIL_MSG("unknown action in wxTreeCtrl::ExpandItem");
+ }
+
+ 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_itemId = item;
+ 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;