#include "bcscrollbar.h"
#include "bcsubwindow.h"
#include "bctoggle.h"
-#include "colors.h"
+#include "bccolors.h"
#define BCPOPUPLISTBOX_W 25
#define BCPOPUPLISTBOX_H 25
int allow_drag = 0); // Allow user to drag icons around
virtual ~BC_ListBox();
- friend class BC_ListBoxToggle;
-
int initialize();
// User event handler for new selections
virtual int sort_order_event() { return 0; };
// Column moved
virtual int move_column_event() { return 0; };
+// item highlight changed
+ virtual int mouse_over_event(int no) { return 0; }
int enable();
int disable();
// Must be called in the constructor.
void set_use_button(int value);
void set_is_suggestions(int value);
-
+ void set_scroll_repeat();
+ void unset_scroll_repeat();
+ int scroll_repeat;
// change the contents
int update(ArrayList<BC_ListBoxItem*> *data,
int indent /* = 0 */,
int master_column);
+ int get_icon_x(BC_ListBoxItem *item);
+ int get_icon_y(BC_ListBoxItem *item);
+ int get_icon_w(BC_ListBoxItem *item);
+ int get_icon_h(BC_ListBoxItem *item);
+ int get_text_w(BC_ListBoxItem *item);
+ int get_text_h(BC_ListBoxItem *item);
int get_item_x(BC_ListBoxItem *item);
int get_item_y(BC_ListBoxItem *item);
int get_item_w(BC_ListBoxItem *item);
// Draw the list items
int draw_items(int flash, int bg_draw=0);
+ int is_highlighted();
+ int get_cursor_item();
private:
void delete_columns();
int get_items_height(ArrayList<BC_ListBoxItem*> *data,
int columns,
int *result = 0);
- int get_icon_w(BC_ListBoxItem *item);
- int get_icon_h(BC_ListBoxItem *item);
- int get_text_w(BC_ListBoxItem *item);
- int get_text_h(BC_ListBoxItem *item);
int get_baseline(BC_ListBoxItem *item);
int get_item_highlight(ArrayList<BC_ListBoxItem*> *data, int column, int item);
int get_item_color(ArrayList<BC_ListBoxItem*> *data, int column, int item);
// Size of the popup if there is one
char **column_titles;
int *column_width;
- int default_column_width[1];
+ int default_column_width[32];
int columns;
int master_column;
int search_column;
// More state variables
int button_highlighted;
int list_highlighted;
+ int packed_icons;
// item cursor is over. May not exist in tables.
// Must be an index since this is needed to change the database.
int highlighted_item;