.. 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 .. currentmodule:: wx.lib.agw.ultimatelistctrl .. highlight:: python .. _wx.lib.agw.ultimatelistctrl.UltimateListLineData: ========================================================================================================================================== |phoenix_title| **wx.lib.agw.ultimatelistctrl.UltimateListLineData** ========================================================================================================================================== A simple class which holds line geometries for :class:`UltimateListCtrl`. | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class UltimateListLineData:
| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.__init__` Default class constructor. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.CalculateSize` Calculates the line size and item positions. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.Check` Checks/unchecks an item. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.Draw` Draws the line on the specified device context. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.DrawHorizontalGradient` Gradient fill from colour 1 to colour 2 from left to right. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.DrawInReportMode` Draws the line on the specified device context when the parent :class:`UltimateListCtrl` :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.DrawTextFormatted` Draws the item text, correctly formatted. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.DrawVerticalGradient` Gradient fill from colour 1 to colour 2 from top to bottom. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.DrawVistaRectangle` Draws the selected item(s) with the Windows Vista style. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.GetAttr` Returns an instance of :class:`UltimateListItemAttr` associated with the first item :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.GetHeight` Returns the line height, in pixels. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.GetImage` Returns a Python list with the zero-based indexes of the images associated :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.GetItem` Returns information about the item. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.GetKind` Returns the item kind. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.GetMode` Returns the current highlighting mode. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.GetText` Returns the item text at the position `index`. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.GetToolTip` Returns the item tooltip at the position `index`. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.GetWidth` Returns the line width. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.GetX` Returns the line `x` position. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.GetY` Returns the line `y` position. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.HasImage` Returns ``True`` if the first item in the line has at least one image :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.HasMode` Returns ``True`` if the parent :class:`UltimateListCtrl` has the window :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.HasText` Returns ``True`` if the text of first item in the line is not the empty :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.HideItemWindow` If the input item has a window associated with it, hide it. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.Highlight` Sets the current line as highlighted or not highlighted. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.InitItems` Initializes the list of items. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.InReportView` Returns ``True`` if the parent :class:`UltimateListCtrl` is in report view. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.IsChecked` Returns whether the item is checked or not. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.IsHighlighted` Returns ``True`` if the line is highlighted. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.IsVirtual` Returns ``True`` if the parent :class:`UltimateListCtrl` has the ``ULC_VIRTUAL`` style set. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.ResetDimensions` Resets the line dimensions (client rectangle). :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.ReverseHighlight` Reverses the line highlighting, switching it off if it was on and vice-versa. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.SetAttr` Sets an instance of :class:`UltimateListItemAttr` to the first item in the line. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.SetAttributes` Sets various attributes to the input device context. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.SetColour` Sets the text colour for the item. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.SetHeight` Sets the line height. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.SetImage` Sets the zero-based indexes of the images associated with the item into the :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.SetItem` Sets information about the item. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.SetKind` Sets the item kind. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.SetPosition` Sets the line position. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.SetReportView` Sets whether :class:`UltimateListLineData` is in report view or not. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.SetText` Sets the item text at the position `index`. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.SetToolTip` Sets the item tooltip at the position `index`. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.SetWidth` Sets the line width. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.SetX` Sets the line `x` position. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListLineData.SetY` Sets the line `y` position. ================================================================================ ================================================================================ | |api| Class API =============== .. class:: UltimateListLineData(object) A simple class which holds line geometries for :class:`UltimateListCtrl`. .. method:: __init__(self, owner) Default class constructor. :param `owner`: an instance of :class:`UltimateListCtrl`. .. method:: CalculateSize(self, dc, spacing) Calculates the line size and item positions. :param `dc`: an instance of :class:`wx.DC`; :param `spacing`: the spacing between the items, in pixels. .. method:: Check(self, index, checked=True) Checks/unchecks an item. :param `index`: the index of the item; :param `checked`: ``True`` to check an item, ``False`` to uncheck it. .. note:: This method is meaningful only for check and radio items. .. method:: Draw(self, line, dc) Draws the line on the specified device context. :param `line`: an instance of :class:`UltimateListLineData`; :param `dc`: an instance of :class:`wx.DC`. .. method:: DrawHorizontalGradient(self, dc, rect, hasfocus) Gradient fill from colour 1 to colour 2 from left to right. :param `dc`: an instance of :class:`wx.DC`; :param `rect`: the rectangle to be filled with the gradient shading; :param `hasfocus`: ``True`` if the main :class:`UltimateListCtrl` has focus, ``False`` otherwise. .. method:: DrawInReportMode(self, dc, line, rect, rectHL, highlighted, current, enabled, oldPN, oldBR) Draws the line on the specified device context when the parent :class:`UltimateListCtrl` is in report mode. :param `dc`: an instance of :class:`wx.DC`; :param `line`: an instance of :class:`UltimateListLineData`; :param `rect`: the item client rectangle; :param `rectHL`: the item client rectangle when the item is highlighted; :param `highlighted`: ``True`` if the item is highlighted, ``False`` otherwise; :param `current`: ``True`` if the item is the current item; :param `enabled`: ``True`` if the item is enabled, ``False`` otherwise; :param `oldPN`: an instance of :class:`wx.Pen`, to save and restore at the end of the drawing; :param `oldBR`: an instance of :class:`wx.Brush`, to save and restore at the end of the drawing. .. method:: DrawTextFormatted(self, dc, text, row, col, itemRect, overflow) Draws the item text, correctly formatted. :param `dc`: an instance of :class:`wx.DC`; :param `text`: the item text; :param `row`: the line number to which this item belongs to; :param `col`: the column number to which this item belongs to; :param `itemRect`: the item client rectangle; :param `overflow`: ``True`` if the item should overflow into neighboring columns, ``False`` otherwise. .. method:: DrawVerticalGradient(self, dc, rect, hasfocus) Gradient fill from colour 1 to colour 2 from top to bottom. :param `dc`: an instance of :class:`wx.DC`; :param `rect`: the rectangle to be filled with the gradient shading; :param `hasfocus`: ``True`` if the main :class:`UltimateListCtrl` has focus, ``False`` otherwise. .. method:: DrawVistaRectangle(self, dc, rect, hasfocus) Draws the selected item(s) with the Windows Vista style. :param `dc`: an instance of :class:`wx.DC`; :param `rect`: the rectangle to be filled with the gradient shading; :param `hasfocus`: ``True`` if the main :class:`UltimateListCtrl` has focus, ``False`` otherwise. .. method:: GetAttr(self) Returns an instance of :class:`UltimateListItemAttr` associated with the first item in the line. .. method:: GetHeight(self) Returns the line height, in pixels. .. method:: GetImage(self, index=0) Returns a Python list with the zero-based indexes of the images associated with the item into the image list. :param `index`: the index of the item. .. method:: GetItem(self, index, info) Returns information about the item. :param `index`: the index of the item; :param `info`: an instance of :class:`UltimateListItem`. .. method:: GetKind(self, index=0) Returns the item kind. :param `index`: the index of the item. .. seealso:: :meth:`~UltimateListLineData.SetKind` for a list of valid item kinds. .. method:: GetMode(self) Returns the current highlighting mode. .. method:: GetText(self, index) Returns the item text at the position `index`. :param `index`: the index of the item. .. method:: GetToolTip(self, index) Returns the item tooltip at the position `index`. :param `index`: the index of the item. .. method:: GetWidth(self) Returns the line width. .. method:: GetX(self) Returns the line `x` position. .. method:: GetY(self) Returns the line `y` position. .. method:: HasImage(self, col=0) Returns ``True`` if the first item in the line has at least one image associated with it. .. method:: HasMode(self, mode) Returns ``True`` if the parent :class:`UltimateListCtrl` has the window style specified by `mode`. :param `mode`: the window style to check. .. method:: HasText(self) Returns ``True`` if the text of first item in the line is not the empty string. .. method:: HideItemWindow(self, item) If the input item has a window associated with it, hide it. :param `item`: an instance of :class:`UltimateListItem`. .. method:: Highlight(self, on) Sets the current line as highlighted or not highlighted. :param `on`: ``True`` to set the current line as highlighted, ``False`` otherwise. .. method:: InitItems(self, num) Initializes the list of items. :param `num`: the initial number of items to store. .. method:: InReportView(self) Returns ``True`` if the parent :class:`UltimateListCtrl` is in report view. .. method:: IsChecked(self, index) Returns whether the item is checked or not. :param `index`: the index of the item. .. method:: IsHighlighted(self) Returns ``True`` if the line is highlighted. .. method:: IsVirtual(self) Returns ``True`` if the parent :class:`UltimateListCtrl` has the ``ULC_VIRTUAL`` style set. .. method:: ResetDimensions(self) Resets the line dimensions (client rectangle). .. method:: ReverseHighlight(self) Reverses the line highlighting, switching it off if it was on and vice-versa. .. method:: SetAttr(self, attr) Sets an instance of :class:`UltimateListItemAttr` to the first item in the line. :param `attr`: an instance of :class:`UltimateListItemAttr`. .. method:: SetAttributes(self, dc, attr, highlighted) Sets various attributes to the input device context. :param `dc`: an instance of :class:`wx.DC`; :param `attr`: an instance of :class:`UltimateListItemAttr`; :param `highlighted`: ``True`` if the item is highlighted, ``False`` otherwise. .. method:: SetColour(self, index, c) Sets the text colour for the item. :param `index`: the index of the item; :param `c`: an instance of :class:`wx.Colour`. .. method:: SetHeight(self, height) Sets the line height. :param `height`: the new line height. .. method:: SetImage(self, index, image) Sets the zero-based indexes of the images associated with the item into the image list. :param `index`: the index of the item; :param `image`: a Python list with the zero-based indexes of the images associated with the item into the image list. .. method:: SetItem(self, index, info) Sets information about the item. :param `index`: the index of the item; :param `info`: an instance of :class:`UltimateListItem`. .. method:: SetKind(self, index, kind=0) Sets the item kind. :param `index`: the index of the item; :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:: SetPosition(self, x, y, spacing) Sets the line position. :param `x`: the current `x` coordinate; :param `y`: the current `y` coordinate; :param `spacing`: the spacing between items, in pixels. .. method:: SetReportView(self, inReportView) Sets whether :class:`UltimateListLineData` is in report view or not. :param `inReportView`: ``True`` to set :class:`UltimateListLineData` in report view, ``False`` otherwise. .. method:: SetText(self, index, s) Sets the item text at the position `index`. :param `index`: the index of the item; :param `s`: the new item text. .. method:: SetToolTip(self, index, s) Sets the item tooltip at the position `index`. :param `index`: the index of the item; :param `s`: the new item tooltip. .. method:: SetWidth(self, width) Sets the line width. :param `width`: the new line width. .. method:: SetX(self, x) Sets the line `x` position. :param `x`: the new line `x` position. .. method:: SetY(self, y) Sets the line `y` position. :param `y`: the new line `y` position.