- wxFrame(void);
- inline wxFrame(wxWindow *parent,
- const wxWindowID id,
- const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- const long style = wxDEFAULT_FRAME_STYLE,
- const wxString& name = wxFrameNameStr)
- {
- Create(parent, id, title, pos, size, style, name);
- }
-
- ~wxFrame(void);
-
- bool Create(wxWindow *parent,
- const wxWindowID id,
- const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- const long style = wxDEFAULT_FRAME_STYLE,
- const wxString& name = wxFrameNameStr);
-
-#if WXWIN_COMPATIBILITY
- // The default thing is to set the focus for the first child window.
- // Override for your own behaviour.
- virtual void OldOnActivate(bool flag);
-
- // Default behaviour is to display a help string for the menu item.
- virtual void OldOnMenuSelect(int id);
-
- inline virtual void OldOnMenuCommand(int WXUNUSED(id)) {}; // Called on frame menu command
- void OldOnSize(int x, int y);
-#endif
-
- virtual bool Destroy(void);
- void SetClientSize(const int width, const int height);
- void GetClientSize(int *width, int *height) const;
+ // construction
+ wxFrame() { Init(); }
+ wxFrame(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();
+
+ 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 ~wxFrame();
+
+ // implement base class pure virtuals
+ virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
+ virtual void Raise();
+
+ // implementation only from now on
+ // -------------------------------
+
+ // event handlers
+ void OnSysColourChanged(wxSysColourChangedEvent& event);
+
+ // Toolbar
+#if wxUSE_TOOLBAR
+ virtual wxToolBar* CreateToolBar(long style = -1,
+ wxWindowID id = wxID_ANY,
+ const wxString& name = wxToolBarNameStr);
+#endif // wxUSE_TOOLBAR
+
+ // Status bar
+#if wxUSE_STATUSBAR
+ virtual wxStatusBar* OnCreateStatusBar(int number = 1,
+ long style = wxST_SIZEGRIP,
+ wxWindowID id = 0,
+ const wxString& name = wxStatusLineNameStr);
+
+ // Hint to tell framework which status bar to use: the default is to use
+ // native one for the platforms which support it (Win32), the generic one
+ // otherwise
+
+ // 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
+
+#if wxUSE_MENUS
+ WXHMENU GetWinMenu() const { return m_hMenu; }
+#endif // wxUSE_MENUS
+
+ // event handlers
+ bool HandlePaint();
+ bool HandleSize(int x, int y, WXUINT flag);
+ bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control);
+ bool HandleMenuSelect(WXWORD nItem, WXWORD nFlags, WXHMENU hMenu);
+ bool HandleMenuLoop(const wxEventType& evtType, WXWORD isPopup);
+
+ // tooltip management
+#if wxUSE_TOOLTIPS
+ WXHWND GetToolTipCtrl() const { return m_hwndToolTip; }
+ void SetToolTipCtrl(WXHWND hwndTT) { m_hwndToolTip = hwndTT; }
+#endif // tooltips
+
+ // a MSW only function which sends a size event to the window using its
+ // current size - this has an effect of refreshing the window layout
+ virtual void SendSizeEvent();
+
+ virtual wxPoint GetClientAreaOrigin() const;
+
+ // override base class version to add menu bar accel processing
+ virtual bool MSWTranslateMessage(WXMSG *msg)
+ {
+ return MSWDoTranslateMessage(this, msg);
+ }
+
+ // window proc for the frames
+ virtual WXLRESULT MSWWindowProc(WXUINT message,
+ WXWPARAM wParam,
+ WXLPARAM lParam);