File: wx.lib.agw.ultimatelistctrl.UltimateListItemData.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 (460 lines) | stat: -rw-r--r-- 16,587 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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
.. 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.agw.ultimatelistctrl

.. highlight:: python



.. _wx.lib.agw.ultimatelistctrl.UltimateListItemData:

==========================================================================================================================================
|phoenix_title|  **wx.lib.agw.ultimatelistctrl.UltimateListItemData**
==========================================================================================================================================

A simple class which holds information about :class:`UltimateListItem` visual
attributes (client rectangles, positions, etc...).



|

|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>UltimateListItemData</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.agw.ultimatelistctrl.UltimateListItemData_inheritance.png" alt="Inheritance diagram of UltimateListItemData" 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.agw.ultimatelistctrl.UltimateListItemData.html" title="wx.lib.agw.ultimatelistctrl.UltimateListItemData" alt="" coords="4,5,323,35"/> </map> 
   </p>

|


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

================================================================================ ================================================================================
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.__init__`               Default class constructor
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.Check`                  Checks/unchecks an item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.DeleteWindow`           Deletes the window associated to the item (if any).
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.Enable`                 Enables or disables the item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetAttr`                Returns the item attributes.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetBackgroundColour`    Returns the currently set background colour.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetColour`              Returns the currently set text colour.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetCustomRenderer`      Returns the custom renderer associated with this item (if any).
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetFont`                Returns the currently set font.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetHeight`              Returns the item height, in pixels.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetImage`               Returns a Python list with the zero-based indexes of the images associated
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetItem`                Returns information about the item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetKind`                Returns the item kind.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetOverFlow`            Returns if the item is in the overflow state.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetText`                Returns the item text.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetTextForMeasuring`    Returns the item text or a simple string if the item text is the
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetToolTip`             Returns the item tooltip.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetVisited`             Returns whether an hypertext item was visited or not.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetWidth`               Returns the item width, in pixels.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetWindow`              Returns the window associated to the item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetWindowEnabled`       Returns whether the associated window is enabled or not.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetWindowSize`          Returns the associated window size.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetX`                   Returns the item `x` position.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetY`                   Returns the item `y` position.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.HasBackgroundColour`    Returns ``True`` if the currently set background colour is valid.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.HasColour`              Returns ``True`` if the currently set text colour is valid.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.HasFont`                Returns ``True`` if the currently set font is valid.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.HasImage`               Returns ``True`` if the item has at least one image associated with it.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.HasText`                Returns ``True`` if the item text is not the empty string.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.Init`                   Initializes the item data structure.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.IsChecked`              Returns whether the item is checked or not.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.IsEnabled`              Returns ``True`` if the item is enabled, ``False`` if it is disabled.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.IsHit`                  Returns ``True`` if the input position is inside the item client rectangle.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.IsHyperText`            Returns whether the item is hypetext or not.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetAttr`                Sets the item attributes.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetBackgroundColour`    Sets the background colour for the item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetColour`              Sets the text colour for the item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetCustomRenderer`      Associate a custom renderer to this item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetData`                Sets client data for the item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetFont`                Sets the text font for the item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetHyperText`           Sets whether the item is hypertext or not.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetImage`               Sets the zero-based indexes of the images associated with the item into the
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetItem`                Sets information about the item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetKind`                Sets the item kind.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetOverFlow`            Sets the item in the overflow/non overflow state.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetPosition`            Sets the item position.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetSize`                Sets the item size.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetText`                Sets the text label for the item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetToolTip`             Sets the tooltip for the item
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetVisited`             Sets whether an hypertext item was visited or not.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetWindow`              Sets the window associated to the item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetWindowEnabled`       Sets whether the associated window is enabled or not.
================================================================================ ================================================================================


|


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


.. class:: UltimateListItemData(object)

   A simple class which holds information about :class:`UltimateListItem` visual
   attributes (client rectangles, positions, etc...).

   .. method:: __init__(self, owner)

      Default class constructor
      
      :param `owner`: an instance of :class:`UltimateListCtrl`.


   .. method:: Check(self, checked=True)

      Checks/unchecks an item.
      
      :param `checked`: ``True`` to check an item, ``False`` to uncheck it.
      
      :note: This method is meaningful only for check and radio items.


   .. method:: DeleteWindow(self)

      Deletes the window associated to the item (if any). 


   .. method:: Enable(self, enable=True)

      Enables or disables the item.
      
      :param `enable`: ``True`` to enable the item, ``False`` to disable it.


   .. method:: GetAttr(self)

      Returns the item attributes. 


   .. method:: GetBackgroundColour(self)

      Returns the currently set background colour. 


   .. method:: GetColour(self)

      Returns the currently set text colour. 


   .. method:: GetCustomRenderer(self)

      Returns the custom renderer associated with this item (if any). 


   .. method:: GetFont(self)

      Returns the currently set font. 


   .. method:: GetHeight(self)

      Returns the item height, in pixels. 


   .. method:: GetImage(self)

      Returns a Python list with the zero-based indexes of the images associated
      with the item into the image list.


   .. method:: GetItem(self, info)

      Returns information about the item.
      
      :param `info`: an instance of :class:`UltimateListItemData`.


   .. method:: GetKind(self)

      Returns the item kind.
      
      :see: :meth:`~UltimateListItemData.SetKind` for a list of valid item kinds.


   .. method:: GetOverFlow(self)

      Returns if the item is in the overflow state.
      
      An item/subitem may overwrite neighboring items/subitems if its text would
      not normally fit in the space allotted to it.


   .. method:: GetText(self)

      Returns the item text. 


   .. method:: GetTextForMeasuring(self)

      Returns the item text or a simple string if the item text is the
      empty string.


   .. method:: GetToolTip(self)

      Returns the item tooltip. 


   .. method:: GetVisited(self)

      Returns whether an hypertext item was visited or not.


   .. method:: GetWidth(self)

      Returns the item width, in pixels. 


   .. method:: GetWindow(self)

      Returns the window associated to the item. 


   .. method:: GetWindowEnabled(self)

      Returns whether the associated window is enabled or not. 


   .. method:: GetWindowSize(self)

      Returns the associated window size. 


   .. method:: GetX(self)

      Returns the item `x` position. 


   .. method:: GetY(self)

      Returns the item `y` position. 


   .. method:: HasBackgroundColour(self)

      Returns ``True`` if the currently set background colour is valid. 


   .. method:: HasColour(self)

      Returns ``True`` if the currently set text colour is valid. 


   .. method:: HasFont(self)

      Returns ``True`` if the currently set font is valid. 


   .. method:: HasImage(self)

      Returns ``True`` if the item has at least one image associated with it. 


   .. method:: HasText(self)

      Returns ``True`` if the item text is not the empty string. 


   .. method:: Init(self)

      Initializes the item data structure. 


   .. method:: IsChecked(self)

      Returns whether the item is checked or not. 


   .. method:: IsEnabled(self)

      Returns ``True`` if the item is enabled, ``False`` if it is disabled. 


   .. method:: IsHit(self, x, y)

      Returns ``True`` if the input position is inside the item client rectangle.
      
      :param `x`: the `x` mouse position;
      :param `y`: the `y` mouse position.


   .. method:: IsHyperText(self)

      Returns whether the item is hypetext or not.


   .. method:: SetAttr(self, attr)

      Sets the item attributes.
      
      :param `attr`: an instance of :class:`UltimateListItemAttr`.


   .. method:: SetBackgroundColour(self, colour)

      Sets the background colour for the item.
      
      :param `colour`: an instance of :class:`wx.Colour`.


   .. method:: SetColour(self, colour)

      Sets the text colour for the item.
      
      :param `colour`: an instance of :class:`wx.Colour`.


   .. method:: SetCustomRenderer(self, renderer)

      Associate a custom renderer to this item.
      
      :param `renderer`: a class able to correctly render the item.
      
      :note: the renderer class **must** implement the methods `DrawSubItem`,
       `GetLineHeight` and `GetSubItemWidth`.


   .. method:: SetData(self, data)

      Sets client data for the item.
      
      :param `data`: the client data associated to the item.
      
      :note: Please note that client data is associated with the item and not
       with subitems.


   .. method:: SetFont(self, font)

      Sets the text font for the item.
      
      :param `font`: an instance of :class:`wx.Font`.


   .. method:: SetHyperText(self, hyper=True)

      Sets whether the item is hypertext or not.
      
      :param `hyper`: ``True`` to set hypertext behaviour, ``False`` otherwise.


   .. method:: SetImage(self, image)

      Sets the zero-based indexes of the images associated with the item into the
      image list.
      
      :param `image`: a Python list with the zero-based indexes of the images
       associated with the item into the image list.


   .. method:: SetItem(self, info)

      Sets information about the item.
      
      :param `info`: an instance of :class:`UltimateListItemData`.


   .. method:: SetKind(self, kind)

      Sets the item kind.
      
      :param `kind`: may be one of the following integers:
      
       =============== ==========================
       Item Kind       Description
       =============== ==========================
              0        A normal item
              1        A checkbox-like item
              2        A radiobutton-type item
       =============== ==========================


   .. method:: SetOverFlow(self, over=True)

      Sets the item in the overflow/non overflow state.
      
      An item/subitem may overwrite neighboring items/subitems if its text would
      not normally fit in the space allotted to it.
      
      :param `over`: ``True`` to set the item in a overflow state, ``False`` otherwise.


   .. method:: SetPosition(self, x, y)

      Sets the item position.
      
      :param `x`: the item `x` position;
      :param `y`: the item `y` position.


   .. method:: SetSize(self, width, height)

      Sets the item size.
      
      :param `width`: the item width, in pixels;
      :param `height`: the item height, in pixels.


   .. method:: SetText(self, text)

      Sets the text label for the item.
      
      :param `text`: the text label for the item.


   .. method:: SetToolTip(self, tooltip)

      Sets the tooltip for the item
      
      :param `tooltip`: the tooltip text


   .. method:: SetVisited(self, visited=True)

      Sets whether an hypertext item was visited or not.
      
      :param `visited`: ``True`` to set a hypertext item as visited, ``False`` otherwise.


   .. method:: SetWindow(self, wnd, expand=False)

      Sets the window associated to the item.
      
      :param `wnd`: a non-toplevel window to be displayed next to the item;
      :param `expand`: ``True`` to expand the column where the item/subitem lives,
       so that the window will be fully visible.


   .. method:: SetWindowEnabled(self, enable=True)

      Sets whether the associated window is enabled or not.
      
      :param `enable`: ``True`` to enable the associated window, ``False`` to disable it.