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
10 // Copyright: (c) Jason Bagley; Art & Logic, Inc.
11 // Licence: wxWindows licence
12 /////////////////////////////////////////////////////////////////////////////
14 #ifndef _WX_DRAWERWINDOW_H_
15 #define _WX_DRAWERWINDOW_H_
17 #include "wx/toplevel.h"
20 // NB: This is currently a private undocumented class -
21 // it is stable, but the API is not and will change in the
25 #if ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
27 class WXDLLIMPEXP_ADV wxDrawerWindow
: public wxTopLevelWindow
29 DECLARE_DYNAMIC_CLASS(wxDrawerWindow
)
35 wxDrawerWindow(wxWindow
* parent
,
37 const wxString
& title
,
38 wxSize size
= wxDefaultSize
,
39 wxDirection edge
= wxLEFT
,
40 const wxString
& name
= wxT("drawerwindow"))
42 this->Create(parent
, id
, title
, size
, edge
, name
);
45 virtual ~wxDrawerWindow();
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
,
52 const wxString
& title
,
53 wxSize size
= wxDefaultSize
,
54 wxDirection edge
= wxLEFT
,
55 const wxString
& name
= wxFrameNameStr
);
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); }
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
67 #endif // defined( __WXMAC__ ) && TARGET_API_MAC_OSX && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
70 // _WX_DRAWERWINDOW_H_