rem: if (bPtr->highlightedItem >= WMGetBagItemCount(bPtr->items)) bPtr->highlightedItem = WMGetBagItemCount(bPtr->items)-1;
context: autoScroll(void *data){    PopUpButton *bPtr = (PopUpButton*)data;    int scrHeight = WMWidgetScreen(bPtr)->rootView->size.height;    int repeat = 0;    int dy = 0;    if (bPtr->scrollStartY > scrHeight-1	&& bPtr->menuView->pos.y+bPtr->menuView->size.height > scrHeight-1) {	repeat = 1;	if (bPtr->menuView->pos.y+bPtr->menuView->size.height-5 	    <= scrHeight - 1) {	    dy = scrHeight - 1		- (bPtr->menuView->pos.y+bPtr->menuView->size.height);	} else	    dy = -5;    } else if (bPtr->scrollStartY <= 1 && bPtr->menuView->pos.y < 1) {	repeat = 1;	if (bPtr->menuView->pos.y+5 > 1) 	    dy = 1 - bPtr->menuView->pos.y;	else	    dy = 5;    }    if (repeat) {	int oldItem;	W_MoveView(bPtr->menuView, bPtr->menuView->pos.x, 		   bPtr->menuView->pos.y + dy);	oldItem = bPtr->highlightedItem;	bPtr->highlightedItem = (bPtr->scrollStartY - bPtr->menuView->pos.y)	    / bPtr->view->size.height;	if (bPtr->highlightedItem >= WMGetBagItemCount(bPtr->items))	    bPtr->highlightedItem = WMGetBagItemCount(bPtr->items)-1;	if (oldItem!=bPtr->highlightedItem) {	    WMMenuItem *item = 		WMGetPopUpButtonMenuItem(bPtr, bPtr->highlightedItem);	    paintMenuEntry(bPtr, oldItem, False);	    	    paintMenuEntry(bPtr, bPtr->highlightedItem,			   WMGetMenuItemEnabled(item));	}	bPtr->timer = WMAddTimerHandler(SCROLL_DELAY, autoScroll, bPtr);    } else {	bPtr->timer = NULL;    }}