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 461 462 463 464 465 466 467 468 469 470
|
.. 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.UltimateListLineData:
==========================================================================================================================================
|phoenix_title| **wx.lib.agw.ultimatelistctrl.UltimateListLineData**
==========================================================================================================================================
A simple class which holds line geometries for :class:`UltimateListCtrl`.
|
|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>UltimateListLineData</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.UltimateListLineData_inheritance.png" alt="Inheritance diagram of UltimateListLineData" 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.UltimateListLineData.html" title="wx.lib.agw.ultimatelistctrl.UltimateListLineData" alt="" coords="5,5,323,35"/> </map>
</p>
|
|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.
:see: :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.
|