phoenix_title wx.lib.agw.ultimatelistctrl.UltimateListLineData

A simple class which holds line geometries for UltimateListCtrl.


class_hierarchy Class Hierarchy

Inheritance diagram for class UltimateListLineData:

method_summary Methods Summary

__init__

Default class constructor.

CalculateSize

Calculates the line size and item positions.

Check

Checks/unchecks an item.

Draw

Draws the line on the specified device context.

DrawHorizontalGradient

Gradient fill from colour 1 to colour 2 from left to right.

DrawInReportMode

Draws the line on the specified device context when the parent UltimateListCtrl

DrawTextFormatted

Draws the item text, correctly formatted.

DrawVerticalGradient

Gradient fill from colour 1 to colour 2 from top to bottom.

DrawVistaRectangle

Draws the selected item(s) with the Windows Vista style.

GetAttr

Returns an instance of UltimateListItemAttr associated with the first item

GetHeight

Returns the line height, in pixels.

GetImage

Returns a Python list with the zero-based indexes of the images associated

GetItem

Returns information about the item.

GetKind

Returns the item kind.

GetMode

Returns the current highlighting mode.

GetText

Returns the item text at the position index.

GetToolTip

Returns the item tooltip at the position index.

GetWidth

Returns the line width.

GetX

Returns the line x position.

GetY

Returns the line y position.

HasImage

Returns True if the first item in the line has at least one image

HasMode

Returns True if the parent UltimateListCtrl has the window

HasText

Returns True if the text of first item in the line is not the empty

HideItemWindow

If the input item has a window associated with it, hide it.

Highlight

Sets the current line as highlighted or not highlighted.

InitItems

Initializes the list of items.

InReportView

Returns True if the parent UltimateListCtrl is in report view.

IsChecked

Returns whether the item is checked or not.

IsHighlighted

Returns True if the line is highlighted.

IsVirtual

Returns True if the parent UltimateListCtrl has the ULC_VIRTUAL style set.

ResetDimensions

Resets the line dimensions (client rectangle).

ReverseHighlight

Reverses the line highlighting, switching it off if it was on and vice-versa.

SetAttr

Sets an instance of UltimateListItemAttr to the first item in the line.

SetAttributes

Sets various attributes to the input device context.

SetColour

Sets the text colour for the item.

SetHeight

Sets the line height.

SetImage

Sets the zero-based indexes of the images associated with the item into the

SetItem

Sets information about the item.

SetKind

Sets the item kind.

SetPosition

Sets the line position.

SetReportView

Sets whether UltimateListLineData is in report view or not.

SetText

Sets the item text at the position index.

SetToolTip

Sets the item tooltip at the position index.

SetWidth

Sets the line width.

SetX

Sets the line x position.

SetY

Sets the line y position.


api Class API

class UltimateListLineData(object)

A simple class which holds line geometries for UltimateListCtrl.


Methods

__init__(self, owner)

Default class constructor.

Parameters:

owner – an instance of UltimateListCtrl.



CalculateSize(self, dc, spacing)

Calculates the line size and item positions.

Parameters:
  • dc – an instance of wx.DC;

  • spacing – the spacing between the items, in pixels.



Check(self, index, checked=True)

Checks/unchecks an item.

Parameters:
  • index – the index of the item;

  • checkedTrue to check an item, False to uncheck it.

Note

This method is meaningful only for check and radio items.



Draw(self, line, dc)

Draws the line on the specified device context.

Parameters:


DrawHorizontalGradient(self, dc, rect, hasfocus)

Gradient fill from colour 1 to colour 2 from left to right.

Parameters:
  • dc – an instance of wx.DC;

  • rect – the rectangle to be filled with the gradient shading;

  • hasfocusTrue if the main UltimateListCtrl has focus, False otherwise.



DrawInReportMode(self, dc, line, rect, rectHL, highlighted, current, enabled, oldPN, oldBR)

Draws the line on the specified device context when the parent UltimateListCtrl is in report mode.

Parameters:
  • dc – an instance of wx.DC;

  • line – an instance of UltimateListLineData;

  • rect – the item client rectangle;

  • rectHL – the item client rectangle when the item is highlighted;

  • highlightedTrue if the item is highlighted, False otherwise;

  • currentTrue if the item is the current item;

  • enabledTrue if the item is enabled, False otherwise;

  • oldPN – an instance of wx.Pen, to save and restore at the end of the drawing;

  • oldBR – an instance of wx.Brush, to save and restore at the end of the drawing.



DrawTextFormatted(self, dc, text, row, col, itemRect, overflow)

Draws the item text, correctly formatted.

Parameters:
  • dc – an instance of wx.DC;

  • text – the item text;

  • row – the line number to which this item belongs to;

  • col – the column number to which this item belongs to;

  • itemRect – the item client rectangle;

  • overflowTrue if the item should overflow into neighboring columns, False otherwise.



DrawVerticalGradient(self, dc, rect, hasfocus)

Gradient fill from colour 1 to colour 2 from top to bottom.

Parameters:
  • dc – an instance of wx.DC;

  • rect – the rectangle to be filled with the gradient shading;

  • hasfocusTrue if the main UltimateListCtrl has focus, False otherwise.



DrawVistaRectangle(self, dc, rect, hasfocus)

Draws the selected item(s) with the Windows Vista style.

Parameters:
  • dc – an instance of wx.DC;

  • rect – the rectangle to be filled with the gradient shading;

  • hasfocusTrue if the main UltimateListCtrl has focus, False otherwise.



GetAttr(self)

Returns an instance of UltimateListItemAttr associated with the first item in the line.



GetHeight(self)

Returns the line height, in pixels.



GetImage(self, index=0)

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

Parameters:

index – the index of the item.



GetItem(self, index, info)

Returns information about the item.

Parameters:


GetKind(self, index=0)

Returns the item kind.

Parameters:

index – the index of the item.

See also

SetKind for a list of valid item kinds.



GetMode(self)

Returns the current highlighting mode.



GetText(self, index)

Returns the item text at the position index.

Parameters:

index – the index of the item.



GetToolTip(self, index)

Returns the item tooltip at the position index.

Parameters:

index – the index of the item.



GetWidth(self)

Returns the line width.



GetX(self)

Returns the line x position.



GetY(self)

Returns the line y position.



HasImage(self, col=0)

Returns True if the first item in the line has at least one image associated with it.



HasMode(self, mode)

Returns True if the parent UltimateListCtrl has the window style specified by mode.

Parameters:

mode – the window style to check.



HasText(self)

Returns True if the text of first item in the line is not the empty string.



HideItemWindow(self, item)

If the input item has a window associated with it, hide it.

Parameters:

item – an instance of UltimateListItem.



Highlight(self, on)

Sets the current line as highlighted or not highlighted.

Parameters:

onTrue to set the current line as highlighted, False otherwise.



InitItems(self, num)

Initializes the list of items.

Parameters:

num – the initial number of items to store.



InReportView(self)

Returns True if the parent UltimateListCtrl is in report view.



IsChecked(self, index)

Returns whether the item is checked or not.

Parameters:

index – the index of the item.



IsHighlighted(self)

Returns True if the line is highlighted.



IsVirtual(self)

Returns True if the parent UltimateListCtrl has the ULC_VIRTUAL style set.



ResetDimensions(self)

Resets the line dimensions (client rectangle).



ReverseHighlight(self)

Reverses the line highlighting, switching it off if it was on and vice-versa.



SetAttr(self, attr)

Sets an instance of UltimateListItemAttr to the first item in the line.

Parameters:

attr – an instance of UltimateListItemAttr.



SetAttributes(self, dc, attr, highlighted)

Sets various attributes to the input device context.

Parameters:
  • dc – an instance of wx.DC;

  • attr – an instance of UltimateListItemAttr;

  • highlightedTrue if the item is highlighted, False otherwise.



SetColour(self, index, c)

Sets the text colour for the item.

Parameters:
  • index – the index of the item;

  • c – an instance of wx.Colour.



SetHeight(self, height)

Sets the line height.

Parameters:

height – the new line height.



SetImage(self, index, image)

Sets the zero-based indexes of the images associated with the item into the image list.

Parameters:
  • index – the index of the item;

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



SetItem(self, index, info)

Sets information about the item.

Parameters:


SetKind(self, index, kind=0)

Sets the item kind.

Parameters:
  • index – the index of the item;

  • 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



SetPosition(self, x, y, spacing)

Sets the line position.

Parameters:
  • x – the current x coordinate;

  • y – the current y coordinate;

  • spacing – the spacing between items, in pixels.



SetReportView(self, inReportView)

Sets whether UltimateListLineData is in report view or not.

Parameters:

inReportViewTrue to set UltimateListLineData in report view, False otherwise.



SetText(self, index, s)

Sets the item text at the position index.

Parameters:
  • index – the index of the item;

  • s – the new item text.



SetToolTip(self, index, s)

Sets the item tooltip at the position index.

Parameters:
  • index – the index of the item;

  • s – the new item tooltip.



SetWidth(self, width)

Sets the line width.

Parameters:

width – the new line width.



SetX(self, x)

Sets the line x position.

Parameters:

x – the new line x position.



SetY(self, y)

Sets the line y position.

Parameters:

y – the new line y position.