2004-09-25 13:22:43 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-10-17 10:44:52 -04:00
|
|
|
// Name: wx/mac/carbon/drawer.h
|
2004-09-25 13:22:43 -04:00
|
|
|
// Purpose: Drawer child window class.
|
|
|
|
// Drawer windows appear under their parent window and
|
|
|
|
// behave like a drawer, opening and closing to reveal
|
|
|
|
// content that does not need to be visible at all times.
|
|
|
|
// Author: Jason Bagley
|
|
|
|
// Modified by:
|
|
|
|
// Created: 2004-30-01
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Jason Bagley; Art & Logic, Inc.
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_DRAWERWINDOW_H_
|
|
|
|
#define _WX_DRAWERWINDOW_H_
|
|
|
|
|
|
|
|
#include "wx/toplevel.h"
|
|
|
|
|
2004-10-02 15:19:55 -04:00
|
|
|
//
|
|
|
|
// NB: This is currently a private undocumented class -
|
|
|
|
// it is stable, but the API is not and will change in the
|
|
|
|
// near future
|
|
|
|
//
|
|
|
|
|
2004-09-25 13:22:43 -04:00
|
|
|
#if ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
|
|
|
|
|
2007-12-11 20:35:53 -05:00
|
|
|
class WXDLLIMPEXP_ADV wxDrawerWindow : public wxTopLevelWindow
|
2004-09-25 13:22:43 -04:00
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxDrawerWindow)
|
2006-10-17 10:44:52 -04:00
|
|
|
|
2004-09-25 13:22:43 -04:00
|
|
|
public:
|
|
|
|
|
|
|
|
wxDrawerWindow();
|
2006-10-17 10:44:52 -04:00
|
|
|
|
2004-09-25 13:22:43 -04:00
|
|
|
wxDrawerWindow(wxWindow* parent,
|
2006-10-17 10:44:52 -04:00
|
|
|
wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
wxSize size = wxDefaultSize,
|
|
|
|
wxDirection edge = wxLEFT,
|
|
|
|
const wxString& name = wxT("drawerwindow"))
|
2004-09-25 13:22:43 -04:00
|
|
|
{
|
|
|
|
this->Create(parent, id, title, size, edge, name);
|
|
|
|
}
|
2006-10-17 10:44:52 -04:00
|
|
|
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxDrawerWindow();
|
2006-10-17 10:44:52 -04:00
|
|
|
|
|
|
|
// Create a drawer window.
|
2004-09-25 13:22:43 -04:00
|
|
|
// If parent is NULL, create as a tool window.
|
2006-10-17 10:44:52 -04:00
|
|
|
// If parent is not NULL, then wxTopLevelWindow::Attach this window to parent.
|
2004-09-25 13:22:43 -04:00
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
wxSize size = wxDefaultSize,
|
|
|
|
wxDirection edge = wxLEFT,
|
|
|
|
const wxString& name = wxFrameNameStr);
|
|
|
|
|
|
|
|
bool Open(bool show = true); // open or close the drawer, possibility for async param, i.e. animate
|
|
|
|
bool Close() { return this->Open(false); }
|
|
|
|
bool IsOpen() const;
|
2006-10-17 10:44:52 -04:00
|
|
|
|
2004-09-25 13:22:43 -04:00
|
|
|
// Set the edge of the parent where the drawer attaches.
|
|
|
|
bool SetPreferredEdge(wxDirection edge);
|
|
|
|
wxDirection GetPreferredEdge() const;
|
2006-10-17 10:44:52 -04:00
|
|
|
wxDirection GetCurrentEdge() const; // not necessarily the preferred, due to screen constraints
|
2004-09-25 13:22:43 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // defined( __WXMAC__ ) && TARGET_API_MAC_OSX && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
|
|
|
|
|
2006-10-17 10:44:52 -04:00
|
|
|
#endif
|
|
|
|
// _WX_DRAWERWINDOW_H_
|