]>
Commit | Line | Data |
---|---|---|
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. | |
26 | Unlike a `wx.ListBox`, only the selection is visible until the | |
27 | user pulls down the menu of choices.", " | |
28 | ||
29 | Events | |
30 | ------ | |
31 | ================ ========================================== | |
32 | EVT_CHOICE Sent when an item in the list is selected. | |
33 | ================ ========================================== | |
34 | "); | |
35 | ||
36 | ||
37 | MustHaveApp(wxChoice); | |
38 | ||
39 | class wxChoice : public wxControlWithItems | |
40 | { | |
41 | public: | |
42 | %pythonAppend wxChoice "self._setOORInfo(self)" | |
43 | %pythonAppend wxChoice() "" | |
44 | ||
45 | DocCtorAStr( | |
46 | wxChoice(wxWindow *parent, wxWindowID id=-1, | |
47 | const wxPoint& pos = wxDefaultPosition, | |
48 | const wxSize& size = wxDefaultSize, | |
49 | const wxArrayString& choices = wxPyEmptyStringArray, | |
50 | long style = 0, | |
51 | const wxValidator& validator = wxDefaultValidator, | |
52 | const wxString& name = wxPyChoiceNameStr), | |
53 | "__init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, | |
54 | List choices=EmptyList, long style=0, Validator validator=DefaultValidator, | |
55 | String name=ChoiceNameStr) -> Choice", | |
56 | "Create and show a Choice control", ""); | |
57 | ||
58 | DocCtorStrName( | |
59 | wxChoice(), | |
60 | "Precreate a Choice control for 2-phase creation.", "", | |
61 | PreChoice); | |
62 | ||
63 | ||
64 | DocDeclAStr( | |
65 | bool, Create(wxWindow *parent, wxWindowID id=-1, | |
66 | const wxPoint& pos = wxDefaultPosition, | |
67 | const wxSize& size = wxDefaultSize, | |
68 | const wxArrayString& choices = wxPyEmptyStringArray, | |
69 | long style = 0, | |
70 | const wxValidator& validator = wxDefaultValidator, | |
71 | const wxString& name = wxPyChoiceNameStr), | |
72 | "Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, | |
73 | List choices=EmptyList, long style=0, Validator validator=DefaultValidator, | |
74 | String name=ChoiceNameStr) -> bool", | |
75 | "Actually create the GUI Choice control for 2-phase creation", ""); | |
76 | ||
77 | DocDeclStr( | |
78 | int , GetCurrentSelection() const, | |
79 | "Unlike `GetSelection` which only returns the accepted selection value, | |
80 | i.e. the selection in the control once the user closes the dropdown | |
81 | list, this function returns the current selection. That is, while the | |
82 | dropdown list is shown, it returns the currently selected item in | |
83 | it. When it is not shown, its result is the same as for the other | |
84 | function.", ""); | |
85 | ||
86 | ||
87 | static wxVisualAttributes | |
88 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
89 | }; | |
90 | ||
91 | //--------------------------------------------------------------------------- |