]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/frame.h
document column reordering in wxListCtrl; fix confusion between GetColumnOrder()...
[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
53a2db12 15class WXDLLIMPEXP_CORE 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 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
MB
89
90 // for generic/mdig.h
f9dae779 91 virtual void DoGetClientSize(int *width, int *height) const;
0dba08dd 92
798a4529 93private:
1c4f8f8d
VZ
94 // common part of all ctors
95 void Init();
f618020a
MB
96
97 // set a single icon for the frame
98 void DoSetIcon( const wxIcon& icon );
99
bfc6fde4 100 //// Motif-specific
bfc6fde4 101 WXWidget m_frameShell;
bfc6fde4
VZ
102 WXWidget m_workArea;
103 WXWidget m_clientArea;
1c4f8f8d
VZ
104 bool m_visibleStatus;
105 bool m_iconized;
f9dae779 106
1c4f8f8d 107 virtual void DoGetSize(int *width, int *height) const;
bfc6fde4 108 virtual void DoSetSize(int x, int y,
83df96d6
JS
109 int width, int height,
110 int sizeFlags = wxSIZE_AUTO);
bfc6fde4 111 virtual void DoSetClientSize(int width, int height);
f9dae779 112
bfc6fde4 113private:
02bcd285 114 virtual bool XmDoCreateTLW(wxWindow* parent,
f58585c0
VZ
115 wxWindowID id,
116 const wxString& title,
117 const wxPoint& pos,
118 const wxSize& size,
119 long style,
120 const wxString& name);
121
798a4529 122
219ee9ba 123
bfc6fde4 124 DECLARE_EVENT_TABLE()
798a4529 125 DECLARE_DYNAMIC_CLASS(wxFrame)
9b6dbb09
JS
126};
127
219ee9ba
VZ
128#endif // _WX_MOTIF_FRAME_H_
129