]>
Commit | Line | Data |
---|---|---|
9b6dbb09 | 1 | ///////////////////////////////////////////////////////////////////////////// |
1c4f8f8d | 2 | // Name: wx/motif/frame.h |
9b6dbb09 JS |
3 | // Purpose: wxFrame class |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 17/09/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart | |
65571936 | 9 | // Licence: wxWindows licence |
9b6dbb09 JS |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
1c4f8f8d VZ |
12 | #ifndef _WX_MOTIF_FRAME_H_ |
13 | #define _WX_MOTIF_FRAME_H_ | |
9b6dbb09 | 14 | |
53a2db12 | 15 | class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase |
bfc6fde4 | 16 | { |
9b6dbb09 | 17 | public: |
1c4f8f8d | 18 | wxFrame() { Init(); } |
bfc6fde4 | 19 | wxFrame(wxWindow *parent, |
83df96d6 JS |
20 | wxWindowID id, |
21 | const wxString& title, | |
22 | const wxPoint& pos = wxDefaultPosition, | |
23 | const wxSize& size = wxDefaultSize, | |
24 | long style = wxDEFAULT_FRAME_STYLE, | |
25 | const wxString& name = wxFrameNameStr) | |
bfc6fde4 | 26 | { |
1c4f8f8d | 27 | Init(); |
f9dae779 | 28 | |
bfc6fde4 VZ |
29 | Create(parent, id, title, pos, size, style, name); |
30 | } | |
f9dae779 | 31 | |
bfc6fde4 | 32 | bool Create(wxWindow *parent, |
83df96d6 JS |
33 | wxWindowID id, |
34 | const wxString& title, | |
35 | const wxPoint& pos = wxDefaultPosition, | |
36 | const wxSize& size = wxDefaultSize, | |
37 | long style = wxDEFAULT_FRAME_STYLE, | |
38 | const wxString& name = wxFrameNameStr); | |
f9dae779 | 39 | |
1c4f8f8d | 40 | virtual ~wxFrame(); |
798a4529 | 41 | |
dabbc6a5 | 42 | virtual bool Show(bool show = true); |
798a4529 | 43 | |
bfc6fde4 VZ |
44 | // Set menu bar |
45 | void SetMenuBar(wxMenuBar *menu_bar); | |
f9dae779 | 46 | |
bfc6fde4 VZ |
47 | // Set title |
48 | void SetTitle(const wxString& title); | |
f9dae779 | 49 | |
bfc6fde4 | 50 | // Set icon |
f618020a MB |
51 | virtual void SetIcons(const wxIconBundle& icons); |
52 | ||
1c4f8f8d | 53 | #if wxUSE_STATUSBAR |
bfc6fde4 | 54 | virtual void PositionStatusBar(); |
1c4f8f8d | 55 | #endif // wxUSE_STATUSBAR |
f9dae779 | 56 | |
bfc6fde4 | 57 | // Create toolbar |
1ccbb61a | 58 | #if wxUSE_TOOLBAR |
f9dae779 | 59 | virtual wxToolBar* CreateToolBar(long style = -1, |
dabbc6a5 | 60 | wxWindowID id = wxID_ANY, |
46675b46 MB |
61 | const wxString& name = wxToolBarNameStr); |
62 | virtual void SetToolBar(wxToolBar *toolbar); | |
bfc6fde4 | 63 | virtual void PositionToolBar(); |
1ccbb61a | 64 | #endif // wxUSE_TOOLBAR |
f9dae779 | 65 | |
1c4f8f8d VZ |
66 | // Implementation only from now on |
67 | // ------------------------------- | |
f9dae779 | 68 | |
1c4f8f8d VZ |
69 | void OnSysColourChanged(wxSysColourChangedEvent& event); |
70 | void OnActivate(wxActivateEvent& event); | |
f9dae779 | 71 | |
dabbc6a5 | 72 | virtual void ChangeFont(bool keepOriginalSize = true); |
bfc6fde4 VZ |
73 | virtual void ChangeBackgroundColour(); |
74 | virtual void ChangeForegroundColour(); | |
1c4f8f8d | 75 | WXWidget GetMenuBarWidget() const; |
bfc6fde4 VZ |
76 | WXWidget GetShellWidget() const { return m_frameShell; } |
77 | WXWidget GetWorkAreaWidget() const { return m_workArea; } | |
78 | WXWidget GetClientAreaWidget() const { return m_clientArea; } | |
79 | WXWidget GetTopWidget() const { return m_frameShell; } | |
f9dae779 | 80 | |
798a4529 | 81 | virtual WXWidget GetMainWidget() const { return m_mainWidget; } |
f9dae779 | 82 | |
bfc6fde4 VZ |
83 | // The widget that can have children on it |
84 | WXWidget GetClientWidget() const; | |
85 | bool GetVisibleStatus() const { return m_visibleStatus; } | |
798a4529 MB |
86 | void SetVisibleStatus( bool status ) { m_visibleStatus = status; } |
87 | ||
bfc6fde4 | 88 | bool PreResize(); |
798a4529 | 89 | |
46675b46 MB |
90 | void SendSizeEvent(); |
91 | ||
798a4529 | 92 | // for generic/mdig.h |
f9dae779 | 93 | virtual void DoGetClientSize(int *width, int *height) const; |
798a4529 | 94 | private: |
1c4f8f8d VZ |
95 | // common part of all ctors |
96 | void Init(); | |
f618020a MB |
97 | |
98 | // set a single icon for the frame | |
99 | void DoSetIcon( const wxIcon& icon ); | |
100 | ||
bfc6fde4 | 101 | //// Motif-specific |
bfc6fde4 | 102 | WXWidget m_frameShell; |
bfc6fde4 VZ |
103 | WXWidget m_workArea; |
104 | WXWidget m_clientArea; | |
1c4f8f8d VZ |
105 | bool m_visibleStatus; |
106 | bool m_iconized; | |
f9dae779 | 107 | |
1c4f8f8d | 108 | virtual void DoGetSize(int *width, int *height) const; |
bfc6fde4 | 109 | virtual void DoSetSize(int x, int y, |
83df96d6 JS |
110 | int width, int height, |
111 | int sizeFlags = wxSIZE_AUTO); | |
bfc6fde4 | 112 | virtual void DoSetClientSize(int width, int height); |
f9dae779 | 113 | |
bfc6fde4 | 114 | private: |
02bcd285 | 115 | virtual bool XmDoCreateTLW(wxWindow* parent, |
f58585c0 VZ |
116 | wxWindowID id, |
117 | const wxString& title, | |
118 | const wxPoint& pos, | |
119 | const wxSize& size, | |
120 | long style, | |
121 | const wxString& name); | |
122 | ||
798a4529 | 123 | |
219ee9ba | 124 | |
bfc6fde4 | 125 | DECLARE_EVENT_TABLE() |
798a4529 | 126 | DECLARE_DYNAMIC_CLASS(wxFrame) |
9b6dbb09 JS |
127 | }; |
128 | ||
219ee9ba VZ |
129 | #endif // _WX_MOTIF_FRAME_H_ |
130 |