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
|
|
|
|
// RCS-ID: $Id$
|
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,
|
2004-01-15 08:49:22 -05:00
|
|
|
const wxString& name = wxFrameNameStr)
|
|
|
|
{
|
|
|
|
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,
|
|
|
|
const wxString& name = wxFrameNameStr);
|
2001-06-26 16:59:19 -04:00
|
|
|
|
|
|
|
virtual wxPoint GetClientAreaOrigin() const;
|
2004-08-10 09:08:43 -04:00
|
|
|
virtual bool Enable(bool enable = true);
|
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,
|
|
|
|
long style = wxST_SIZEGRIP,
|
|
|
|
wxWindowID id = 0,
|
|
|
|
const wxString& name = wxStatusLineNameStr);
|
|
|
|
#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,
|
2001-11-24 18:59:34 -05:00
|
|
|
const wxString& name = wxToolBarNameStr);
|
|
|
|
#endif // wxUSE_TOOLBAR
|
2001-10-06 18:45:51 -04:00
|
|
|
|
2006-10-29 15:39:31 -05:00
|
|
|
virtual wxSize GetMinSize() const;
|
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
|
|
|
|
2001-09-22 07:56:23 -04:00
|
|
|
virtual void DoGetClientSize(int *width, int *height) const;
|
|
|
|
virtual void DoSetClientSize(int width, int height);
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
#if wxUSE_MENUS
|
|
|
|
// override to update menu bar position when the frame size changes
|
|
|
|
virtual void PositionMenuBar();
|
2001-10-06 18:45:51 -04:00
|
|
|
virtual void DetachMenuBar();
|
|
|
|
virtual void AttachMenuBar(wxMenuBar *menubar);
|
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
|
|
|
|
virtual void PositionStatusBar();
|
|
|
|
#endif // wxUSE_MENUS
|
|
|
|
|
2006-02-08 16:47:09 -05:00
|
|
|
protected:
|
|
|
|
#if wxUSE_TOOLBAR
|
|
|
|
virtual void PositionToolBar();
|
|
|
|
#endif // wxUSE_TOOLBAR
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxFrame)
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_UNIV_FRAME_H_
|