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$
|
|
|
|
// Copyright: (c)
|
1999-10-27 21:17:35 -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
|
|
|
|
2002-08-31 07:29:13 -04:00
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
2000-07-15 15:51:35 -04:00
|
|
|
#pragma interface "panelg.h"
|
1998-05-20 10:01:55 -04:00
|
|
|
#endif
|
|
|
|
|
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
|
|
|
|
2001-08-05 20:49:59 -04:00
|
|
|
class WXDLLEXPORT wxControlContainer;
|
1998-05-20 10:01:55 -04:00
|
|
|
|
1999-04-14 07:55:35 -04:00
|
|
|
WXDLLEXPORT_DATA(extern 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();
|
|
|
|
|
1999-02-04 18:21:27 -05:00
|
|
|
Create(parent, -1, wxPoint(x, y), wxSize(width, height), style, name);
|
|
|
|
}
|
1999-10-20 00:57:45 -04:00
|
|
|
|
1999-02-04 18:21:27 -05:00
|
|
|
// Constructor
|
|
|
|
wxPanel(wxWindow *parent,
|
2003-03-20 21:58:55 -05:00
|
|
|
wxWindowID winid = -1,
|
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
|
2003-03-20 21:58:55 -05:00
|
|
|
bool Create(wxWindow *parent, wxWindowID winid,
|
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-02-04 18:21:27 -05:00
|
|
|
// responds to colour changes
|
|
|
|
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
1999-10-20 00:57:45 -04:00
|
|
|
|
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__
|
2002-12-04 09:11:26 -05:00
|
|
|
virtual bool IsCanvasWindow() const { return TRUE; }
|
|
|
|
virtual bool ProvidesBackground() const { return TRUE; }
|
2002-04-14 10:42:43 -04:00
|
|
|
#endif
|
|
|
|
|
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:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxPanel)
|
|
|
|
DECLARE_EVENT_TABLE()
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
1999-10-27 21:17:35 -04:00
|
|
|
// _WX_GENERIC_PANEL_H_
|