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