1998-09-18 06:19:10 -04: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 17:03:02 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-09-18 06:19:10 -04: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 06:01:13 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxStaticBox)
|
1998-09-18 06:19:10 -04:00
|
|
|
|
1999-02-22 06:01:13 -05: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 06:19:10 -04:00
|
|
|
|
1999-02-22 06:01:13 -05: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 06:19:10 -04:00
|
|
|
|
1999-07-23 17:03:02 -04:00
|
|
|
virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
|
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
1998-09-18 06:19:10 -04:00
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
void SetLabel(const wxString& label);
|
|
|
|
wxString GetLabel() const;
|
1998-11-28 08:38:40 -05:00
|
|
|
|
1999-02-22 06:01:13 -05: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 10:38:52 -04:00
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
protected:
|
|
|
|
// Motif-specific
|
|
|
|
WXWidget m_formWidget;
|
|
|
|
WXWidget m_labelWidget;
|
1998-09-18 06:19:10 -04:00
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
virtual void DoSetSize(int x, int y,
|
|
|
|
int width, int height,
|
|
|
|
int sizeFlags = wxSIZE_AUTO);
|
1998-10-16 10:38:52 -04:00
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
1998-09-18 06:19:10 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_STATBOX_H_
|