]>
Commit | Line | Data |
---|---|---|
c801d85f | 1 | ///////////////////////////////////////////////////////////////////////////// |
7c0ea335 | 2 | // Name: wx/gtk/frame.h |
c801d85f KB |
3 | // Purpose: |
4 | // Author: Robert Roebling | |
58614078 RR |
5 | // Id: $Id$ |
6 | // Copyright: (c) 1998 Robert Roebling, Julian Smart | |
ab16f4a3 | 7 | // Licence: wxWindows licence |
c801d85f KB |
8 | ///////////////////////////////////////////////////////////////////////////// |
9 | ||
10 | ||
11 | #ifndef __GTKFRAMEH__ | |
12 | #define __GTKFRAMEH__ | |
13 | ||
14 | #ifdef __GNUG__ | |
7c0ea335 | 15 | #pragma interface "frame.h" |
c801d85f KB |
16 | #endif |
17 | ||
c801d85f KB |
18 | //----------------------------------------------------------------------------- |
19 | // classes | |
20 | //----------------------------------------------------------------------------- | |
21 | ||
716b7364 | 22 | class wxMDIChildFrame; |
cf4219e7 RR |
23 | class wxMDIClientWindow; |
24 | class wxMenu; | |
25 | class wxMenuBar; | |
26 | class wxToolBar; | |
27 | class wxStatusBar; | |
c801d85f | 28 | |
c801d85f | 29 | //----------------------------------------------------------------------------- |
1e6feb95 | 30 | // wxFrameGTK |
c801d85f KB |
31 | //----------------------------------------------------------------------------- |
32 | ||
1e6feb95 | 33 | class wxFrameGTK : public wxFrameBase |
c801d85f | 34 | { |
bfc6fde4 | 35 | public: |
7c0ea335 | 36 | // construction |
1e6feb95 VZ |
37 | wxFrameGTK() { Init(); } |
38 | wxFrameGTK(wxWindow *parent, | |
39 | wxWindowID id, | |
40 | const wxString& title, | |
41 | const wxPoint& pos = wxDefaultPosition, | |
42 | const wxSize& size = wxDefaultSize, | |
43 | long style = wxDEFAULT_FRAME_STYLE, | |
44 | const wxString& name = wxFrameNameStr) | |
7c0ea335 VZ |
45 | { |
46 | Init(); | |
47 | ||
48 | Create(parent, id, title, pos, size, style, name); | |
49 | } | |
50 | ||
51 | bool Create(wxWindow *parent, | |
52 | wxWindowID id, | |
53 | const wxString& title, | |
54 | const wxPoint& pos = wxDefaultPosition, | |
55 | const wxSize& size = wxDefaultSize, | |
56 | long style = wxDEFAULT_FRAME_STYLE, | |
57 | const wxString& name = wxFrameNameStr); | |
58 | ||
1e6feb95 | 59 | virtual ~wxFrameGTK(); |
7c0ea335 VZ |
60 | |
61 | // implement base class pure virtuals | |
62 | virtual void Maximize(bool maximize = TRUE); | |
63 | virtual bool IsMaximized() const; | |
64 | virtual void Iconize(bool iconize = TRUE); | |
65 | virtual bool IsIconized() const; | |
66 | virtual void SetIcon(const wxIcon& icon); | |
67 | virtual void MakeModal(bool modal = TRUE); | |
68 | virtual void Restore(); | |
69 | ||
3d0c4d2e RR |
70 | virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); |
71 | virtual bool IsFullScreen() const { return m_fsIsShowing; }; | |
72 | ||
88ac883a | 73 | #if wxUSE_STATUSBAR |
8febdd39 RR |
74 | virtual void PositionStatusBar(); |
75 | ||
7c0ea335 VZ |
76 | virtual wxStatusBar* CreateStatusBar(int number = 1, |
77 | long style = wxST_SIZEGRIP, | |
78 | wxWindowID id = 0, | |
79 | const wxString& name = wxStatusLineNameStr); | |
88ac883a | 80 | #endif // wxUSE_STATUSBAR |
bfc6fde4 | 81 | |
88ac883a | 82 | #if wxUSE_TOOLBAR |
7c0ea335 VZ |
83 | virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT, |
84 | wxWindowID id = -1, | |
85 | const wxString& name = wxToolBarNameStr); | |
307f16e8 | 86 | void SetToolBar(wxToolBar *toolbar); |
88ac883a | 87 | #endif // wxUSE_TOOLBAR |
bfc6fde4 | 88 | |
a6e2b3a8 | 89 | virtual bool Show(bool show = TRUE); |
bfc6fde4 VZ |
90 | |
91 | virtual void SetTitle( const wxString &title ); | |
92 | virtual wxString GetTitle() const { return m_title; } | |
93 | ||
7c0ea335 VZ |
94 | // implementation from now on |
95 | // -------------------------- | |
bfc6fde4 | 96 | |
23efdd02 | 97 | // move the window to the specified location and resize it: this is called |
3dd9b88a | 98 | // from both DoSetSize() and DoSetClientSize() |
23efdd02 | 99 | virtual void DoMoveWindow(int x, int y, int width, int height); |
3dd9b88a | 100 | |
7c0ea335 | 101 | // GTK callbacks |
bfc6fde4 | 102 | virtual void GtkOnSize( int x, int y, int width, int height ); |
bfc6fde4 VZ |
103 | virtual void OnInternalIdle(); |
104 | ||
3dd9b88a VZ |
105 | // do *not* call this to iconize the frame, this is a private function! |
106 | void SetIconizeState(bool iconic); | |
107 | ||
bfc6fde4 | 108 | wxString m_title; |
7c0ea335 VZ |
109 | int m_miniEdge, |
110 | m_miniTitle; | |
f362b96d | 111 | GtkWidget *m_mainWidget; |
16bcc879 RR |
112 | bool m_menuBarDetached; |
113 | bool m_toolBarDetached; | |
6bc8a1c8 | 114 | bool m_insertInClientArea; /* not from within OnCreateXXX */ |
bfc6fde4 | 115 | |
3d0c4d2e RR |
116 | bool m_fsIsShowing; /* full screen */ |
117 | long m_fsSaveStyle; | |
118 | long m_fsSaveFlag; | |
119 | wxRect m_fsSaveFrame; | |
120 | ||
bfc6fde4 | 121 | protected: |
ddb6bc71 RR |
122 | // common part of all ctors |
123 | void Init(); | |
7c0ea335 | 124 | |
1c4f8f8d | 125 | // override wxWindow methods to take into account tool/menu/statusbars |
bfc6fde4 VZ |
126 | virtual void DoSetSize(int x, int y, |
127 | int width, int height, | |
128 | int sizeFlags = wxSIZE_AUTO); | |
129 | ||
130 | virtual void DoSetClientSize(int width, int height); | |
f9241296 | 131 | virtual void DoGetClientSize( int *width, int *height ) const; |
bfc6fde4 | 132 | |
6522713c VZ |
133 | #if wxUSE_MENUS_NATIVE |
134 | virtual void DetachMenuBar(); | |
135 | virtual void AttachMenuBar(wxMenuBar *menubar); | |
136 | #endif // wxUSE_MENUS_NATIVE | |
137 | ||
3dd9b88a | 138 | // is the frame currently iconized? |
6522713c | 139 | bool m_isIconized; |
c801d85f KB |
140 | }; |
141 | ||
142 | #endif // __GTKFRAMEH__ |