m_lastOnSame = false;
#if defined( __WXMAC__ )
- m_normalFont.CreateSystemFont(wxOSX_SYSTEM_FONT_VIEWS);
+ m_normalFont = wxFont(wxOSX_SYSTEM_FONT_VIEWS);
#else
m_normalFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
#endif
}
}
+void wxGenericTreeCtrl::ClearFocusedItem()
+{
+ wxTreeItemId item = GetFocusedItem();
+ if ( item.IsOk() )
+ SelectItem(item, false);
+}
+
+void wxGenericTreeCtrl::SetFocusedItem(const wxTreeItemId& item)
+{
+ wxCHECK_RET( item.IsOk(), wxT("invalid tree item") );
+
+ SelectItem(item, true);
+}
+
void wxGenericTreeCtrl::UnselectAllChildren(wxGenericTreeItem *item)
{
if (item->IsSelected())
// end : go to last item without opening parents
// alnum : start or continue searching for the item with this prefix
int keyCode = event.GetKeyCode();
+
+#ifdef __WXOSX__
+ // Make the keys work as they do in the native control:
+ // right => expand
+ // left => collapse if current item is expanded
+ if (keyCode == WXK_RIGHT)
+ {
+ keyCode = '+';
+ }
+ else if (keyCode == WXK_LEFT && IsExpanded(m_current))
+ {
+ keyCode = '-';
+ }
+#endif // __WXOSX__
+
switch ( keyCode )
{
case '+':