]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/_choice.i
embedded sample's README updates
[wxWidgets.git] / wxPython / src / _choice.i
CommitLineData
d14a1e28
RD
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
b2dc1044
RD
18MAKE_CONST_WXSTRING(ChoiceNameStr);
19
d14a1e28
RD
20//---------------------------------------------------------------------------
21%newgroup;
22
fcafa8a9
RD
23
24DocStr(wxChoice,
25"A Choice control is used to select one of a list of strings. Unlike a ListBox,
26only the selection is visible until the user pulls down the menu of choices.");
27
28RefDoc(wxChoice, "
29 Events
30 EVT_CHOICE: Sent when an item in the list is selected.
31");
32
33
d14a1e28
RD
34class wxChoice : public wxControlWithItems
35{
36public:
2b9048c5
RD
37 %pythonAppend wxChoice "self._setOORInfo(self)"
38 %pythonAppend wxChoice() ""
d14a1e28 39
e029dde7
RD
40 RefDoc(wxChoice, ""); // turn it off for the ctors
41
fcafa8a9
RD
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 }
d14a1e28
RD
94};
95
96//---------------------------------------------------------------------------