1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: statbox.h
|
|
|
|
// Purpose: wxStaticBox class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
1999-07-23 21:03:02 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_STATBOX_H_
|
|
|
|
#define _WX_STATBOX_H_
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "statbox.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
|
|
|
WXDLLEXPORT_DATA(extern const char*) wxStaticBoxNameStr;
|
|
|
|
|
|
|
|
// Group box
|
|
|
|
class WXDLLEXPORT wxStaticBox: public wxControl
|
|
|
|
{
|
1999-02-22 11:01:13 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxStaticBox)
|
1998-09-18 10:19:10 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
public:
|
|
|
|
wxStaticBox();
|
|
|
|
wxStaticBox(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString& name = wxStaticBoxNameStr)
|
|
|
|
{
|
|
|
|
Create(parent, id, label, pos, size, style, name);
|
|
|
|
}
|
|
|
|
~wxStaticBox();
|
1998-09-18 10:19:10 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString& name = wxStaticBoxNameStr);
|
1998-09-18 10:19:10 +00:00
|
|
|
|
1999-07-23 21:03:02 +00:00
|
|
|
virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
|
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
1998-09-18 10:19:10 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
void SetLabel(const wxString& label);
|
|
|
|
wxString GetLabel() const;
|
1998-11-28 13:38:40 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
// Implementation
|
|
|
|
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
|
|
|
virtual void ChangeBackgroundColour();
|
|
|
|
virtual void ChangeForegroundColour();
|
|
|
|
WXWidget GetTopWidget() const { return m_formWidget; }
|
|
|
|
WXWidget GetLabelWidget() const { return m_labelWidget; }
|
1998-10-16 14:38:52 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
protected:
|
|
|
|
// Motif-specific
|
|
|
|
WXWidget m_formWidget;
|
|
|
|
WXWidget m_labelWidget;
|
1998-09-18 10:19:10 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
virtual void DoSetSize(int x, int y,
|
|
|
|
int width, int height,
|
|
|
|
int sizeFlags = wxSIZE_AUTO);
|
1998-10-16 14:38:52 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
1998-09-18 10:19:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_STATBOX_H_
|