]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/frame.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
20 #include "wx/object.h"
21 #include "wx/window.h"
23 #include "wx/statusbr.h"
25 //-----------------------------------------------------------------------------
27 //-----------------------------------------------------------------------------
29 class wxMDIChildFrame
;
33 //-----------------------------------------------------------------------------
35 //-----------------------------------------------------------------------------
37 extern const char *wxFrameNameStr
;
39 //-----------------------------------------------------------------------------
41 //-----------------------------------------------------------------------------
43 class wxFrame
: public wxWindow
48 wxFrame( wxWindow
*parent
, wxWindowID id
, const wxString
&title
,
49 const wxPoint
&pos
= wxDefaultPosition
, const wxSize
&size
= wxDefaultSize
,
50 long style
= wxDEFAULT_FRAME_STYLE
, const wxString
&name
= wxFrameNameStr
);
51 bool Create( wxWindow
*parent
, wxWindowID id
, const wxString
&title
,
52 const wxPoint
&pos
= wxDefaultPosition
, const wxSize
&size
= wxDefaultSize
,
53 long style
= wxDEFAULT_FRAME_STYLE
, const wxString
&name
= wxFrameNameStr
);
59 virtual bool Show( bool show
);
60 virtual void Enable( bool enable
);
63 virtual void GetClientSize( int *width
, int *height
) const;
64 // set minimal size for the frame (@@@ other params not implemented)
65 void SetSizeHints(int minW
, int minH
,
66 int maxW
= -1, int maxH
= -1,
70 virtual bool CreateStatusBar( int number
= 1 );
71 wxStatusBar
*GetStatusBar();
72 virtual void SetStatusText( const wxString
&text
, int number
= 0 );
73 virtual void SetStatusWidths( int n
, int *width
);
76 void SetMenuBar( wxMenuBar
*menuBar
);
77 wxMenuBar
*GetMenuBar();
80 void SetTitle( const wxString
&title
);
81 wxString
GetTitle() const { return m_title
; }
84 void OnActivate( wxActivateEvent
&event
) { } // called from docview.cpp
85 void OnSize( wxSizeEvent
&event
);
86 void OnCloseWindow( wxCloseEvent
& event
);
87 void OnIdle(wxIdleEvent
& event
);
89 virtual void GtkOnSize( int x
, int y
, int width
, int height
);
93 friend wxMDIChildFrame
;
95 // update frame's menus (called from OnIdle)
97 void DoMenuUpdates(wxMenu
* menu
);
99 GtkWidget
*m_mainWindow
;
100 wxMenuBar
*m_frameMenuBar
;
101 wxStatusBar
*m_frameStatusBar
;
105 DECLARE_DYNAMIC_CLASS(wxFrame
)
106 DECLARE_EVENT_TABLE()
109 #endif // __GTKFRAMEH__