Package dtk :: Package ui :: Module categorybar :: Class Categorybar

Class Categorybar

source code


Categorybar.

Instance Methods
 
__init__(self, items, font_size=DEFAULT_FONT_SIZE, padding_left=20, padding_middle=10, padding_right=25)
Initialize Categorybar class.
source code
 
set_index(self, index)
Set selected item index.
source code
 
get_index(self)
Get selected index.
source code
 
get_icon_width(self, items)
Get icon width.
source code
Method Details

__init__(self, items, font_size=DEFAULT_FONT_SIZE, padding_left=20, padding_middle=10, padding_right=25)
(Constructor)

source code 

Initialize Categorybar class.

Parameters:
  • items - A list of category item, format: (icon_dpixbuf, content, click_callback)
Overrides: box.EventBox.__init__

set_index(self, index)

source code 

Set selected item index.

Parameters:
  • index - Index of selected item.

get_index(self)

source code 

Get selected index.

Returns:
Return selected item index.

get_icon_width(self, items)

source code 

Get icon width.

Parameters:
  • items - A list of category item, format: (icon_dpixbuf, content, click_callback)