]> git.saurik.com Git - wxWidgets.git/commitdiff
mac toplevel window added
authorStefan Csomor <csomor@advancedconcepts.ch>
Sun, 30 Sep 2001 09:16:31 +0000 (09:16 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sun, 30 Sep 2001 09:16:31 +0000 (09:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 files changed:
include/wx/mac/dialog.h
include/wx/mac/frame.h
include/wx/mac/toplevel.h [new file with mode: 0644]
src/mac/carbon/dialog.cpp
src/mac/carbon/filedlg.cpp
src/mac/carbon/frame.cpp
src/mac/carbon/mdi.cpp
src/mac/dialog.cpp
src/mac/filedlg.cpp
src/mac/frame.cpp
src/mac/mdi.cpp
src/makemac7.mcp [new file with mode: 0644]

index 78d8942e7ceb095eb49e681ffe35b587ee698cc6..6ae557e92764c1f65751ba3fe2c359f782f55830 100644 (file)
@@ -66,10 +66,6 @@ public:
 
     virtual bool Destroy();
     bool Show(bool show);
-    void Iconize(bool iconize);
-    virtual bool IsIconized() const;
-
-    virtual bool IsTopLevel() const { return TRUE; }
 
     void SetModal(bool flag);
     virtual bool IsModal() const;
index c71cf5fee5b6fdac331879177fd2a365ac89f638..c3032d69f04bcf556797043fc6bccd90031c23eb 100644 (file)
@@ -58,14 +58,6 @@ public:
 
     virtual ~wxFrameMac();
 
-    // implement base class pure virtuals
-    virtual void Maximize(bool maximize = TRUE);
-    virtual bool IsMaximized() const;
-    virtual void Iconize(bool iconize = TRUE);
-    virtual bool IsIconized() const;
-    virtual void Restore();
-    virtual void SetIcon(const wxIcon& icon);
-
     // implementation only from now on
     // -------------------------------
 
@@ -120,7 +112,6 @@ protected:
     virtual void DoSetClientSize(int width, int height);
 
 protected:
-  bool                  m_iconized;
 #if wxUSE_STATUSBAR
     static bool           m_useNativeStatusBar;
 #endif // wxUSE_STATUSBAR
diff --git a/include/wx/mac/toplevel.h b/include/wx/mac/toplevel.h
new file mode 100644 (file)
index 0000000..d9ccdc2
--- /dev/null
@@ -0,0 +1,82 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        wx/mac/toplevel.h
+// Purpose:     wxTopLevelWindowMac is the MSW implementation of wxTLW
+// Author:      Vadim Zeitlin
+// Modified by:
+// Created:     20.09.01
+// RCS-ID:      $Id$
+// Copyright:   (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
+// Licence:     wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_MSW_TOPLEVEL_H_
+#define _WX_MSW_TOPLEVEL_H_
+
+#ifdef __GNUG__
+    #pragma interface "toplevel.h"
+#endif
+
+// ----------------------------------------------------------------------------
+// wxTopLevelWindowMac
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxTopLevelWindowMac : public wxTopLevelWindowBase
+{
+public:
+    // constructors and such
+    wxTopLevelWindowMac() { Init(); }
+
+    wxTopLevelWindowMac(wxWindow *parent,
+                        wxWindowID id,
+                        const wxString& title,
+                        const wxPoint& pos = wxDefaultPosition,
+                        const wxSize& size = wxDefaultSize,
+                        long style = wxDEFAULT_FRAME_STYLE,
+                        const wxString& name = wxFrameNameStr)
+    {
+        Init();
+
+        (void)Create(parent, id, title, pos, size, style, name);
+    }
+
+    bool Create(wxWindow *parent,
+                wxWindowID id,
+                const wxString& title,
+                const wxPoint& pos = wxDefaultPosition,
+                const wxSize& size = wxDefaultSize,
+                long style = wxDEFAULT_FRAME_STYLE,
+                const wxString& name = wxFrameNameStr);
+
+    virtual ~wxTopLevelWindowMac();
+
+    // implement base class pure virtuals
+    virtual void Maximize(bool maximize = TRUE);
+    virtual bool IsMaximized() const;
+    virtual void Iconize(bool iconize = TRUE);
+    virtual bool IsIconized() const;
+    virtual void SetIcon(const wxIcon& icon);
+    virtual void Restore();
+
+    virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL) { return FALSE; }
+    virtual bool IsFullScreen() const { return FALSE; }
+
+    // implementation from now on
+    // --------------------------
+
+protected:
+    // common part of all ctors
+    void Init();
+
+    // is the frame currently iconized?
+    bool m_iconized;
+
+    // should the frame be maximized when it will be shown? set by Maximize()
+    // when it is called while the frame is hidden
+    bool m_maximizeOnShow;
+};
+
+// list of all frames and modeless dialogs
+extern WXDLLEXPORT_DATA(wxWindowList) wxModelessWindows;
+
+#endif // _WX_MSW_TOPLEVEL_H_
+
index 044002d970b1076ba6d8c912a834b55152996b82..1490247378e9c89d7e8da9176cbc742a7221d4aa 100644 (file)
@@ -24,7 +24,7 @@
 // Lists to keep track of windows, so we can disable/enable them
 // for modal dialogs
 wxList wxModalDialogs;
-wxList wxModelessWindows;  // Frames and modeless dialogs
+//wxList wxModelessWindows;  // Frames and modeless dialogs
 extern wxList wxPendingDelete;
 
 #if !USE_SHARED_LIBRARY
@@ -129,16 +129,6 @@ void wxDialog::OnCharHook(wxKeyEvent& event)
   event.Skip();
 }
 
-void wxDialog::Iconize(bool WXUNUSED(iconize))
-{
-       // mac dialogs cannot be iconized
-}
-
-bool wxDialog::IsIconized() const
-{
-       // mac dialogs cannot be iconized
-    return FALSE;
-}
 
 void wxDialog::DoSetClientSize(int width, int height)
 {
index 144cdee7963c5cf78b7710f47f71bbf7fae77562..1d6fd58d44d32371f335a4b7fa0157b46cd6daa9 100644 (file)
@@ -560,7 +560,11 @@ pascal Boolean CrossPlatformFilterCallback (
                if (theItem->descriptorType == typeFSS && !theInfo->isFolder)
                {
                  FSSpec        spec;
-                 memcpy( &spec , *theItem->dataHandle , sizeof(FSSpec) ) ;
+#if TARGET_CARBON
+                 ::AEGetDescData(theItem, &spec, sizeof(FSSpec) ) ;
+#else
+                 memcpy( &spec , (*theItem->dataHandle) , sizeof(FSSpec) ) ;
+#endif
                  display = CheckFile( spec.name , theInfo->fileAndFolder.fileInfo.finderInfo.fdType , data ) ;
                }
        }
index 8a589cbf548e3ba33c45d1e7ac3fd89a18cee906..04776b8cb1ee5f1a2e45c679ba72e95941a0be58 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <wx/mac/uma.h>
 
-extern wxList wxModelessWindows;
+extern wxWindowList wxModelessWindows;
 extern wxList wxPendingDelete;
 
 #if !USE_SHARED_LIBRARY
@@ -164,39 +164,6 @@ bool wxFrameMac::Enable(bool enable)
 
     return TRUE;
 }
-// Equivalent to maximize/restore in Windows
-void wxFrameMac::Maximize(bool maximize)
-{
-    // TODO
-}
-
-bool wxFrameMac::IsIconized() const
-{
-    // TODO
-    return FALSE;
-}
-
-void wxFrameMac::Iconize(bool iconize)
-{
-    // TODO
-}
-
-// Is the frame maximized?
-bool wxFrameMac::IsMaximized(void) const
-{
-    // TODO
-    return FALSE;
-}
-
-void wxFrameMac::Restore()
-{
-    // TODO
-}
-
-void wxFrameMac::SetIcon(const wxIcon& icon)
-{
-   wxFrameBase::SetIcon(icon);
-}
 
 wxStatusBar *wxFrameMac::OnCreateStatusBar(int number, long style, wxWindowID id,
     const wxString& name)
index 79197cdecdac5ba29e42bfe0d284d6f07b0d0d23..f0d2f53138072a7f112915c640fc598f3befde1d 100644 (file)
@@ -17,7 +17,7 @@
 #include "wx/menu.h"
 #include "wx/settings.h"
 
-extern wxList wxModelessWindows;
+extern wxWindowList wxModelessWindows;
 
 #if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame, wxFrame)
index 044002d970b1076ba6d8c912a834b55152996b82..1490247378e9c89d7e8da9176cbc742a7221d4aa 100644 (file)
@@ -24,7 +24,7 @@
 // Lists to keep track of windows, so we can disable/enable them
 // for modal dialogs
 wxList wxModalDialogs;
-wxList wxModelessWindows;  // Frames and modeless dialogs
+//wxList wxModelessWindows;  // Frames and modeless dialogs
 extern wxList wxPendingDelete;
 
 #if !USE_SHARED_LIBRARY
@@ -129,16 +129,6 @@ void wxDialog::OnCharHook(wxKeyEvent& event)
   event.Skip();
 }
 
-void wxDialog::Iconize(bool WXUNUSED(iconize))
-{
-       // mac dialogs cannot be iconized
-}
-
-bool wxDialog::IsIconized() const
-{
-       // mac dialogs cannot be iconized
-    return FALSE;
-}
 
 void wxDialog::DoSetClientSize(int width, int height)
 {
index 144cdee7963c5cf78b7710f47f71bbf7fae77562..1d6fd58d44d32371f335a4b7fa0157b46cd6daa9 100644 (file)
@@ -560,7 +560,11 @@ pascal Boolean CrossPlatformFilterCallback (
                if (theItem->descriptorType == typeFSS && !theInfo->isFolder)
                {
                  FSSpec        spec;
-                 memcpy( &spec , *theItem->dataHandle , sizeof(FSSpec) ) ;
+#if TARGET_CARBON
+                 ::AEGetDescData(theItem, &spec, sizeof(FSSpec) ) ;
+#else
+                 memcpy( &spec , (*theItem->dataHandle) , sizeof(FSSpec) ) ;
+#endif
                  display = CheckFile( spec.name , theInfo->fileAndFolder.fileInfo.finderInfo.fdType , data ) ;
                }
        }
index 8a589cbf548e3ba33c45d1e7ac3fd89a18cee906..04776b8cb1ee5f1a2e45c679ba72e95941a0be58 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <wx/mac/uma.h>
 
-extern wxList wxModelessWindows;
+extern wxWindowList wxModelessWindows;
 extern wxList wxPendingDelete;
 
 #if !USE_SHARED_LIBRARY
@@ -164,39 +164,6 @@ bool wxFrameMac::Enable(bool enable)
 
     return TRUE;
 }
-// Equivalent to maximize/restore in Windows
-void wxFrameMac::Maximize(bool maximize)
-{
-    // TODO
-}
-
-bool wxFrameMac::IsIconized() const
-{
-    // TODO
-    return FALSE;
-}
-
-void wxFrameMac::Iconize(bool iconize)
-{
-    // TODO
-}
-
-// Is the frame maximized?
-bool wxFrameMac::IsMaximized(void) const
-{
-    // TODO
-    return FALSE;
-}
-
-void wxFrameMac::Restore()
-{
-    // TODO
-}
-
-void wxFrameMac::SetIcon(const wxIcon& icon)
-{
-   wxFrameBase::SetIcon(icon);
-}
 
 wxStatusBar *wxFrameMac::OnCreateStatusBar(int number, long style, wxWindowID id,
     const wxString& name)
index 79197cdecdac5ba29e42bfe0d284d6f07b0d0d23..f0d2f53138072a7f112915c640fc598f3befde1d 100644 (file)
@@ -17,7 +17,7 @@
 #include "wx/menu.h"
 #include "wx/settings.h"
 
-extern wxList wxModelessWindows;
+extern wxWindowList wxModelessWindows;
 
 #if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame, wxFrame)
diff --git a/src/makemac7.mcp b/src/makemac7.mcp
new file mode 100644 (file)
index 0000000..f7b351e
Binary files /dev/null and b/src/makemac7.mcp differ