1
///////////////////////////////////////////////////////////////////////////////
2
// Name: wx/x11/toplevel.h
3
// Purpose: wxTopLevelWindowX11 is the X11 implementation of wxTLW
4
// Author: Julian Smart
7
// RCS-ID: $Id: toplevel.h 52834 2008-03-26 15:06:00Z FM $
8
// Copyright: (c) 2002 Julian Smart
9
// Licence: wxWindows licence
10
///////////////////////////////////////////////////////////////////////////////
12
#ifndef _WX_X11_TOPLEVEL_H_
13
#define _WX_X11_TOPLEVEL_H_
15
// ----------------------------------------------------------------------------
16
// wxTopLevelWindowX11
17
// ----------------------------------------------------------------------------
19
class WXDLLIMPEXP_CORE wxTopLevelWindowX11 : public wxTopLevelWindowBase
22
// constructors and such
23
wxTopLevelWindowX11() { Init(); }
25
wxTopLevelWindowX11(wxWindow *parent,
27
const wxString& title,
28
const wxPoint& pos = wxDefaultPosition,
29
const wxSize& size = wxDefaultSize,
30
long style = wxDEFAULT_FRAME_STYLE,
31
const wxString& name = wxFrameNameStr)
35
(void)Create(parent, id, title, pos, size, style, name);
38
bool Create(wxWindow *parent,
40
const wxString& title,
41
const wxPoint& pos = wxDefaultPosition,
42
const wxSize& size = wxDefaultSize,
43
long style = wxDEFAULT_FRAME_STYLE,
44
const wxString& name = wxFrameNameStr);
46
virtual ~wxTopLevelWindowX11();
48
// implement base class pure virtuals
49
virtual void Maximize(bool maximize = true);
50
virtual bool IsMaximized() const;
51
virtual void Iconize(bool iconize = true);
52
virtual bool IsIconized() const;
53
virtual void SetIcons(const wxIconBundle& icons);
54
virtual void Restore();
56
virtual bool Show( bool show = true );
58
virtual bool ShowFullScreen( bool show, long style = wxFULLSCREEN_ALL );
59
virtual bool IsFullScreen() const { return m_fsIsShowing; }
61
virtual void SetTitle( const wxString& title);
62
virtual wxString GetTitle() const;
65
void SetNeedResizeInIdle( bool set = true )
66
{ m_needResizeInIdle = set; }
67
void SetConfigureGeometry( int x, int y, int width, int height )
68
{ m_x = x; m_y = y; m_width = width; m_height = height; }
70
virtual bool SetShape(const wxRegion& region);
72
// For implementation purposes - sometimes decorations make the
73
// client area smaller
74
virtual wxPoint GetClientAreaOrigin() const;
76
virtual void OnInternalIdle();
79
// common part of all ctors
82
// set the icon for the window
83
void DoSetIcon( const wxIcon& icon );
85
// For implementation of delayed resize events
86
bool m_needResizeInIdle;
88
virtual void DoGetClientSize( int *width, int *height ) const;
89
virtual void DoGetSize( int *width, int *height ) const;
90
virtual void DoSetClientSize(int width, int height);
91
virtual void DoSetSize(int x, int y,
92
int width, int height,
93
int sizeFlags = wxSIZE_AUTO);
94
virtual void DoGetPosition( int *x, int *y ) const;
96
// Is the frame currently iconized?
99
// Should the frame be maximized when it will be shown? set by Maximize()
100
// when it is called while the frame is hidden
101
bool m_maximizeOnShow;
103
// Data to save/restore when calling ShowFullScreen
104
long m_fsStyle; // Passed to ShowFullScreen
106
bool m_fsIsMaximized;
111
int m_x,m_y,m_width,m_height;
114
// list of all frames and modeless dialogs
115
//extern WXDLLIMPEXP_DATA_CORE(wxWindowList) wxModelessWindows;
117
#endif // _WX_X11_TOPLEVEL_H_