.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. _wx.dataview.DataViewVirtualListModel: ========================================================================================================================================== |phoenix_title| **wx.dataview.DataViewVirtualListModel** ========================================================================================================================================== :ref:`wx.dataview.DataViewVirtualListModel` is a specialized data model which lets you address an item by its position (row) rather than its :ref:`wx.dataview.DataViewItem` and as such offers the exact same interface as :ref:`wx.dataview.DataViewIndexListModel`. The important difference is that under platforms other than macOS, using this model will result in a truly virtual control able to handle millions of items as the control doesn't store any item (a feature not supported by macOS). .. seealso:: :ref:`wx.dataview.DataViewListModel` for the API. | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class DataViewVirtualListModel:
| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.dataview.DataViewVirtualListModel.__init__` Constructor. :meth:`~wx.dataview.DataViewVirtualListModel.GetItem` Returns the :ref:`wx.dataview.DataViewItem` at the given `row`. :meth:`~wx.dataview.DataViewVirtualListModel.Reset` Call this after if the data has to be read again from the model. :meth:`~wx.dataview.DataViewVirtualListModel.RowAppended` Call this after a row has been appended to the model. :meth:`~wx.dataview.DataViewVirtualListModel.RowChanged` Call this after a row has been changed. :meth:`~wx.dataview.DataViewVirtualListModel.RowDeleted` Call this after a row has been deleted. :meth:`~wx.dataview.DataViewVirtualListModel.RowInserted` Call this after a row has been inserted at the given position. :meth:`~wx.dataview.DataViewVirtualListModel.RowPrepended` Call this after a row has been prepended to the model. :meth:`~wx.dataview.DataViewVirtualListModel.RowValueChanged` Call this after a value has been changed. :meth:`~wx.dataview.DataViewVirtualListModel.RowsDeleted` Call this after rows have been deleted. ================================================================================ ================================================================================ | |api| Class API =============== .. class:: wx.dataview.DataViewVirtualListModel(DataViewListModel) **Possible constructors**:: DataViewVirtualListModel(initial_size=0) DataViewVirtualListModel is a specialized data model which lets you address an item by its position (row) rather than its DataViewItem and as such offers the exact same interface as DataViewIndexListModel. .. method:: __init__(self, initial_size=0) Constructor. :param `initial_size`: :type `initial_size`: int .. method:: GetItem(self, row) Returns the :ref:`wx.dataview.DataViewItem` at the given `row`. :param `row`: :type `row`: int :rtype: :ref:`wx.dataview.DataViewItem` .. method:: Reset(self, new_size) Call this after if the data has to be read again from the model. This is useful after major changes when calling the methods below (possibly thousands of times) doesn't make sense. :param `new_size`: :type `new_size`: int .. method:: RowAppended(self) Call this after a row has been appended to the model. .. method:: RowChanged(self, row) Call this after a row has been changed. :param `row`: :type `row`: int .. method:: RowDeleted(self, row) Call this after a row has been deleted. :param `row`: :type `row`: int .. method:: RowInserted(self, before) Call this after a row has been inserted at the given position. :param `before`: :type `before`: int .. method:: RowPrepended(self) Call this after a row has been prepended to the model. .. method:: RowValueChanged(self, row, col) Call this after a value has been changed. :param `row`: :type `row`: int :param `col`: :type `col`: int .. method:: RowsDeleted(self, rows) Call this after rows have been deleted. The array will internally get copied and sorted in descending order so that the rows with the highest position will be deleted first. :param `rows`: :type `rows`: list of integers