]> git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/frame.h
add a header placeholder
[wxWidgets.git] / include / wx / motif / frame.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/frame.h
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
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_MOTIF_FRAME_H_
13 #define _WX_MOTIF_FRAME_H_
14
15 class WXDLLEXPORT wxFrame : public wxFrameBase
16 {
17 public:
18 wxFrame() { Init(); }
19 wxFrame(wxWindow *parent,
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)
26 {
27 Init();
28
29 Create(parent, id, title, pos, size, style, name);
30 }
31
32 bool Create(wxWindow *parent,
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);
39
40 virtual ~wxFrame();
41
42 virtual bool Show(bool show = true);
43
44 // Set menu bar
45 void SetMenuBar(wxMenuBar *menu_bar);
46
47 // Set title
48 void SetTitle(const wxString& title);
49
50 // Set icon
51 virtual void SetIcon(const wxIcon& icon);
52 virtual void SetIcons(const wxIconBundle& icons);
53
54 #if wxUSE_STATUSBAR
55 virtual void PositionStatusBar();
56 #endif // wxUSE_STATUSBAR
57
58 // Create toolbar
59 #if wxUSE_TOOLBAR
60 virtual wxToolBar* CreateToolBar(long style = -1,
61 wxWindowID id = wxID_ANY,
62 const wxString& name = wxToolBarNameStr);
63 virtual void SetToolBar(wxToolBar *toolbar);
64 virtual void PositionToolBar();
65 #endif // wxUSE_TOOLBAR
66
67 // Implementation only from now on
68 // -------------------------------
69
70 void OnSysColourChanged(wxSysColourChangedEvent& event);
71 void OnActivate(wxActivateEvent& event);
72
73 virtual void ChangeFont(bool keepOriginalSize = true);
74 virtual void ChangeBackgroundColour();
75 virtual void ChangeForegroundColour();
76 WXWidget GetMenuBarWidget() const;
77 WXWidget GetShellWidget() const { return m_frameShell; }
78 WXWidget GetWorkAreaWidget() const { return m_workArea; }
79 WXWidget GetClientAreaWidget() const { return m_clientArea; }
80 WXWidget GetTopWidget() const { return m_frameShell; }
81
82 virtual WXWidget GetMainWidget() const { return m_mainWidget; }
83
84 // The widget that can have children on it
85 WXWidget GetClientWidget() const;
86 bool GetVisibleStatus() const { return m_visibleStatus; }
87 void SetVisibleStatus( bool status ) { m_visibleStatus = status; }
88
89 bool PreResize();
90
91 void SendSizeEvent();
92
93 // for generic/mdig.h
94 virtual void DoGetClientSize(int *width, int *height) const;
95 private:
96 // common part of all ctors
97 void Init();
98
99 // set a single icon for the frame
100 void DoSetIcon( const wxIcon& icon );
101
102 //// Motif-specific
103 WXWidget m_frameShell;
104 WXWidget m_workArea;
105 WXWidget m_clientArea;
106 bool m_visibleStatus;
107 bool m_iconized;
108
109 virtual void DoGetSize(int *width, int *height) const;
110 virtual void DoSetSize(int x, int y,
111 int width, int height,
112 int sizeFlags = wxSIZE_AUTO);
113 virtual void DoSetClientSize(int width, int height);
114
115 private:
116 virtual bool XmDoCreateTLW(wxWindow* parent,
117 wxWindowID id,
118 const wxString& title,
119 const wxPoint& pos,
120 const wxSize& size,
121 long style,
122 const wxString& name);
123
124
125
126 DECLARE_EVENT_TABLE()
127 DECLARE_DYNAMIC_CLASS(wxFrame)
128 };
129
130 #endif // _WX_MOTIF_FRAME_H_
131