AGW Logo

agw_title UltimateListLineData

A simple class which holds line geometries for UltimateListCtrl.

hierarchy Inheritance Diagram

Inheritance diagram for: UltimateListLineData

Inheritance diagram of UltimateListLineData


method_summary Methods Summary

__init__Default class constructor.
CalculateSizeCalculates the line size and item positions.
CheckChecks/unchecks an item.
DrawDraws the line on the specified device context.
DrawHorizontalGradientGradient fill from colour 1 to colour 2 from left to right.
DrawInReportModeDraws the line on the specified device context when the parent UltimateListCtrl
DrawTextFormattedDraws the item text, correctly formatted.
DrawVerticalGradientGradient fill from colour 1 to colour 2 from top to bottom.
DrawVistaRectangleDraws the selected item(s) with the Windows Vista style.
GetAttrReturns an instance of UltimateListItemAttr associated with the first item
GetHeightReturns the line height, in pixels.
GetImageReturns a Python list with the zero-based indexes of the images associated
GetItemReturns information about the item.
GetKindReturns the item kind.
GetModeReturns the current highlighting mode.
GetTextReturns the item text at the position index.
GetToolTipReturns the item tooltip at the position index.
GetWidthReturns the line width.
GetXReturns the line x position.
GetYReturns the line y position.
HasImageReturns True if the first item in the line has at least one image
HasModeReturns True if the parent UltimateListCtrl has the window
HasTextReturns True if the text of first item in the line is not the empty
HideItemWindowIf the input item has a window associated with it, hide it.
HighlightSets the current line as highlighted or not highlighted.
InReportViewReturns True if the parent UltimateListCtrl is in report view.
InitItemsInitializes the list of items.
IsCheckedReturns whether the item is checked or not.
IsHighlightedReturns True if the line is highlighted.
IsVirtualReturns True if the parent UltimateListCtrl has the ULC_VIRTUAL style set.
ResetDimensionsResets the line dimensions (client rectangle).
ReverseHighlightReverses the line highlighting, switching it off if it was on and vice-versa.
SetAttrSets an instance of UltimateListItemAttr to the first item in the line.
SetAttributesSets various attributes to the input device context.
SetColourSets the text colour for the item.
SetHeightSets the line height.
SetImageSets the zero-based indexes of the images associated with the item into the image list.
SetItemSets information about the item.
SetKindSets the item kind.
SetPositionSets the line position.
SetReportViewSets whether UltimateListLineData is in report view or not.
SetTextSets the item text at the position index.
SetToolTipSets the item tooltip at the position index.
SetWidthSets the line width.
SetXSets the line x position.
SetYSets the line y position.

API Class API

class UltimateListLineData(object)[source]

A simple class which holds line geometries for UltimateListCtrl.



__init__(owner)[source]

Default class constructor.

Parameters:owner – an instance of UltimateListCtrl.


CalculateSize(dc, spacing)[source]

Calculates the line size and item positions.

Parameters:
  • dc – an instance of wx.DC;
  • spacing – the spacing between the items, in pixels.


Check(index, checked=True)[source]

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(line, dc)[source]

Draws the line on the specified device context.

Parameters:


DrawHorizontalGradient(dc, rect, hasfocus)[source]

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(dc, line, rect, rectHL, highlighted, current, enabled, oldPN, oldBR)[source]

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(dc, text, row, col, itemRect, overflow)[source]

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(dc, rect, hasfocus)[source]

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(dc, rect, hasfocus)[source]

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()[source]

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



GetHeight()[source]

Returns the line height, in pixels.



GetImage(index=0)[source]

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(index, info)[source]

Returns information about the item.

Parameters:


GetKind(index=0)[source]

Returns the item kind.

Parameters:index – the index of the item.

See also

SetKind for a list of valid item kinds.



GetMode()[source]

Returns the current highlighting mode.



GetText(index)[source]

Returns the item text at the position index.

Parameters:index – the index of the item.


GetToolTip(index)[source]

Returns the item tooltip at the position index.

Parameters:index – the index of the item.


GetWidth()[source]

Returns the line width.



GetX()[source]

Returns the line x position.



GetY()[source]

Returns the line y position.



HasImage(col=0)[source]

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



HasMode(mode)[source]

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

Parameters:mode – the window style to check.


HasText()[source]

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



HideItemWindow(item)[source]

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

Parameters:item – an instance of UltimateListItem.


Highlight(on)[source]

Sets the current line as highlighted or not highlighted.

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


InReportView()[source]

Returns True if the parent UltimateListCtrl is in report view.



InitItems(num)[source]

Initializes the list of items.

Parameters:num – the initial number of items to store.


IsChecked(index)[source]

Returns whether the item is checked or not.

Parameters:index – the index of the item.


IsHighlighted()[source]

Returns True if the line is highlighted.



IsVirtual()[source]

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



ResetDimensions()[source]

Resets the line dimensions (client rectangle).



ReverseHighlight()[source]

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



SetAttr(attr)[source]

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

Parameters:attr – an instance of UltimateListItemAttr.


SetAttributes(dc, attr, highlighted)[source]

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(index, c)[source]

Sets the text colour for the item.

Parameters:
  • index – the index of the item;
  • c – an instance of wx.Colour.


SetHeight(height)[source]

Sets the line height.

Parameters:height – the new line height.


SetImage(index, image)[source]

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(index, info)[source]

Sets information about the item.

Parameters:


SetKind(index, kind=0)[source]

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(x, y, spacing)[source]

Sets the line position.

Parameters:
  • x – the current x coordinate;
  • y – the current y coordinate;
  • spacing – the spacing between items, in pixels.


SetReportView(inReportView)[source]

Sets whether UltimateListLineData is in report view or not.

Parameters:inReportViewTrue to set UltimateListLineData in report view, False otherwise.


SetText(index, s)[source]

Sets the item text at the position index.

Parameters:
  • index – the index of the item;
  • s – the new item text.


SetToolTip(index, s)[source]

Sets the item tooltip at the position index.

Parameters:
  • index – the index of the item;
  • s – the new item tooltip.


SetWidth(width)[source]

Sets the line width.

Parameters:width – the new line width.


SetX(x)[source]

Sets the line x position.

Parameters:x – the new line x position.


SetY(y)[source]

Sets the line y position.

Parameters:y – the new line y position.
Tree

Table Of Contents

Previous topic

UltimateListItemData

Next topic

UltimateListMainWindow