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)
|
2001-06-26 16:59:19 -04:00
|
|
|
// Licence: wxWindows licence
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_UNIV_FRAME_H_
|
|
|
|
#define _WX_UNIV_FRAME_H_
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
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:
|
2001-09-18 18:33:48 -04: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,
|
2001-09-18 18:33:48 -04: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;
|
2001-09-18 18:33:48 -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()
|
|
|
|
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL,
|
|
|
|
wxWindowID id = -1,
|
|
|
|
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;
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
protected:
|
|
|
|
void OnSize(wxSizeEvent& event);
|
2001-10-10 18:33:34 -04:00
|
|
|
|
2001-10-06 18:45:51 -04:00
|
|
|
// sends wxSizeEvent to itself (used after attaching xxxBar)
|
|
|
|
void SendSizeEvent();
|
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_
|