]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/_choice.i
Oops
[wxWidgets.git] / wxPython / src / _choice.i
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: _choice.i
3 // Purpose: SWIG interface defs for wxChoice
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
18 MAKE_CONST_WXSTRING(ChoiceNameStr);
19
20 //---------------------------------------------------------------------------
21 %newgroup;
22
23
24 DocStr(wxChoice,
25 "A Choice control is used to select one of a list of strings. Unlike a ListBox,
26 only the selection is visible until the user pulls down the menu of choices.");
27
28 RefDoc(wxChoice, "
29 Events
30 EVT_CHOICE: Sent when an item in the list is selected.
31 ");
32
33
34 class wxChoice : public wxControlWithItems
35 {
36 public:
37 %pythonAppend wxChoice "self._setOORInfo(self)"
38 %pythonAppend wxChoice() ""
39
40 RefDoc(wxChoice, ""); // turn it off for the ctors
41
42 DocCtorAStr(
43 wxChoice(wxWindow *parent, wxWindowID id,
44 const wxPoint& pos = wxDefaultPosition,
45 const wxSize& size = wxDefaultSize,
46 const wxArrayString& choices = wxPyEmptyStringArray,
47 long style = 0,
48 const wxValidator& validator = wxDefaultValidator,
49 const wxString& name = wxPyChoiceNameStr),
50 "__init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,\n"
51 " List choices=[], long style=0, Validator validator=DefaultValidator,\n"
52 " String name=ChoiceNameStr) -> Choice",
53 "Create and show a Choice control");
54
55 DocCtorStrName(
56 wxChoice(),
57 "Precreate a Choice control for 2-phase creation.",
58 PreChoice);
59
60
61 DocDeclAStr(
62 bool, Create(wxWindow *parent, wxWindowID id,
63 const wxPoint& pos = wxDefaultPosition,
64 const wxSize& size = wxDefaultSize,
65 const wxArrayString& choices = wxPyEmptyStringArray,
66 long style = 0,
67 const wxValidator& validator = wxDefaultValidator,
68 const wxString& name = wxPyChoiceNameStr),
69 "Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,\n"
70 " List choices=[], long style=0, Validator validator=DefaultValidator,\n"
71 " String name=ChoiceNameStr) -> bool",
72 "Actually create the GUI Choice control for 2-phase creation");
73
74
75 // // These are only meaningful on wxMotif...
76 // int GetColumns();
77 // void SetColumns(const int n = 1);
78
79
80 DocDeclStr(
81 void , SetSelection(const int n),
82 "Select the n'th item (zero based) in the list.");
83
84 DocDeclStr(
85 void , SetStringSelection(const wxString& string),
86 "Select the item with the specifed string");
87
88 DocDeclStr(
89 void , SetString(int n, const wxString& string),
90 "Set the label for the n'th item (zero based) in the list.");
91
92
93 %pythoncode { Select = SetSelection }
94 };
95
96 //---------------------------------------------------------------------------