]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/gtk/frame.h | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
5 | // Id: $Id$ | |
6 | // Copyright: (c) 1998 Robert Roebling, Julian Smart | |
7 | // Licence: wxWindows licence | |
8 | ///////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | #ifndef _WX_GTK_FRAME_H_ | |
11 | #define _WX_GTK_FRAME_H_ | |
12 | ||
13 | //----------------------------------------------------------------------------- | |
14 | // wxFrame | |
15 | //----------------------------------------------------------------------------- | |
16 | ||
17 | class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase | |
18 | { | |
19 | public: | |
20 | // construction | |
21 | wxFrame() { Init(); } | |
22 | wxFrame(wxWindow *parent, | |
23 | wxWindowID id, | |
24 | const wxString& title, | |
25 | const wxPoint& pos = wxDefaultPosition, | |
26 | const wxSize& size = wxDefaultSize, | |
27 | long style = wxDEFAULT_FRAME_STYLE, | |
28 | const wxString& name = wxFrameNameStr) | |
29 | { | |
30 | Init(); | |
31 | ||
32 | Create(parent, id, title, pos, size, style, name); | |
33 | } | |
34 | ||
35 | bool Create(wxWindow *parent, | |
36 | wxWindowID id, | |
37 | const wxString& title, | |
38 | const wxPoint& pos = wxDefaultPosition, | |
39 | const wxSize& size = wxDefaultSize, | |
40 | long style = wxDEFAULT_FRAME_STYLE, | |
41 | const wxString& name = wxFrameNameStr); | |
42 | ||
43 | virtual ~wxFrame(); | |
44 | ||
45 | #if wxUSE_STATUSBAR | |
46 | void SetStatusBar(wxStatusBar *statbar); | |
47 | #endif // wxUSE_STATUSBAR | |
48 | ||
49 | #if wxUSE_TOOLBAR | |
50 | void SetToolBar(wxToolBar *toolbar); | |
51 | #endif // wxUSE_TOOLBAR | |
52 | ||
53 | virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); | |
54 | wxPoint GetClientAreaOrigin() const { return wxPoint(0, 0); } | |
55 | ||
56 | #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2 | |
57 | // in Hildon environment all frames are always shown maximized | |
58 | virtual bool IsMaximized() const { return true; } | |
59 | #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2 | |
60 | ||
61 | // implementation from now on | |
62 | // -------------------------- | |
63 | ||
64 | virtual bool SendIdleEvents(wxIdleEvent& event); | |
65 | ||
66 | protected: | |
67 | // common part of all ctors | |
68 | void Init(); | |
69 | ||
70 | // override wxWindow methods to take into account tool/menu/statusbars | |
71 | virtual void DoGetClientSize( int *width, int *height ) const; | |
72 | ||
73 | #if wxUSE_MENUS_NATIVE | |
74 | virtual void DetachMenuBar(); | |
75 | virtual void AttachMenuBar(wxMenuBar *menubar); | |
76 | #endif // wxUSE_MENUS_NATIVE | |
77 | ||
78 | private: | |
79 | long m_fsSaveFlag; | |
80 | ||
81 | DECLARE_DYNAMIC_CLASS(wxFrame) | |
82 | }; | |
83 | ||
84 | #endif // _WX_GTK_FRAME_H_ |