]> git.saurik.com Git - wxWidgets.git/blob - include/wx/x11/toplevel.h
Remove all lines containing cvs/svn "$Id$" keyword.
[wxWidgets.git] / include / wx / x11 / toplevel.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/x11/toplevel.h
3 // Purpose: wxTopLevelWindowX11 is the X11 implementation of wxTLW
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 20.09.01
7 // Copyright: (c) 2002 Julian Smart
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_X11_TOPLEVEL_H_
12 #define _WX_X11_TOPLEVEL_H_
13
14 // ----------------------------------------------------------------------------
15 // wxTopLevelWindowX11
16 // ----------------------------------------------------------------------------
17
18 class WXDLLIMPEXP_CORE wxTopLevelWindowX11 : public wxTopLevelWindowBase
19 {
20 public:
21 // constructors and such
22 wxTopLevelWindowX11() { Init(); }
23
24 wxTopLevelWindowX11(wxWindow *parent,
25 wxWindowID id,
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)
31 {
32 Init();
33
34 (void)Create(parent, id, title, pos, size, style, name);
35 }
36
37 bool Create(wxWindow *parent,
38 wxWindowID id,
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);
44
45 virtual ~wxTopLevelWindowX11();
46
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();
54
55 virtual bool Show( bool show = true );
56
57 virtual bool ShowFullScreen( bool show, long style = wxFULLSCREEN_ALL );
58 virtual bool IsFullScreen() const { return m_fsIsShowing; }
59
60 virtual void SetTitle( const wxString& title);
61 virtual wxString GetTitle() const;
62
63 // implementation
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; }
68
69 virtual bool SetShape(const wxRegion& region);
70
71 // For implementation purposes - sometimes decorations make the
72 // client area smaller
73 virtual wxPoint GetClientAreaOrigin() const;
74
75 virtual void OnInternalIdle();
76
77 protected:
78 // common part of all ctors
79 void Init();
80
81 // set the icon for the window
82 void DoSetIcon( const wxIcon& icon );
83
84 // For implementation of delayed resize events
85 bool m_needResizeInIdle;
86
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;
94
95 // Is the frame currently iconized?
96 bool m_iconized;
97
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;
101
102 // Data to save/restore when calling ShowFullScreen
103 long m_fsStyle; // Passed to ShowFullScreen
104 wxRect m_fsOldSize;
105 bool m_fsIsMaximized;
106 bool m_fsIsShowing;
107 wxString m_title;
108
109 // Geometry
110 int m_x,m_y,m_width,m_height;
111 };
112
113 // list of all frames and modeless dialogs
114 //extern WXDLLIMPEXP_DATA_CORE(wxWindowList) wxModelessWindows;
115
116 #endif // _WX_X11_TOPLEVEL_H_