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