X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/489468feaa08b8f504735eecca522fb8d0f825d2..3e356d414488f3949baf7467bbc784f400287202:/src/osx/carbon/mdi.cpp diff --git a/src/osx/carbon/mdi.cpp b/src/osx/carbon/mdi.cpp index ca02c69c0d..3cd460be75 100644 --- a/src/osx/carbon/mdi.cpp +++ b/src/osx/carbon/mdi.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/mac/carbon/mdi.cpp +// Name: src/osx/carbon/mdi.cpp // Purpose: MDI classes // Author: Stefan Csomor // Modified by: @@ -22,8 +22,8 @@ #include "wx/statusbr.h" #endif -#include "wx/mac/private.h" -#include "wx/mac/uma.h" +#include "wx/osx/private.h" +#include "wx/osx/uma.h" IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame, wxFrame) IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame, wxFrame) @@ -50,7 +50,7 @@ static const int IDM_WINDOWTILEVERT = 4005; void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) { -#if 1 // TODO REMOVE +#if wxOSX_USE_CARBON // TODO REMOVE if ( inWindowRef ) { // bool isHighlighted = IsWindowHighlited( inWindowRef ) ; @@ -74,6 +74,8 @@ void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) SetPort( port ) ; #endif } +#elif defined(wxOSX_USE_COCOA) +// TODO: implement me! #endif } @@ -218,7 +220,7 @@ void wxMDIParentFrame::MacActivate(long timestamp, bool activating) { wxLogTrace(TRACE_MDI, wxT("child had been scheduled for deactivation, rehighlighting")); - UMAHighlightAndActivateWindow((WindowRef)s_macDeactivateWindow->MacGetWindowRef(), true); + UMAHighlightAndActivateWindow((WindowRef)s_macDeactivateWindow->GetWXWindow(), true); wxLogTrace(TRACE_MDI, wxT("finished highliting child")); @@ -382,14 +384,10 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent, SetName(name); if ( id == wxID_ANY ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - if (parent) - parent->AddChild(this); + id = (int)NewControlId(); - MacCreateRealWindow( pos , size , MacRemoveBordersFromStyle(style) , name ) ; + wxNonOwnedWindow::Create( parent, id, pos , size , MacRemoveBordersFromStyle(style) , name ) ; + SetTitle( title ); SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE)); @@ -420,7 +418,7 @@ void wxMDIChildFrame::MacActivate(long timestamp, bool activating) { wxLogTrace(TRACE_MDI, wxT("parent had been scheduled for deactivation, rehighlighting")); - UMAHighlightAndActivateWindow((WindowRef)s_macDeactivateWindow->MacGetWindowRef(), true); + UMAHighlightAndActivateWindow((WindowRef)s_macDeactivateWindow->GetWXWindow(), true); wxLogTrace(TRACE_MDI, wxT("finished highliting parent"));