From a15eb0a5c87f265c0cd49f7dca31ad4068123a27 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 30 Sep 2001 17:34:51 +0000 Subject: [PATCH] toplevel fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/mac/dialog.h | 8 +- src/mac/carbon/dialog.cpp | 65 ++++------------ src/mac/carbon/frame.cpp | 75 ++++++------------ src/mac/carbon/toplevel.cpp | 143 ++++++++++++++++++++++++++++++++++ src/mac/dialog.cpp | 65 ++++------------ src/mac/frame.cpp | 75 ++++++------------ src/mac/morefile/MoreExtr.cpp | 2 +- src/mac/toplevel.cpp | 143 ++++++++++++++++++++++++++++++++++ 8 files changed, 361 insertions(+), 215 deletions(-) create mode 100644 src/mac/carbon/toplevel.cpp create mode 100644 src/mac/toplevel.cpp diff --git a/include/wx/mac/dialog.h b/include/wx/mac/dialog.h index 6ae557e927..2ba611bf9a 100644 --- a/include/wx/mac/dialog.h +++ b/include/wx/mac/dialog.h @@ -64,7 +64,7 @@ public: ~wxDialog(); - virtual bool Destroy(); +// virtual bool Destroy(); bool Show(bool show); void SetModal(bool flag); @@ -87,7 +87,7 @@ public: // -------------- // event handlers - bool OnClose(); +// bool OnClose(); void OnCharHook(wxKeyEvent& event); void OnCloseWindow(wxCloseEvent& event); @@ -99,10 +99,6 @@ public: // Responds to colour changes void OnSysColourChanged(wxSysColourChangedEvent& event); - // override more base class virtuals - virtual void DoGetPosition(int *x, int *y) const; - virtual void DoSetClientSize(int width, int height); - // show modal dialog and enter modal loop void DoShowModal(); diff --git a/src/mac/carbon/dialog.cpp b/src/mac/carbon/dialog.cpp index 1490247378..8275205594 100644 --- a/src/mac/carbon/dialog.cpp +++ b/src/mac/carbon/dialog.cpp @@ -28,15 +28,17 @@ wxList wxModalDialogs; extern wxList wxPendingDelete; #if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxPanel) +IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxTopLevelWindow) -BEGIN_EVENT_TABLE(wxDialog, wxPanel) - EVT_SIZE(wxDialog::OnSize) +BEGIN_EVENT_TABLE(wxDialog, wxTopLevelWindow) EVT_BUTTON(wxID_OK, wxDialog::OnOK) EVT_BUTTON(wxID_APPLY, wxDialog::OnApply) EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel) + EVT_CHAR_HOOK(wxDialog::OnCharHook) + EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged) + EVT_CLOSE(wxDialog::OnCloseWindow) END_EVENT_TABLE() @@ -58,15 +60,9 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id, SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); - if (!parent) - wxTopLevelWindows.Append(this); - - if (parent) parent->AddChild(this); - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; + if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) ) + return FALSE; MacCreateRealWindow( title , pos , size , MacRemoveBordersFromStyle(style) , name ) ; @@ -93,29 +89,16 @@ void wxDialog::SetModal(bool flag) wxDialog::~wxDialog() { m_isBeingDeleted = TRUE ; - wxTopLevelWindows.DeleteObject(this); - - Show(FALSE); - - if ( !IsModal() ) - wxModelessWindows.DeleteObject(this); - - // If this is the last top-level window, exit. - if (wxTheApp && (wxTopLevelWindows.Number() == 0)) - { - wxTheApp->SetTopWindow(NULL); - - if (wxTheApp->GetExitOnFrameDelete()) - { - wxTheApp->ExitMainLoop() ; - } - } + Show(FALSE); } -// By default, pressing escape cancels the dialog +// By default, pressing escape cancels the dialog , on mac command-stop does the same thing void wxDialog::OnCharHook(wxKeyEvent& event) { - if (event.m_keyCode == WXK_ESCAPE) + if ( + ( event.m_keyCode == WXK_ESCAPE || + ( event.m_keyCode == '.' && event.MetaDown() ) ) + && FindWindow(wxID_CANCEL) ) { // Behaviour changed in 2.0: we'll send a Cancel message // to the dialog instead of Close. @@ -129,17 +112,6 @@ void wxDialog::OnCharHook(wxKeyEvent& event) event.Skip(); } - -void wxDialog::DoSetClientSize(int width, int height) -{ - wxWindow::DoSetClientSize( width , height ) ; -} - -void wxDialog::DoGetPosition(int *x, int *y) const -{ - wxWindow::DoGetPosition( x , y ) ; -} - bool wxDialog::IsModal() const { return (GetWindowStyleFlag() & wxDIALOG_MODAL) != 0; @@ -151,7 +123,6 @@ bool wxDialog::IsModalShowing() const return wxModalDialogs.Find((wxDialog *)this) != NULL; // const_cast } - extern bool s_macIsInModalLoop ; bool wxDialog::Show(bool show) @@ -295,16 +266,6 @@ void wxDialog::OnCloseWindow(wxCloseEvent& event) closing.DeleteObject(this); } -// Destroy the window (delayed, if a managed window) -bool wxDialog::Destroy() -{ - wxCHECK_MSG( !wxPendingDelete.Member(this), FALSE, - _T("wxDialog destroyed twice") ); - - wxPendingDelete.Append(this); - return TRUE; -} - void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& event) { SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); diff --git a/src/mac/carbon/frame.cpp b/src/mac/carbon/frame.cpp index 04776b8cb1..f9f0d2bec6 100644 --- a/src/mac/carbon/frame.cpp +++ b/src/mac/carbon/frame.cpp @@ -30,7 +30,6 @@ extern wxList wxPendingDelete; #if !USE_SHARED_LIBRARY BEGIN_EVENT_TABLE(wxFrameMac, wxFrameBase) -// EVT_SIZE(wxFrameMac::OnSize) EVT_ACTIVATE(wxFrameMac::OnActivate) // EVT_MENU_HIGHLIGHT_ALL(wxFrameMac::OnMenuHighlight) EVT_SYS_COLOUR_CHANGED(wxFrameMac::OnSysColourChanged) @@ -107,15 +106,8 @@ bool wxFrameMac::Create(wxWindow *parent, { SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE)); - if ( id > -1 ) - m_windowId = id; - else - m_windowId = (int)NewControlId(); - - if (parent) parent->AddChild(this); - - if (!parent) - wxTopLevelWindows.Append(this); + if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) ) + return FALSE; MacCreateRealWindow( title, pos , size , MacRemoveBordersFromStyle(style) , name ) ; @@ -129,23 +121,9 @@ bool wxFrameMac::Create(wxWindow *parent, wxFrameMac::~wxFrameMac() { m_isBeingDeleted = TRUE; - wxTopLevelWindows.DeleteObject(this); DeleteAllBars(); -/* Check if it's the last top-level window */ - - if (wxTheApp && (wxTopLevelWindows.Number() == 0)) - { - wxTheApp->SetTopWindow(NULL); - - if (wxTheApp->GetExitOnFrameDelete()) - { - wxTheApp->ExitMainLoop() ; - } - } - - wxModelessWindows.DeleteObject(this); } @@ -216,46 +194,39 @@ void wxFrameMac::OnActivate(wxActivateEvent& event) { if ( !event.GetActive() ) { - // remember the last focused child + // remember the last focused child if it is our child m_winLastFocused = FindFocus(); - while ( m_winLastFocused ) + + // so we NULL it out if it's a child from some other frame + wxWindow *win = m_winLastFocused; + while ( win ) { - if ( GetChildren().Find(m_winLastFocused) ) + if ( win->IsTopLevel() ) + { + if ( win != this ) + { + m_winLastFocused = NULL; + } + break; + } - m_winLastFocused = m_winLastFocused->GetParent(); + win = win->GetParent(); } event.Skip(); } else { -/* - for ( wxWindowList::Node *node = GetChildren().GetFirst(); - node; - node = node->GetNext() ) - { - // FIXME all this is totally bogus - we need to do the same as wxPanel, - // but how to do it without duplicating the code? - - // restore focus - wxWindow *child = node->GetData(); - - if ( !child->IsTopLevel() && child->AcceptsFocus() -#if wxUSE_TOOLBAR - && !wxDynamicCast(child, wxToolBar) -#endif // wxUSE_TOOLBAR -#if wxUSE_STATUSBAR - && !wxDynamicCast(child, wxStatusBar) -#endif // wxUSE_STATUSBAR - ) + // restore focus to the child which was last focused + wxWindow *parent = m_winLastFocused ? m_winLastFocused->GetParent() + : NULL; + if ( !parent ) { - child->SetFocus(); - break; + parent = this; } - } - */ - wxSetFocusToChild(this, &m_winLastFocused); + + wxSetFocusToChild(parent, &m_winLastFocused); if ( m_frameMenuBar != NULL ) { diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp new file mode 100644 index 0000000000..9e346918f7 --- /dev/null +++ b/src/mac/carbon/toplevel.cpp @@ -0,0 +1,143 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: mac/toplevel.cpp +// Purpose: implements wxTopLevelWindow for MSW +// Author: Vadim Zeitlin +// Modified by: +// Created: 24.09.01 +// RCS-ID: $Id$ +// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) +// License: wxWindows license +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#ifdef __GNUG__ + #pragma implementation "toplevel.h" +#endif + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/toplevel.h" + #include "wx/string.h" + #include "wx/log.h" + #include "wx/intl.h" +#endif //WX_PRECOMP + +// ---------------------------------------------------------------------------- +// globals +// ---------------------------------------------------------------------------- + +// list of all frames and modeless dialogs +wxWindowList wxModelessWindows; + +// ============================================================================ +// wxTopLevelWindowMac implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxTopLevelWindowMac creation +// ---------------------------------------------------------------------------- + +void wxTopLevelWindowMac::Init() +{ + m_iconized = + m_maximizeOnShow = FALSE; +} + +bool wxTopLevelWindowMac::Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + // init our fields + Init(); + + m_windowStyle = style; + + SetName(name); + + m_windowId = id == -1 ? NewControlId() : id; + + wxTopLevelWindows.Append(this); + + if ( parent ) + parent->AddChild(this); + + return TRUE; +} + +wxTopLevelWindowMac::~wxTopLevelWindowMac() +{ + wxTopLevelWindows.DeleteObject(this); + + if ( wxModelessWindows.Find(this) ) + wxModelessWindows.DeleteObject(this); + + // If this is the last top-level window, exit. + if ( wxTheApp && (wxTopLevelWindows.Number() == 0) ) + { + wxTheApp->SetTopWindow(NULL); + + if ( wxTheApp->GetExitOnFrameDelete() ) + { + wxTheApp->ExitMainLoop() ; + } + } +} + + +// ---------------------------------------------------------------------------- +// wxTopLevelWindowMac maximize/minimize +// ---------------------------------------------------------------------------- + +void wxTopLevelWindowMac::Maximize(bool maximize) +{ + // not available on mac +} + +bool wxTopLevelWindowMac::IsMaximized() const +{ + return false ; +} + +void wxTopLevelWindowMac::Iconize(bool iconize) +{ + // not available on mac +} + +bool wxTopLevelWindowMac::IsIconized() const +{ + // mac dialogs cannot be iconized + return FALSE; +} + +void wxTopLevelWindowMac::Restore() +{ + // not available on mac +} + +// ---------------------------------------------------------------------------- +// wxTopLevelWindowMac misc +// ---------------------------------------------------------------------------- + +void wxTopLevelWindowMac::SetIcon(const wxIcon& icon) +{ + // this sets m_icon + wxTopLevelWindowBase::SetIcon(icon); +} diff --git a/src/mac/dialog.cpp b/src/mac/dialog.cpp index 1490247378..8275205594 100644 --- a/src/mac/dialog.cpp +++ b/src/mac/dialog.cpp @@ -28,15 +28,17 @@ wxList wxModalDialogs; extern wxList wxPendingDelete; #if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxPanel) +IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxTopLevelWindow) -BEGIN_EVENT_TABLE(wxDialog, wxPanel) - EVT_SIZE(wxDialog::OnSize) +BEGIN_EVENT_TABLE(wxDialog, wxTopLevelWindow) EVT_BUTTON(wxID_OK, wxDialog::OnOK) EVT_BUTTON(wxID_APPLY, wxDialog::OnApply) EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel) + EVT_CHAR_HOOK(wxDialog::OnCharHook) + EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged) + EVT_CLOSE(wxDialog::OnCloseWindow) END_EVENT_TABLE() @@ -58,15 +60,9 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id, SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); - if (!parent) - wxTopLevelWindows.Append(this); - - if (parent) parent->AddChild(this); - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; + if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) ) + return FALSE; MacCreateRealWindow( title , pos , size , MacRemoveBordersFromStyle(style) , name ) ; @@ -93,29 +89,16 @@ void wxDialog::SetModal(bool flag) wxDialog::~wxDialog() { m_isBeingDeleted = TRUE ; - wxTopLevelWindows.DeleteObject(this); - - Show(FALSE); - - if ( !IsModal() ) - wxModelessWindows.DeleteObject(this); - - // If this is the last top-level window, exit. - if (wxTheApp && (wxTopLevelWindows.Number() == 0)) - { - wxTheApp->SetTopWindow(NULL); - - if (wxTheApp->GetExitOnFrameDelete()) - { - wxTheApp->ExitMainLoop() ; - } - } + Show(FALSE); } -// By default, pressing escape cancels the dialog +// By default, pressing escape cancels the dialog , on mac command-stop does the same thing void wxDialog::OnCharHook(wxKeyEvent& event) { - if (event.m_keyCode == WXK_ESCAPE) + if ( + ( event.m_keyCode == WXK_ESCAPE || + ( event.m_keyCode == '.' && event.MetaDown() ) ) + && FindWindow(wxID_CANCEL) ) { // Behaviour changed in 2.0: we'll send a Cancel message // to the dialog instead of Close. @@ -129,17 +112,6 @@ void wxDialog::OnCharHook(wxKeyEvent& event) event.Skip(); } - -void wxDialog::DoSetClientSize(int width, int height) -{ - wxWindow::DoSetClientSize( width , height ) ; -} - -void wxDialog::DoGetPosition(int *x, int *y) const -{ - wxWindow::DoGetPosition( x , y ) ; -} - bool wxDialog::IsModal() const { return (GetWindowStyleFlag() & wxDIALOG_MODAL) != 0; @@ -151,7 +123,6 @@ bool wxDialog::IsModalShowing() const return wxModalDialogs.Find((wxDialog *)this) != NULL; // const_cast } - extern bool s_macIsInModalLoop ; bool wxDialog::Show(bool show) @@ -295,16 +266,6 @@ void wxDialog::OnCloseWindow(wxCloseEvent& event) closing.DeleteObject(this); } -// Destroy the window (delayed, if a managed window) -bool wxDialog::Destroy() -{ - wxCHECK_MSG( !wxPendingDelete.Member(this), FALSE, - _T("wxDialog destroyed twice") ); - - wxPendingDelete.Append(this); - return TRUE; -} - void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& event) { SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); diff --git a/src/mac/frame.cpp b/src/mac/frame.cpp index 04776b8cb1..f9f0d2bec6 100644 --- a/src/mac/frame.cpp +++ b/src/mac/frame.cpp @@ -30,7 +30,6 @@ extern wxList wxPendingDelete; #if !USE_SHARED_LIBRARY BEGIN_EVENT_TABLE(wxFrameMac, wxFrameBase) -// EVT_SIZE(wxFrameMac::OnSize) EVT_ACTIVATE(wxFrameMac::OnActivate) // EVT_MENU_HIGHLIGHT_ALL(wxFrameMac::OnMenuHighlight) EVT_SYS_COLOUR_CHANGED(wxFrameMac::OnSysColourChanged) @@ -107,15 +106,8 @@ bool wxFrameMac::Create(wxWindow *parent, { SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE)); - if ( id > -1 ) - m_windowId = id; - else - m_windowId = (int)NewControlId(); - - if (parent) parent->AddChild(this); - - if (!parent) - wxTopLevelWindows.Append(this); + if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) ) + return FALSE; MacCreateRealWindow( title, pos , size , MacRemoveBordersFromStyle(style) , name ) ; @@ -129,23 +121,9 @@ bool wxFrameMac::Create(wxWindow *parent, wxFrameMac::~wxFrameMac() { m_isBeingDeleted = TRUE; - wxTopLevelWindows.DeleteObject(this); DeleteAllBars(); -/* Check if it's the last top-level window */ - - if (wxTheApp && (wxTopLevelWindows.Number() == 0)) - { - wxTheApp->SetTopWindow(NULL); - - if (wxTheApp->GetExitOnFrameDelete()) - { - wxTheApp->ExitMainLoop() ; - } - } - - wxModelessWindows.DeleteObject(this); } @@ -216,46 +194,39 @@ void wxFrameMac::OnActivate(wxActivateEvent& event) { if ( !event.GetActive() ) { - // remember the last focused child + // remember the last focused child if it is our child m_winLastFocused = FindFocus(); - while ( m_winLastFocused ) + + // so we NULL it out if it's a child from some other frame + wxWindow *win = m_winLastFocused; + while ( win ) { - if ( GetChildren().Find(m_winLastFocused) ) + if ( win->IsTopLevel() ) + { + if ( win != this ) + { + m_winLastFocused = NULL; + } + break; + } - m_winLastFocused = m_winLastFocused->GetParent(); + win = win->GetParent(); } event.Skip(); } else { -/* - for ( wxWindowList::Node *node = GetChildren().GetFirst(); - node; - node = node->GetNext() ) - { - // FIXME all this is totally bogus - we need to do the same as wxPanel, - // but how to do it without duplicating the code? - - // restore focus - wxWindow *child = node->GetData(); - - if ( !child->IsTopLevel() && child->AcceptsFocus() -#if wxUSE_TOOLBAR - && !wxDynamicCast(child, wxToolBar) -#endif // wxUSE_TOOLBAR -#if wxUSE_STATUSBAR - && !wxDynamicCast(child, wxStatusBar) -#endif // wxUSE_STATUSBAR - ) + // restore focus to the child which was last focused + wxWindow *parent = m_winLastFocused ? m_winLastFocused->GetParent() + : NULL; + if ( !parent ) { - child->SetFocus(); - break; + parent = this; } - } - */ - wxSetFocusToChild(this, &m_winLastFocused); + + wxSetFocusToChild(parent, &m_winLastFocused); if ( m_frameMenuBar != NULL ) { diff --git a/src/mac/morefile/MoreExtr.cpp b/src/mac/morefile/MoreExtr.cpp index 26b7c2c393..490d6dda27 100644 --- a/src/mac/morefile/MoreExtr.cpp +++ b/src/mac/morefile/MoreExtr.cpp @@ -235,7 +235,7 @@ pascal OSErr GetVolumeInfoNoName(ConstStr255Param pathname, ** to the local tempPathname). */ -#if !TARGET_CARBON +#if TARGET_CARBON pascal OSErr XGetVolumeInfoNoName(ConstStr255Param pathname, short vRefNum, diff --git a/src/mac/toplevel.cpp b/src/mac/toplevel.cpp new file mode 100644 index 0000000000..9e346918f7 --- /dev/null +++ b/src/mac/toplevel.cpp @@ -0,0 +1,143 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: mac/toplevel.cpp +// Purpose: implements wxTopLevelWindow for MSW +// Author: Vadim Zeitlin +// Modified by: +// Created: 24.09.01 +// RCS-ID: $Id$ +// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) +// License: wxWindows license +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#ifdef __GNUG__ + #pragma implementation "toplevel.h" +#endif + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/toplevel.h" + #include "wx/string.h" + #include "wx/log.h" + #include "wx/intl.h" +#endif //WX_PRECOMP + +// ---------------------------------------------------------------------------- +// globals +// ---------------------------------------------------------------------------- + +// list of all frames and modeless dialogs +wxWindowList wxModelessWindows; + +// ============================================================================ +// wxTopLevelWindowMac implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxTopLevelWindowMac creation +// ---------------------------------------------------------------------------- + +void wxTopLevelWindowMac::Init() +{ + m_iconized = + m_maximizeOnShow = FALSE; +} + +bool wxTopLevelWindowMac::Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + // init our fields + Init(); + + m_windowStyle = style; + + SetName(name); + + m_windowId = id == -1 ? NewControlId() : id; + + wxTopLevelWindows.Append(this); + + if ( parent ) + parent->AddChild(this); + + return TRUE; +} + +wxTopLevelWindowMac::~wxTopLevelWindowMac() +{ + wxTopLevelWindows.DeleteObject(this); + + if ( wxModelessWindows.Find(this) ) + wxModelessWindows.DeleteObject(this); + + // If this is the last top-level window, exit. + if ( wxTheApp && (wxTopLevelWindows.Number() == 0) ) + { + wxTheApp->SetTopWindow(NULL); + + if ( wxTheApp->GetExitOnFrameDelete() ) + { + wxTheApp->ExitMainLoop() ; + } + } +} + + +// ---------------------------------------------------------------------------- +// wxTopLevelWindowMac maximize/minimize +// ---------------------------------------------------------------------------- + +void wxTopLevelWindowMac::Maximize(bool maximize) +{ + // not available on mac +} + +bool wxTopLevelWindowMac::IsMaximized() const +{ + return false ; +} + +void wxTopLevelWindowMac::Iconize(bool iconize) +{ + // not available on mac +} + +bool wxTopLevelWindowMac::IsIconized() const +{ + // mac dialogs cannot be iconized + return FALSE; +} + +void wxTopLevelWindowMac::Restore() +{ + // not available on mac +} + +// ---------------------------------------------------------------------------- +// wxTopLevelWindowMac misc +// ---------------------------------------------------------------------------- + +void wxTopLevelWindowMac::SetIcon(const wxIcon& icon) +{ + // this sets m_icon + wxTopLevelWindowBase::SetIcon(icon); +} -- 2.49.0