1 #ifndef BCLISTBOXITEM_H
2 #define BCLISTBOXITEM_H
5 #include "bcpixmap.inc"
11 // Every item in a list inherits this
17 BC_ListBoxItem(char *text
, int color
= BLACK
);
18 BC_ListBoxItem(char *text
,
24 // autoplace is always 1 in initialization.
25 // Positions set with the set_ commands cancel autoplacement.
26 // Final positions are calculated in the next draw_items.
28 virtual ~BC_ListBoxItem();
30 friend class BC_ListBox
;
32 BC_ListBoxItem
& operator=(BC_ListBoxItem
& item
);
33 void copy_from(BC_ListBoxItem
*item
);
34 void set_text(char *new_text
);
36 void set_icon(BC_Pixmap
*icon
);
37 void set_icon_vframe(VFrame
*icon_vframe
);
42 void set_icon_x(int x
);
43 void set_icon_y(int y
);
44 void set_text_x(int x
);
45 void set_text_y(int y
);
46 void set_color(int color
);
47 void set_searchable(int value
);
49 void set_selected(int value
);
50 int set_autoplace_icon(int value
);
51 int set_autoplace_text(int value
);
52 void set_selectable(int value
);
55 // The item with the sublist must be in column 0. Only this is searched by
57 // Mind you, sublists are ignored in icon mode.
58 ArrayList
<BC_ListBoxItem
*>* new_sublist(int columns
);
59 ArrayList
<BC_ListBoxItem
*>* get_sublist();
60 // Return the number of columns in the sublist
62 // Return if it's expanded
64 void set_expand(int value
);
74 // x and y position in listbox relative to top left
75 // Different positions for icon mode and text mode are maintained
78 // If autoplacement should be performed in the next draw
79 int autoplace_icon
, autoplace_text
;
82 // 1 - currently selected
83 // 2 - previously selected and now adding selections with shift
85 // Allow this item to be included in queries. Directories are not
86 // included in queries.
89 // Array of one list of pointers for each column for a sublist.
90 // It's an array so we can pass the sublist directly to another listbox.
91 ArrayList
<BC_ListBoxItem
*> *sublist
;