X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c8fce1a43c78a54eefcbe4fad2048d3f6ee09855..aa57eeea83fac24e9d188fa800bdc96c95f5bbeb:/src/generic/treectlg.cpp diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 01cd41e868..97c309222a 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -40,6 +40,10 @@ #include "wx/renderer.h" +#ifdef __WXMAC__ + #include "wx/mac/private.h" +#endif + // ----------------------------------------------------------------------------- // array types // ----------------------------------------------------------------------------- @@ -677,7 +681,7 @@ BEGIN_EVENT_TABLE(wxGenericTreeCtrl,wxScrolledWindow) EVT_TREE_ITEM_GETTOOLTIP(-1, wxGenericTreeCtrl::OnGetToolTip) END_EVENT_TABLE() -#if !defined(__WXMSW__) || defined(__WIN16__) || defined(__WXUNIVERSAL__) +#if !defined(__WXMSW__) || defined(__WXUNIVERSAL__) /* * wxTreeCtrl has to be a real class or we have problems with * the run-time information. @@ -734,7 +738,11 @@ void wxGenericTreeCtrl::Init() m_lastOnSame = FALSE; +#if defined( __WXMAC__ ) && __WXMAC_CARBON__ + m_normalFont.MacCreateThemeFont( kThemeViewsFont ) ; +#else m_normalFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ); +#endif m_boldFont = wxFont(m_normalFont.GetPointSize(), m_normalFont.GetFamily(), m_normalFont.GetStyle(), @@ -1898,8 +1906,12 @@ void wxGenericTreeCtrl::ScrollTo(const wxTreeItemId &item) // We have to call this here because the label in // question might just have been added and no screen // update taken place. - if (m_dirty) wxYieldIfNeeded(); - + if (m_dirty) +#if defined( __WXMSW__ ) || defined(__WXMAC__) + Update(); +#else + wxYieldIfNeeded(); +#endif wxGenericTreeItem *gitem = (wxGenericTreeItem*) item.m_pItem; // now scroll to the item @@ -2831,7 +2843,11 @@ void wxGenericTreeCtrl::Edit( const wxTreeItemId& item ) // question might just have been added and no screen // update taken place. if ( m_dirty ) +#if defined( __WXMSW__ ) || defined(__WXMAC__) + Update(); +#else wxYieldIfNeeded(); +#endif m_textCtrl = new wxTreeTextCtrl(this, itemEdit); @@ -2888,7 +2904,9 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event ) int flags = 0; wxGenericTreeItem *thisItem = m_anchor->HitTest(pt, this, flags, 0); wxGenericTreeItem *underMouse = thisItem; +#if wxUSE_TOOLTIPS bool underMouseChanged = (underMouse != m_underMouse) ; +#endif // wxUSE_TOOLTIPS if ((underMouse) && (flags & wxTREE_HITTEST_ONITEMBUTTON) && @@ -3016,7 +3034,11 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event ) // highlight the current drop target if any DrawDropEffect(m_dropTarget); +#if defined( __WXMSW__ ) || defined(__WXMAC__) + Update(); +#else wxYieldIfNeeded(); +#endif } } else if ( (event.LeftUp() || event.RightUp()) && m_isDragging ) @@ -3047,7 +3069,11 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event ) SetCursor(m_oldCursor); +#if defined( __WXMSW__ ) || defined(__WXMAC__) + Update(); +#else wxYieldIfNeeded(); +#endif } else {