]>
Commit | Line | Data |
---|---|---|
0de6dfa7 MB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/motif/toplevel.h | |
3 | // Purpose: wxTopLevelWindow Motif implementation | |
4 | // Author: Mattia Barbon | |
5 | // Modified by: | |
6 | // Created: 12/10/2002 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Mattia Barbon | |
65571936 | 9 | // Licence: wxWindows licence |
0de6dfa7 MB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef __MOTIFTOPLEVELH__ | |
13 | #define __MOTIFTOPLEVELH__ | |
14 | ||
94c7b088 | 15 | class WXDLLIMPEXP_CORE wxTopLevelWindowMotif : public wxTopLevelWindowBase |
0de6dfa7 MB |
16 | { |
17 | public: | |
18 | wxTopLevelWindowMotif() { Init(); } | |
19 | wxTopLevelWindowMotif( wxWindow* parent, wxWindowID id, | |
20 | const wxString& title, | |
21 | const wxPoint& pos = wxDefaultPosition, | |
22 | const wxSize& size = wxDefaultSize, | |
23 | long style = wxDEFAULT_FRAME_STYLE, | |
24 | const wxString& name = wxFrameNameStr ) | |
25 | { | |
26 | Init(); | |
27 | ||
28 | Create( parent, id, title, pos, size, style, name ); | |
29 | } | |
30 | ||
31 | bool Create( wxWindow* parent, wxWindowID id, | |
32 | const wxString& title, | |
33 | const wxPoint& pos = wxDefaultPosition, | |
34 | const wxSize& size = wxDefaultSize, | |
35 | long style = wxDEFAULT_FRAME_STYLE, | |
36 | const wxString& name = wxFrameNameStr ); | |
37 | ||
38 | virtual ~wxTopLevelWindowMotif(); | |
39 | ||
40 | virtual bool ShowFullScreen( bool show, long style = wxFULLSCREEN_ALL ); | |
41 | virtual bool IsFullScreen() const; | |
42 | ||
96be256b | 43 | virtual void Maximize(bool maximize = true); |
0de6dfa7 | 44 | virtual void Restore(); |
96be256b | 45 | virtual void Iconize(bool iconize = true); |
0de6dfa7 MB |
46 | virtual bool IsMaximized() const; |
47 | virtual bool IsIconized() const; | |
48 | ||
49 | virtual void Raise(); | |
50 | virtual void Lower(); | |
51 | ||
52 | virtual wxString GetTitle() const { return m_title; } | |
53 | virtual void SetTitle( const wxString& title ) { m_title = title; } | |
54 | ||
7c9b17c1 | 55 | virtual void DoSetSizeHints( int minW, int minH, |
66f8b9ac MB |
56 | int maxW = -1, int maxH = -1, |
57 | int incW = -1, int incH = -1 ); | |
58 | ||
f7f78039 MB |
59 | virtual bool SetShape( const wxRegion& region ); |
60 | ||
0de6dfa7 MB |
61 | WXWidget GetShellWidget() const; |
62 | protected: | |
63 | // common part of all constructors | |
64 | void Init(); | |
2187eef5 MB |
65 | // common part of wxDialog/wxFrame destructors |
66 | void PreDestroy(); | |
0de6dfa7 | 67 | |
dad6a47e | 68 | virtual void DoGetPosition(int* x, int* y) const; |
f58585c0 | 69 | |
0de6dfa7 | 70 | private: |
e6b915ed VZ |
71 | #if wxCHECK_VERSION(2,7,0) |
72 | // DoDestroy() is not used anywhere else, DoCreate() should also be renamed | |
73 | // in src/motif/dialog.cpp, frame.cpp and toplevel.cp | |
74 | #error "Remove DoDestroy() and rename DoCreate() to XmDoCreateTLW(), they were only kept for binary backwards compatibility" | |
75 | #endif | |
76 | ||
f58585c0 | 77 | // really create the Motif widget for TLW |
e6b915ed | 78 | virtual bool DoCreate(wxWindow* parent, |
f58585c0 VZ |
79 | wxWindowID id, |
80 | const wxString& title, | |
81 | const wxPoint& pos, | |
82 | const wxSize& size, | |
83 | long style, | |
84 | const wxString& name) = 0; | |
0de6dfa7 | 85 | |
e6b915ed | 86 | virtual void DoDestroy() { } |
0de6dfa7 MB |
87 | |
88 | wxString m_title; | |
89 | }; | |
90 | ||
91 | #endif // __MOTIFTOPLEVELH__ |