2002-02-08 12:00:11 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/x11/toplevel.h
|
|
|
|
// Purpose: wxTopLevelWindowX11 is the X11 implementation of wxTLW
|
2002-02-05 16:34:33 +00:00
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
2002-02-08 12:00:11 +00:00
|
|
|
// Created: 20.09.01
|
2002-02-05 16:34:33 +00:00
|
|
|
// RCS-ID: $Id$
|
2002-02-08 12:00:11 +00:00
|
|
|
// Copyright: (c) 2002 Julian Smart
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
2002-02-08 12:00:11 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2002-02-05 16:34:33 +00:00
|
|
|
|
2002-02-08 12:00:11 +00:00
|
|
|
#ifndef _WX_X11_TOPLEVEL_H_
|
|
|
|
#define _WX_X11_TOPLEVEL_H_
|
2002-02-05 16:34:33 +00:00
|
|
|
|
2002-02-08 12:00:11 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxTopLevelWindowX11
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2008-03-26 15:06:00 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxTopLevelWindowX11 : public wxTopLevelWindowBase
|
2002-02-05 16:34:33 +00:00
|
|
|
{
|
|
|
|
public:
|
2002-02-08 12:00:11 +00: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 16:34:33 +00:00
|
|
|
{
|
|
|
|
Init();
|
2002-02-08 12:00:11 +00:00
|
|
|
|
|
|
|
(void)Create(parent, id, title, pos, size, style, name);
|
2002-02-05 16:34:33 +00:00
|
|
|
}
|
2002-02-08 12:00:11 +00:00
|
|
|
|
2002-02-05 16:34:33 +00:00
|
|
|
bool Create(wxWindow *parent,
|
2002-02-08 12:00:11 +00: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
|
2005-11-10 12:03:39 +00:00
|
|
|
virtual void Maximize(bool maximize = true);
|
2002-02-05 16:34:33 +00:00
|
|
|
virtual bool IsMaximized() const;
|
2005-11-10 12:03:39 +00:00
|
|
|
virtual void Iconize(bool iconize = true);
|
2002-02-08 12:00:11 +00:00
|
|
|
virtual bool IsIconized() const;
|
2002-03-26 21:54:23 +00:00
|
|
|
virtual void SetIcons(const wxIconBundle& icons);
|
2002-02-05 16:34:33 +00:00
|
|
|
virtual void Restore();
|
2002-02-08 12:00:11 +00:00
|
|
|
|
2005-11-10 12:03:39 +00:00
|
|
|
virtual bool Show( bool show = true );
|
2002-02-08 12:00:11 +00:00
|
|
|
|
2002-03-13 18:25:11 +00:00
|
|
|
virtual bool ShowFullScreen( bool show, long style = wxFULLSCREEN_ALL );
|
2002-02-08 12:00:11 +00:00
|
|
|
virtual bool IsFullScreen() const { return m_fsIsShowing; }
|
|
|
|
|
2002-02-10 01:03:45 +00:00
|
|
|
virtual void SetTitle( const wxString& title);
|
|
|
|
virtual wxString GetTitle() const;
|
2005-11-10 12:03:39 +00:00
|
|
|
|
2002-03-13 18:25:11 +00:00
|
|
|
// implementation
|
2005-11-10 12:03:39 +00:00
|
|
|
void SetNeedResizeInIdle( bool set = true )
|
2002-03-28 18:57:50 +00:00
|
|
|
{ m_needResizeInIdle = set; }
|
|
|
|
void SetConfigureGeometry( int x, int y, int width, int height )
|
|
|
|
{ m_x = x; m_y = y; m_width = width; m_height = height; }
|
2003-11-23 08:04:10 +00:00
|
|
|
|
|
|
|
virtual bool SetShape(const wxRegion& region);
|
2005-11-10 12:03:39 +00:00
|
|
|
|
2006-02-08 21:47:09 +00:00
|
|
|
// For implementation purposes - sometimes decorations make the
|
|
|
|
// client area smaller
|
|
|
|
virtual wxPoint GetClientAreaOrigin() const;
|
|
|
|
|
|
|
|
virtual void OnInternalIdle();
|
|
|
|
|
2002-02-05 16:34:33 +00:00
|
|
|
protected:
|
|
|
|
// common part of all ctors
|
|
|
|
void Init();
|
2002-02-08 12:00:11 +00:00
|
|
|
|
2002-03-26 21:54:23 +00:00
|
|
|
// set the icon for the window
|
|
|
|
void DoSetIcon( const wxIcon& icon );
|
|
|
|
|
2002-03-13 18:25:11 +00:00
|
|
|
// For implementation of delayed resize events
|
|
|
|
bool m_needResizeInIdle;
|
|
|
|
|
2002-02-12 12:59:14 +00:00
|
|
|
virtual void DoGetClientSize( int *width, int *height ) const;
|
2002-03-29 15:04:30 +00:00
|
|
|
virtual void DoGetSize( int *width, int *height ) const;
|
2002-02-12 12:59:14 +00:00
|
|
|
virtual void DoSetClientSize(int width, int height);
|
2002-02-14 18:06:50 +00:00
|
|
|
virtual void DoSetSize(int x, int y,
|
|
|
|
int width, int height,
|
|
|
|
int sizeFlags = wxSIZE_AUTO);
|
|
|
|
virtual void DoGetPosition( int *x, int *y ) const;
|
2005-11-10 12:03:39 +00:00
|
|
|
|
2002-02-17 21:09:04 +00:00
|
|
|
// Is the frame currently iconized?
|
2002-02-08 12:00:11 +00:00
|
|
|
bool m_iconized;
|
|
|
|
|
2002-02-17 21:09:04 +00:00
|
|
|
// Should the frame be maximized when it will be shown? set by Maximize()
|
2002-02-08 12:00:11 +00:00
|
|
|
// when it is called while the frame is hidden
|
|
|
|
bool m_maximizeOnShow;
|
|
|
|
|
|
|
|
// Data to save/restore when calling ShowFullScreen
|
2002-02-17 21:09:04 +00:00
|
|
|
long m_fsStyle; // Passed to ShowFullScreen
|
2002-02-08 12:00:11 +00:00
|
|
|
wxRect m_fsOldSize;
|
|
|
|
bool m_fsIsMaximized;
|
|
|
|
bool m_fsIsShowing;
|
2002-02-10 01:03:45 +00:00
|
|
|
wxString m_title;
|
2005-11-10 12:03:39 +00:00
|
|
|
|
2002-03-28 18:57:50 +00:00
|
|
|
// Geometry
|
|
|
|
int m_x,m_y,m_width,m_height;
|
2002-02-05 16:34:33 +00:00
|
|
|
};
|
|
|
|
|
2002-02-11 11:06:50 +00:00
|
|
|
// list of all frames and modeless dialogs
|
2008-03-26 15:06:00 +00:00
|
|
|
//extern WXDLLIMPEXP_DATA_CORE(wxWindowList) wxModelessWindows;
|
2002-02-11 11:06:50 +00:00
|
|
|
|
2002-02-08 12:00:11 +00:00
|
|
|
#endif // _WX_X11_TOPLEVEL_H_
|