1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/x11/toplevel.h
3 // Purpose: wxTopLevelWindowX11 is the X11 implementation of wxTLW
4 // Author: Julian Smart
7 // Copyright: (c) 2002 Julian Smart
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_X11_TOPLEVEL_H_
12 #define _WX_X11_TOPLEVEL_H_
14 // ----------------------------------------------------------------------------
15 // wxTopLevelWindowX11
16 // ----------------------------------------------------------------------------
18 class WXDLLIMPEXP_CORE wxTopLevelWindowX11
: public wxTopLevelWindowBase
21 // constructors and such
22 wxTopLevelWindowX11() { Init(); }
24 wxTopLevelWindowX11(wxWindow
*parent
,
26 const wxString
& title
,
27 const wxPoint
& pos
= wxDefaultPosition
,
28 const wxSize
& size
= wxDefaultSize
,
29 long style
= wxDEFAULT_FRAME_STYLE
,
30 const wxString
& name
= wxFrameNameStr
)
34 (void)Create(parent
, id
, title
, pos
, size
, style
, name
);
37 bool Create(wxWindow
*parent
,
39 const wxString
& title
,
40 const wxPoint
& pos
= wxDefaultPosition
,
41 const wxSize
& size
= wxDefaultSize
,
42 long style
= wxDEFAULT_FRAME_STYLE
,
43 const wxString
& name
= wxFrameNameStr
);
45 virtual ~wxTopLevelWindowX11();
47 // implement base class pure virtuals
48 virtual void Maximize(bool maximize
= true);
49 virtual bool IsMaximized() const;
50 virtual void Iconize(bool iconize
= true);
51 virtual bool IsIconized() const;
52 virtual void SetIcons(const wxIconBundle
& icons
);
53 virtual void Restore();
55 virtual bool Show( bool show
= true );
57 virtual bool ShowFullScreen( bool show
, long style
= wxFULLSCREEN_ALL
);
58 virtual bool IsFullScreen() const { return m_fsIsShowing
; }
60 virtual void SetTitle( const wxString
& title
);
61 virtual wxString
GetTitle() const;
64 void SetNeedResizeInIdle( bool set
= true )
65 { m_needResizeInIdle
= set
; }
66 void SetConfigureGeometry( int x
, int y
, int width
, int height
)
67 { m_x
= x
; m_y
= y
; m_width
= width
; m_height
= height
; }
69 virtual bool SetShape(const wxRegion
& region
);
71 // For implementation purposes - sometimes decorations make the
72 // client area smaller
73 virtual wxPoint
GetClientAreaOrigin() const;
75 virtual void OnInternalIdle();
78 // common part of all ctors
81 // set the icon for the window
82 void DoSetIcon( const wxIcon
& icon
);
84 // For implementation of delayed resize events
85 bool m_needResizeInIdle
;
87 virtual void DoGetClientSize( int *width
, int *height
) const;
88 virtual void DoGetSize( int *width
, int *height
) const;
89 virtual void DoSetClientSize(int width
, int height
);
90 virtual void DoSetSize(int x
, int y
,
91 int width
, int height
,
92 int sizeFlags
= wxSIZE_AUTO
);
93 virtual void DoGetPosition( int *x
, int *y
) const;
95 // Is the frame currently iconized?
98 // Should the frame be maximized when it will be shown? set by Maximize()
99 // when it is called while the frame is hidden
100 bool m_maximizeOnShow
;
102 // Data to save/restore when calling ShowFullScreen
103 long m_fsStyle
; // Passed to ShowFullScreen
105 bool m_fsIsMaximized
;
110 int m_x
,m_y
,m_width
,m_height
;
113 // list of all frames and modeless dialogs
114 //extern WXDLLIMPEXP_DATA_CORE(wxWindowList) wxModelessWindows;
116 #endif // _WX_X11_TOPLEVEL_H_