]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/toplevel.h
reSWIGged
[wxWidgets.git] / include / wx / mac / carbon / toplevel.h
CommitLineData
8cf73271
SC
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/mac/toplevel.h
3// Purpose: wxTopLevelWindowMac is the Mac implementation of wxTLW
4// Author: Stefan Csomor
5// Modified by:
6// Created: 20.09.01
7// RCS-ID: $Id$
8// Copyright: (c) 2001 Stefan Csomor
9// Licence: wxWindows licence
10///////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_MSW_TOPLEVEL_H_
13#define _WX_MSW_TOPLEVEL_H_
14
15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "toplevel.h"
17#endif
18
19#if wxUSE_SYSTEM_OPTIONS
20 #define wxMAC_WINDOW_PLAIN_TRANSITION _T("mac.window-plain-transition")
21#endif
22
23// ----------------------------------------------------------------------------
24// wxTopLevelWindowMac
25// ----------------------------------------------------------------------------
26
27class WXDLLEXPORT wxTopLevelWindowMac : public wxTopLevelWindowBase
28{
29public:
30 // constructors and such
31 wxTopLevelWindowMac() { Init(); }
32
33 wxTopLevelWindowMac(wxWindow *parent,
34 wxWindowID id,
35 const wxString& title,
36 const wxPoint& pos = wxDefaultPosition,
37 const wxSize& size = wxDefaultSize,
38 long style = wxDEFAULT_FRAME_STYLE,
39 const wxString& name = wxFrameNameStr)
40 {
41 Init();
42
43 (void)Create(parent, id, title, pos, size, style, name);
44 }
45
46 bool Create(wxWindow *parent,
47 wxWindowID id,
48 const wxString& title,
49 const wxPoint& pos = wxDefaultPosition,
50 const wxSize& size = wxDefaultSize,
51 long style = wxDEFAULT_FRAME_STYLE,
52 const wxString& name = wxFrameNameStr);
53
54 virtual ~wxTopLevelWindowMac();
55
4f305456
SC
56 virtual wxPoint GetClientAreaOrigin() const;
57
8cf73271
SC
58 // implement base class pure virtuals
59 virtual void Maximize(bool maximize = TRUE);
60 virtual bool IsMaximized() const;
61 virtual void Iconize(bool iconize = TRUE);
62 virtual bool IsIconized() const;
63 virtual void SetIcon(const wxIcon& icon);
64 virtual void SetIcons(const wxIconBundle& icons) { SetIcon( icons.GetIcon( -1 ) ); }
65 virtual void Restore();
66
67 virtual bool SetShape(const wxRegion& region);
68
69 virtual bool ShowFullScreen(bool WXUNUSED(show), long WXUNUSED(style) = wxFULLSCREEN_ALL)
70 { return FALSE; }
71 virtual bool IsFullScreen() const { return FALSE; }
72
73 // implementation from now on
74 // --------------------------
75
76 static void MacDelayedDeactivation(long timestamp);
77 virtual void MacCreateRealWindow( const wxString& title,
78 const wxPoint& pos,
79 const wxSize& size,
80 long style,
81 const wxString& name ) ;
8cf73271 82 virtual void ClearBackground() ;
4f305456 83
8cf73271
SC
84 WXWindow MacGetWindowRef() { return m_macWindow ; }
85 virtual void MacActivate( long timestamp , bool inIsActivating ) ;
4f305456 86
8cf73271
SC
87 virtual void Raise();
88 virtual void Lower();
89 virtual void SetTitle( const wxString& title);
90 virtual bool Show( bool show = TRUE );
4f305456
SC
91
92 virtual void MacSetBackgroundBrush( const wxBrush &brush ) ;
93
8cf73271
SC
94 bool MacUsesCompositing() { return m_macUsesCompositing; }
95
4f305456
SC
96 void MacSetMetalAppearance( bool on ) ;
97
98 void MacChangeWindowAttributes( wxUint32 attributesToSet , wxUint32 attributesToClear ) ;
99 wxUint32 MacGetWindowAttributes() const ;
100
8cf73271 101 WXEVENTHANDLERREF MacGetEventHandler() { return m_macEventHandler ; }
4f305456 102
8cf73271
SC
103protected:
104 // common part of all ctors
105 void Init();
106
4f305456
SC
107 virtual void DoGetPosition( int *x, int *y ) const;
108 virtual void DoGetSize( int *width, int *height ) const;
109 virtual void DoMoveWindow(int x, int y, int width, int height);
110 virtual void DoGetClientSize(int *width, int *height) const;
111
8cf73271
SC
112 // is the frame currently iconized?
113 bool m_iconized;
114
115 // should the frame be maximized when it will be shown? set by Maximize()
116 // when it is called while the frame is hidden
117 bool m_maximizeOnShow;
118 bool m_macUsesCompositing ;
119
8cf73271 120 WXWindow m_macWindow ;
4f305456 121
8cf73271 122 wxWindowMac* m_macFocus ;
8cf73271 123
8cf73271 124 static wxTopLevelWindowMac *s_macDeactivateWindow;
8cf73271 125private :
8cf73271 126 WXEVENTHANDLERREF m_macEventHandler ;
4f305456
SC
127
128 DECLARE_EVENT_TABLE()
8cf73271
SC
129};
130
131// list of all frames and modeless dialogs
132extern WXDLLEXPORT_DATA(wxWindowList) wxModelessWindows;
133
8cf73271
SC
134#endif // _WX_MSW_TOPLEVEL_H_
135