X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7810c95b5de52447a5c2c8aaed06f287e02fc690..f1c75e0f93b4ec9f45827cc5a2d16ef17a675dfc:/include/wx/mac/frame.h?ds=sidebyside diff --git a/include/wx/mac/frame.h b/include/wx/mac/frame.h index ec02faec6d..aa21b150ee 100644 --- a/include/wx/mac/frame.h +++ b/include/wx/mac/frame.h @@ -1,18 +1,18 @@ ///////////////////////////////////////////////////////////////////////////// // Name: frame.h // Purpose: wxFrame class -// Author: AUTHOR +// Author: Stefan Csomor // Modified by: -// Created: ??/??/98 +// Created: 1998-01-01 // RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_FRAME_H_ #define _WX_FRAME_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(__APPLE__) #pragma interface "frame.h" #endif @@ -21,17 +21,15 @@ #include "wx/accel.h" #include "wx/icon.h" -WXDLLEXPORT_DATA(extern const char*) wxFrameNameStr; -WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr; +WXDLLEXPORT_DATA(extern const wxChar*) wxFrameNameStr; +WXDLLEXPORT_DATA(extern const wxChar*) wxToolBarNameStr; class WXDLLEXPORT wxMenuBar; class WXDLLEXPORT wxStatusBar; class WXDLLEXPORT wxMacToolTip ; -class WXDLLEXPORT wxFrame: public wxFrameBase { - - DECLARE_DYNAMIC_CLASS(wxFrame) - +class WXDLLEXPORT wxFrame: public wxFrameBase +{ public: // construction wxFrame() { Init(); } @@ -58,20 +56,11 @@ public: virtual ~wxFrame(); - // 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 SetMenuBar(wxMenuBar *menubar); - virtual void SetIcon(const wxIcon& icon); - // implementation only from now on // ------------------------------- // override some more virtuals - virtual bool Enable(bool enable) ; + virtual bool Enable(bool enable = TRUE) ; // get the origin of the client area (which may be different from (0, 0) // if the frame has a toolbar) in client coordinates @@ -83,7 +72,7 @@ public: // Toolbar #if wxUSE_TOOLBAR - virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT, + virtual wxToolBar* CreateToolBar(long style = -1, wxWindowID id = -1, const wxString& name = wxToolBarNameStr); @@ -98,11 +87,6 @@ public: const wxString& name = wxStatusLineNameStr); virtual void PositionStatusBar(); - - // Hint to tell framework which status bar to use - // TODO: should this go into a wxFrameworkSettings class perhaps? - static void UseNativeStatusBar(bool useNative) { m_useNativeStatusBar = useNative; }; - static bool UsesNativeStatusBar() { return m_useNativeStatusBar; }; #endif // wxUSE_STATUSBAR // tooltip management @@ -112,6 +96,10 @@ public: wxMacToolTip* m_hwndToolTip ; #endif // tooltips + // called by wxWindow whenever it gets focus + void SetLastFocus(wxWindow *win) { m_winLastFocused = win; } + wxWindow *GetLastFocus() const { return m_winLastFocused; } + protected: // common part of all ctors void Init(); @@ -120,16 +108,16 @@ protected: virtual void DoGetClientSize(int *width, int *height) const; virtual void DoSetClientSize(int width, int height); + virtual void DetachMenuBar(); + virtual void AttachMenuBar(wxMenuBar *menubar); + protected: - bool m_iconized; -#if wxUSE_STATUSBAR - static bool m_useNativeStatusBar; -#endif // wxUSE_STATUSBAR // the last focused child: we restore focus to it on activation wxWindow *m_winLastFocused; private: DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxFrame) }; #endif