]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/carbon/drawer.h
Added #if wxUSE_STACKWALKER. Fixes compilation of OS X shared libraries.
[wxWidgets.git] / include / wx / mac / carbon / drawer.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: 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 // 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
18 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
19 #pragma interface "drawer.h"
20 #endif
21
22 #include "wx/toplevel.h"
23
24 //
25 // NB: This is currently a private undocumented class -
26 // it is stable, but the API is not and will change in the
27 // near future
28 //
29
30 #if ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
31
32 class WXDLLEXPORT wxDrawerWindow : public wxTopLevelWindow
33 {
34 DECLARE_DYNAMIC_CLASS(wxDrawerWindow)
35
36 public:
37
38 wxDrawerWindow();
39
40 wxDrawerWindow(wxWindow* parent,
41 wxWindowID id,
42 const wxString& title,
43 wxSize size = wxDefaultSize,
44 wxDirection edge = wxLEFT,
45 const wxString& name = wxT("drawerwindow"))
46 {
47 this->Create(parent, id, title, size, edge, name);
48 }
49
50 ~wxDrawerWindow();
51
52 // Create a drawer window.
53 // If parent is NULL, create as a tool window.
54 // If parent is not NULL, then wxTopLevelWindow::Attach this window to parent.
55 bool Create(wxWindow *parent,
56 wxWindowID id,
57 const wxString& title,
58 wxSize size = wxDefaultSize,
59 wxDirection edge = wxLEFT,
60 const wxString& name = wxFrameNameStr);
61
62 bool Open(bool show = true); // open or close the drawer, possibility for async param, i.e. animate
63 bool Close() { return this->Open(false); }
64 bool IsOpen() const;
65
66 // Set the edge of the parent where the drawer attaches.
67 bool SetPreferredEdge(wxDirection edge);
68 wxDirection GetPreferredEdge() const;
69 wxDirection GetCurrentEdge() const; // not necessarily the preferred, due to screen constraints
70 };
71
72 #endif // defined( __WXMAC__ ) && TARGET_API_MAC_OSX && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
73
74 #endif // _WX_DRAWERWINDOW_H_