@ -575,47 +575,51 @@ int Fl_Browser_::handle(int event) {
void * l1 = selection_ ;
void * l1 = selection_ ;
void * l = l1 ; if ( ! l ) l = top_ ; if ( ! l ) l = item_first ( ) ;
void * l = l1 ; if ( ! l ) l = top_ ; if ( ! l ) l = item_first ( ) ;
if ( l ) {
if ( l ) {
if ( type ( ) = = FL_HOLD_BROWSER ) switch ( Fl : : event_key ( ) ) {
if ( type ( ) = = FL_HOLD_BROWSER ) {
case FL_Down :
switch ( Fl : : event_key ( ) ) {
while ( ( l = item_next ( l ) ) )
case FL_Down :
if ( item_height ( l ) > 0 ) { select_only ( l , when ( ) ) ; break ; }
while ( ( l = item_next ( l ) ) )
return 1 ;
if ( item_height ( l ) > 0 ) { select_only ( l , when ( ) ) ; break ; }
case FL_Up :
return 1 ;
while ( ( l = item_prev ( l ) ) ) if ( item_height ( l ) > 0 ) {
case FL_Up :
select_only ( l , when ( ) ) ; break ; }
while ( ( l = item_prev ( l ) ) ) if ( item_height ( l ) > 0 ) {
return 1 ;
select_only ( l , when ( ) ) ; break ; }
} else switch ( Fl : : event_key ( ) ) {
return 1 ;
case FL_Enter :
}
case FL_KP_Enter :
} else {
select_only ( l , when ( ) ) ;
switch ( Fl : : event_key ( ) ) {
return 1 ;
case FL_Enter :
case ' ' :
case FL_KP_Enter :
selection_ = l ;
select_only ( l , when ( ) ) ;
select ( l , ! item_selected ( l ) , when ( ) ) ;
return 1 ;
return 1 ;
case ' ' :
case FL_Down :
selection_ = l ;
while ( ( l = item_next ( l ) ) ) {
select ( l , ! item_selected ( l ) , when ( ) ) ;
if ( Fl : : event_state ( FL_SHIFT | FL_CTRL ) )
return 1 ;
select ( l , l1 ? item_selected ( l1 ) : 1 , when ( ) ) ;
case FL_Down :
if ( item_height ( l ) > 0 ) goto J1 ;
while ( ( l = item_next ( l ) ) ) {
}
if ( Fl : : event_state ( FL_SHIFT | FL_CTRL ) )
return 1 ;
select ( l , l1 ? item_selected ( l1 ) : 1 , when ( ) ) ;
case FL_Up :
if ( item_height ( l ) > 0 ) goto J1 ;
while ( ( l = item_prev ( l ) ) ) {
}
if ( Fl : : event_state ( FL_SHIFT | FL_CTRL ) )
return 1 ;
select ( l , l1 ? item_selected ( l1 ) : 1 , when ( ) ) ;
case FL_Up :
if ( item_height ( l ) > 0 ) goto J1 ;
while ( ( l = item_prev ( l ) ) ) {
}
if ( Fl : : event_state ( FL_SHIFT | FL_CTRL ) )
return 1 ;
select ( l , l1 ? item_selected ( l1 ) : 1 , when ( ) ) ;
J1 :
if ( item_height ( l ) > 0 ) goto J1 ;
if ( selection_ ) redraw_line ( selection_ ) ;
}
selection_ = l ; redraw_line ( l ) ;
return 1 ;
display ( l ) ;
J1 :
return 1 ;
if ( selection_ ) redraw_line ( selection_ ) ;
selection_ = l ; redraw_line ( l ) ;
display ( l ) ;
return 1 ;
}
}
}
}
}
}
}
if ( Fl_Group : : handle ( event ) ) return 1 ;
if ( Fl_Group : : handle ( event ) ) return 1 ;
int X , Y , W , H ; bbox ( X , Y , W , H ) ;
int X , Y , W , H ; bbox ( X , Y , W , H ) ;
int my ;
int my ;