// Lowest right icon coordinate.
current_icon_x = item->icon_x;
if(current_icon_x > *icon_x) *icon_x = current_icon_x;
- if(current_icon_x + get_item_w(item) > *next_icon_x)
+ if(current_icon_x + get_item_w(item) > *next_icon_x) {
*next_icon_x = current_icon_x + get_item_w(item);
-
+ *next_icon_y = 0;
+ }
current_icon_y = item->icon_y + get_item_h(item);
if(current_icon_y > *next_icon_y)
*next_icon_y = current_icon_y;
int x, y, w, h;
BC_ListBoxItem *item = data[master_column].values[j];
- if(display_format == LISTBOX_ICONS)
- {
+ if( display_format == LISTBOX_ICONS ||
+ display_format == LISTBOX_ICON_LIST ) {
get_icon_mask(item, x, y, w, h);
if(y + h + yposition > highest) highest = y + h + yposition;
{
get_text_mask(item, x, y, w, h);
*result += h;
-
-
// Descend into sublist
if(item->get_sublist() &&
item->get_expand())
}
}
- if((display_format == LISTBOX_TEXT ||
- display_format == LISTBOX_ICON_LIST) &&
- top_level)
+ if( display_format == LISTBOX_TEXT && top_level )
{
highest = LISTBOX_MARGIN + *result;
}
}
}
}
- else
+ else if( gui ) {
// Text is treed
- {
// Cursor is inside items rectangle
if(cursor_x >= 0 &&
cursor_x < (yscrollbar ?
//printf("BC_ListBox::button_release_event 10\n");
unset_repeat(get_resources()->scroll_repeat);
current_operation = NO_OPERATION;
- translate_coordinates(top_level->event_win,
- gui->win,
- gui->get_cursor_x(),
- gui->get_cursor_y(),
- &cursor_x,
- &cursor_y);
-
- selection_number1 =
- selection_number =
- get_cursor_item(data, cursor_x, cursor_y);
+ if( gui ) {
+ translate_coordinates(top_level->event_win, gui->win,
+ gui->get_cursor_x(), gui->get_cursor_y(),
+ &cursor_x, &cursor_y);
+ selection_number1 = selection_number =
+ get_cursor_item(data, cursor_x, cursor_y);
//printf("BC_ListBox::button_release_event %d %d\n", selection_number2, selection_number1);
+ }
if(is_popup)
{