2002-02-08 07:00:11 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/x11/toplevel.h
|
|
|
|
// Purpose: wxTopLevelWindowX11 is the X11 implementation of wxTLW
|
2002-02-05 11:34:33 -05:00
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
2002-02-08 07:00:11 -05:00
|
|
|
// Created: 20.09.01
|
2002-02-05 11:34:33 -05:00
|
|
|
// RCS-ID: $Id$
|
2002-02-08 07:00:11 -05:00
|
|
|
// Copyright: (c) 2002 Julian Smart
|
2002-02-05 11:34:33 -05:00
|
|
|
// Licence: wxWindows licence
|
2002-02-08 07:00:11 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2002-02-05 11:34:33 -05:00
|
|
|
|
2002-02-08 07:00:11 -05:00
|
|
|
#ifndef _WX_X11_TOPLEVEL_H_
|
|
|
|
#define _WX_X11_TOPLEVEL_H_
|
2002-02-05 11:34:33 -05:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
2002-02-08 07:00:11 -05:00
|
|
|
#pragma interface "toplevel.h"
|
2002-02-05 11:34:33 -05:00
|
|
|
#endif
|
|
|
|
|
2002-02-08 07:00:11 -05:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxTopLevelWindowX11
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxTopLevelWindowX11 : public wxTopLevelWindowBase
|
2002-02-05 11:34:33 -05:00
|
|
|
{
|
|
|
|
public:
|
2002-02-08 07:00:11 -05:00
|
|
|
// constructors and such
|
|
|
|
wxTopLevelWindowX11() { Init(); }
|
|
|
|
|
|
|
|
wxTopLevelWindowX11(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_FRAME_STYLE,
|
|
|
|
const wxString& name = wxFrameNameStr)
|
2002-02-05 11:34:33 -05:00
|
|
|
{
|
|
|
|
Init();
|
2002-02-08 07:00:11 -05:00
|
|
|
|
|
|
|
(void)Create(parent, id, title, pos, size, style, name);
|
2002-02-05 11:34:33 -05:00
|
|
|
}
|
2002-02-08 07:00:11 -05:00
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
bool Create(wxWindow *parent,
|
2002-02-08 07:00:11 -05:00
|
|
|
wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_FRAME_STYLE,
|
|
|
|
const wxString& name = wxFrameNameStr);
|
|
|
|
|
|
|
|
virtual ~wxTopLevelWindowX11();
|
|
|
|
|
|
|
|
// implement base class pure virtuals
|
|
|
|
virtual void Maximize(bool maximize = TRUE);
|
2002-02-05 11:34:33 -05:00
|
|
|
virtual bool IsMaximized() const;
|
2002-02-08 07:00:11 -05:00
|
|
|
virtual void Iconize(bool iconize = TRUE);
|
|
|
|
virtual bool IsIconized() const;
|
|
|
|
virtual void SetIcon(const wxIcon& icon);
|
2002-02-05 11:34:33 -05:00
|
|
|
virtual void Restore();
|
2002-02-08 07:00:11 -05:00
|
|
|
|
|
|
|
virtual bool Show(bool show = TRUE);
|
|
|
|
|
|
|
|
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
|
|
|
virtual bool IsFullScreen() const { return m_fsIsShowing; }
|
|
|
|
|
2002-02-09 20:03:45 -05:00
|
|
|
virtual void SetTitle( const wxString& title);
|
|
|
|
virtual wxString GetTitle() const;
|
|
|
|
|
2002-02-08 07:00:11 -05:00
|
|
|
// implementation from now on
|
|
|
|
// --------------------------
|
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
protected:
|
|
|
|
// common part of all ctors
|
|
|
|
void Init();
|
2002-02-08 07:00:11 -05:00
|
|
|
|
|
|
|
// create a new frame, return FALSE if it couldn't be created
|
|
|
|
bool CreateFrame(const wxString& title,
|
|
|
|
const wxPoint& pos,
|
|
|
|
const wxSize& size);
|
|
|
|
|
|
|
|
// create a new dialog using the given dialog template from resources,
|
|
|
|
// return FALSE if it couldn't be created
|
|
|
|
bool CreateDialog(const wxString& title,
|
|
|
|
const wxPoint& pos,
|
|
|
|
const wxSize& size);
|
|
|
|
|
|
|
|
// is the frame currently iconized?
|
|
|
|
bool m_iconized;
|
|
|
|
|
|
|
|
// should the frame be maximized when it will be shown? set by Maximize()
|
|
|
|
// when it is called while the frame is hidden
|
|
|
|
bool m_maximizeOnShow;
|
|
|
|
|
|
|
|
// Data to save/restore when calling ShowFullScreen
|
|
|
|
long m_fsStyle; // Passed to ShowFullScreen
|
|
|
|
wxRect m_fsOldSize;
|
|
|
|
bool m_fsIsMaximized;
|
|
|
|
bool m_fsIsShowing;
|
2002-02-09 20:03:45 -05:00
|
|
|
wxString m_title;
|
2002-02-05 11:34:33 -05:00
|
|
|
};
|
|
|
|
|
2002-02-08 07:00:11 -05:00
|
|
|
#endif // _WX_X11_TOPLEVEL_H_
|
|
|
|
|