]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/_radio.i
wx.InitAllImageHandlers is now an empty function that does nothing but
[wxWidgets.git] / wxPython / src / _radio.i
CommitLineData
d14a1e28
RD
1/////////////////////////////////////////////////////////////////////////////
2// Name: _radio.i
3// Purpose: SWIG interface defs for wxRadioButton and wxRadioBox
4//
5// Author: Robin Dunn
6//
7// Created: 10-June-1998
8// RCS-ID: $Id$
9// Copyright: (c) 2003 by Total Control Software
10// Licence: wxWindows license
11/////////////////////////////////////////////////////////////////////////////
12
13// Not a %module
14
15
16//---------------------------------------------------------------------------
17
b2dc1044
RD
18MAKE_CONST_WXSTRING(RadioBoxNameStr);
19MAKE_CONST_WXSTRING(RadioButtonNameStr);
d14a1e28
RD
20
21//---------------------------------------------------------------------------
22%newgroup
23
24class wxRadioBox : public wxControl
25{
26public:
94eaeb1b 27 %pythonPrepend wxRadioBox "if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']"
2b9048c5
RD
28 %pythonPrepend wxRadioBox() ""
29 %pythonAppend wxRadioBox "self._setOORInfo(self)"
30 %pythonAppend wxRadioBox() ""
d14a1e28
RD
31
32 wxRadioBox(wxWindow* parent, wxWindowID id,
33 const wxString& label,
2b9048c5 34 const wxPoint& pos = wxDefaultPosition,
d14a1e28 35 const wxSize& size = wxDefaultSize,
699e192b
RD
36 //int choices = 0, wxString* choices_array = NULL,
37 const wxArrayString& choices = wxPyEmptyStringArray,
d14a1e28
RD
38 int majorDimension = 0,
39 long style = wxRA_HORIZONTAL,
40 const wxValidator& validator = wxDefaultValidator,
41 const wxString& name = wxPyRadioBoxNameStr);
42 %name(PreRadioBox)wxRadioBox();
43
44 bool Create(wxWindow* parent, wxWindowID id,
699e192b
RD
45 const wxString& label,
46 const wxPoint& pos = wxDefaultPosition,
47 const wxSize& size = wxDefaultSize,
48 //int choices = 0, wxString* choices_array = NULL,
49 const wxArrayString& choices = wxPyEmptyStringArray,
50 int majorDimension = 0,
51 long style = wxRA_HORIZONTAL,
52 const wxValidator& validator = wxDefaultValidator,
53 const wxString& name = wxPyRadioBoxNameStr);
d14a1e28
RD
54
55 virtual void SetSelection(int n);
56 virtual int GetSelection() const;
57
58 virtual wxString GetStringSelection() const;
59 virtual bool SetStringSelection(const wxString& s);
60
61 // string access
62 virtual int GetCount() const;
63 virtual int FindString(const wxString& s) const;
64
65 virtual wxString GetString(int n) const;
66 virtual void SetString(int n, const wxString& label);
67 %pythoncode { GetItemLabel = GetString };
68 %pythoncode { SetItemLabel = SetString };
69
70 // change the individual radio button state
dd9f7fea
RD
71 %name(EnableItem) virtual void Enable(int n, bool enable = True);
72 %name(ShowItem) virtual void Show(int n, bool show = True);
d14a1e28
RD
73
74#ifndef __WXGTK__
75 // layout parameters
76 virtual int GetColumnCount() const;
77 virtual int GetRowCount() const;
78
79 // return the item above/below/to the left/right of the given one
80 int GetNextItem(int item, wxDirection dir, long style) const;
81#else
82 %extend {
83 int GetColumnCount() const { return -1; }
84 int GetRowCount() const { return -1; }
85 int GetNextItem(int item, wxDirection dir, long style) const { return -1; }
86 }
87#endif
88
880715c9
RD
89 static wxVisualAttributes
90 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
d14a1e28
RD
91};
92
93
94//---------------------------------------------------------------------------
95%newgroup
96
97class wxRadioButton : public wxControl
98{
99public:
2b9048c5
RD
100 %pythonAppend wxRadioButton "self._setOORInfo(self)"
101 %pythonAppend wxRadioButton() ""
d14a1e28
RD
102
103 wxRadioButton(wxWindow* parent, wxWindowID id,
104 const wxString& label,
105 const wxPoint& pos = wxDefaultPosition,
106 const wxSize& size = wxDefaultSize,
107 long style = 0,
108 const wxValidator& validator = wxDefaultValidator,
109 const wxString& name = wxPyRadioButtonNameStr);
110 %name(PreRadioButton)wxRadioButton();
111
112 bool Create(wxWindow* parent, wxWindowID id,
113 const wxString& label,
114 const wxPoint& pos = wxDefaultPosition,
115 const wxSize& size = wxDefaultSize,
116 long style = 0,
117 const wxValidator& validator = wxDefaultValidator,
118 const wxString& name = wxPyRadioButtonNameStr);
119
120 bool GetValue();
121 void SetValue(bool value);
880715c9
RD
122
123 static wxVisualAttributes
124 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
d14a1e28
RD
125};
126
127//---------------------------------------------------------------------------
128//---------------------------------------------------------------------------