]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: frame.h | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
5 | // Created: 01/02/97 | |
6 | // Id: | |
7 | // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem | |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | ||
12 | #ifndef __GTKFRAMEH__ | |
13 | #define __GTKFRAMEH__ | |
14 | ||
15 | #ifdef __GNUG__ | |
16 | #pragma interface | |
17 | #endif | |
18 | ||
19 | #include "wx/defs.h" | |
20 | #include "wx/object.h" | |
21 | #include "wx/window.h" | |
22 | #include "wx/menu.h" | |
23 | #include "wx/statusbr.h" | |
24 | ||
25 | //----------------------------------------------------------------------------- | |
26 | // classes | |
27 | //----------------------------------------------------------------------------- | |
28 | ||
29 | class wxRadioBox; | |
30 | ||
31 | class wxFrame; | |
32 | ||
33 | //----------------------------------------------------------------------------- | |
34 | // global data | |
35 | //----------------------------------------------------------------------------- | |
36 | ||
37 | extern const char *wxFrameNameStr; | |
38 | ||
39 | //----------------------------------------------------------------------------- | |
40 | // wxFrame | |
41 | //----------------------------------------------------------------------------- | |
42 | ||
43 | class wxFrame: public wxWindow | |
44 | { | |
45 | DECLARE_DYNAMIC_CLASS(wxFrame) | |
46 | ||
47 | public: | |
48 | ||
49 | wxFrame(void); | |
debe6624 JS |
50 | wxFrame( wxWindow *parent, wxWindowID id, const wxString &title, |
51 | const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, | |
52 | long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr ); | |
53 | bool Create( wxWindow *parent, wxWindowID id, const wxString &title, | |
54 | const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, | |
55 | long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr ); | |
c801d85f KB |
56 | ~wxFrame(void); |
57 | bool Destroy(void); | |
58 | void OnCloseWindow( wxCloseEvent& event ); | |
debe6624 JS |
59 | virtual bool Show( bool show ); |
60 | virtual void Enable( bool enable ); | |
c801d85f KB |
61 | virtual void GetClientSize( int *width, int *height ) const; |
62 | void OnSize( wxSizeEvent &event ); | |
63 | void SetMenuBar( wxMenuBar *menuBar ); | |
debe6624 JS |
64 | virtual bool CreateStatusBar( int number = 1 ); |
65 | virtual void SetStatusText( const wxString &text, int number = 0 ); | |
66 | virtual void SetStatusWidths( int n, int *width ); | |
c801d85f KB |
67 | wxStatusBar *GetStatusBar(void); |
68 | wxMenuBar *GetMenuBar(void); | |
69 | void SetTitle( const wxString &title ); | |
70 | wxString GetTitle(void) const; | |
71 | void OnActivate( wxActivateEvent &WXUNUSED(event) ) {}; | |
e2414cbe | 72 | void OnIdle( wxIdleEvent &event ); |
c801d85f | 73 | |
219f895a RR |
74 | //private: |
75 | ||
76 | void GtkOnSize( int x, int y, int width, int height ); | |
e2414cbe RR |
77 | void DoMenuUpdates(void); |
78 | void DoMenuUpdates(wxMenu* menu); | |
c801d85f KB |
79 | |
80 | private: | |
81 | ||
82 | friend wxWindow; | |
83 | ||
84 | GtkWidget *m_mainWindow; | |
85 | wxMenuBar *m_frameMenuBar; | |
86 | wxStatusBar *m_frameStatusBar; | |
87 | bool m_doingOnSize; | |
88 | wxString m_title; | |
89 | ||
90 | ||
91 | DECLARE_EVENT_TABLE() | |
92 | ||
93 | }; | |
94 | ||
95 | #endif // __GTKFRAMEH__ |