2001-06-26 20:59:19 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/univ/frame.h
|
|
|
|
// Purpose: wxFrame class for wxUniversal
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Modified by:
|
|
|
|
// Created: 19.05.01
|
2001-07-02 19:42:27 +00:00
|
|
|
// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
2001-06-26 20:59:19 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_UNIV_FRAME_H_
|
|
|
|
#define _WX_UNIV_FRAME_H_
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxFrame
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2008-03-26 15:06:00 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase
|
2001-06-26 20:59:19 +00:00
|
|
|
{
|
|
|
|
public:
|
2004-01-15 13:49:22 +00:00
|
|
|
wxFrame() {}
|
2001-06-26 20:59:19 +00:00
|
|
|
wxFrame(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_FRAME_STYLE,
|
2004-01-15 13:49:22 +00:00
|
|
|
const wxString& name = wxFrameNameStr)
|
|
|
|
{
|
|
|
|
Create(parent, id, title, pos, size, style, name);
|
|
|
|
}
|
2001-10-10 22:33:34 +00:00
|
|
|
|
2001-09-18 22:33:48 +00:00
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_FRAME_STYLE,
|
|
|
|
const wxString& name = wxFrameNameStr);
|
2001-06-26 20:59:19 +00:00
|
|
|
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual wxPoint GetClientAreaOrigin() const wxOVERRIDE;
|
|
|
|
virtual bool Enable(bool enable = true) wxOVERRIDE;
|
2001-06-26 20:59:19 +00:00
|
|
|
|
2001-10-06 22:45:51 +00:00
|
|
|
#if wxUSE_STATUSBAR
|
|
|
|
virtual wxStatusBar* CreateStatusBar(int number = 1,
|
2009-04-25 12:59:09 +00:00
|
|
|
long style = wxSTB_DEFAULT_STYLE,
|
2001-10-06 22:45:51 +00:00
|
|
|
wxWindowID id = 0,
|
2014-03-30 00:02:23 +00:00
|
|
|
const wxString& name = wxStatusLineNameStr) wxOVERRIDE;
|
2001-10-06 22:45:51 +00:00
|
|
|
#endif // wxUSE_STATUSBAR
|
|
|
|
|
2001-11-24 23:59:34 +00:00
|
|
|
#if wxUSE_TOOLBAR
|
|
|
|
// create main toolbar bycalling OnCreateToolBar()
|
2003-07-10 10:53:00 +00:00
|
|
|
virtual wxToolBar* CreateToolBar(long style = -1,
|
2004-08-10 13:08:43 +00:00
|
|
|
wxWindowID id = wxID_ANY,
|
2014-03-30 00:02:23 +00:00
|
|
|
const wxString& name = wxToolBarNameStr) wxOVERRIDE;
|
2001-11-24 23:59:34 +00:00
|
|
|
#endif // wxUSE_TOOLBAR
|
2001-10-06 22:45:51 +00:00
|
|
|
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual wxSize GetMinSize() const wxOVERRIDE;
|
2002-02-10 19:08:54 +00:00
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
protected:
|
|
|
|
void OnSize(wxSizeEvent& event);
|
2005-02-20 00:12:01 +00:00
|
|
|
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
2001-10-10 22:33:34 +00:00
|
|
|
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual void DoGetClientSize(int *width, int *height) const wxOVERRIDE;
|
|
|
|
virtual void DoSetClientSize(int width, int height) wxOVERRIDE;
|
2001-09-22 11:56:23 +00:00
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
#if wxUSE_MENUS
|
|
|
|
// override to update menu bar position when the frame size changes
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual void PositionMenuBar() wxOVERRIDE;
|
|
|
|
virtual void DetachMenuBar() wxOVERRIDE;
|
|
|
|
virtual void AttachMenuBar(wxMenuBar *menubar) wxOVERRIDE;
|
2001-06-26 20:59:19 +00:00
|
|
|
#endif // wxUSE_MENUS
|
|
|
|
|
2001-09-24 18:01:13 +00:00
|
|
|
#if wxUSE_STATUSBAR
|
|
|
|
// override to update statusbar position when the frame size changes
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual void PositionStatusBar() wxOVERRIDE;
|
2001-09-24 18:01:13 +00:00
|
|
|
#endif // wxUSE_MENUS
|
|
|
|
|
2006-02-08 21:47:09 +00:00
|
|
|
protected:
|
|
|
|
#if wxUSE_TOOLBAR
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual void PositionToolBar() wxOVERRIDE;
|
2006-02-08 21:47:09 +00:00
|
|
|
#endif // wxUSE_TOOLBAR
|
|
|
|
|
2015-04-23 11:49:01 +00:00
|
|
|
wxDECLARE_EVENT_TABLE();
|
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxFrame);
|
2001-06-26 20:59:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_UNIV_FRAME_H_
|