]> git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/toplevel.h
Moved wxWindow::SetSizeHints implementation to wxTopLevelWindow,
[wxWidgets.git] / include / wx / motif / toplevel.h
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
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef __MOTIFTOPLEVELH__
13 #define __MOTIFTOPLEVELH__
14
15 #if defined(__GNUG__) && !defined(__APPLE__)
16 #pragma interface "toplevel.h"
17 #endif
18
19 class wxTopLevelWindowMotif : public wxTopLevelWindowBase
20 {
21 public:
22 wxTopLevelWindowMotif() { Init(); }
23 wxTopLevelWindowMotif( wxWindow* parent, wxWindowID id,
24 const wxString& title,
25 const wxPoint& pos = wxDefaultPosition,
26 const wxSize& size = wxDefaultSize,
27 long style = wxDEFAULT_FRAME_STYLE,
28 const wxString& name = wxFrameNameStr )
29 {
30 Init();
31
32 Create( parent, id, title, pos, size, style, name );
33 }
34
35 bool Create( wxWindow* parent, wxWindowID id,
36 const wxString& title,
37 const wxPoint& pos = wxDefaultPosition,
38 const wxSize& size = wxDefaultSize,
39 long style = wxDEFAULT_FRAME_STYLE,
40 const wxString& name = wxFrameNameStr );
41
42 virtual ~wxTopLevelWindowMotif();
43
44 virtual bool ShowFullScreen( bool show, long style = wxFULLSCREEN_ALL );
45 virtual bool IsFullScreen() const;
46
47 virtual void Maximize(bool maximize = TRUE);
48 virtual void Restore();
49 virtual void Iconize(bool iconize = TRUE);
50 virtual bool IsMaximized() const;
51 virtual bool IsIconized() const;
52
53 virtual void Raise();
54 virtual void Lower();
55
56 virtual wxString GetTitle() const { return m_title; }
57 virtual void SetTitle( const wxString& title ) { m_title = title; }
58
59 virtual void SetSizeHints( int minW, int minH,
60 int maxW = -1, int maxH = -1,
61 int incW = -1, int incH = -1 );
62
63 WXWidget GetShellWidget() const;
64 protected:
65 // common part of all constructors
66 void Init();
67 // common part of wxDialog/wxFrame destructors
68 void PreDestroy();
69
70 private:
71 // both these functions should be pure virtual
72 virtual bool DoCreate( wxWindow* parent, wxWindowID id,
73 const wxString& title,
74 const wxPoint& pos,
75 const wxSize& size,
76 long style,
77 const wxString& name )
78 {
79 return FALSE;
80 }
81
82 virtual void DoDestroy() { }
83
84 wxString m_title;
85 };
86
87 #endif // __MOTIFTOPLEVELH__