2001-09-15 22:13:08 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/mgl/toplevel.h
|
|
|
|
// Purpose: Top level window, abstraction of wxFrame and wxDialog
|
|
|
|
// Author: Vaclav Slavik
|
|
|
|
// Id: $Id$
|
2002-02-14 20:30:34 +00:00
|
|
|
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
2001-09-15 22:13:08 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __WX_TOPLEVEL_H__
|
|
|
|
#define __WX_TOPLEVEL_H__
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxTopLevelWindowMGL
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class wxTopLevelWindowMGL : public wxTopLevelWindowBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// construction
|
|
|
|
wxTopLevelWindowMGL() { Init(); }
|
|
|
|
wxTopLevelWindowMGL(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_FRAME_STYLE,
|
|
|
|
const wxString& name = wxFrameNameStr)
|
|
|
|
{
|
|
|
|
Init();
|
|
|
|
|
|
|
|
Create(parent, id, title, pos, size, style, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
virtual ~wxTopLevelWindowMGL();
|
|
|
|
|
|
|
|
// implement base class pure virtuals
|
2005-11-04 18:49:49 +00:00
|
|
|
virtual void Maximize(bool maximize = true);
|
2001-09-15 22:13:08 +00:00
|
|
|
virtual bool IsMaximized() const;
|
2005-11-04 18:49:49 +00:00
|
|
|
virtual void Iconize(bool iconize = true);
|
2001-09-15 22:13:08 +00:00
|
|
|
virtual bool IsIconized() const;
|
|
|
|
virtual void Restore();
|
|
|
|
|
|
|
|
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
|
|
|
virtual bool IsFullScreen() const { return m_fsIsShowing; }
|
|
|
|
|
2005-11-04 18:49:49 +00:00
|
|
|
virtual bool Show(bool show = true);
|
2001-10-07 14:33:30 +00:00
|
|
|
|
2001-09-15 22:13:08 +00:00
|
|
|
virtual void SetTitle(const wxString &title) { m_title = title; }
|
|
|
|
virtual wxString GetTitle() const { return m_title; }
|
|
|
|
|
|
|
|
// implementation from now on
|
|
|
|
// --------------------------
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// common part of all ctors
|
|
|
|
void Init();
|
|
|
|
|
|
|
|
wxString m_title;
|
2001-10-28 23:25:35 +00:00
|
|
|
bool m_fsIsShowing:1; /* full screen */
|
2001-09-15 22:13:08 +00:00
|
|
|
long m_fsSaveStyle;
|
|
|
|
long m_fsSaveFlag;
|
|
|
|
wxRect m_fsSaveFrame;
|
|
|
|
|
|
|
|
// is the frame currently iconized?
|
2001-10-28 23:25:35 +00:00
|
|
|
bool m_isIconized:1;
|
2001-09-15 22:13:08 +00:00
|
|
|
// and maximized?
|
2001-10-28 23:25:35 +00:00
|
|
|
bool m_isMaximized:1;
|
2001-09-15 22:13:08 +00:00
|
|
|
wxRect m_savedFrame;
|
2001-10-28 23:25:35 +00:00
|
|
|
|
|
|
|
// did we sent wxSizeEvent at least once?
|
|
|
|
bool m_sizeSet:1;
|
2001-09-15 22:13:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __WX_TOPLEVEL_H__
|