use wx_static_cast() instead of static_cast<> on an off chance that some compiler still doesn't have the latter; fix svn properties for the new file
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@55206 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
5256
src/aui/auibar.cpp
5256
src/aui/auibar.cpp
File diff suppressed because it is too large
Load Diff
@@ -1006,7 +1006,7 @@ wxAuiSimpleTabArt::~wxAuiSimpleTabArt()
|
||||
|
||||
wxAuiTabArt* wxAuiSimpleTabArt::Clone()
|
||||
{
|
||||
return static_cast<wxAuiTabArt*>(new wxAuiSimpleTabArt);
|
||||
return wx_static_cast(wxAuiTabArt*, new wxAuiSimpleTabArt);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -761,7 +761,7 @@ void wxAuiManager::UpdateHintWindowConfig()
|
||||
{
|
||||
if (w->IsKindOf(CLASSINFO(wxFrame)))
|
||||
{
|
||||
wxFrame* f = static_cast<wxFrame*>(w);
|
||||
wxFrame* f = wx_static_cast(wxFrame*, w);
|
||||
can_do_transparent = f->CanSetTransparent();
|
||||
break;
|
||||
}
|
||||
@@ -927,7 +927,7 @@ void wxAuiManager::SetArtProvider(wxAuiDockArt* art_provider)
|
||||
bool wxAuiManager::AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info)
|
||||
{
|
||||
wxASSERT_MSG(window, wxT("NULL window ptrs are not allowed"));
|
||||
|
||||
|
||||
// check if the pane has a valid window
|
||||
if (!window)
|
||||
return false;
|
||||
@@ -995,7 +995,7 @@ bool wxAuiManager::AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info)
|
||||
button.button_id = wxAUI_BUTTON_CLOSE;
|
||||
pinfo.buttons.Add(button);
|
||||
}
|
||||
|
||||
|
||||
if (pinfo.HasGripper())
|
||||
{
|
||||
if (pinfo.window->IsKindOf(CLASSINFO(wxAuiToolBar)))
|
||||
@@ -1004,13 +1004,13 @@ bool wxAuiManager::AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info)
|
||||
// have a gripper control. The toolbar's built-in gripper
|
||||
// meshes better with the look and feel of the control than ours,
|
||||
// so turn wxAuiManager's gripper off, and the toolbar's on.
|
||||
|
||||
wxAuiToolBar* tb = static_cast<wxAuiToolBar*>(pinfo.window);
|
||||
|
||||
wxAuiToolBar* tb = wx_static_cast(wxAuiToolBar*, pinfo.window);
|
||||
pinfo.SetFlag(wxAuiPaneInfo::optionGripper, false);
|
||||
tb->SetGripperVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (pinfo.best_size == wxDefaultSize &&
|
||||
pinfo.window)
|
||||
@@ -1043,7 +1043,7 @@ bool wxAuiManager::AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2336,7 +2336,7 @@ wxSizer* wxAuiManager::LayoutAll(wxAuiPaneInfoArray& panes,
|
||||
cont->Add(middle, 1, wxEXPAND);
|
||||
else
|
||||
delete middle;
|
||||
|
||||
|
||||
|
||||
|
||||
// find any bottom docks in this layer
|
||||
@@ -3823,7 +3823,7 @@ void wxAuiManager::OnFindManager(wxAuiManagerEvent& evt)
|
||||
// if we are managing a child frame, get the 'real' manager
|
||||
if (window->IsKindOf(CLASSINFO(wxAuiFloatingFrame)))
|
||||
{
|
||||
wxAuiFloatingFrame* float_frame = static_cast<wxAuiFloatingFrame*>(window);
|
||||
wxAuiFloatingFrame* float_frame = wx_static_cast(wxAuiFloatingFrame*, window);
|
||||
evt.SetManager(float_frame->GetOwnerManager());
|
||||
return;
|
||||
}
|
||||
@@ -4201,7 +4201,7 @@ void wxAuiManager::OnLeftUp(wxMouseEvent& event)
|
||||
{
|
||||
m_hover_button = NULL;
|
||||
m_frame->ReleaseMouse();
|
||||
|
||||
|
||||
if (m_action_part)
|
||||
{
|
||||
UpdateButtonOnScreen(m_action_part, event);
|
||||
|
@@ -128,13 +128,13 @@ wxAuiTabArt* wxAuiMDIParentFrame::GetArtProvider()
|
||||
{
|
||||
if (!m_pClientWindow)
|
||||
return NULL;
|
||||
|
||||
|
||||
return m_pClientWindow->GetArtProvider();
|
||||
}
|
||||
|
||||
wxAuiNotebook* wxAuiMDIParentFrame::GetNotebook() const
|
||||
{
|
||||
return static_cast<wxAuiNotebook*>(m_pClientWindow);
|
||||
return wx_static_cast(wxAuiNotebook*, m_pClientWindow);
|
||||
}
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ bool wxAuiMDIParentFrame::ProcessEvent(wxEvent& event)
|
||||
if (m_pLastEvt == &event)
|
||||
return false;
|
||||
m_pLastEvt = &event;
|
||||
|
||||
|
||||
// let the active child (if any) process the event first.
|
||||
bool res = false;
|
||||
if (m_pActiveChild &&
|
||||
@@ -357,11 +357,11 @@ void wxAuiMDIParentFrame::Tile(wxOrientation orient)
|
||||
{
|
||||
wxAuiMDIClientWindow* client_window = GetClientWindow();
|
||||
wxASSERT_MSG(client_window, wxT("Missing MDI Client Window"));
|
||||
|
||||
|
||||
int cur_idx = client_window->GetSelection();
|
||||
if (cur_idx == -1)
|
||||
return;
|
||||
|
||||
|
||||
if (orient == wxVERTICAL)
|
||||
{
|
||||
client_window->Split(cur_idx, wxLEFT);
|
||||
@@ -399,7 +399,7 @@ wxAuiMDIChildFrame::wxAuiMDIChildFrame(wxAuiMDIParentFrame *parent,
|
||||
const wxString& name)
|
||||
{
|
||||
Init();
|
||||
|
||||
|
||||
// There are two ways to create an tabbed mdi child fram without
|
||||
// making it the active document. Either Show(false) can be called
|
||||
// before Create() (as is customary on some ports with wxFrame-type
|
||||
@@ -409,7 +409,7 @@ wxAuiMDIChildFrame::wxAuiMDIChildFrame(wxAuiMDIParentFrame *parent,
|
||||
// onto the panel underneath.
|
||||
if (style & wxMINIMIZE)
|
||||
m_activate_on_create = false;
|
||||
|
||||
|
||||
Create(parent, id, title, wxDefaultPosition, size, 0, name);
|
||||
}
|
||||
|
||||
@@ -431,7 +431,7 @@ wxAuiMDIChildFrame::~wxAuiMDIChildFrame()
|
||||
pClientWindow->RemovePage(idx);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if wxUSE_MENUS
|
||||
wxDELETE(m_pMenuBar);
|
||||
#endif // wxUSE_MENUS
|
||||
@@ -472,7 +472,7 @@ bool wxAuiMDIChildFrame::Create(wxAuiMDIParentFrame* parent,
|
||||
|
||||
pClientWindow->AddPage(this, title, m_activate_on_create);
|
||||
pClientWindow->Refresh();
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -490,7 +490,7 @@ bool wxAuiMDIChildFrame::Destroy()
|
||||
wxActivateEvent event(wxEVT_ACTIVATE, false, GetId());
|
||||
event.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
|
||||
|
||||
pParentFrame->SetActiveChild(NULL);
|
||||
pParentFrame->SetChildMenuBar(NULL);
|
||||
}
|
||||
@@ -578,15 +578,15 @@ void wxAuiMDIChildFrame::SetIcon(const wxIcon& icon)
|
||||
wxASSERT_MSG(pParentFrame, wxT("Missing MDI Parent Frame"));
|
||||
|
||||
m_icon = icon;
|
||||
|
||||
|
||||
wxBitmap bmp;
|
||||
bmp.CopyFromIcon(m_icon);
|
||||
|
||||
|
||||
wxAuiMDIClientWindow* pClientWindow = pParentFrame->GetClientWindow();
|
||||
if (pClientWindow != NULL)
|
||||
{
|
||||
int idx = pClientWindow->GetPageIndex(this);
|
||||
|
||||
|
||||
if (idx != -1)
|
||||
{
|
||||
pClientWindow->SetPageBitmap((size_t)idx, bmp);
|
||||
@@ -598,8 +598,8 @@ const wxIcon& wxAuiMDIChildFrame::GetIcon() const
|
||||
{
|
||||
return m_icon;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void wxAuiMDIChildFrame::Activate()
|
||||
{
|
||||
wxAuiMDIParentFrame* pParentFrame = GetMDIParentFrame();
|
||||
@@ -667,7 +667,7 @@ void wxAuiMDIChildFrame::Init()
|
||||
bool wxAuiMDIChildFrame::Show(bool show)
|
||||
{
|
||||
m_activate_on_create = show;
|
||||
|
||||
|
||||
// do nothing
|
||||
return true;
|
||||
}
|
||||
@@ -732,11 +732,11 @@ bool wxAuiMDIClientWindow::CreateClient(wxAuiMDIParentFrame* parent, long style)
|
||||
{
|
||||
SetWindowStyleFlag(style);
|
||||
|
||||
wxSize caption_icon_size =
|
||||
wxSize caption_icon_size =
|
||||
wxSize(wxSystemSettings::GetMetric(wxSYS_SMALLICON_X),
|
||||
wxSystemSettings::GetMetric(wxSYS_SMALLICON_Y));
|
||||
SetUniformBitmapSize(caption_icon_size);
|
||||
|
||||
|
||||
if (!wxAuiNotebook::Create(parent,
|
||||
wxID_ANY,
|
||||
wxPoint(0,0),
|
||||
@@ -764,7 +764,7 @@ void wxAuiMDIClientWindow::PageChanged(int old_selection, int new_selection)
|
||||
// don't do anything if the page doesn't actually change
|
||||
if (old_selection == new_selection)
|
||||
return;
|
||||
|
||||
|
||||
/*
|
||||
// don't do anything if the new page is already active
|
||||
if (new_selection != -1)
|
||||
@@ -773,8 +773,8 @@ void wxAuiMDIClientWindow::PageChanged(int old_selection, int new_selection)
|
||||
if (child->GetMDIParentFrame()->GetActiveChild() == child)
|
||||
return;
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
|
||||
// notify old active child that it has been deactivated
|
||||
if ((old_selection != -1) && (old_selection < (int)GetPageCount()))
|
||||
{
|
||||
@@ -785,34 +785,34 @@ void wxAuiMDIClientWindow::PageChanged(int old_selection, int new_selection)
|
||||
event.SetEventObject(old_child);
|
||||
old_child->GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
|
||||
|
||||
// notify new active child that it has been activated
|
||||
if (new_selection != -1)
|
||||
{
|
||||
wxAuiMDIChildFrame* active_child = (wxAuiMDIChildFrame*)GetPage(new_selection);
|
||||
wxASSERT_MSG(active_child, wxT("wxAuiMDIClientWindow::PageChanged - null page pointer"));
|
||||
|
||||
|
||||
wxActivateEvent event(wxEVT_ACTIVATE, true, active_child->GetId());
|
||||
event.SetEventObject(active_child);
|
||||
active_child->GetEventHandler()->ProcessEvent(event);
|
||||
|
||||
|
||||
if (active_child->GetMDIParentFrame())
|
||||
{
|
||||
active_child->GetMDIParentFrame()->SetActiveChild(active_child);
|
||||
active_child->GetMDIParentFrame()->SetChildMenuBar(active_child);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void wxAuiMDIClientWindow::OnPageClose(wxAuiNotebookEvent& evt)
|
||||
{
|
||||
wxAuiMDIChildFrame* wnd;
|
||||
wnd = static_cast<wxAuiMDIChildFrame*>(GetPage(evt.GetSelection()));
|
||||
|
||||
wxAuiMDIChildFrame*
|
||||
wnd = wx_static_cast(wxAuiMDIChildFrame*, GetPage(evt.GetSelection()));
|
||||
|
||||
wnd->Close();
|
||||
|
||||
|
||||
// regardless of the result of wnd->Close(), we've
|
||||
// already taken care of the close operations, so
|
||||
// suppress further processing
|
||||
@@ -832,5 +832,6 @@ void wxAuiMDIClientWindow::OnSize(wxSizeEvent& evt)
|
||||
((wxAuiMDIChildFrame *)GetPage(pos))->ApplyMDIChildFrameRect();
|
||||
}
|
||||
|
||||
#endif //wxUSE_AUI
|
||||
#endif // wxUSE_MDI
|
||||
|
||||
#endif // wxUSE_AUI
|
||||
|
Reference in New Issue
Block a user