Package dtk :: Package ui :: Module listview :: Class ListItem

Class ListItem

source code


ListItem template to build your own item for ListView.


Note: This class just template to build list item, you should build new item with same interface.

Instance Methods
 
__init__(self, title, artist, length)
Initialize ListItem class.
source code
 
set_index(self, index)
Update index.
source code
 
get_index(self)
Get index.
source code
 
emit_redraw_request(self)
Emit redraw-request signal.
source code
 
update(self, title, artist, length)
Update.
source code
 
render_title(self, cr, rect, in_select, in_highlight)
Render title.
source code
 
render_artist(self, cr, rect, in_select, in_highlight)
Render artist.
source code
 
render_length(self, cr, rect, in_select, in_highlight)
Render length.
source code
 
get_column_sizes(self)
Get column sizes.
source code
 
get_renders(self)
Get render callbacks.
source code
Class Variables
  __gsignals__ = {"redraw-request":(gobject.SIGNAL_RUN_LAST, gob...
Method Details

__init__(self, title, artist, length)
(Constructor)

source code 

Initialize ListItem class.

Parameters:
  • title - Title.
  • artist - Artist.
  • length - Length.

set_index(self, index)

source code 

Update index.

This is ListView interface, you should implement it.

Parameters:
  • index - Index.

get_index(self)

source code 

Get index.

This is ListView interface, you should implement it.

emit_redraw_request(self)

source code 

Emit redraw-request signal.

This is ListView interface, you should implement it.

update(self, title, artist, length)

source code 

Update.

This is ListView interface, you should implement it.

Parameters:
  • title - Title.
  • artist - Artist.
  • length - Length.

render_title(self, cr, rect, in_select, in_highlight)

source code 

Render title.

Parameters:
  • cr - Cairo context.
  • rect - Redraw rectangle.
  • in_select - Whether current item is selected, this value pass from ListView.
  • in_highlight - Whether current item is highlighted, this value pass from ListView.

render_artist(self, cr, rect, in_select, in_highlight)

source code 

Render artist.

Parameters:
  • cr - Cairo context.
  • rect - Redraw rectangle.
  • in_select - Whether current item is selected, this value pass from ListView.
  • in_highlight - Whether current item is highlighted, this value pass from ListView.

render_length(self, cr, rect, in_select, in_highlight)

source code 

Render length.

Parameters:
  • cr - Cairo context.
  • rect - Redraw rectangle.
  • in_select - Whether current item is selected, this value pass from ListView.
  • in_highlight - Whether current item is highlighted, this value pass from ListView.

get_column_sizes(self)

source code 

Get column sizes.

This is ListView interface, you should implement it.

Returns:
Return column size tuple.

get_renders(self)

source code 

Get render callbacks.

This is ListView interface, you should implement it.

Returns:
Return render functions.

Class Variable Details

__gsignals__

Value:
{"redraw-request":(gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ()),}