]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/frame.h
moved wxUSE_MS_HTML_HELP back into setup_inc.h (undoing change of rev 1.41) as it...
[wxWidgets.git] / include / wx / motif / frame.h
CommitLineData
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
1c4f8f8d 15class WXDLLEXPORT wxFrame : public wxFrameBase
bfc6fde4 16{
9b6dbb09 17public:
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
VZ
50 // Set icon
51 virtual void SetIcon(const wxIcon& icon);
f618020a
MB
52 virtual void SetIcons(const wxIconBundle& icons);
53
1c4f8f8d 54#if wxUSE_STATUSBAR
bfc6fde4 55 virtual void PositionStatusBar();
1c4f8f8d 56#endif // wxUSE_STATUSBAR
f9dae779 57
bfc6fde4 58 // Create toolbar
1ccbb61a 59#if wxUSE_TOOLBAR
f9dae779 60 virtual wxToolBar* CreateToolBar(long style = -1,
dabbc6a5 61 wxWindowID id = wxID_ANY,
46675b46
MB
62 const wxString& name = wxToolBarNameStr);
63 virtual void SetToolBar(wxToolBar *toolbar);
bfc6fde4 64 virtual void PositionToolBar();
1ccbb61a 65#endif // wxUSE_TOOLBAR
f9dae779 66
1c4f8f8d
VZ
67 // Implementation only from now on
68 // -------------------------------
f9dae779 69
1c4f8f8d
VZ
70 void OnSysColourChanged(wxSysColourChangedEvent& event);
71 void OnActivate(wxActivateEvent& event);
f9dae779 72
dabbc6a5 73 virtual void ChangeFont(bool keepOriginalSize = true);
bfc6fde4
VZ
74 virtual void ChangeBackgroundColour();
75 virtual void ChangeForegroundColour();
1c4f8f8d 76 WXWidget GetMenuBarWidget() const;
bfc6fde4
VZ
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; }
f9dae779 81
798a4529 82 virtual WXWidget GetMainWidget() const { return m_mainWidget; }
f9dae779 83
bfc6fde4
VZ
84 // The widget that can have children on it
85 WXWidget GetClientWidget() const;
86 bool GetVisibleStatus() const { return m_visibleStatus; }
798a4529
MB
87 void SetVisibleStatus( bool status ) { m_visibleStatus = status; }
88
bfc6fde4 89 bool PreResize();
798a4529 90
46675b46
MB
91 void SendSizeEvent();
92
798a4529 93 // for generic/mdig.h
f9dae779 94 virtual void DoGetClientSize(int *width, int *height) const;
798a4529 95private:
1c4f8f8d
VZ
96 // common part of all ctors
97 void Init();
f618020a
MB
98
99 // set a single icon for the frame
100 void DoSetIcon( const wxIcon& icon );
101
bfc6fde4 102 //// Motif-specific
bfc6fde4 103 WXWidget m_frameShell;
bfc6fde4
VZ
104 WXWidget m_workArea;
105 WXWidget m_clientArea;
1c4f8f8d
VZ
106 bool m_visibleStatus;
107 bool m_iconized;
f9dae779 108
1c4f8f8d 109 virtual void DoGetSize(int *width, int *height) const;
bfc6fde4 110 virtual void DoSetSize(int x, int y,
83df96d6
JS
111 int width, int height,
112 int sizeFlags = wxSIZE_AUTO);
bfc6fde4 113 virtual void DoSetClientSize(int width, int height);
f9dae779 114
bfc6fde4 115private:
02bcd285 116 virtual bool XmDoCreateTLW(wxWindow* parent,
f58585c0
VZ
117 wxWindowID id,
118 const wxString& title,
119 const wxPoint& pos,
120 const wxSize& size,
121 long style,
122 const wxString& name);
123
798a4529 124
219ee9ba 125
bfc6fde4 126 DECLARE_EVENT_TABLE()
798a4529 127 DECLARE_DYNAMIC_CLASS(wxFrame)
9b6dbb09
JS
128};
129
219ee9ba
VZ
130#endif // _WX_MOTIF_FRAME_H_
131