20#ifndef KWIDGETLISTBOX_H
21#define KWIDGETLISTBOX_H
29typedef bool (*show_callback) (
int index, TQWidget* widget,
void* data);
31class KWidgetListbox :
public TQTable
37 KWidgetListbox(TQWidget *parent = 0,
const char *name = 0);
40 int insertItem(TQWidget* item,
int index = -1);
41 void setSelected(TQWidget* item);
42 void setSelected(
int index);
43 void removeItem(TQWidget* item);
44 void removeItem(
int index);
47 TQWidget* selectedItem()
const;
48 TQWidget* item(
int index)
const;
49 int index(TQWidget* itm)
const;
50 uint count()
const {
return numRows(); };
52 void showItems(show_callback func = 0,
void* data = 0);
54 void paintCell(TQPainter* p,
int row,
int col,
const TQRect& cr,
55 bool selected,
const TQColorGroup& cg);
57 void setItemColors(
int index,
bool even);
60 virtual void showEvent(TQShowEvent* e);
63 void selectionChanged(
int row,
int col);
66 void selected(
int index);