mdi GetActiveChild patch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -265,6 +265,8 @@ private:
|
|||||||
|
|
||||||
#if wxUSE_GENERIC_MDI_AS_NATIVE
|
#if wxUSE_GENERIC_MDI_AS_NATIVE
|
||||||
|
|
||||||
|
class wxMDIChildFrame ;
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxMDIParentFrame
|
// wxMDIParentFrame
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -284,6 +286,9 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxMDIChildFrame * GetActiveChild() const ;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
|
DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
|
||||||
};
|
};
|
||||||
|
@@ -34,6 +34,8 @@
|
|||||||
#include "wx/intl.h"
|
#include "wx/intl.h"
|
||||||
#endif //WX_PRECOMP
|
#endif //WX_PRECOMP
|
||||||
|
|
||||||
|
#define _(x) wxT(x)
|
||||||
|
|
||||||
#include "wx/generic/mdig.h"
|
#include "wx/generic/mdig.h"
|
||||||
|
|
||||||
enum MDI_MENU_ID
|
enum MDI_MENU_ID
|
||||||
@@ -110,7 +112,7 @@ bool wxGenericMDIParentFrame::Create(wxWindow *parent,
|
|||||||
m_pWindowMenu = new wxMenu;
|
m_pWindowMenu = new wxMenu;
|
||||||
|
|
||||||
m_pWindowMenu->Append(wxWINDOWCLOSE, _("Cl&ose"));
|
m_pWindowMenu->Append(wxWINDOWCLOSE, _("Cl&ose"));
|
||||||
m_pWindowMenu->Append(wxWINDOWCLOSEALL, _("Close Al&l"));
|
m_pWindowMenu->Append(wxWINDOWCLOSEALL, _("Close All"));
|
||||||
m_pWindowMenu->AppendSeparator();
|
m_pWindowMenu->AppendSeparator();
|
||||||
m_pWindowMenu->Append(wxWINDOWNEXT, _("&Next"));
|
m_pWindowMenu->Append(wxWINDOWNEXT, _("&Next"));
|
||||||
m_pWindowMenu->Append(wxWINDOWPREV, _("&Previous"));
|
m_pWindowMenu->Append(wxWINDOWPREV, _("&Previous"));
|
||||||
@@ -795,6 +797,16 @@ void wxGenericMDIClientWindow::OnSize(wxSizeEvent& event)
|
|||||||
|
|
||||||
#if wxUSE_GENERIC_MDI_AS_NATIVE
|
#if wxUSE_GENERIC_MDI_AS_NATIVE
|
||||||
|
|
||||||
|
wxMDIChildFrame * wxMDIParentFrame::GetActiveChild() const
|
||||||
|
{
|
||||||
|
wxGenericMDIChildFrame *pGFrame = wxGenericMDIParentFrame::GetActiveChild();
|
||||||
|
wxMDIChildFrame *pFrame = wxDynamicCast(pGFrame, wxMDIChildFrame);
|
||||||
|
|
||||||
|
wxASSERT_MSG(!(pFrame == NULL && pGFrame != NULL), wxT("Active frame is class not derived from wxMDIChildFrame!"));
|
||||||
|
|
||||||
|
return pFrame;
|
||||||
|
}
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame, wxGenericMDIParentFrame)
|
IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame, wxGenericMDIParentFrame)
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame, wxGenericMDIChildFrame)
|
IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame, wxGenericMDIChildFrame)
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxGenericMDIClientWindow)
|
IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxGenericMDIClientWindow)
|
||||||
|
Reference in New Issue
Block a user