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
|
2004-05-23 16:53:33 -04: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
|
|
|
|
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
|
2005-11-10 07:03:39 -05:00
|
|
|
virtual void Maximize(bool maximize = true);
|
2002-02-05 11:34:33 -05:00
|
|
|
virtual bool IsMaximized() const;
|
2005-11-10 07:03:39 -05:00
|
|
|
virtual void Iconize(bool iconize = true);
|
2002-02-08 07:00:11 -05:00
|
|
|
virtual bool IsIconized() const;
|
2002-03-26 16:54:23 -05:00
|
|
|
virtual void SetIcons(const wxIconBundle& icons);
|
2002-02-05 11:34:33 -05:00
|
|
|
virtual void Restore();
|
2002-02-08 07:00:11 -05:00
|
|
|
|
2005-11-10 07:03:39 -05:00
|
|
|
virtual bool Show( bool show = true );
|
2002-02-08 07:00:11 -05:00
|
|
|
|
2002-03-13 13:25:11 -05:00
|
|
|
virtual bool ShowFullScreen( bool show, long style = wxFULLSCREEN_ALL );
|
2002-02-08 07:00:11 -05:00
|
|
|
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;
|
2005-11-10 07:03:39 -05:00
|
|
|
|
2002-03-13 13:25:11 -05:00
|
|
|
// implementation
|
2005-11-10 07:03:39 -05:00
|
|
|
void SetNeedResizeInIdle( bool set = true )
|
2002-03-28 13:57:50 -05: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 03:04:10 -05:00
|
|
|
|
|
|
|
virtual bool SetShape(const wxRegion& region);
|
2005-11-10 07:03:39 -05:00
|
|
|
|
2006-02-08 16:47:09 -05:00
|
|
|
// For implementation purposes - sometimes decorations make the
|
|
|
|
// client area smaller
|
|
|
|
virtual wxPoint GetClientAreaOrigin() const;
|
|
|
|
|
|
|
|
virtual void OnInternalIdle();
|
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
protected:
|
|
|
|
// common part of all ctors
|
|
|
|
void Init();
|
2002-02-08 07:00:11 -05:00
|
|
|
|
2002-03-26 16:54:23 -05:00
|
|
|
// set the icon for the window
|
|
|
|
void DoSetIcon( const wxIcon& icon );
|
|
|
|
|
2002-03-13 13:25:11 -05:00
|
|
|
// For implementation of delayed resize events
|
|
|
|
bool m_needResizeInIdle;
|
|
|
|
|
2002-02-12 07:59:14 -05:00
|
|
|
virtual void DoGetClientSize( int *width, int *height ) const;
|
2002-03-29 10:04:30 -05:00
|
|
|
virtual void DoGetSize( int *width, int *height ) const;
|
2002-02-12 07:59:14 -05:00
|
|
|
virtual void DoSetClientSize(int width, int height);
|
2002-02-14 13:06:50 -05: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 07:03:39 -05:00
|
|
|
|
2002-02-17 16:09:04 -05:00
|
|
|
// Is the frame currently iconized?
|
2002-02-08 07:00:11 -05:00
|
|
|
bool m_iconized;
|
|
|
|
|
2002-02-17 16:09:04 -05:00
|
|
|
// Should the frame be maximized when it will be shown? set by Maximize()
|
2002-02-08 07:00:11 -05:00
|
|
|
// when it is called while the frame is hidden
|
|
|
|
bool m_maximizeOnShow;
|
|
|
|
|
|
|
|
// Data to save/restore when calling ShowFullScreen
|
2002-02-17 16:09:04 -05:00
|
|
|
long m_fsStyle; // Passed to ShowFullScreen
|
2002-02-08 07:00:11 -05:00
|
|
|
wxRect m_fsOldSize;
|
|
|
|
bool m_fsIsMaximized;
|
|
|
|
bool m_fsIsShowing;
|
2002-02-09 20:03:45 -05:00
|
|
|
wxString m_title;
|
2005-11-10 07:03:39 -05:00
|
|
|
|
2002-03-28 13:57:50 -05:00
|
|
|
// Geometry
|
|
|
|
int m_x,m_y,m_width,m_height;
|
2002-02-05 11:34:33 -05:00
|
|
|
};
|
|
|
|
|
2002-02-11 06:06:50 -05:00
|
|
|
// list of all frames and modeless dialogs
|
|
|
|
//extern WXDLLEXPORT_DATA(wxWindowList) wxModelessWindows;
|
|
|
|
|
2002-02-08 07:00:11 -05:00
|
|
|
#endif // _WX_X11_TOPLEVEL_H_
|