1//---------------------------------------------------------------------------
2// This file is generated by wxPython's SIP generator.  Do not edit by hand.
3//
4// Copyright: (c) 2018 by Total Control Software
5// License:   wxWindows License
6//
7// This file will be included by _core.sip
8//
9//---------------------------------------------------------------------------
10
11//---------------------------------------------------------------------------
12
13const char* wxChoiceNameStr;
14
15class wxChoice : wxControl, wxItemContainer
16{
17    %Docstring
18        Choice()
19        Choice(parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, choices=[], style=0, validator=DefaultValidator, name=ChoiceNameStr)
20
21        A choice item is used to select one of a list of strings.
22    %End
23    %TypeHeaderCode
24        #include <wx/choice.h>
25    %End
26
27public:
28    wxChoice();
29    %PreMethodCode
30        if (!wxPyCheckForApp()) return NULL;
31    %End
32
33    wxChoice(
34        wxWindow * parent   /TransferThis/,
35        wxWindowID id = wxID_ANY,
36        const wxPoint & pos = wxDefaultPosition,
37        const wxSize & size = wxDefaultSize,
38        const wxArrayString & choices = wxArrayString(),
39        long style = 0,
40        const wxValidator & validator = wxDefaultValidator,
41        const wxString & name = wxChoiceNameStr
42    );
43    %PreMethodCode
44        if (!wxPyCheckForApp()) return NULL;
45    %End
46
47    ~wxChoice();
48
49    bool Create(
50        wxWindow * parent   /TransferThis/,
51        wxWindowID id = wxID_ANY,
52        const wxPoint & pos = wxDefaultPosition,
53        const wxSize & size = wxDefaultSize,
54        const wxArrayString & choices = wxArrayString(),
55        long style = 0,
56        const wxValidator & validator = wxDefaultValidator,
57        const wxString & name = wxChoiceNameStr
58    );
59    %Docstring
60        Create(parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, choices=[], style=0, validator=DefaultValidator, name=ChoiceNameStr) -> bool
61
62        Creates the choice for two-step construction.
63    %End
64
65    int GetColumns() const;
66    %Docstring
67        GetColumns() -> int
68
69        Gets the number of columns in this choice item.
70    %End
71
72    int GetCurrentSelection() const;
73    %Docstring
74        GetCurrentSelection() -> int
75
76        Unlike wxControlWithItems::GetSelection() which only returns the
77        accepted selection value (the selection in the control once the user
78        closes the dropdown list), this function returns the current
79        selection.
80    %End
81
82    void SetColumns(
83        int n = 1
84    );
85    %Docstring
86        SetColumns(n=1)
87
88        Sets the number of columns in this choice item.
89    %End
90
91    bool IsSorted() const;
92    %Docstring
93        IsSorted() -> bool
94    %End
95
96    unsigned int GetCount() const;
97    %Docstring
98        GetCount() -> unsignedint
99
100        Returns the number of items in the control.
101    %End
102
103    int GetSelection() const;
104    %Docstring
105        GetSelection() -> int
106
107        Returns the index of the selected item or wxNOT_FOUND if no item is
108        selected.
109    %End
110
111    void SetSelection(
112        int n
113    );
114    %Docstring
115        SetSelection(n)
116
117        Sets the selection to the given item n or removes the selection
118        entirely if n == wxNOT_FOUND.
119    %End
120
121    int FindString(
122        const wxString & string,
123        bool caseSensitive = false
124    ) const;
125    %Docstring
126        FindString(string, caseSensitive=False) -> int
127
128        Finds an item whose label matches the given string.
129    %End
130
131    wxString GetString(
132        unsigned int n
133    ) const;
134    %Docstring
135        GetString(n) -> String
136
137        Returns the label of the item with the given index.
138    %End
139
140    void SetString(
141        unsigned int n,
142        const wxString & string
143    );
144    %Docstring
145        SetString(n, string)
146
147        Sets the label for the given item.
148    %End
149
150    public:
151    virtual wxPoint GetClientAreaOrigin() const;
152    virtual bool Validate();
153    virtual bool TransferDataToWindow();
154    virtual bool TransferDataFromWindow();
155    virtual void InitDialog();
156    virtual bool AcceptsFocus() const;
157    virtual bool AcceptsFocusRecursively() const;
158    virtual bool AcceptsFocusFromKeyboard() const;
159    virtual void AddChild( wxWindowBase *child );
160    virtual void RemoveChild( wxWindowBase *child );
161    virtual void InheritAttributes();
162    virtual bool ShouldInheritColours() const;
163    virtual void OnInternalIdle();
164    virtual wxWindow *GetMainWindowOfCompositeControl();
165    virtual bool InformFirstDirection(int direction, int size, int availableOtherDir);
166    virtual void SetCanFocus(bool canFocus);
167    virtual bool Destroy();
168    virtual void SetValidator( const wxValidator &validator );
169    virtual wxValidator* GetValidator();
170
171
172    protected:
173    virtual bool ProcessEvent(wxEvent & event);
174    virtual void DoEnable(bool enable);
175    virtual void DoGetPosition(int *x, int *y) const;
176    virtual void DoGetSize(int *width, int *height) const;
177    virtual void DoGetClientSize(int *width, int *height) const;
178    virtual wxSize DoGetBestSize() const;
179    virtual wxSize DoGetBestClientSize() const;
180    virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags);
181    virtual void DoSetClientSize(int width, int height);
182    virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH );
183    virtual wxSize DoGetBorderSize() const;
184    virtual void DoMoveWindow(int x, int y, int width, int height);
185    virtual void DoSetWindowVariant( wxWindowVariant variant);
186    virtual wxBorder GetDefaultBorder() const;
187    virtual wxBorder GetDefaultBorderForControl() const;
188    virtual void DoFreeze();
189    virtual void DoThaw();
190    virtual bool HasTransparentBackground();
191    virtual bool TryBefore(wxEvent& event);
192    virtual bool TryAfter(wxEvent& event);
193
194
195    public:
196
197
198    static
199    wxVisualAttributes GetClassDefaultAttributes(
200        wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL
201    );
202    %Docstring
203        GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
204    %End
205    %PreMethodCode
206        if (!wxPyCheckForApp()) return NULL;
207    %End
208
209    public:
210
211
212    %Property(name=Columns, get=GetColumns, set=SetColumns)
213    %Property(name=Count, get=GetCount)
214    %Property(name=CurrentSelection, get=GetCurrentSelection)
215    %Property(name=Selection, get=GetSelection, set=SetSelection)
216};  // end of class wxChoice
217
218
219
220//---------------------------------------------------------------------------
221
222