]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/toplevel.h
export statement needed
[wxWidgets.git] / include / wx / mac / toplevel.h
CommitLineData
fe08e597
SC
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/mac/toplevel.h
5273bf2f 3// Purpose: wxTopLevelWindowMac is the Mac implementation of wxTLW
fe08e597
SC
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 20.09.01
7// RCS-ID: $Id$
8// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
9// Licence: wxWindows licence
10///////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_MSW_TOPLEVEL_H_
13#define _WX_MSW_TOPLEVEL_H_
14
15#ifdef __GNUG__
16 #pragma interface "toplevel.h"
17#endif
18
19// ----------------------------------------------------------------------------
20// wxTopLevelWindowMac
21// ----------------------------------------------------------------------------
22
23class WXDLLEXPORT wxTopLevelWindowMac : public wxTopLevelWindowBase
24{
25public:
26 // constructors and such
27 wxTopLevelWindowMac() { Init(); }
28
29 wxTopLevelWindowMac(wxWindow *parent,
30 wxWindowID id,
31 const wxString& title,
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize,
34 long style = wxDEFAULT_FRAME_STYLE,
35 const wxString& name = wxFrameNameStr)
36 {
37 Init();
38
39 (void)Create(parent, id, title, pos, size, style, name);
40 }
41
42 bool Create(wxWindow *parent,
43 wxWindowID id,
44 const wxString& title,
45 const wxPoint& pos = wxDefaultPosition,
46 const wxSize& size = wxDefaultSize,
47 long style = wxDEFAULT_FRAME_STYLE,
48 const wxString& name = wxFrameNameStr);
49
50 virtual ~wxTopLevelWindowMac();
51
52 // implement base class pure virtuals
53 virtual void Maximize(bool maximize = TRUE);
54 virtual bool IsMaximized() const;
55 virtual void Iconize(bool iconize = TRUE);
56 virtual bool IsIconized() const;
57 virtual void SetIcon(const wxIcon& icon);
58 virtual void Restore();
59
60 virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL) { return FALSE; }
61 virtual bool IsFullScreen() const { return FALSE; }
62
63 // implementation from now on
64 // --------------------------
65
6ed63f8b
SC
66 virtual void MacCreateRealWindow( const wxString& title,
67 const wxPoint& pos,
68 const wxSize& size,
69 long style,
70 const wxString& name ) ;
5273bf2f
SC
71 static WXWindow MacGetWindowInUpdate() { return s_macWindowInUpdate ; }
72 virtual void MacGetPortParams(WXPOINTPTR localOrigin, WXRECTPTR clipRect, WXWindow *window , wxWindowMac** rootwin ) ;
6ed63f8b 73 virtual void Clear() ;
5273bf2f
SC
74 virtual WXWidget MacGetContainerForEmbedding() ;
75 WXWindow MacGetWindowRef() { return m_macWindow ; }
76 virtual void MacActivate( WXEVENTREF ev , bool inIsActivating ) ;
6ed63f8b 77 virtual void MacUpdate( long timestamp ) ;
5273bf2f
SC
78 virtual void MacMouseDown( WXEVENTREF ev , short windowPart ) ;
79 virtual void MacMouseUp( WXEVENTREF ev , short windowPart ) ;
80 virtual void MacMouseMoved( WXEVENTREF ev , short windowPart ) ;
81 virtual void MacKeyDown( WXEVENTREF ev ) ;
82 virtual void MacFireMouseEvent( WXEVENTREF ev ) ;
6ed63f8b
SC
83 virtual void Raise();
84 virtual void Lower();
85 virtual void SetTitle( const wxString& title);
86 virtual bool Show( bool show = TRUE );
87 virtual void DoMoveWindow(int x, int y, int width, int height);
5273bf2f 88 void MacInvalidate( const WXRECTPTR rect, bool eraseBackground ) ;
fe08e597
SC
89protected:
90 // common part of all ctors
91 void Init();
92
93 // is the frame currently iconized?
94 bool m_iconized;
95
96 // should the frame be maximized when it will be shown? set by Maximize()
97 // when it is called while the frame is hidden
98 bool m_maximizeOnShow;
6ed63f8b 99
5273bf2f
SC
100 short m_macWindowBackgroundTheme ;
101 WXWindow m_macWindow ;
102 WXWidget m_macRootControl ;
6ed63f8b 103 wxWindowMac* m_macFocus ;
5273bf2f 104 WXHRGN m_macNoEraseUpdateRgn ;
6ed63f8b
SC
105 bool m_macNeedsErasing ;
106
5273bf2f 107 static WXWindow s_macWindowInUpdate ;
fe08e597
SC
108};
109
110// list of all frames and modeless dialogs
111extern WXDLLEXPORT_DATA(wxWindowList) wxModelessWindows;
112
6ed63f8b
SC
113// associate mac windows with wx counterparts
114
5273bf2f
SC
115wxTopLevelWindowMac* wxFindWinFromMacWindow( WXWindow inWindow ) ;
116void wxAssociateWinWithMacWindow(WXWindow inWindow, wxTopLevelWindowMac *win) ;
6ed63f8b
SC
117void wxRemoveMacWindowAssociation(wxTopLevelWindowMac *win) ;
118
119
fe08e597
SC
120#endif // _WX_MSW_TOPLEVEL_H_
121