1999-01-01 11:05:26 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: radiobox.h
|
|
|
|
// Purpose: wxRadioBox class
|
|
|
|
// Author: AUTHOR
|
|
|
|
// Modified by:
|
|
|
|
// Created: ??/??/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) AUTHOR
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_RADIOBOX_H_
|
|
|
|
#define _WX_RADIOBOX_H_
|
|
|
|
|
2002-08-31 07:29:13 -04:00
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
1999-01-01 11:05:26 -05:00
|
|
|
#pragma interface "radiobox.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// List box item
|
2001-06-28 17:23:41 -04:00
|
|
|
class WXDLLEXPORT wxBitmap ;
|
1999-11-18 19:11:42 -05:00
|
|
|
|
2001-06-28 17:23:41 -04:00
|
|
|
class WXDLLEXPORT wxRadioButton ;
|
1999-01-01 11:05:26 -05:00
|
|
|
|
2001-06-28 17:23:41 -04:00
|
|
|
class WXDLLEXPORT wxRadioBox: public wxControl, public wxRadioBoxBase
|
1999-01-01 11:05:26 -05:00
|
|
|
{
|
1999-11-18 19:11:42 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
1999-01-01 11:05:26 -05:00
|
|
|
public:
|
1999-11-18 19:11:42 -05:00
|
|
|
// Constructors & destructor
|
|
|
|
wxRadioBox();
|
|
|
|
inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
|
|
int n = 0, const wxString choices[] = NULL,
|
|
|
|
int majorDim = 0, long style = wxRA_HORIZONTAL,
|
|
|
|
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
|
|
|
|
{
|
|
|
|
Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
|
|
|
|
}
|
|
|
|
~wxRadioBox();
|
|
|
|
bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
|
|
int n = 0, const wxString choices[] = NULL,
|
|
|
|
int majorDim = 0, long style = wxRA_HORIZONTAL,
|
|
|
|
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
|
|
|
|
|
|
|
|
// Specific functions (in wxWindows2 reference)
|
2001-06-29 12:19:53 -04:00
|
|
|
virtual void SetSelection(int item);
|
|
|
|
virtual int GetSelection() const;
|
|
|
|
|
|
|
|
inline virtual int GetCount() const { return m_noItems; } ;
|
|
|
|
|
|
|
|
virtual wxString GetString(int item) const;
|
|
|
|
virtual void SetString(int item, const wxString& label) ;
|
|
|
|
|
|
|
|
virtual void Enable(int item, bool enable);
|
|
|
|
virtual void Show(int item, bool show) ;
|
|
|
|
|
|
|
|
virtual int GetColumnCount() const ;
|
|
|
|
virtual int GetRowCount() const ;
|
|
|
|
|
|
|
|
|
2002-06-04 14:09:20 -04:00
|
|
|
virtual bool Enable(bool enable = TRUE);
|
|
|
|
virtual wxString GetLabel() const;
|
|
|
|
virtual void SetLabel(const wxString& label) ;
|
|
|
|
virtual bool Show(bool show = TRUE);
|
1999-11-18 19:11:42 -05:00
|
|
|
|
|
|
|
// Other external functions
|
|
|
|
void Command(wxCommandEvent& event);
|
|
|
|
void SetFocus();
|
|
|
|
|
|
|
|
// Other variable access functions
|
|
|
|
inline int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
|
|
|
|
inline void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
|
1999-01-01 11:05:26 -05:00
|
|
|
|
2001-05-08 15:13:45 -04:00
|
|
|
void OnRadioButton( wxCommandEvent& event ) ;
|
1999-01-01 11:05:26 -05:00
|
|
|
protected:
|
1999-11-18 19:11:42 -05:00
|
|
|
wxRadioButton *m_radioButtonCycle;
|
|
|
|
|
|
|
|
int m_majorDim ;
|
|
|
|
int m_noItems;
|
|
|
|
int m_noRowsOrCols;
|
|
|
|
|
|
|
|
// Internal functions
|
2001-07-11 16:33:12 -04:00
|
|
|
virtual wxSize DoGetBestSize() const ;
|
1999-11-18 19:11:42 -05:00
|
|
|
virtual void DoSetSize(int x, int y,
|
1999-11-05 04:16:09 -05:00
|
|
|
int width, int height,
|
|
|
|
int sizeFlags = wxSIZE_AUTO);
|
1999-11-18 19:11:42 -05:00
|
|
|
|
2001-05-08 15:13:45 -04:00
|
|
|
DECLARE_EVENT_TABLE()
|
1999-01-01 11:05:26 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_RADIOBOX_H_
|