]>
Commit | Line | Data |
---|---|---|
1b0fb34b JS |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/x11/toplevel.h | |
3 | // Purpose: wxTopLevelWindowX11 is the X11 implementation of wxTLW | |
83df96d6 JS |
4 | // Author: Julian Smart |
5 | // Modified by: | |
1b0fb34b | 6 | // Created: 20.09.01 |
1b0fb34b | 7 | // Copyright: (c) 2002 Julian Smart |
65571936 | 8 | // Licence: wxWindows licence |
1b0fb34b | 9 | /////////////////////////////////////////////////////////////////////////////// |
83df96d6 | 10 | |
1b0fb34b JS |
11 | #ifndef _WX_X11_TOPLEVEL_H_ |
12 | #define _WX_X11_TOPLEVEL_H_ | |
83df96d6 | 13 | |
1b0fb34b JS |
14 | // ---------------------------------------------------------------------------- |
15 | // wxTopLevelWindowX11 | |
16 | // ---------------------------------------------------------------------------- | |
17 | ||
53a2db12 | 18 | class WXDLLIMPEXP_CORE wxTopLevelWindowX11 : public wxTopLevelWindowBase |
83df96d6 JS |
19 | { |
20 | public: | |
1b0fb34b JS |
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) | |
83df96d6 JS |
31 | { |
32 | Init(); | |
1b0fb34b JS |
33 | |
34 | (void)Create(parent, id, title, pos, size, style, name); | |
83df96d6 | 35 | } |
1b0fb34b | 36 | |
83df96d6 | 37 | bool Create(wxWindow *parent, |
1b0fb34b JS |
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 | |
ffd84c94 | 48 | virtual void Maximize(bool maximize = true); |
83df96d6 | 49 | virtual bool IsMaximized() const; |
ffd84c94 | 50 | virtual void Iconize(bool iconize = true); |
1b0fb34b | 51 | virtual bool IsIconized() const; |
f618020a | 52 | virtual void SetIcons(const wxIconBundle& icons); |
83df96d6 | 53 | virtual void Restore(); |
1b0fb34b | 54 | |
ffd84c94 | 55 | virtual bool Show( bool show = true ); |
1b0fb34b | 56 | |
77df2fbc | 57 | virtual bool ShowFullScreen( bool show, long style = wxFULLSCREEN_ALL ); |
1b0fb34b JS |
58 | virtual bool IsFullScreen() const { return m_fsIsShowing; } |
59 | ||
b513212d JS |
60 | virtual void SetTitle( const wxString& title); |
61 | virtual wxString GetTitle() const; | |
ffd84c94 | 62 | |
77df2fbc | 63 | // implementation |
ffd84c94 | 64 | void SetNeedResizeInIdle( bool set = true ) |
c2c0dabf RR |
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; } | |
ff9ca1fd MB |
68 | |
69 | virtual bool SetShape(const wxRegion& region); | |
ffd84c94 | 70 | |
6f02a879 VZ |
71 | // For implementation purposes - sometimes decorations make the |
72 | // client area smaller | |
73 | virtual wxPoint GetClientAreaOrigin() const; | |
74 | ||
75 | virtual void OnInternalIdle(); | |
76 | ||
83df96d6 JS |
77 | protected: |
78 | // common part of all ctors | |
79 | void Init(); | |
1b0fb34b | 80 | |
f618020a MB |
81 | // set the icon for the window |
82 | void DoSetIcon( const wxIcon& icon ); | |
83 | ||
77df2fbc RR |
84 | // For implementation of delayed resize events |
85 | bool m_needResizeInIdle; | |
77df2fbc | 86 | |
e5053ade | 87 | virtual void DoGetClientSize( int *width, int *height ) const; |
e97d2576 | 88 | virtual void DoGetSize( int *width, int *height ) const; |
e5053ade | 89 | virtual void DoSetClientSize(int width, int height); |
3a0b23eb JS |
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; | |
ffd84c94 | 94 | |
7e4501ee | 95 | // Is the frame currently iconized? |
1b0fb34b JS |
96 | bool m_iconized; |
97 | ||
7e4501ee | 98 | // Should the frame be maximized when it will be shown? set by Maximize() |
1b0fb34b JS |
99 | // when it is called while the frame is hidden |
100 | bool m_maximizeOnShow; | |
101 | ||
102 | // Data to save/restore when calling ShowFullScreen | |
7e4501ee | 103 | long m_fsStyle; // Passed to ShowFullScreen |
1b0fb34b JS |
104 | wxRect m_fsOldSize; |
105 | bool m_fsIsMaximized; | |
106 | bool m_fsIsShowing; | |
b513212d | 107 | wxString m_title; |
ffd84c94 | 108 | |
c2c0dabf RR |
109 | // Geometry |
110 | int m_x,m_y,m_width,m_height; | |
83df96d6 JS |
111 | }; |
112 | ||
b28d3abf | 113 | // list of all frames and modeless dialogs |
53a2db12 | 114 | //extern WXDLLIMPEXP_DATA_CORE(wxWindowList) wxModelessWindows; |
b28d3abf | 115 | |
1b0fb34b | 116 | #endif // _WX_X11_TOPLEVEL_H_ |