From 6f63ec3f93070e6824da775cf8d2565a025c2406 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 17 Dec 1998 17:59:50 +0000 Subject: [PATCH] Just a teeny change -- addition of wxFrame::IsMaximized. For wxMDIChildFrame in wxGTK, is probably always TRUE (always size of client area). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/motif/frame.h | 4 ++++ include/wx/motif/mdi.h | 4 ++++ include/wx/msw/frame.h | 3 +++ include/wx/stubs/frame.h | 3 +++ src/motif/frame.cpp | 7 +++++++ src/motif/mdi.cpp | 7 +++++++ src/msw/frame.cpp | 6 ++++++ src/stubs/frame.cpp | 7 +++++++ 8 files changed, 41 insertions(+) diff --git a/include/wx/motif/frame.h b/include/wx/motif/frame.h index 945ecbc5a8..152e8132d6 100644 --- a/include/wx/motif/frame.h +++ b/include/wx/motif/frame.h @@ -143,6 +143,10 @@ public: // Compatibility inline bool Iconized() const { return IsIconized(); } + // Is the frame maximized? Returns FALSE under Motif (but TRUE for + // wxMDIChildFrame due to the tabbed implementation). + virtual bool IsMaximized(void) const ; + virtual void Maximize(bool maximize); // Responds to colour changes diff --git a/include/wx/motif/mdi.h b/include/wx/motif/mdi.h index 74b483d5fa..557f0044db 100644 --- a/include/wx/motif/mdi.h +++ b/include/wx/motif/mdi.h @@ -180,6 +180,10 @@ public: virtual void Activate(); virtual bool IsIconized() const ; + // Is the frame maximized? Returns TRUE for + // wxMDIChildFrame due to the tabbed implementation. + virtual bool IsMaximized(void) const ; + bool Show(bool show); inline WXWidget GetMainWidget() const { return m_mainWidget; }; diff --git a/include/wx/msw/frame.h b/include/wx/msw/frame.h index b9bfa8580b..1c191305d8 100644 --- a/include/wx/msw/frame.h +++ b/include/wx/msw/frame.h @@ -138,6 +138,9 @@ public: virtual bool IsIconized(void) const ; + // Is it maximized? + virtual bool IsMaximized(void) const ; + // Compatibility inline bool Iconized(void) const { return IsIconized(); } diff --git a/include/wx/stubs/frame.h b/include/wx/stubs/frame.h index fcd8689e56..c013362175 100644 --- a/include/wx/stubs/frame.h +++ b/include/wx/stubs/frame.h @@ -128,6 +128,9 @@ public: // Compatibility inline bool Iconized() const { return IsIconized(); } + // Is the frame maximized? + virtual bool IsMaximized(void) const ; + virtual void Maximize(bool maximize); // Responds to colour changes diff --git a/src/motif/frame.cpp b/src/motif/frame.cpp index d540ec4a9c..d018baa2a2 100644 --- a/src/motif/frame.cpp +++ b/src/motif/frame.cpp @@ -534,6 +534,13 @@ bool wxFrame::IsIconized() const return iconic; } +// Is it maximized? +bool wxFrame::IsMaximized(void) const +{ + // No maximizing in Motif (?) + return FALSE; +} + void wxFrame::SetTitle(const wxString& title) { if (title == m_title) diff --git a/src/motif/mdi.cpp b/src/motif/mdi.cpp index a2076eaf31..a5f9b7cc55 100644 --- a/src/motif/mdi.cpp +++ b/src/motif/mdi.cpp @@ -572,6 +572,13 @@ bool wxMDIChildFrame::IsIconized() const return FALSE; } +// Is it maximized? Always maximized under Motif, using the +// tabbed MDI implementation. +bool wxMDIChildFrame::IsMaximized(void) const +{ + return TRUE; +} + void wxMDIChildFrame::Restore() { // TODO diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 70feafee93..8759c68272 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -331,6 +331,12 @@ bool wxFrame::IsIconized(void) const return m_iconized; } +// Is it maximized? +bool wxFrame::IsMaximized(void) const +{ + return (::IsZoomed((HWND) GetHWND()) != 0) ; +} + void wxFrame::SetTitle(const wxString& title) { SetWindowText((HWND) GetHWND(), (const char *)title); diff --git a/src/stubs/frame.cpp b/src/stubs/frame.cpp index 84555cbf01..1e8c9e9ae5 100644 --- a/src/stubs/frame.cpp +++ b/src/stubs/frame.cpp @@ -163,6 +163,13 @@ bool wxFrame::IsIconized() const return FALSE; } +// Is the frame maximized? +bool wxFrame::IsMaximized(void) const +{ + // TODO + return FALSE; +} + void wxFrame::SetTitle(const wxString& title) { // TODO