]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/frame.h
made the log dialog resizeable (again?)
[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
af0bb3b1 9// Licence: wxWindows licence
9b6dbb09
JS
10/////////////////////////////////////////////////////////////////////////////
11
1c4f8f8d
VZ
12#ifndef _WX_MOTIF_FRAME_H_
13#define _WX_MOTIF_FRAME_H_
9b6dbb09
JS
14
15#ifdef __GNUG__
1c4f8f8d 16 #pragma interface "frame.h"
9b6dbb09
JS
17#endif
18
1c4f8f8d 19class WXDLLEXPORT wxFrame : public wxFrameBase
bfc6fde4 20{
9b6dbb09 21public:
1c4f8f8d 22 wxFrame() { Init(); }
bfc6fde4
VZ
23 wxFrame(wxWindow *parent,
24 wxWindowID id,
25 const wxString& title,
26 const wxPoint& pos = wxDefaultPosition,
27 const wxSize& size = wxDefaultSize,
28 long style = wxDEFAULT_FRAME_STYLE,
29 const wxString& name = wxFrameNameStr)
30 {
1c4f8f8d
VZ
31 Init();
32
bfc6fde4
VZ
33 Create(parent, id, title, pos, size, style, name);
34 }
35
bfc6fde4 36 bool Create(wxWindow *parent,
1c4f8f8d
VZ
37 wxWindowID id,
38 const wxString& title,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
41 long style = wxDEFAULT_FRAME_STYLE,
42 const wxString& name = wxFrameNameStr);
bfc6fde4 43
1c4f8f8d 44 virtual ~wxFrame();
bfc6fde4 45
a6e2b3a8 46 virtual bool Show(bool show = TRUE);
bfc6fde4
VZ
47
48 // Set menu bar
49 void SetMenuBar(wxMenuBar *menu_bar);
bfc6fde4
VZ
50
51 // Set title
52 void SetTitle(const wxString& title);
53 wxString GetTitle() const { return m_title; }
54
bfc6fde4
VZ
55 // Set icon
56 virtual void SetIcon(const wxIcon& icon);
57
1c4f8f8d 58#if wxUSE_STATUSBAR
bfc6fde4 59 virtual void PositionStatusBar();
1c4f8f8d 60#endif // wxUSE_STATUSBAR
bfc6fde4
VZ
61
62 // Create toolbar
1ccbb61a 63#if wxUSE_TOOLBAR
bfc6fde4 64 virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1, const wxString& name = wxToolBarNameStr);
bfc6fde4 65 virtual void PositionToolBar();
1ccbb61a 66#endif // wxUSE_TOOLBAR
9b6dbb09 67
bfc6fde4
VZ
68 // Iconize
69 virtual void Iconize(bool iconize);
9b6dbb09 70
1c4f8f8d 71 virtual bool IsIconized() const;
9b6dbb09 72
bfc6fde4
VZ
73 // Is the frame maximized? Returns FALSE under Motif (but TRUE for
74 // wxMDIChildFrame due to the tabbed implementation).
1c4f8f8d 75 virtual bool IsMaximized() const;
6f63ec3f 76
bfc6fde4 77 virtual void Maximize(bool maximize);
9b6dbb09 78
bfc6fde4
VZ
79 virtual void Raise();
80 virtual void Lower();
9b6dbb09 81
1c4f8f8d
VZ
82 virtual void Restore();
83
84 // Implementation only from now on
85 // -------------------------------
86
87 void OnSysColourChanged(wxSysColourChangedEvent& event);
88 void OnActivate(wxActivateEvent& event);
9b6dbb09 89
bfc6fde4
VZ
90 virtual void ChangeFont(bool keepOriginalSize = TRUE);
91 virtual void ChangeBackgroundColour();
92 virtual void ChangeForegroundColour();
1c4f8f8d 93 WXWidget GetMenuBarWidget() const;
bfc6fde4
VZ
94 WXWidget GetShellWidget() const { return m_frameShell; }
95 WXWidget GetWorkAreaWidget() const { return m_workArea; }
96 WXWidget GetClientAreaWidget() const { return m_clientArea; }
97 WXWidget GetTopWidget() const { return m_frameShell; }
1c4f8f8d
VZ
98
99 virtual WXWidget GetMainWidget() const { return m_frameWidget; }
50414e24 100
bfc6fde4
VZ
101 // The widget that can have children on it
102 WXWidget GetClientWidget() const;
103 bool GetVisibleStatus() const { return m_visibleStatus; }
9b6dbb09 104
bfc6fde4 105 bool PreResize();
9b6dbb09 106
449f38b5 107protected:
1c4f8f8d
VZ
108 // common part of all ctors
109 void Init();
9b6dbb09 110
bfc6fde4 111 //// Motif-specific
bfc6fde4
VZ
112 WXWidget m_frameShell;
113 WXWidget m_frameWidget;
114 WXWidget m_workArea;
115 WXWidget m_clientArea;
bfc6fde4 116 wxString m_title;
1c4f8f8d
VZ
117 bool m_visibleStatus;
118 bool m_iconized;
bfc6fde4 119
1c4f8f8d
VZ
120 virtual void DoGetClientSize(int *width, int *height) const;
121 virtual void DoGetSize(int *width, int *height) const;
122 virtual void DoGetPosition(int *x, int *y) const;
bfc6fde4
VZ
123 virtual void DoSetSize(int x, int y,
124 int width, int height,
125 int sizeFlags = wxSIZE_AUTO);
bfc6fde4 126 virtual void DoSetClientSize(int width, int height);
9b6dbb09 127
bfc6fde4
VZ
128private:
129 DECLARE_EVENT_TABLE()
1c4f8f8d 130 DECLARE_DYNAMIC_CLASS(wxFrame)
9b6dbb09
JS
131};
132
133#endif
1c4f8f8d 134 // _WX_MOTIF_FRAME_H_