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