1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2000-07-15 15:51:35 -04:00
|
|
|
// Name: wx/generic/panelg.h
|
|
|
|
// Purpose: wxPanel: a container for child controls
|
1998-05-20 10:01:55 -04:00
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
2005-05-04 14:57:50 -04:00
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1999-10-27 21:17:35 -04:00
|
|
|
#ifndef _WX_GENERIC_PANEL_H_
|
|
|
|
#define _WX_GENERIC_PANEL_H_
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2000-07-15 15:51:35 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// headers and forward declarations
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
1998-05-20 10:01:55 -04:00
|
|
|
#include "wx/window.h"
|
2001-08-05 20:49:59 -04:00
|
|
|
#include "wx/containr.h"
|
2000-07-15 15:51:35 -04:00
|
|
|
|
2007-07-09 06:09:52 -04:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxControlContainer;
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2006-01-16 09:59:55 -05:00
|
|
|
extern WXDLLEXPORT_DATA(const wxChar) wxPanelNameStr[];
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2000-07-15 15:51:35 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxPanel contains other controls and implements TAB traversal between them
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
1999-01-31 18:30:33 -05:00
|
|
|
class WXDLLEXPORT wxPanel : public wxWindow
|
1998-05-20 10:01:55 -04:00
|
|
|
{
|
|
|
|
public:
|
2001-08-06 18:50:28 -04:00
|
|
|
wxPanel() { Init(); }
|
1999-10-20 00:57:45 -04:00
|
|
|
|
1999-02-04 18:21:27 -05:00
|
|
|
// Old-style constructor (no default values for coordinates to avoid
|
|
|
|
// ambiguity with the new one)
|
|
|
|
wxPanel(wxWindow *parent,
|
|
|
|
int x, int y, int width, int height,
|
|
|
|
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
|
|
|
const wxString& name = wxPanelNameStr)
|
|
|
|
{
|
1999-06-17 17:21:52 -04:00
|
|
|
Init();
|
|
|
|
|
2004-06-17 12:22:36 -04:00
|
|
|
Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), style, name);
|
1999-02-04 18:21:27 -05:00
|
|
|
}
|
1999-10-20 00:57:45 -04:00
|
|
|
|
1999-02-04 18:21:27 -05:00
|
|
|
// Constructor
|
|
|
|
wxPanel(wxWindow *parent,
|
2004-06-17 12:22:36 -04:00
|
|
|
wxWindowID winid = wxID_ANY,
|
1999-02-04 18:21:27 -05:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
|
|
|
const wxString& name = wxPanelNameStr)
|
|
|
|
{
|
1999-06-18 14:04:32 -04:00
|
|
|
Init();
|
|
|
|
|
2003-03-20 21:58:55 -05:00
|
|
|
Create(parent, winid, pos, size, style, name);
|
1999-02-04 18:21:27 -05:00
|
|
|
}
|
1998-05-20 10:01:55 -04:00
|
|
|
|
1999-02-04 18:21:27 -05:00
|
|
|
// Pseudo ctor
|
2006-07-24 13:44:46 -04:00
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID winid = wxID_ANY,
|
1999-02-04 18:21:27 -05:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
|
|
|
const wxString& name = wxPanelNameStr);
|
1999-10-20 00:57:45 -04:00
|
|
|
|
2001-08-05 20:49:59 -04:00
|
|
|
virtual ~wxPanel();
|
1999-06-17 17:21:52 -04:00
|
|
|
|
|
|
|
// implementation from now on
|
|
|
|
// --------------------------
|
|
|
|
|
1999-10-31 05:22:26 -05:00
|
|
|
// calls layout for layout constraints and sizers
|
1999-10-20 00:57:45 -04:00
|
|
|
void OnSize(wxSizeEvent& event);
|
|
|
|
|
2001-10-17 18:25:56 -04:00
|
|
|
virtual void InitDialog();
|
|
|
|
|
2002-05-06 06:51:43 -04:00
|
|
|
#ifdef __WXUNIVERSAL__
|
2004-06-17 12:22:36 -04:00
|
|
|
virtual bool IsCanvasWindow() const { return true; }
|
2002-04-14 10:42:43 -04:00
|
|
|
#endif
|
|
|
|
|
2007-08-08 08:39:56 -04:00
|
|
|
// choose the default border for this window
|
|
|
|
virtual wxBorder GetDefaultBorder() const { return wxWindowBase::GetDefaultBorder(); }
|
2004-06-17 12:22:36 -04:00
|
|
|
|
2001-08-05 20:49:59 -04:00
|
|
|
WX_DECLARE_CONTROL_CONTAINER();
|
2001-05-26 18:20:33 -04:00
|
|
|
|
1999-02-04 18:21:27 -05:00
|
|
|
protected:
|
1999-06-17 17:21:52 -04:00
|
|
|
// common part of all ctors
|
|
|
|
void Init();
|
|
|
|
|
1999-01-31 18:30:33 -05:00
|
|
|
private:
|
2003-07-21 20:24:07 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel)
|
1999-01-31 18:30:33 -05:00
|
|
|
DECLARE_EVENT_TABLE()
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
1999-10-27 21:17:35 -04:00
|
|
|
// _WX_GENERIC_PANEL_H_
|