]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/frame.h
Made CCS_VERT definition more general
[wxWidgets.git] / include / wx / cocoa / frame.h
CommitLineData
fb896a32
DE
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/cocoa/frame.h
3// Purpose: wxFrame class
4// Author: David Elliott
5// Modified by:
6// Created: 2003/03/16
7// RCS-ID: $Id:
8// Copyright: (c) 2003 David Elliott
9// Licence: wxWindows license
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_COCOA_FRAME_H_
13#define _WX_COCOA_FRAME_H_
14
15class WXDLLEXPORT wxMenuBar;
16class WXDLLEXPORT wxMenuItem;
a58a6614 17class WXDLLEXPORT wxStatusBar;
fb896a32
DE
18
19class WXDLLEXPORT wxFrame: public wxFrameBase
20{
21 DECLARE_EVENT_TABLE()
22 DECLARE_DYNAMIC_CLASS(wxFrame)
23// ------------------------------------------------------------------------
24// initialization
25// ------------------------------------------------------------------------
26public:
27 wxFrame() { Init(); }
28 wxFrame(wxWindow *parent,
29 wxWindowID winid,
30 const wxString& title,
31 const wxPoint& pos = wxDefaultPosition,
32 const wxSize& size = wxDefaultSize,
33 long style = wxDEFAULT_FRAME_STYLE,
34 const wxString& name = wxFrameNameStr)
35 {
36 Init();
37 Create(parent, winid, title, pos, size, style, name);
38 }
39
40 virtual ~wxFrame();
41
42 bool Create(wxWindow *parent,
43 wxWindowID winid,
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);
49protected:
50 void Init();
51// ------------------------------------------------------------------------
52// Cocoa specifics
53// ------------------------------------------------------------------------
54protected:
55 virtual void Cocoa_wxMenuItemAction(wxMenuItem& item);
e08efb8d 56 virtual void CocoaSetWxWindowSize(int width, int height);
448cbf1d
DE
57
58 // Helper function to position status/tool bars
59 void UpdateFrameNSView();
60
61 virtual void CocoaReplaceView(WX_NSView oldView, WX_NSView newView);
62 // frameNSView is used whenever a statusbar/generic toolbar are present
63 WX_NSView m_frameNSView;
fb896a32
DE
64// ------------------------------------------------------------------------
65// Implementation
66// ------------------------------------------------------------------------
67public:
68 void AttachMenuBar(wxMenuBar *mbar);
69 void DetachMenuBar();
70
71 // implementation only from now on
72 // -------------------------------
73
74 // override some more virtuals
75 virtual bool Show( bool show = true );
76
77 // get the origin of the client area (which may be different from (0, 0)
78 // if the frame has a toolbar) in client coordinates
79 virtual wxPoint GetClientAreaOrigin() const;
a58a6614 80
448cbf1d
DE
81 // create the main status bar by calling OnCreateStatusBar()
82 virtual wxStatusBar* CreateStatusBar(int number = 1,
83 long style = wxST_SIZEGRIP,
84 wxWindowID winid = 0,
85 const wxString& name =
86 wxStatusLineNameStr);
87 // sets the main status bar
88 void SetStatusBar(wxStatusBar *statBar);
89 // create main toolbar bycalling OnCreateToolBar()
90 virtual wxToolBar* CreateToolBar(long style = -1,
91 wxWindowID winid = -1,
92 const wxString& name = wxToolBarNameStr);
93 // sets the main tool bar
94 virtual void SetToolBar(wxToolBar *toolbar);
a58a6614 95protected:
a58a6614 96 void PositionStatusBar();
fb896a32
DE
97};
98
99#endif // _WX_COCOA_FRAME_H_