]>
Commit | Line | Data |
---|---|---|
3e17bc3f | 1 | ///////////////////////////////////////////////////////////////////////////// |
1b88201f | 2 | // Name: wx/mac/carbon/drawer.h |
3e17bc3f RN |
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 | // RCS-ID: $Id$ | |
11 | // Copyright: (c) Jason Bagley; Art & Logic, Inc. | |
12 | // Licence: wxWindows licence | |
13 | ///////////////////////////////////////////////////////////////////////////// | |
14 | ||
15 | #ifndef _WX_DRAWERWINDOW_H_ | |
16 | #define _WX_DRAWERWINDOW_H_ | |
17 | ||
3e17bc3f RN |
18 | #include "wx/toplevel.h" |
19 | ||
6a8b0d45 RN |
20 | // |
21 | // NB: This is currently a private undocumented class - | |
22 | // it is stable, but the API is not and will change in the | |
23 | // near future | |
24 | // | |
25 | ||
3e17bc3f RN |
26 | #if ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 ) |
27 | ||
163b3ad7 | 28 | class WXDLLIMPEXP_ADV wxDrawerWindow : public wxTopLevelWindow |
3e17bc3f RN |
29 | { |
30 | DECLARE_DYNAMIC_CLASS(wxDrawerWindow) | |
1b88201f | 31 | |
3e17bc3f RN |
32 | public: |
33 | ||
34 | wxDrawerWindow(); | |
1b88201f | 35 | |
3e17bc3f | 36 | wxDrawerWindow(wxWindow* parent, |
1b88201f WS |
37 | wxWindowID id, |
38 | const wxString& title, | |
39 | wxSize size = wxDefaultSize, | |
40 | wxDirection edge = wxLEFT, | |
41 | const wxString& name = wxT("drawerwindow")) | |
3e17bc3f RN |
42 | { |
43 | this->Create(parent, id, title, size, edge, name); | |
44 | } | |
1b88201f | 45 | |
d3c7fc99 | 46 | virtual ~wxDrawerWindow(); |
1b88201f WS |
47 | |
48 | // Create a drawer window. | |
3e17bc3f | 49 | // If parent is NULL, create as a tool window. |
1b88201f | 50 | // If parent is not NULL, then wxTopLevelWindow::Attach this window to parent. |
3e17bc3f RN |
51 | bool Create(wxWindow *parent, |
52 | wxWindowID id, | |
53 | const wxString& title, | |
54 | wxSize size = wxDefaultSize, | |
55 | wxDirection edge = wxLEFT, | |
56 | const wxString& name = wxFrameNameStr); | |
57 | ||
58 | bool Open(bool show = true); // open or close the drawer, possibility for async param, i.e. animate | |
59 | bool Close() { return this->Open(false); } | |
60 | bool IsOpen() const; | |
1b88201f | 61 | |
3e17bc3f RN |
62 | // Set the edge of the parent where the drawer attaches. |
63 | bool SetPreferredEdge(wxDirection edge); | |
64 | wxDirection GetPreferredEdge() const; | |
1b88201f | 65 | wxDirection GetCurrentEdge() const; // not necessarily the preferred, due to screen constraints |
3e17bc3f RN |
66 | }; |
67 | ||
68 | #endif // defined( __WXMAC__ ) && TARGET_API_MAC_OSX && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 ) | |
69 | ||
1b88201f WS |
70 | #endif |
71 | // _WX_DRAWERWINDOW_H_ |