m_hint_fademax=50;
- if (m_hint_wnd && !m_hint_wnd->CanSetTransparent())
+ if (m_hint_wnd
+ // CanSetTransparent is only present in the 2.7.0 ABI. To allow this file to be easily used
+ // in a backported environment, conditionally compile this in.
+#if wxCHECK_VERSION(2,7,0)
+ && !m_hint_wnd->CanSetTransparent()
+#endif
+ )
{
m_hint_wnd->Close();
this,
p);
+#if wxCHECK_VERSION(2,7,0)
// on MSW and Mac, if the owner desires transparent dragging, and
// the dragging is happening right now, then the floating
// window should have this style by default
if (m_action == actionDragFloatingPane &&
(m_flags & wxAUI_MGR_TRANSPARENT_DRAG))
frame->SetTransparent(150);
+#endif
frame->SetPaneWindow(p);
p.frame = frame;
}
m_hint_fadeamt += 4;
+#if wxCHECK_VERSION(2,7,0)
m_hint_wnd->SetTransparent(m_hint_fadeamt);
+#else
+ if (m_hint_wnd->IsKindOf(CLASSINFO(wxPseudoTransparentFrame)))
+ ((wxPseudoTransparentFrame *)m_hint_wnd)->SetTransparent(m_hint_fadeamt);
+#endif
}
void wxFrameManager::ShowHint(const wxRect& rect)
if (m_action == actionDragFloatingPane && m_action_window)
m_action_window->SetFocus();
+#if wxCHECK_VERSION(2,7,0)
m_hint_wnd->SetTransparent(m_hint_fadeamt);
+#else
+ if (m_hint_wnd->IsKindOf(CLASSINFO(wxPseudoTransparentFrame)))
+ ((wxPseudoTransparentFrame *)m_hint_wnd)->SetTransparent(m_hint_fadeamt);
+#endif
m_hint_wnd->SetSize(rect);
m_hint_wnd->Raise();
if (m_hint_wnd)
{
m_hint_wnd->Show(false);
+#if wxCHECK_VERSION(2,7,0)
m_hint_wnd->SetTransparent(0);
+#else
+ if (m_hint_wnd->IsKindOf(CLASSINFO(wxPseudoTransparentFrame)))
+ ((wxPseudoTransparentFrame *)m_hint_wnd)->SetTransparent(0);
+#endif
m_hint_fadetimer.Stop();
m_last_hint = wxRect();
return;
wxPaneInfo& pane = GetPane(wnd);
wxASSERT_MSG(pane.IsOk(), wxT("Pane window not found"));
+#if wxCHECK_VERSION(2,7,0)
if (m_flags & wxAUI_MGR_TRANSPARENT_DRAG)
pane.frame->SetTransparent(150);
+#endif
}
void wxFrameManager::OnFloatingPaneMoving(wxWindow* wnd)
{
pane.floating_pos = pane.frame->GetPosition();
+#if wxCHECK_VERSION(2,7,0)
if (m_flags & wxAUI_MGR_TRANSPARENT_DRAG)
pane.frame->SetTransparent(255);
+#endif
}
Update();