1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxFrame class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/toolbar.h"
19 class WXDLLIMPEXP_FWD_CORE wxMacToolTip
;
21 class WXDLLIMPEXP_CORE wxFrame
: public wxFrameBase
26 wxFrame(wxWindow
*parent
,
28 const wxString
& title
,
29 const wxPoint
& pos
= wxDefaultPosition
,
30 const wxSize
& size
= wxDefaultSize
,
31 long style
= wxDEFAULT_FRAME_STYLE
,
32 const wxString
& name
= wxFrameNameStr
)
36 Create(parent
, id
, title
, pos
, size
, style
, name
);
39 bool Create(wxWindow
*parent
,
41 const wxString
& title
,
42 const wxPoint
& pos
= wxDefaultPosition
,
43 const wxSize
& size
= wxDefaultSize
,
44 long style
= wxDEFAULT_FRAME_STYLE
,
45 const wxString
& name
= wxFrameNameStr
);
49 // implementation only from now on
50 // -------------------------------
52 // get the origin of the client area (which may be different from (0, 0)
53 // if the frame has a toolbar) in client coordinates
54 virtual wxPoint
GetClientAreaOrigin() const;
56 // override some more virtuals
57 virtual bool Enable(bool enable
= true) ;
60 void OnActivate(wxActivateEvent
& event
);
61 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
62 void OnSize(wxSizeEvent
& event
);
66 virtual wxToolBar
* CreateToolBar(long style
= -1,
68 const wxString
& name
= wxToolBarNameStr
);
70 virtual void SetToolBar(wxToolBar
*toolbar
);
71 #endif // wxUSE_TOOLBAR
75 virtual wxStatusBar
* OnCreateStatusBar(int number
= 1,
76 long style
= wxSTB_DEFAULT_STYLE
,
78 const wxString
& name
= wxStatusLineNameStr
);
79 #endif // wxUSE_STATUSBAR
81 // called by wxWindow whenever it gets focus
82 void SetLastFocus(wxWindow
*win
) { m_winLastFocused
= win
; }
83 wxWindow
*GetLastFocus() const { return m_winLastFocused
; }
89 // common part of all ctors
93 virtual void PositionToolBar();
96 virtual void PositionStatusBar();
99 // override base class virtuals
100 virtual void DoGetClientSize(int *width
, int *height
) const;
101 virtual void DoSetClientSize(int width
, int height
);
104 virtual void DetachMenuBar();
105 virtual void AttachMenuBar(wxMenuBar
*menubar
);
108 // the last focused child: we restore focus to it on activation
109 wxWindow
*m_winLastFocused
;
111 virtual bool MacIsChildOfClientArea( const wxWindow
* child
) const ;
113 DECLARE_EVENT_TABLE()
114 DECLARE_DYNAMIC_CLASS(wxFrame
)