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_
|
|
|
|
|
2003-08-09 08:38:21 -04:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
2001-07-04 14:07:15 -04:00
|
|
|
#pragma interface "univframe.h"
|
2001-06-26 16:59:19 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxFrame
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2001-10-10 18:33:34 -04:00
|
|
|
class WXDLLEXPORT 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);
|
|
|
|
virtual void PositionToolBar();
|
|
|
|
#endif // wxUSE_TOOLBAR
|
2001-10-06 18:45:51 -04:00
|
|
|
|
2002-02-10 14:08:54 -05:00
|
|
|
virtual int GetMinWidth() const;
|
|
|
|
virtual int GetMinHeight() const;
|
|
|
|
|
2002-12-10 16:41:31 -05:00
|
|
|
// sends wxSizeEvent to itself (used after attaching xxxBar)
|
|
|
|
virtual void SendSizeEvent();
|
|
|
|
|
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
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxFrame)
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_UNIV_FRAME_H_
|