]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/frame.h
210aa7b612a54cf92c1873dbcec92f242f0f6903
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/frame.h
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling, Julian Smart
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
15 #pragma interface "frame.h"
18 //-----------------------------------------------------------------------------
20 //-----------------------------------------------------------------------------
22 class wxMDIChildFrame
;
23 class wxMDIClientWindow
;
31 //-----------------------------------------------------------------------------
33 //-----------------------------------------------------------------------------
35 class wxFrame
: public wxFrameBase
40 wxFrame(wxWindow
*parent
,
42 const wxString
& title
,
43 const wxPoint
& pos
= wxDefaultPosition
,
44 const wxSize
& size
= wxDefaultSize
,
45 long style
= wxDEFAULT_FRAME_STYLE
,
46 const wxString
& name
= wxFrameNameStr
)
50 Create(parent
, id
, title
, pos
, size
, style
, name
);
53 bool Create(wxWindow
*parent
,
55 const wxString
& title
,
56 const wxPoint
& pos
= wxDefaultPosition
,
57 const wxSize
& size
= wxDefaultSize
,
58 long style
= wxDEFAULT_FRAME_STYLE
,
59 const wxString
& name
= wxFrameNameStr
);
63 // implement base class pure virtuals
64 virtual void Maximize(bool maximize
= TRUE
);
65 virtual bool IsMaximized() const;
66 virtual void Iconize(bool iconize
= TRUE
);
67 virtual bool IsIconized() const;
68 virtual void SetIcon(const wxIcon
& icon
);
69 virtual void MakeModal(bool modal
= TRUE
);
70 virtual void Restore();
72 virtual void SetMenuBar( wxMenuBar
*menuBar
);
75 virtual wxStatusBar
* CreateStatusBar(int number
= 1,
76 long style
= wxST_SIZEGRIP
,
78 const wxString
& name
= wxStatusLineNameStr
);
79 #endif // wxUSE_STATUSBAR
82 virtual wxToolBar
* CreateToolBar(long style
= wxNO_BORDER
| wxTB_HORIZONTAL
| wxTB_FLAT
,
84 const wxString
& name
= wxToolBarNameStr
);
85 void SetToolBar(wxToolBar
*toolbar
);
86 #endif // wxUSE_TOOLBAR
88 virtual bool Show(bool show
);
90 virtual void SetTitle( const wxString
&title
);
91 virtual wxString
GetTitle() const { return m_title
; }
93 // implementation from now on
94 // --------------------------
96 // move the window to the specified location and resize it: this is called
97 // from both DoSetSize() and DoSetClientSize()
98 virtual void DoMoveWindow(int x
, int y
, int width
, int height
);
101 virtual void GtkOnSize( int x
, int y
, int width
, int height
);
102 virtual void OnInternalIdle();
107 GtkWidget
*m_mainWidget
;
108 bool m_menuBarDetached
;
109 bool m_toolBarDetached
;
110 bool m_insertInClientArea
; /* not from within OnCreateXXX */
113 // common part of all ctors
116 // override wxWindow methods to take into account tool/menu/statusbars
117 virtual void DoSetSize(int x
, int y
,
118 int width
, int height
,
119 int sizeFlags
= wxSIZE_AUTO
);
121 virtual void DoSetClientSize(int width
, int height
);
122 virtual void DoGetClientSize( int *width
, int *height
) const;
125 DECLARE_DYNAMIC_CLASS(wxFrame
)
128 #endif // __GTKFRAMEH__