Package dtk :: Package ui :: Module listview

Module listview

source code

Classes
  ListView
Powerful listview widget.
  ListItem
ListItem template to build your own item for ListView.
Functions
 
render_text(cr, rect, content, in_select, in_highlight, align=ALIGN_START, font_size=DEFAULT_FONT_SIZE)
Helper render text function for ListItem, you should implement your own.
source code
 
render_image(cr, rect, image_path, x, y)
Helper render image function for ListItem, you should implement your own.
source code
Function Details

render_text(cr, rect, content, in_select, in_highlight, align=ALIGN_START, font_size=DEFAULT_FONT_SIZE)

source code 

Helper render text function for ListItem, you should implement your own.

Parameters:
  • cr - Cairo context.
  • rect - Draw area.
  • content - Content.
  • in_select - Whether item is selected.
  • in_highlight - Whether item is highlighted.
  • align - Render alignment option, default is ALIGN_START.
  • font_size - Render font size, default is DEFAULT_FONT_SIZE.

render_image(cr, rect, image_path, x, y)

source code 

Helper render image function for ListItem, you should implement your own.

Parameters:
  • cr - Cairo context.
  • rect - Draw area.
  • image_path - Image path.
  • x - X coordiante of draw position.
  • y - Y coordiante of draw position.