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