]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/_choice.i
wx.InitAllImageHandlers is now an empty function that does nothing but
[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,
dce2bd22
RD
25"A Choice control is used to select one of a list of strings.
26Unlike a `wx.ListBox`, only the selection is visible until the
d07d2bc9 27user pulls down the menu of choices.", "
dce2bd22
RD
28
29Events
30------
31 ================ ==========================================
32 EVT_CHOICE Sent when an item in the list is selected.
33 ================ ==========================================
fcafa8a9
RD
34");
35
36
d14a1e28
RD
37class wxChoice : public wxControlWithItems
38{
39public:
2b9048c5
RD
40 %pythonAppend wxChoice "self._setOORInfo(self)"
41 %pythonAppend wxChoice() ""
d14a1e28 42
fcafa8a9 43 DocCtorAStr(
907c2926 44 wxChoice(wxWindow *parent, wxWindowID id=-1,
fcafa8a9
RD
45 const wxPoint& pos = wxDefaultPosition,
46 const wxSize& size = wxDefaultSize,
47 const wxArrayString& choices = wxPyEmptyStringArray,
48 long style = 0,
49 const wxValidator& validator = wxDefaultValidator,
50 const wxString& name = wxPyChoiceNameStr),
dce2bd22
RD
51 "__init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
52 List choices=[], long style=0, Validator validator=DefaultValidator,
53 String name=ChoiceNameStr) -> Choice",
d07d2bc9 54 "Create and show a Choice control", "");
fcafa8a9
RD
55
56 DocCtorStrName(
57 wxChoice(),
d07d2bc9 58 "Precreate a Choice control for 2-phase creation.", "",
fcafa8a9
RD
59 PreChoice);
60
61
62 DocDeclAStr(
907c2926 63 bool, Create(wxWindow *parent, wxWindowID id=-1,
fcafa8a9
RD
64 const wxPoint& pos = wxDefaultPosition,
65 const wxSize& size = wxDefaultSize,
66 const wxArrayString& choices = wxPyEmptyStringArray,
67 long style = 0,
68 const wxValidator& validator = wxDefaultValidator,
69 const wxString& name = wxPyChoiceNameStr),
dce2bd22
RD
70 "Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
71 List choices=[], long style=0, Validator validator=DefaultValidator,
72 String name=ChoiceNameStr) -> bool",
d07d2bc9 73 "Actually create the GUI Choice control for 2-phase creation", "");
fcafa8a9
RD
74
75
76// // These are only meaningful on wxMotif...
77// int GetColumns();
78// void SetColumns(const int n = 1);
79
80
81 DocDeclStr(
82 void , SetSelection(const int n),
d07d2bc9 83 "Select the n'th item (zero based) in the list.", "");
fcafa8a9
RD
84
85 DocDeclStr(
f8c88923 86 bool , SetStringSelection(const wxString& string),
d07d2bc9 87 "Select the item with the specifed string", "");
fcafa8a9
RD
88
89 DocDeclStr(
90 void , SetString(int n, const wxString& string),
d07d2bc9 91 "Set the label for the n'th item (zero based) in the list.", "");
fcafa8a9
RD
92
93
94 %pythoncode { Select = SetSelection }
880715c9
RD
95
96 static wxVisualAttributes
97 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
d14a1e28
RD
98};
99
100//---------------------------------------------------------------------------