]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/radiobox.h
Minor modifications...
[wxWidgets.git] / include / wx / gtk / radiobox.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: radiobox.h
3// Purpose:
4// Author: Robert Roebling
5// Created: 01/02/97
6// Id:
7// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11
12#ifndef __GTKRADIOBOXH__
13#define __GTKRADIOBOXH__
14
15#ifdef __GNUG__
16#pragma interface
17#endif
18
19#include "wx/defs.h"
20#include "wx/object.h"
21#include "wx/list.h"
22#include "wx/control.h"
23#include "wx/bitmap.h"
24
25//-----------------------------------------------------------------------------
26// classes
27//-----------------------------------------------------------------------------
28
29class wxRadioBox;
30
31//-----------------------------------------------------------------------------
32// global data
33//-----------------------------------------------------------------------------
34
35extern const char *wxRadioBoxNameStr;
36
37//-----------------------------------------------------------------------------
38// wxRadioBox
39//-----------------------------------------------------------------------------
40
41class wxRadioBox: public wxControl
42{
43
44 DECLARE_DYNAMIC_CLASS(wxRadioBox)
45
46 public:
47
48 wxRadioBox(void);
6de97a3b
RR
49 inline wxRadioBox( wxWindow *parent, wxWindowID id, const wxString& title,
50 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
c67daf87 51 int n = 0, const wxString choices[] = (const wxString *) NULL,
6de97a3b
RR
52 int majorDim = 0, long style = wxRA_HORIZONTAL,
53 const wxValidator& val = wxDefaultValidator,
54 const wxString& name = wxRadioBoxNameStr )
55 {
56 Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name );
57 }
d6d1892b 58 ~wxRadioBox(void);
debe6624 59 bool Create( wxWindow *parent, wxWindowID id, const wxString& title,
6de97a3b 60 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
c67daf87 61 int n = 0, const wxString choices[] = (const wxString *) NULL,
6de97a3b
RR
62 int majorDim = 0, long style = wxRA_HORIZONTAL,
63 const wxValidator& val = wxDefaultValidator,
64 const wxString& name = wxRadioBoxNameStr );
c801d85f 65 int FindString( const wxString& s) const;
debe6624 66 void SetSelection( int n );
c801d85f 67 int GetSelection(void) const;
debe6624 68 wxString GetString( int n ) const;
c801d85f 69 void SetLabel( const wxString& label );
debe6624
JS
70 void SetLabel( int item, const wxString& label );
71 void SetLabel( int item, wxBitmap *bitmap );
72 wxString GetLabel( int item ) const;
73 bool Show( bool show );
74 void Enable( bool enable );
75 void Enable( int item, bool enable );
76 void Show( int item, bool show );
c801d85f
KB
77 virtual wxString GetStringSelection(void) const;
78 virtual bool SetStringSelection( const wxString& s );
79 virtual int Number(void) const;
80 int GetNumberOfRowsOrCols(void) const;
debe6624 81 void SetNumberOfRowsOrCols( int n );
d3904ceb 82
868a2826 83 void SetFont( const wxFont &font );
f96aa4d9 84 void SetBackgroundColour( const wxColour &colour );
3f659fd6
RR
85 void OnSize( wxSizeEvent &event );
86
868a2826
RR
87 // implementation
88
b4071e91
RR
89 bool IsOwnGtkWindow( GdkWindow *window );
90
d6d1892b
RR
91 bool m_alreadySent;
92 wxList m_boxes;
c801d85f 93
3f659fd6 94 DECLARE_EVENT_TABLE()
c801d85f
KB
95};
96
97#endif // __GTKRADIOBOXH__