removed a bunch of wxCHECK_VERSION(2,7,0)'s because aui isn't 2.6.x-backportable anymore

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Benjamin Williams
2006-11-16 10:39:23 +00:00
parent 4cd1d19679
commit 7453065ac0

View File

@@ -646,9 +646,7 @@ void wxAuiManager::UpdateHintWindowConfig()
if (w->IsKindOf(CLASSINFO(wxFrame))) if (w->IsKindOf(CLASSINFO(wxFrame)))
{ {
wxFrame* f = static_cast<wxFrame*>(w); wxFrame* f = static_cast<wxFrame*>(w);
#if wxCHECK_VERSION(2,7,0)
can_do_transparent = f->CanSetTransparent(); can_do_transparent = f->CanSetTransparent();
#endif
break; break;
} }
@@ -1003,9 +1001,11 @@ bool wxAuiManager::DetachPane(wxWindow* window)
p.frame->Show(false); p.frame->Show(false);
// reparent to m_frame and destroy the pane // reparent to m_frame and destroy the pane
if(m_action_window == p.frame) { if(m_action_window == p.frame)
{
m_action_window = NULL; m_action_window = NULL;
} }
p.window->Reparent(m_frame); p.window->Reparent(m_frame);
p.frame->SetSizer(NULL); p.frame->SetSizer(NULL);
p.frame->Destroy(); p.frame->Destroy();
@@ -1041,22 +1041,26 @@ bool wxAuiManager::DetachPane(wxWindow* window)
void wxAuiManager::ClosePane(wxAuiPaneInfo& pane_info) void wxAuiManager::ClosePane(wxAuiPaneInfo& pane_info)
{ {
// if we were maximized, restore // if we were maximized, restore
if(pane_info.IsMaximized()) { if (pane_info.IsMaximized())
{
RestorePane(pane_info); RestorePane(pane_info);
} }
// first, hide the window // first, hide the window
if (pane_info.window && pane_info.window->IsShown()) { if (pane_info.window && pane_info.window->IsShown())
{
pane_info.window->Show(false); pane_info.window->Show(false);
} }
// make sure that we are the parent of this window // make sure that we are the parent of this window
if(pane_info.window && pane_info.window->GetParent() != m_frame) { if (pane_info.window && pane_info.window->GetParent() != m_frame)
{
pane_info.window->Reparent(m_frame); pane_info.window->Reparent(m_frame);
} }
// if we have a frame, destroy it // if we have a frame, destroy it
if(pane_info.frame) { if (pane_info.frame)
{
pane_info.frame->Destroy(); pane_info.frame->Destroy();
pane_info.frame = NULL; pane_info.frame = NULL;
} }
@@ -1066,7 +1070,8 @@ void wxAuiManager::ClosePane(wxAuiPaneInfo& pane_info)
{ {
wxWindow * window = pane_info.window; wxWindow * window = pane_info.window;
DetachPane(window); DetachPane(window);
if(window) { if(window)
{
window->Destroy(); window->Destroy();
} }
} }
@@ -1084,7 +1089,8 @@ void wxAuiManager::MaximizePane(wxAuiPaneInfo& pane_info)
for (i = 0, pane_count = m_panes.GetCount(); i < pane_count; ++i) for (i = 0, pane_count = m_panes.GetCount(); i < pane_count; ++i)
{ {
wxAuiPaneInfo& p = m_panes.Item(i); wxAuiPaneInfo& p = m_panes.Item(i);
if(!p.IsToolbar()) { if (!p.IsToolbar())
{
p.Restore(); p.Restore();
p.SaveHidden(); p.SaveHidden();
p.Hide(); p.Hide();
@@ -1097,7 +1103,8 @@ void wxAuiManager::MaximizePane(wxAuiPaneInfo& pane_info)
m_has_maximized = true; m_has_maximized = true;
// last, show the window // last, show the window
if (pane_info.window && !pane_info.window->IsShown()) { if (pane_info.window && !pane_info.window->IsShown())
{
pane_info.window->Show(true); pane_info.window->Show(true);
} }
} }
@@ -1110,7 +1117,8 @@ void wxAuiManager::RestorePane(wxAuiPaneInfo& pane_info)
for (i = 0, pane_count = m_panes.GetCount(); i < pane_count; ++i) for (i = 0, pane_count = m_panes.GetCount(); i < pane_count; ++i)
{ {
wxAuiPaneInfo& p = m_panes.Item(i); wxAuiPaneInfo& p = m_panes.Item(i);
if(!p.IsToolbar()) { if (!p.IsToolbar())
{
p.RestoreHidden(); p.RestoreHidden();
} }
} }
@@ -1120,7 +1128,8 @@ void wxAuiManager::RestorePane(wxAuiPaneInfo& pane_info)
m_has_maximized = false; m_has_maximized = false;
// last, show the window // last, show the window
if (pane_info.window && !pane_info.window->IsShown()) { if (pane_info.window && !pane_info.window->IsShown())
{
pane_info.window->Show(true); pane_info.window->Show(true);
} }
} }
@@ -1133,7 +1142,8 @@ void wxAuiManager::RestoreMaximizedPane()
for (i = 0, pane_count = m_panes.GetCount(); i < pane_count; ++i) for (i = 0, pane_count = m_panes.GetCount(); i < pane_count; ++i)
{ {
wxAuiPaneInfo& p = m_panes.Item(i); wxAuiPaneInfo& p = m_panes.Item(i);
if(p.IsMaximized()) { if(p.IsMaximized())
{
RestorePane(p); RestorePane(p);
break; break;
} }
@@ -2245,14 +2255,12 @@ void wxAuiManager::Update()
// pane, which has recently been floated // pane, which has recently been floated
wxAuiFloatingFrame* frame = CreateFloatingFrame(m_frame, p); wxAuiFloatingFrame* frame = CreateFloatingFrame(m_frame, p);
#if wxCHECK_VERSION(2,7,0)
// on MSW and Mac, if the owner desires transparent dragging, and // on MSW and Mac, if the owner desires transparent dragging, and
// the dragging is happening right now, then the floating // the dragging is happening right now, then the floating
// window should have this style by default // window should have this style by default
if (m_action == actionDragFloatingPane && if (m_action == actionDragFloatingPane &&
(m_flags & wxAUI_MGR_TRANSPARENT_DRAG)) (m_flags & wxAUI_MGR_TRANSPARENT_DRAG))
frame->SetTransparent(150); frame->SetTransparent(150);
#endif
frame->SetPaneWindow(p); frame->SetPaneWindow(p);
p.frame = frame; p.frame = frame;
@@ -2926,12 +2934,7 @@ void wxAuiManager::OnHintFadeTimer(wxTimerEvent& WXUNUSED(event))
} }
m_hint_fadeamt += 4; m_hint_fadeamt += 4;
#if wxCHECK_VERSION(2,7,0)
m_hint_wnd->SetTransparent(m_hint_fadeamt); 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 wxAuiManager::ShowHint(const wxRect& rect) void wxAuiManager::ShowHint(const wxRect& rect)
@@ -2961,12 +2964,7 @@ void wxAuiManager::ShowHint(const wxRect& rect)
if (m_action == actionDragFloatingPane && m_action_window) if (m_action == actionDragFloatingPane && m_action_window)
m_action_window->SetFocus(); m_action_window->SetFocus();
#if wxCHECK_VERSION(2,7,0)
m_hint_wnd->SetTransparent(m_hint_fadeamt); 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->Raise(); m_hint_wnd->Raise();
@@ -3040,12 +3038,7 @@ void wxAuiManager::HideHint()
{ {
if (m_hint_wnd->IsShown()) if (m_hint_wnd->IsShown())
m_hint_wnd->Show(false); m_hint_wnd->Show(false);
#if wxCHECK_VERSION(2,7,0)
m_hint_wnd->SetTransparent(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_hint_fadetimer.Stop();
m_last_hint = wxRect(); m_last_hint = wxRect();
return; return;
@@ -3174,10 +3167,8 @@ void wxAuiManager::OnFloatingPaneMoveStart(wxWindow* wnd)
wxAuiPaneInfo& pane = GetPane(wnd); wxAuiPaneInfo& pane = GetPane(wnd);
wxASSERT_MSG(pane.IsOk(), wxT("Pane window not found")); wxASSERT_MSG(pane.IsOk(), wxT("Pane window not found"));
#if wxCHECK_VERSION(2,7,0)
if (m_flags & wxAUI_MGR_TRANSPARENT_DRAG) if (m_flags & wxAUI_MGR_TRANSPARENT_DRAG)
pane.frame->SetTransparent(150); pane.frame->SetTransparent(150);
#endif
} }
void wxAuiManager::OnFloatingPaneMoving(wxWindow* wnd, wxDirection dir) void wxAuiManager::OnFloatingPaneMoving(wxWindow* wnd, wxDirection dir)
@@ -3349,11 +3340,11 @@ void wxAuiManager::OnFloatingPaneMoved(wxWindow* wnd, wxDirection dir)
{ {
pane.floating_pos = pane.frame->GetPosition(); pane.floating_pos = pane.frame->GetPosition();
#if wxCHECK_VERSION(2,7,0)
if (m_flags & wxAUI_MGR_TRANSPARENT_DRAG) if (m_flags & wxAUI_MGR_TRANSPARENT_DRAG)
pane.frame->SetTransparent(255); pane.frame->SetTransparent(255);
#endif }
} else if(m_has_maximized) { else if (m_has_maximized)
{
RestoreMaximizedPane(); RestoreMaximizedPane();
} }