]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/frame.h
8d3764474078b79680132c77cf3fe9b033d83434
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
;
29 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
33 class wxFrameGTK
: public wxFrameBase
37 wxFrameGTK() { Init(); }
38 wxFrameGTK(wxWindow
*parent
,
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
)
48 Create(parent
, id
, title
, pos
, size
, style
, name
);
51 bool Create(wxWindow
*parent
,
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
);
59 virtual ~wxFrameGTK();
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();
70 virtual bool ShowFullScreen(bool show
, long style
= wxFULLSCREEN_ALL
);
71 virtual bool IsFullScreen() const { return m_fsIsShowing
; };
74 virtual void PositionStatusBar();
76 virtual wxStatusBar
* CreateStatusBar(int number
= 1,
77 long style
= wxST_SIZEGRIP
,
79 const wxString
& name
= wxStatusLineNameStr
);
80 #endif // wxUSE_STATUSBAR
83 virtual wxToolBar
* CreateToolBar(long style
= wxNO_BORDER
| wxTB_HORIZONTAL
| wxTB_FLAT
,
85 const wxString
& name
= wxToolBarNameStr
);
86 void SetToolBar(wxToolBar
*toolbar
);
87 #endif // wxUSE_TOOLBAR
89 virtual bool Show(bool show
= TRUE
);
91 virtual void SetTitle( const wxString
&title
);
92 virtual wxString
GetTitle() const { return m_title
; }
94 // implementation from now on
95 // --------------------------
97 // move the window to the specified location and resize it: this is called
98 // from both DoSetSize() and DoSetClientSize()
99 virtual void DoMoveWindow(int x
, int y
, int width
, int height
);
102 virtual void GtkOnSize( int x
, int y
, int width
, int height
);
103 virtual void OnInternalIdle();
105 // do *not* call this to iconize the frame, this is a private function!
106 void SetIconizeState(bool iconic
);
111 GtkWidget
*m_mainWidget
;
112 bool m_menuBarDetached
;
113 bool m_toolBarDetached
;
114 bool m_insertInClientArea
; /* not from within OnCreateXXX */
116 bool m_fsIsShowing
; /* full screen */
119 wxRect m_fsSaveFrame
;
122 // common part of all ctors
125 // override wxWindow methods to take into account tool/menu/statusbars
126 virtual void DoSetSize(int x
, int y
,
127 int width
, int height
,
128 int sizeFlags
= wxSIZE_AUTO
);
130 virtual void DoSetClientSize(int width
, int height
);
131 virtual void DoGetClientSize( int *width
, int *height
) const;
133 #if wxUSE_MENUS_NATIVE
134 virtual void DetachMenuBar();
135 virtual void AttachMenuBar(wxMenuBar
*menubar
);
136 #endif // wxUSE_MENUS_NATIVE
138 // is the frame currently iconized?
142 #endif // __GTKFRAMEH__