]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/radiobox.h
wxGTK compilation fixes
[wxWidgets.git] / include / wx / gtk / 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"
dcf924a3
RR
19
20#if wxUSE_RADIOBOX
21
c801d85f
KB
22#include "wx/object.h"
23#include "wx/list.h"
24#include "wx/control.h"
25#include "wx/bitmap.h"
26
27//-----------------------------------------------------------------------------
28// classes
29//-----------------------------------------------------------------------------
30
31class wxRadioBox;
32
33//-----------------------------------------------------------------------------
34// global data
35//-----------------------------------------------------------------------------
36
37extern const char *wxRadioBoxNameStr;
38
39//-----------------------------------------------------------------------------
40// wxRadioBox
41//-----------------------------------------------------------------------------
42
43class wxRadioBox: public wxControl
44{
45
46 DECLARE_DYNAMIC_CLASS(wxRadioBox)
47
0de9b5b2
RR
48public:
49 wxRadioBox();
6de97a3b
RR
50 inline wxRadioBox( wxWindow *parent, wxWindowID id, const wxString& title,
51 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
c67daf87 52 int n = 0, const wxString choices[] = (const wxString *) NULL,
fdd3ed7a 53 int majorDim = 1, long style = wxRA_HORIZONTAL,
6de97a3b 54 const wxValidator& val = wxDefaultValidator,
f03fc89f 55 const wxString& name = wxRadioBoxNameStr )
6de97a3b
RR
56 {
57 Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name );
58 }
d6d1892b 59 ~wxRadioBox(void);
debe6624 60 bool Create( wxWindow *parent, wxWindowID id, const wxString& title,
6de97a3b 61 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
c67daf87 62 int n = 0, const wxString choices[] = (const wxString *) NULL,
6de97a3b
RR
63 int majorDim = 0, long style = wxRA_HORIZONTAL,
64 const wxValidator& val = wxDefaultValidator,
f03fc89f 65 const wxString& name = wxRadioBoxNameStr );
0de9b5b2 66
c801d85f 67 int FindString( const wxString& s) const;
debe6624 68 void SetSelection( int n );
0de9b5b2
RR
69 int GetSelection() const;
70
debe6624 71 wxString GetString( int n ) const;
0de9b5b2
RR
72
73 wxString GetLabel( int item ) const;
74 wxString GetLabel() const { return wxControl::GetLabel(); }
c801d85f 75 void SetLabel( const wxString& label );
debe6624 76 void SetLabel( int item, const wxString& label );
0de9b5b2
RR
77
78 /* doesn't work */
debe6624 79 void SetLabel( int item, wxBitmap *bitmap );
0de9b5b2 80
debe6624 81 bool Show( bool show );
0de9b5b2
RR
82 void Show( int item, bool show );
83
f03fc89f 84 bool Enable( bool enable );
debe6624 85 void Enable( int item, bool enable );
0de9b5b2
RR
86
87 virtual wxString GetStringSelection() const;
c801d85f 88 virtual bool SetStringSelection( const wxString& s );
0de9b5b2
RR
89
90 virtual int Number() const;
91 int GetNumberOfRowsOrCols() const;
debe6624 92 void SetNumberOfRowsOrCols( int n );
d3904ceb 93
3f659fd6 94 void OnSize( wxSizeEvent &event );
b292e2f5 95 void SetFocus();
3f659fd6 96
868a2826
RR
97 // implementation
98
953704c1
RR
99 void DisableEvents();
100 void EnableEvents();
b4071e91 101 bool IsOwnGtkWindow( GdkWindow *window );
58614078 102 void ApplyWidgetStyle();
d3b4d113 103 wxSize LayoutItems();
b4071e91 104
d6d1892b 105 bool m_alreadySent;
d3b4d113 106 int m_majorDim;
d6d1892b 107 wxList m_boxes;
c801d85f 108
3f659fd6 109 DECLARE_EVENT_TABLE()
c801d85f
KB
110};
111
dcf924a3
RR
112#endif
113
c801d85f 114#endif // __GTKRADIOBOXH__