]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/os2/toplevel.h
cleanup - added whitespace around operators, some blank lines, fixed comment typos...
[wxWidgets.git] / include / wx / os2 / toplevel.h
index 8f49bb12fe195584d9a2074e1c74cc44a1bf9aba..a251addfe7ef84c5750f8649e6a7c87e79e7bfa7 100644 (file)
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        wx/msw/toplevel.h
-// Purpose:     wxTopLevelWindowMSW is the MSW implementation of wxTLW
+// Name:        wx/os2/toplevel.h
+// Purpose:     wxTopLevelWindowOS2 is the OS2 implementation of wxTLW
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     20.09.01
 #ifndef _WX_MSW_TOPLEVEL_H_
 #define _WX_MSW_TOPLEVEL_H_
 
-#ifdef __GNUG__
-    #pragma interface "toplevel.h"
-#endif
-
-enum ETemplateID { kResizeableDialog = 1000
-                  ,kCaptionDialog
-                  ,kNoCaptionDialog
-                 };
+enum ETemplateID
+{
+    kResizeableDialog = 130,
+    kCaptionDialog,
+    kNoCaptionDialog
+};
 
 // ----------------------------------------------------------------------------
 // wxTopLevelWindowOS2
@@ -59,41 +57,50 @@ public:
     //
     // 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
-                                      );
+    virtual void SetTitle( const wxString& title);
+    virtual wxString GetTitle() const;
+
+    virtual void Iconize(bool bIconize = true);
+    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 SendSizeEvent(void);
+    virtual void SetIcon(const wxIcon& rIcon);
+    virtual void SetIcons(const wxIconBundle& rIcons);
+
+    virtual bool Show(bool bShow = true);
+    virtual bool ShowFullScreen( bool bShow,
+                                 long lStyle = wxFULLSCREEN_ALL );
 
     //
-    // EnableCloseButton(FALSE) may be used to remove the "Close"
+    // 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; }
+    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
-                                          );
+    PSWP         GetSwpClient(void) { return &m_vSwpClient; }
+
+    void         OnActivate(wxActivateEvent& rEvent);
+
+    void         SetLastFocus(wxWindow *pWin) { m_pWinLastFocused = pWin; }
+    wxWindow*    GetLastFocus(void) const { return m_pWinLastFocused; }
+
 protected:
+
     //
     // Common part of all ctors
     //
     void Init(void);
 
     //
-    // Create a new frame, return FALSE if it couldn't be created
+    // Create a new frame, return false if it couldn't be created
     //
     bool CreateFrame( const wxString& rsTitle
                      ,const wxPoint&  rPos
@@ -102,7 +109,7 @@ protected:
 
     //
     // Create a new dialog using the given dialog template from resources,
-    // return FALSE if it couldn't be created
+    // return false if it couldn't be created
     //
     bool CreateDialog( ULONG           ulDlgTemplate
                       ,const wxString& rsTitle
@@ -126,42 +133,46 @@ protected:
                                 ) const;
 
     //
-    // Get the OS/2 window flags corresponding to wxWindows ones
+    // Translate wxWidgets flags into OS flags
+    //
+    virtual WXDWORD OS2GetStyle( long     lFlag
+                                ,WXDWORD* pdwExstyle
+                               ) const;
+
     //
-    // The functions returns the flags (WS_XXX) directly and puts the ext
-    // (WS_EX_XXX) flags into the provided pointer if not NULL
+    // Choose the right parent to use with CreateWindow()
     //
-    long OS2GetCreateWindowFlags(long* lExflags) const;
+    virtual WXHWND  OS2GetParent(void) const;
 
     //
     // Is the frame currently iconized?
     //
-    bool                            m_bIconized;
+    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;
+    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;
+    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
+    wxWindow* m_pWinLastFocused;
 
-//
-// List of all frames and modeless dialogs
-//
-extern WXDLLEXPORT_DATA(wxWindowList) wxModelessWindows;
+    WXHWND m_hFrame;
+    SWP    m_vSwp;
+    SWP    m_vSwpClient;
+    static bool m_sbInitialized;
+    static wxWindow* m_spHiddenParent;
 
-#endif // _WX_MSW_TOPLEVEL_H_
+    DECLARE_EVENT_TABLE()
+}; // end of CLASS wxTopLevelWindowOS2
 
+#endif // _WX_MSW_TOPLEVEL_H_