]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/frame.h
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 SetMenuBar( wxMenuBar
*menuBar
);
78 virtual void PositionStatusBar();
80 virtual wxStatusBar
* CreateStatusBar(int number
= 1,
81 long style
= wxST_SIZEGRIP
,
83 const wxString
& name
= wxStatusLineNameStr
);
84 #endif // wxUSE_STATUSBAR
87 virtual wxToolBar
* CreateToolBar(long style
= wxNO_BORDER
| wxTB_HORIZONTAL
| wxTB_FLAT
,
89 const wxString
& name
= wxToolBarNameStr
);
90 void SetToolBar(wxToolBar
*toolbar
);
91 #endif // wxUSE_TOOLBAR
93 virtual bool Show(bool show
= TRUE
);
95 virtual void SetTitle( const wxString
&title
);
96 virtual wxString
GetTitle() const { return m_title
; }
98 // implementation from now on
99 // --------------------------
101 // move the window to the specified location and resize it: this is called
102 // from both DoSetSize() and DoSetClientSize()
103 virtual void DoMoveWindow(int x
, int y
, int width
, int height
);
106 virtual void GtkOnSize( int x
, int y
, int width
, int height
);
107 virtual void OnInternalIdle();
109 // do *not* call this to iconize the frame, this is a private function!
110 void SetIconizeState(bool iconic
);
115 GtkWidget
*m_mainWidget
;
116 bool m_menuBarDetached
;
117 bool m_toolBarDetached
;
118 bool m_insertInClientArea
; /* not from within OnCreateXXX */
120 bool m_fsIsShowing
; /* full screen */
123 wxRect m_fsSaveFrame
;
126 // common part of all ctors
129 // override wxWindow methods to take into account tool/menu/statusbars
130 virtual void DoSetSize(int x
, int y
,
131 int width
, int height
,
132 int sizeFlags
= wxSIZE_AUTO
);
134 virtual void DoSetClientSize(int width
, int height
);
135 virtual void DoGetClientSize( int *width
, int *height
) const;
137 // is the frame currently iconized?
141 DECLARE_DYNAMIC_CLASS(wxFrameGTK
)
144 #endif // __GTKFRAMEH__