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
,
19 BC_ListBoxItem(char *text
,
25 // autoplace is always 1 in initialization.
26 // Positions set with the set_ commands cancel autoplacement.
27 // Final positions are calculated in the next draw_items.
29 virtual ~BC_ListBoxItem();
31 friend class BC_ListBox
;
33 BC_ListBoxItem
& operator=(BC_ListBoxItem
& item
);
34 void copy_from(BC_ListBoxItem
*item
);
35 void set_text(char *new_text
);
37 void set_icon(BC_Pixmap
*icon
);
38 void set_icon_vframe(VFrame
*icon_vframe
);
43 void set_icon_x(int x
);
44 void set_icon_y(int y
);
45 void set_text_x(int x
);
46 void set_text_y(int y
);
47 void set_color(int color
);
48 void set_searchable(int value
);
50 void set_selected(int value
);
51 int set_autoplace_icon(int value
);
52 int set_autoplace_text(int value
);
53 void set_selectable(int value
);
56 // The item with the sublist must be in column 0. Only this is searched by
58 // Mind you, sublists are ignored in icon mode.
59 ArrayList
<BC_ListBoxItem
*>* new_sublist(int columns
);
60 ArrayList
<BC_ListBoxItem
*>* get_sublist();
61 // Return the number of columns in the sublist
63 // Return if it's expanded
65 void set_expand(int value
);
75 // x and y position in listbox relative to top left
76 // Different positions for icon mode and text mode are maintained
79 // If autoplacement should be performed in the next draw
80 int autoplace_icon
, autoplace_text
;
83 // 1 - currently selected
84 // 2 - previously selected and now adding selections with shift
86 // Allow this item to be included in queries. Directories are not
87 // included in queries.
90 // Array of one list of pointers for each column for a sublist.
91 // It's an array so we can pass the sublist directly to another listbox.
92 ArrayList
<BC_ListBoxItem
*> *sublist
;