File: wx.lib.combotreebox.BaseComboTreeBox.txt

package info (click to toggle)
wxpython4.0 4.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 211,112 kB
  • sloc: cpp: 888,355; python: 223,130; makefile: 52,087; ansic: 45,780; sh: 3,012; xml: 1,534; perl: 264
file content (323 lines) | stat: -rw-r--r-- 12,178 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2018 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. currentmodule:: wx.lib.combotreebox

.. highlight:: python



.. _wx.lib.combotreebox.BaseComboTreeBox:

==========================================================================================================================================
|phoenix_title|  **wx.lib.combotreebox.BaseComboTreeBox**
==========================================================================================================================================

BaseComboTreeBox is the base class for platform specific versions of the
ComboTreeBox.



|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>BaseComboTreeBox</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.lib.combotreebox.BaseComboTreeBox_inheritance.png" alt="Inheritance diagram of BaseComboTreeBox" usemap="#dummy" class="inheritance"/></center>
   </div>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.combotreebox.BaseComboTreeBox.html" title="wx.lib.combotreebox.BaseComboTreeBox" alt="" coords="4,5,288,35"/> </map> 
   </p>

|


|sub_classes| Known Subclasses
==============================

:class:`wx.lib.combotreebox.GTKComboTreeBox`, :class:`wx.lib.combotreebox.NativeComboTreeBox`

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.__init__`                           
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.Append`                             Adds the itemText to the control, associating the given clientData
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.Clear`                              Removes all items from the control.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.Delete`                             Deletes the item from the control.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.FindClientData`                     Finds the *first* item in the tree with client data equal to the
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.FindString`                         Finds the *first* item in the tree with a label equal to the
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.GetClientData`                      Returns the client data associated with the given item, if any.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.GetCount`                           Returns the number of items in the control.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.GetSelection`                       Returns the :class:`TreeItemId` of the selected item or an invalid item
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.GetString`                          Returns the label of the given item.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.GetStringSelection`                 Returns the label of the selected item or an empty string if no item
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.GetTree`                            Returns the tree control that is popped up.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.GetValue`                           Returns the current value in the combobox text field.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.Hide`                               Hide the popped up frame with the tree.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.Insert`                             Insert an item into the control before the ``previous`` item
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.IsEmpty`                            Returns ``True`` if the control is empty or ``False`` if it has some items.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.NotifyItemSelected`                 Simulate selection of an item by the user. This is meant to
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.NotifyNoItemSelected`               This is called by the PopupFrame when the user closes the
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.OnKeyDown`                          
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.OnMouseClick`                       
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.OnText`                             
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.Popup`                              Pops up the frame with the tree.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.SetClientData`                      Associate the given client data with the provided item.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.SetClientDataSelection`             Selects the item with the provided clientData in the control.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.SetSelection`                       Sets the provided item to be the selected item.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.SetString`                          Sets the label for the provided item.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.SetStringSelection`                 Selects the item with the provided string in the control.
:meth:`~wx.lib.combotreebox.BaseComboTreeBox.SetValue`                           Sets the text for the combobox text field.
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: BaseComboTreeBox(object)

   BaseComboTreeBox is the base class for platform specific versions of the
   ComboTreeBox.

   .. method:: __init__(self, \*args, \*\*kwargs)


   .. method:: Append(self, itemText, parent=None, clientData=None)

      Adds the itemText to the control, associating the given clientData
      with the item if not None. If parent is None, itemText is added
      as a root item, else itemText is added as a child item of
      parent. The return value is the :class:`TreeItemId` of the newly added
      item.
      
      :param string `itemText`: text to add to the control
      :keyword TreeItemId `parent`: if None item is added as a root, else it
        is added as a child of the parent.
      :keyword PyObject `clientData`: the client data to find
      :return: :class:`TreeItemId` of newly added item
      :rtype: :class:`TreeItemId`


   .. method:: Clear(self)

      Removes all items from the control.


   .. method:: Delete(self, item)

      Deletes the item from the control.


   .. method:: FindClientData(self, clientData, parent=None)

      Finds the *first* item in the tree with client data equal to the
      given clientData. If no such item exists, an invalid item is
      returned.
      
      :param PyObject `clientData`: the client data to find
      :keyword TreeItemId `parent`: :class:`TreeItemId` parent or None
      :return: :class:`TreeItemId`
      :rtype: :class:`TreeItemId`


   .. method:: FindString(self, string, parent=None)

      Finds the *first* item in the tree with a label equal to the
      given string. If no such item exists, an invalid item is
      returned.
      
      :param string `string`: string to be found in label
      :keyword TreeItemId `parent`: :class:`TreeItemId` parent or None
      :return: :class:`TreeItemId`
      :rtype: :class:`TreeItemId`


   .. method:: GetClientData(self, item)

      Returns the client data associated with the given item, if any.
      
      :param TreeItemId `item`: item for which to get clientData
      :return: the client data
      :rtype: PyObject


   .. method:: GetCount(self)

      Returns the number of items in the control.
      
      :return: items in control
      :rtype: integer


   .. method:: GetSelection(self)

      Returns the :class:`TreeItemId` of the selected item or an invalid item
      if no item is selected.
      
      :return: a TreeItemId
      :rtype: :class:`TreeItemId`


   .. method:: GetString(self, item)

      Returns the label of the given item.
      
      :param TreeItemId `item`: :class:`TreeItemId` for which to get the label
      :return: label
      :rtype: string


   .. method:: GetStringSelection(self)

      Returns the label of the selected item or an empty string if no item
      is selected.
      
      :return: the label of the selected item or an empty string
      :rtype: string


   .. method:: GetTree(self)

      Returns the tree control that is popped up.


   .. method:: GetValue(self)

      Returns the current value in the combobox text field.
      
      :return: the current value in the combobox text field
      :rtype: string


   .. method:: Hide(self)

      Hide the popped up frame with the tree.


   .. method:: Insert(self, itemText, previous=None, parent=None, clientData=None)

      Insert an item into the control before the ``previous`` item
      and/or as child of the ``parent`` item. The itemText is associated
      with clientData when not None.
      
      :param string `itemText`: the items label
      :keyword TreeItemId `previous`: the previous item
      :keyword TreeItemId `parent`: the parent item
      :keyword PyObject `clientData`: the data to associate
      :return: the create :class:`TreeItemId`
      :rtype: :class:`TreeItemId`


   .. method:: IsEmpty(self)

      Returns ``True`` if the control is empty or ``False`` if it has some items.
      
      :return: ``True`` if control is empty
      :rtype: boolean


   .. method:: NotifyItemSelected(self, text)

      Simulate selection of an item by the user. This is meant to
      be called by the PopupFrame when the user selects an item.


   .. method:: NotifyNoItemSelected(self)

      This is called by the PopupFrame when the user closes the
      PopupFrame, without selecting an item.


   .. method:: OnKeyDown(self, keyEvent)


   .. method:: OnMouseClick(self, event)


   .. method:: OnText(self, event)


   .. method:: Popup(self)

      Pops up the frame with the tree.


   .. method:: SetClientData(self, item, clientData)

      Associate the given client data with the provided item.
      
      :param TreeItemId `item`: item for which to set the clientData
      :param PyObject `clientData`: the data to set


   .. method:: SetClientDataSelection(self, clientData)

      Selects the item with the provided clientData in the control.
      Returns ``True`` if the item belonging to the clientData has been
      selected, ``False`` if it wasn't found in the control.
      
      :param PyObject `clientData`: the client data to find
      :return: ``True`` if an item has been selected, otherwise ``False`` :rtype: bool


   .. method:: SetSelection(self, item)

      Sets the provided item to be the selected item.
      
      :param TreeItemId `item`: Select this item


   .. method:: SetString(self, item, string)

      Sets the label for the provided item.
      
      :param TreeItemId `item`: item on which to set the label
      :param string `string`: the label to set


   .. method:: SetStringSelection(self, string)

      Selects the item with the provided string in the control.
      Returns ``True`` if the provided string has been selected, ``False`` if
      it wasn't found in the control.
      
      :param string `string`: try to select the item with this string
      :return: ``True`` if an item has been selected
      :rtype: boolean


   .. method:: SetValue(self, value)

      Sets the text for the combobox text field.
      
      NB: For a combobox with wxCB_READONLY style the string must be
      in the combobox choices list, otherwise the call to SetValue()
      is ignored.
      
      :param string `value`: set the combobox text field