]> git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/carbon/drawer.h
Remove all lines containing cvs/svn "$Id$" keyword.
[wxWidgets.git] / include / wx / osx / carbon / drawer.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/carbon/drawer.h
3 // Purpose: Drawer child window class.
4 // Drawer windows appear under their parent window and
5 // behave like a drawer, opening and closing to reveal
6 // content that does not need to be visible at all times.
7 // Author: Jason Bagley
8 // Modified by:
9 // Created: 2004-30-01
10 // Copyright: (c) Jason Bagley; Art & Logic, Inc.
11 // Licence: wxWindows licence
12 /////////////////////////////////////////////////////////////////////////////
13
14 #ifndef _WX_DRAWERWINDOW_H_
15 #define _WX_DRAWERWINDOW_H_
16
17 #include "wx/toplevel.h"
18
19 //
20 // NB: This is currently a private undocumented class -
21 // it is stable, but the API is not and will change in the
22 // near future
23 //
24
25 #if ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
26
27 class WXDLLIMPEXP_ADV wxDrawerWindow : public wxTopLevelWindow
28 {
29 DECLARE_DYNAMIC_CLASS(wxDrawerWindow)
30
31 public:
32
33 wxDrawerWindow();
34
35 wxDrawerWindow(wxWindow* parent,
36 wxWindowID id,
37 const wxString& title,
38 wxSize size = wxDefaultSize,
39 wxDirection edge = wxLEFT,
40 const wxString& name = wxT("drawerwindow"))
41 {
42 this->Create(parent, id, title, size, edge, name);
43 }
44
45 virtual ~wxDrawerWindow();
46
47 // Create a drawer window.
48 // If parent is NULL, create as a tool window.
49 // If parent is not NULL, then wxTopLevelWindow::Attach this window to parent.
50 bool Create(wxWindow *parent,
51 wxWindowID id,
52 const wxString& title,
53 wxSize size = wxDefaultSize,
54 wxDirection edge = wxLEFT,
55 const wxString& name = wxFrameNameStr);
56
57 bool Open(bool show = true); // open or close the drawer, possibility for async param, i.e. animate
58 bool Close() { return this->Open(false); }
59 bool IsOpen() const;
60
61 // Set the edge of the parent where the drawer attaches.
62 bool SetPreferredEdge(wxDirection edge);
63 wxDirection GetPreferredEdge() const;
64 wxDirection GetCurrentEdge() const; // not necessarily the preferred, due to screen constraints
65 };
66
67 #endif // defined( __WXMAC__ ) && TARGET_API_MAC_OSX && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
68
69 #endif
70 // _WX_DRAWERWINDOW_H_