]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/frame.h
use gdk_fontset_load() instead of gdk_font_load() for better Japanese support (patch...
[wxWidgets.git] / include / wx / gtk / frame.h
CommitLineData
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
ab7ce33c 14#if defined(__GNUG__) && !defined(__APPLE__)
7c0ea335 15 #pragma interface "frame.h"
c801d85f
KB
16#endif
17
c801d85f
KB
18//-----------------------------------------------------------------------------
19// classes
20//-----------------------------------------------------------------------------
21
716b7364 22class wxMDIChildFrame;
cf4219e7
RR
23class wxMDIClientWindow;
24class wxMenu;
25class wxMenuBar;
26class wxToolBar;
27class wxStatusBar;
c801d85f 28
c801d85f 29//-----------------------------------------------------------------------------
0d53fc34 30// wxFrame
c801d85f
KB
31//-----------------------------------------------------------------------------
32
0d53fc34 33class wxFrame : public wxFrameBase
c801d85f 34{
bfc6fde4 35public:
7c0ea335 36 // construction
0d53fc34
VS
37 wxFrame() { Init(); }
38 wxFrame(wxWindow *parent,
1e6feb95
VZ
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
0d53fc34 59 virtual ~wxFrame();
7c0ea335 60
88ac883a 61#if wxUSE_STATUSBAR
8febdd39
RR
62 virtual void PositionStatusBar();
63
7c0ea335
VZ
64 virtual wxStatusBar* CreateStatusBar(int number = 1,
65 long style = wxST_SIZEGRIP,
66 wxWindowID id = 0,
67 const wxString& name = wxStatusLineNameStr);
88ac883a 68#endif // wxUSE_STATUSBAR
bfc6fde4 69
88ac883a 70#if wxUSE_TOOLBAR
7c0ea335
VZ
71 virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT,
72 wxWindowID id = -1,
73 const wxString& name = wxToolBarNameStr);
307f16e8 74 void SetToolBar(wxToolBar *toolbar);
88ac883a 75#endif // wxUSE_TOOLBAR
b9f29261
VS
76
77 wxPoint GetClientAreaOrigin() const { return wxPoint(0, 0); }
bfc6fde4 78
7c0ea335
VZ
79 // implementation from now on
80 // --------------------------
bfc6fde4 81
7c0ea335 82 // GTK callbacks
bfc6fde4 83 virtual void GtkOnSize( int x, int y, int width, int height );
bfc6fde4
VZ
84 virtual void OnInternalIdle();
85
16bcc879 86 bool m_menuBarDetached;
2b5f62a0 87 int m_menuBarHeight;
16bcc879 88 bool m_toolBarDetached;
3d0c4d2e 89
bfc6fde4 90protected:
ddb6bc71
RR
91 // common part of all ctors
92 void Init();
7c0ea335 93
1c4f8f8d 94 // override wxWindow methods to take into account tool/menu/statusbars
bfc6fde4 95 virtual void DoSetClientSize(int width, int height);
f9241296 96 virtual void DoGetClientSize( int *width, int *height ) const;
bfc6fde4 97
6522713c 98#if wxUSE_MENUS_NATIVE
2b5f62a0 99
6522713c
VZ
100 virtual void DetachMenuBar();
101 virtual void AttachMenuBar(wxMenuBar *menubar);
2b5f62a0
VZ
102
103public:
104 // Menu size is dynamic now, call this whenever it might change.
105 void UpdateMenuBarSize();
106
6522713c 107#endif // wxUSE_MENUS_NATIVE
0d53fc34
VS
108
109 DECLARE_DYNAMIC_CLASS(wxFrame)
c801d85f
KB
110};
111
112#endif // __GTKFRAMEH__