1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2000-07-15 19:51:35 +00:00
|
|
|
// Name: wx/generic/panelg.h
|
|
|
|
// Purpose: wxPanel: a container for child controls
|
1998-05-20 14:01:55 +00:00
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c)
|
1999-10-28 01:17:35 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1999-10-28 01:17:35 +00:00
|
|
|
#ifndef _WX_GENERIC_PANEL_H_
|
|
|
|
#define _WX_GENERIC_PANEL_H_
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2002-08-31 11:29:13 +00:00
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
2000-07-15 19:51:35 +00:00
|
|
|
#pragma interface "panelg.h"
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif
|
|
|
|
|
2000-07-15 19:51:35 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// headers and forward declarations
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
#include "wx/window.h"
|
2001-08-06 00:49:59 +00:00
|
|
|
#include "wx/containr.h"
|
2000-07-15 19:51:35 +00:00
|
|
|
|
2001-08-06 00:49:59 +00:00
|
|
|
class WXDLLEXPORT wxControlContainer;
|
1998-05-20 14:01:55 +00:00
|
|
|
|
1999-04-14 11:55:35 +00:00
|
|
|
WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr;
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2000-07-15 19:51:35 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxPanel contains other controls and implements TAB traversal between them
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
1999-01-31 23:30:33 +00:00
|
|
|
class WXDLLEXPORT wxPanel : public wxWindow
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
|
|
|
public:
|
2001-08-06 22:50:28 +00:00
|
|
|
wxPanel() { Init(); }
|
1999-10-20 04:57:45 +00:00
|
|
|
|
1999-02-04 23:21:27 +00: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 21:21:52 +00:00
|
|
|
Init();
|
|
|
|
|
1999-02-04 23:21:27 +00:00
|
|
|
Create(parent, -1, wxPoint(x, y), wxSize(width, height), style, name);
|
|
|
|
}
|
1999-10-20 04:57:45 +00:00
|
|
|
|
1999-02-04 23:21:27 +00:00
|
|
|
// Constructor
|
|
|
|
wxPanel(wxWindow *parent,
|
2003-03-21 02:58:55 +00:00
|
|
|
wxWindowID winid = -1,
|
1999-02-04 23:21:27 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
|
|
|
const wxString& name = wxPanelNameStr)
|
|
|
|
{
|
1999-06-18 18:04:32 +00:00
|
|
|
Init();
|
|
|
|
|
2003-03-21 02:58:55 +00:00
|
|
|
Create(parent, winid, pos, size, style, name);
|
1999-02-04 23:21:27 +00:00
|
|
|
}
|
1998-05-20 14:01:55 +00:00
|
|
|
|
1999-02-04 23:21:27 +00:00
|
|
|
// Pseudo ctor
|
2003-03-21 02:58:55 +00:00
|
|
|
bool Create(wxWindow *parent, wxWindowID winid,
|
1999-02-04 23:21:27 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
|
|
|
const wxString& name = wxPanelNameStr);
|
1999-10-20 04:57:45 +00:00
|
|
|
|
2001-08-06 00:49:59 +00:00
|
|
|
virtual ~wxPanel();
|
1999-06-17 21:21:52 +00:00
|
|
|
|
|
|
|
// implementation from now on
|
|
|
|
// --------------------------
|
|
|
|
|
1999-02-04 23:21:27 +00:00
|
|
|
// responds to colour changes
|
|
|
|
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
1999-10-20 04:57:45 +00:00
|
|
|
|
1999-10-31 10:22:26 +00:00
|
|
|
// calls layout for layout constraints and sizers
|
1999-10-20 04:57:45 +00:00
|
|
|
void OnSize(wxSizeEvent& event);
|
|
|
|
|
2001-10-17 22:25:56 +00:00
|
|
|
virtual void InitDialog();
|
|
|
|
|
2002-05-06 10:51:43 +00:00
|
|
|
#ifdef __WXUNIVERSAL__
|
2002-12-04 14:11:26 +00:00
|
|
|
virtual bool IsCanvasWindow() const { return TRUE; }
|
|
|
|
virtual bool ProvidesBackground() const { return TRUE; }
|
2002-04-14 14:42:43 +00:00
|
|
|
#endif
|
|
|
|
|
2001-08-06 00:49:59 +00:00
|
|
|
WX_DECLARE_CONTROL_CONTAINER();
|
2001-05-26 22:20:33 +00:00
|
|
|
|
1999-02-04 23:21:27 +00:00
|
|
|
protected:
|
1999-06-17 21:21:52 +00:00
|
|
|
// common part of all ctors
|
|
|
|
void Init();
|
|
|
|
|
1999-01-31 23:30:33 +00:00
|
|
|
private:
|
2003-07-22 00:24:07 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel)
|
1999-01-31 23:30:33 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
1999-10-28 01:17:35 +00:00
|
|
|
// _WX_GENERIC_PANEL_H_
|