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
|
.. 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.SelectionStore:
==========================================================================================================================================
|phoenix_title| **wx.lib.agw.ultimatelistctrl.SelectionStore**
==========================================================================================================================================
SelectionStore is used to store the selected items in the virtual
controls, i.e. it is well suited for storing even when the control contains
a huge (practically infinite) number of items.
Of course, internally it still has to store the selected items somehow (as
an array currently) but the advantage is that it can handle the selection
of all items (common operation) efficiently and that it could be made even
smarter in the future (e.g. store the selections as an array of ranges +
individual items) without changing its API.
|
|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>SelectionStore</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.SelectionStore_inheritance.png" alt="Inheritance diagram of SelectionStore" 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.SelectionStore.html" title="wx.lib.agw.ultimatelistctrl.SelectionStore" alt="" coords="5,5,283,35"/> </map>
</p>
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.lib.agw.ultimatelistctrl.SelectionStore.__init__` Default class constructor.
:meth:`~wx.lib.agw.ultimatelistctrl.SelectionStore.Clear` Clears the number of selected items.
:meth:`~wx.lib.agw.ultimatelistctrl.SelectionStore.GetSelectedCount` Return the total number of selected items.
:meth:`~wx.lib.agw.ultimatelistctrl.SelectionStore.IsSelected` Returns ``True`` if the given item is selected.
:meth:`~wx.lib.agw.ultimatelistctrl.SelectionStore.OnItemDelete` Must be called when an item is deleted.
:meth:`~wx.lib.agw.ultimatelistctrl.SelectionStore.SelectItem` Selects the given item.
:meth:`~wx.lib.agw.ultimatelistctrl.SelectionStore.SelectRange` Selects a range of items.
:meth:`~wx.lib.agw.ultimatelistctrl.SelectionStore.SetItemCount` Sets the total number of items we handle.
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: SelectionStore(object)
SelectionStore is used to store the selected items in the virtual
controls, i.e. it is well suited for storing even when the control contains
a huge (practically infinite) number of items.
Of course, internally it still has to store the selected items somehow (as
an array currently) but the advantage is that it can handle the selection
of all items (common operation) efficiently and that it could be made even
smarter in the future (e.g. store the selections as an array of ranges +
individual items) without changing its API.
.. method:: __init__(self)
Default class constructor.
.. method:: Clear(self)
Clears the number of selected items.
.. method:: GetSelectedCount(self)
Return the total number of selected items.
.. method:: IsSelected(self, item)
Returns ``True`` if the given item is selected.
:param `item`: the item to check for selection state.
.. method:: OnItemDelete(self, item)
Must be called when an item is deleted.
:param `item`: the item that is being deleted.
.. method:: SelectItem(self, item, select=True)
Selects the given item.
:param `item`: the item to select;
:param `select`: ``True`` to select the item, ``False`` otherwise.
:return: ``True`` if the items selection really changed.
.. method:: SelectRange(self, itemFrom, itemTo, select=True)
Selects a range of items.
:param `itemFrom`: the first index of the selection range;
:param `itemTo`: the last index of the selection range;
:param `select`: ``True`` to select the items, ``False`` otherwise.
:return: ``True`` and fill the `itemsChanged` array with the indices of items
which have changed state if "few" of them did, otherwise return ``False``
(meaning that too many items changed state to bother counting them individually).
.. method:: SetItemCount(self, count)
Sets the total number of items we handle.
:param `count`: the total number of items we handle.
|