1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: panelg.h
|
|
|
|
// Purpose: wxPanel: similar to wxWindows but is coloured as for a dialog
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c)
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __PANELH_G__
|
|
|
|
#define __PANELH_G__
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "panelg.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/window.h"
|
|
|
|
|
|
|
|
WXDLLEXPORT_DATA(extern const char*) wxPanelNameStr;
|
|
|
|
|
|
|
|
// Dialog boxes
|
|
|
|
class WXDLLEXPORT wxPanel: public wxWindow
|
|
|
|
{
|
|
|
|
public:
|
1998-07-08 18:12:44 -04:00
|
|
|
wxPanel();
|
1998-05-20 10:01:55 -04:00
|
|
|
|
1998-07-08 18:12:44 -04:00
|
|
|
// Old-style constructor (no default values for coordinates to avoid ambiguity
|
|
|
|
// with the new one)
|
1998-05-20 10:01:55 -04:00
|
|
|
inline wxPanel(wxWindow *parent,
|
1998-07-08 18:12:44 -04:00
|
|
|
int x, int y, int width, int height,
|
|
|
|
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
|
|
|
const wxString& name = wxPanelNameStr)
|
1998-05-20 10:01:55 -04:00
|
|
|
{
|
|
|
|
Create(parent, -1, wxPoint(x, y), wxSize(width, height), style, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Constructor
|
1998-07-08 18:12:44 -04:00
|
|
|
inline wxPanel(wxWindow *parent, wxWindowID id = -1,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
|
|
|
const wxString& name = wxPanelNameStr)
|
1998-05-20 10:01:55 -04:00
|
|
|
{
|
|
|
|
Create(parent, id, pos, size, style, name);
|
|
|
|
}
|
|
|
|
|
1998-07-04 11:17:59 -04:00
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
1998-07-08 18:12:44 -04:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
|
|
|
const wxString& name = wxPanelNameStr);
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
// Sends an OnInitDialog event, which in turns transfers data to
|
|
|
|
// to the dialog via validators.
|
1998-07-08 18:12:44 -04:00
|
|
|
virtual void InitDialog();
|
1998-05-20 10:01:55 -04:00
|
|
|
|
1998-07-08 18:12:44 -04:00
|
|
|
// overriden base class virtuals
|
|
|
|
virtual void SetFocus();
|
|
|
|
|
|
|
|
// callbacks
|
|
|
|
// Responds to colour changes
|
1998-05-20 10:01:55 -04:00
|
|
|
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
1998-07-08 18:12:44 -04:00
|
|
|
// Process a keyboard navigation message (Tab traversal)
|
|
|
|
void OnNavigationKey(wxNavigationKeyEvent& event);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
bool SetFocusToNextChild(wxNode *nodeCurrent = NULL, bool bForward = TRUE);
|
1998-05-20 10:01:55 -04:00
|
|
|
|
1998-07-08 18:12:44 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxPanel)
|
1998-05-20 10:01:55 -04:00
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// __PANELH_G__
|