]>
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 |
83df96d6 | 7 | // RCS-ID: $Id$ |
1b0fb34b | 8 | // Copyright: (c) 2002 Julian Smart |
65571936 | 9 | // Licence: wxWindows licence |
1b0fb34b | 10 | /////////////////////////////////////////////////////////////////////////////// |
83df96d6 | 11 | |
1b0fb34b JS |
12 | #ifndef _WX_X11_TOPLEVEL_H_ |
13 | #define _WX_X11_TOPLEVEL_H_ | |
83df96d6 | 14 | |
1b0fb34b JS |
15 | // ---------------------------------------------------------------------------- |
16 | // wxTopLevelWindowX11 | |
17 | // ---------------------------------------------------------------------------- | |
18 | ||
19 | class WXDLLEXPORT wxTopLevelWindowX11 : public wxTopLevelWindowBase | |
83df96d6 JS |
20 | { |
21 | public: | |
1b0fb34b JS |
22 | // constructors and such |
23 | wxTopLevelWindowX11() { Init(); } | |
24 | ||
25 | wxTopLevelWindowX11(wxWindow *parent, | |
26 | wxWindowID id, | |
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) | |
83df96d6 JS |
32 | { |
33 | Init(); | |
1b0fb34b JS |
34 | |
35 | (void)Create(parent, id, title, pos, size, style, name); | |
83df96d6 | 36 | } |
1b0fb34b | 37 | |
83df96d6 | 38 | bool Create(wxWindow *parent, |
1b0fb34b JS |
39 | wxWindowID id, |
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); | |
45 | ||
46 | virtual ~wxTopLevelWindowX11(); | |
47 | ||
48 | // implement base class pure virtuals | |
49 | virtual void Maximize(bool maximize = TRUE); | |
83df96d6 | 50 | virtual bool IsMaximized() const; |
1b0fb34b JS |
51 | virtual void Iconize(bool iconize = TRUE); |
52 | virtual bool IsIconized() const; | |
f618020a MB |
53 | virtual void SetIcon(const wxIcon& icon) { SetIcons( wxIconBundle( icon ) ); } |
54 | virtual void SetIcons(const wxIconBundle& icons); | |
83df96d6 | 55 | virtual void Restore(); |
1b0fb34b | 56 | |
77df2fbc | 57 | virtual bool Show( bool show = TRUE ); |
1b0fb34b | 58 | |
77df2fbc | 59 | virtual bool ShowFullScreen( bool show, long style = wxFULLSCREEN_ALL ); |
1b0fb34b JS |
60 | virtual bool IsFullScreen() const { return m_fsIsShowing; } |
61 | ||
b513212d JS |
62 | virtual void SetTitle( const wxString& title); |
63 | virtual wxString GetTitle() const; | |
64 | ||
77df2fbc | 65 | // implementation |
c2c0dabf RR |
66 | void SetNeedResizeInIdle( bool set = TRUE ) |
67 | { m_needResizeInIdle = set; } | |
68 | void SetConfigureGeometry( int x, int y, int width, int height ) | |
69 | { m_x = x; m_y = y; m_width = width; m_height = height; } | |
ff9ca1fd MB |
70 | |
71 | virtual bool SetShape(const wxRegion& region); | |
7e4501ee | 72 | |
83df96d6 JS |
73 | protected: |
74 | // common part of all ctors | |
75 | void Init(); | |
1b0fb34b | 76 | |
f618020a MB |
77 | // set the icon for the window |
78 | void DoSetIcon( const wxIcon& icon ); | |
79 | ||
77df2fbc RR |
80 | // For implementation purposes - sometimes decorations make the |
81 | // client area smaller | |
e5053ade JS |
82 | virtual wxPoint GetClientAreaOrigin() const; |
83 | ||
77df2fbc RR |
84 | // For implementation of delayed resize events |
85 | bool m_needResizeInIdle; | |
86 | virtual void OnInternalIdle(); | |
87 | ||
e5053ade | 88 | virtual void DoGetClientSize( int *width, int *height ) const; |
e97d2576 | 89 | virtual void DoGetSize( int *width, int *height ) const; |
e5053ade | 90 | virtual void DoSetClientSize(int width, int height); |
3a0b23eb JS |
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; | |
e5053ade | 95 | |
7e4501ee | 96 | // Is the frame currently iconized? |
1b0fb34b JS |
97 | bool m_iconized; |
98 | ||
7e4501ee | 99 | // Should the frame be maximized when it will be shown? set by Maximize() |
1b0fb34b JS |
100 | // when it is called while the frame is hidden |
101 | bool m_maximizeOnShow; | |
102 | ||
103 | // Data to save/restore when calling ShowFullScreen | |
7e4501ee | 104 | long m_fsStyle; // Passed to ShowFullScreen |
1b0fb34b JS |
105 | wxRect m_fsOldSize; |
106 | bool m_fsIsMaximized; | |
107 | bool m_fsIsShowing; | |
b513212d | 108 | wxString m_title; |
c2c0dabf RR |
109 | |
110 | // Geometry | |
111 | int m_x,m_y,m_width,m_height; | |
83df96d6 JS |
112 | }; |
113 | ||
b28d3abf JS |
114 | // list of all frames and modeless dialogs |
115 | //extern WXDLLEXPORT_DATA(wxWindowList) wxModelessWindows; | |
116 | ||
1b0fb34b JS |
117 | #endif // _WX_X11_TOPLEVEL_H_ |
118 |