]> git.saurik.com Git - wxWidgets.git/commitdiff
toplevel fixes and USE_RUL and PRTOTCOL stuff
authorDavid Webster <Dave.Webster@bhmi.com>
Mon, 7 Jan 2002 16:40:17 +0000 (16:40 +0000)
committerDavid Webster <Dave.Webster@bhmi.com>
Mon, 7 Jan 2002 16:40:17 +0000 (16:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/os2/setup0.h
include/wx/os2/toplevel.h [new file with mode: 0644]

index e0eb8e2836c3cbb3d639c5febc6794f08e9dab0c..6cb96314bdde56b11f97116716d8cd8ca3bce91e 100644 (file)
                                   // DLL loading and function calling
 #define wxUSE_DYNAMIC_LOADER 0
 
+#define wxUSE_PROTOCOL          1
+#define wxUSE_URL               1
+#define wxUSE_PROTOCOL_HTTP     1
+#define wxUSE_PROTOCOL_FTP      1
+#define wxUSE_PROTOCOL_FILE     1
+
 #endif
     // _WX_SETUP_H_
diff --git a/include/wx/os2/toplevel.h b/include/wx/os2/toplevel.h
new file mode 100644 (file)
index 0000000..8f49bb1
--- /dev/null
@@ -0,0 +1,167 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        wx/msw/toplevel.h
+// Purpose:     wxTopLevelWindowMSW 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
+
+enum ETemplateID { kResizeableDialog = 1000
+                  ,kCaptionDialog
+                  ,kNoCaptionDialog
+                 };
+
+// ----------------------------------------------------------------------------
+// wxTopLevelWindowOS2
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxTopLevelWindowOS2 : public wxTopLevelWindowBase
+{
+public:
+    // constructors and such
+    wxTopLevelWindowOS2() { Init(); }
+
+    wxTopLevelWindowOS2( wxWindow*       pParent
+                        ,wxWindowID      vId
+                        ,const wxString& rsTitle
+                        ,const wxPoint&  rPos = wxDefaultPosition
+                        ,const wxSize&   rSize = wxDefaultSize
+                        ,long            lStyle = wxDEFAULT_FRAME_STYLE
+                        ,const wxString& rsName = wxFrameNameStr
+                       )
+    {
+        Init();
+
+        (void)Create(pParent, vId, rsTitle, rPos, rSize, lStyle, rsName);
+    }
+
+    bool Create( wxWindow*       pParent
+                ,wxWindowID      vId
+                ,const wxString& rsTitle
+                ,const wxPoint&  rPos = wxDefaultPosition
+                ,const wxSize&   rSize = wxDefaultSize
+                ,long            lStyle = wxDEFAULT_FRAME_STYLE
+                ,const wxString& rsName = wxFrameNameStr
+               );
+
+    virtual ~wxTopLevelWindowOS2();
+
+    //
+    // Implement base class pure virtuals
+    //
+           virtual void Iconize(bool bIconize = TRUE);
+    inline virtual bool IsFullScreen(void) const { return m_bFsIsShowing; }
+           virtual bool IsIconized(void) const;
+           virtual bool IsMaximized(void) const;
+           virtual void Maximize(bool bMaximize = TRUE);
+           virtual void Restore(void);
+           virtual void SetIcon(const wxIcon& rIcon);
+           virtual bool Show(bool bShow = TRUE);
+           virtual bool ShowFullScreen( bool bShow
+                                       ,long lStyle = wxFULLSCREEN_ALL
+                                      );
+
+    //
+    // EnableCloseButton(FALSE) may be used to remove the "Close"
+    // button from the title bar
+    //
+                   bool EnableCloseButton(bool bEnable = TRUE);
+                   HWND GetFrame(void) const { return m_hFrame; }
+
+    //
+    // Implementation from now on
+    // --------------------------
+    //
+           virtual void AlterChildPos(void); // OS/2 child control positioning
+           virtual void UpdateInternalSize( wxWindow* pChild
+                                           ,int       nHeight
+                                          );
+protected:
+    //
+    // Common part of all ctors
+    //
+    void Init(void);
+
+    //
+    // Create a new frame, return FALSE if it couldn't be created
+    //
+    bool CreateFrame( const wxString& rsTitle
+                     ,const wxPoint&  rPos
+                     ,const wxSize&   rSize
+                    );
+
+    //
+    // Create a new dialog using the given dialog template from resources,
+    // return FALSE if it couldn't be created
+    //
+    bool CreateDialog( ULONG           ulDlgTemplate
+                      ,const wxString& rsTitle
+                      ,const wxPoint&  rPos
+                      ,const wxSize&   rSize
+                     );
+
+    //
+    // Common part of Iconize(), Maximize() and Restore()
+    //
+    void DoShowWindow(int nShowCmd);
+
+    //
+    // Implement the geometry-related methods for a top level window
+    //
+    virtual void DoSetClientSize( int nWidth
+                                 ,int nHeight
+                                );
+    virtual void DoGetClientSize( int* pnWidth
+                                 ,int* pnHeight
+                                ) const;
+
+    //
+    // Get the OS/2 window flags corresponding to wxWindows ones
+    //
+    // The functions returns the flags (WS_XXX) directly and puts the ext
+    // (WS_EX_XXX) flags into the provided pointer if not NULL
+    //
+    long OS2GetCreateWindowFlags(long* lExflags) const;
+
+    //
+    // Is the frame currently iconized?
+    //
+    bool                            m_bIconized;
+
+    //
+    // Should the frame be maximized when it will be shown? set by Maximize()
+    // when it is called while the frame is hidden
+    //
+    bool                            m_bMaximizeOnShow;
+
+    //
+    // Data to save/restore when calling ShowFullScreen
+    //
+    long                            m_lFsStyle; // Passed to ShowFullScreen
+    wxRect                          m_vFsOldSize;
+    long                            m_lFsOldWindowStyle;
+    bool                            m_bFsIsMaximized;
+    bool                            m_bFsIsShowing;
+
+    WXHWND                          m_hFrame;
+    SWP                             m_vSwp;
+    SWP                             m_vSwpClient;
+}; // end of CLASS wxTopLevelWindowOS2
+
+//
+// List of all frames and modeless dialogs
+//
+extern WXDLLEXPORT_DATA(wxWindowList) wxModelessWindows;
+
+#endif // _WX_MSW_TOPLEVEL_H_
+