]> git.saurik.com Git - wxWidgets.git/blob - include/wx/x11/toplevel.h
really disable wxUSE_DISPLAY for wxMGL and wxOS2
[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 // RCS-ID: $Id$
8 // Copyright: (c) 2002 Julian Smart
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_X11_TOPLEVEL_H_
13 #define _WX_X11_TOPLEVEL_H_
14
15 // ----------------------------------------------------------------------------
16 // wxTopLevelWindowX11
17 // ----------------------------------------------------------------------------
18
19 class WXDLLEXPORT wxTopLevelWindowX11 : public wxTopLevelWindowBase
20 {
21 public:
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)
32 {
33 Init();
34
35 (void)Create(parent, id, title, pos, size, style, name);
36 }
37
38 bool Create(wxWindow *parent,
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);
50 virtual bool IsMaximized() const;
51 virtual void Iconize(bool iconize = true);
52 virtual bool IsIconized() const;
53 virtual void SetIcon(const wxIcon& icon) { SetIcons( wxIconBundle( icon ) ); }
54 virtual void SetIcons(const wxIconBundle& icons);
55 virtual void Restore();
56
57 virtual bool Show( bool show = true );
58
59 virtual bool ShowFullScreen( bool show, long style = wxFULLSCREEN_ALL );
60 virtual bool IsFullScreen() const { return m_fsIsShowing; }
61
62 virtual void SetTitle( const wxString& title);
63 virtual wxString GetTitle() const;
64
65 // implementation
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; }
70
71 virtual bool SetShape(const wxRegion& region);
72
73 // For implementation purposes - sometimes decorations make the
74 // client area smaller
75 virtual wxPoint GetClientAreaOrigin() const;
76
77 virtual void OnInternalIdle();
78
79 protected:
80 // common part of all ctors
81 void Init();
82
83 // set the icon for the window
84 void DoSetIcon( const wxIcon& icon );
85
86 // For implementation of delayed resize events
87 bool m_needResizeInIdle;
88
89 virtual void DoGetClientSize( int *width, int *height ) const;
90 virtual void DoGetSize( int *width, int *height ) const;
91 virtual void DoSetClientSize(int width, int height);
92 virtual void DoSetSize(int x, int y,
93 int width, int height,
94 int sizeFlags = wxSIZE_AUTO);
95 virtual void DoGetPosition( int *x, int *y ) const;
96
97 // Is the frame currently iconized?
98 bool m_iconized;
99
100 // Should the frame be maximized when it will be shown? set by Maximize()
101 // when it is called while the frame is hidden
102 bool m_maximizeOnShow;
103
104 // Data to save/restore when calling ShowFullScreen
105 long m_fsStyle; // Passed to ShowFullScreen
106 wxRect m_fsOldSize;
107 bool m_fsIsMaximized;
108 bool m_fsIsShowing;
109 wxString m_title;
110
111 // Geometry
112 int m_x,m_y,m_width,m_height;
113 };
114
115 // list of all frames and modeless dialogs
116 //extern WXDLLEXPORT_DATA(wxWindowList) wxModelessWindows;
117
118 #endif // _WX_X11_TOPLEVEL_H_