int ti_mlwlb_scroll(TWidget * wid, int dir)
{
	TTK_SCROLLMOD (dir,4);
	
	if (dir<0) {
		if (ti_mlwlb_curcset<0) {
			ttk_input_char(TTK_INPUT_LEFT);
		} else {
			if ((ti_mlwlb_position--)==0) {
				ti_mlwlb_advance_level(0);
			}
			wid->dirty=1;
		}
	} else {
		if (ti_mlwlb_curcset<0) {
			ttk_input_char(TTK_INPUT_RIGHT);
		} else {
			if ((ti_mlwlb_position++)==6) {
				ti_mlwlb_advance_level(1);
			}
			wid->dirty=1;
		}
	}
	return TTK_EV_CLICK;
}
예제 #2
0
static int mystify_scroll(TWidget *wid, int dir)
{
#ifdef IPOD
    TTK_SCROLLMOD(dir, 4);
#endif
    if(dir > 0){
        sleep_time++;
    }
    else{
        if(sleep_time >= 0)
            sleep_time--;
    }
    ttk_widget_set_timer(wid, sleep_time);
    wid->dirty++;
    return TTK_EV_CLICK;
}
예제 #3
0
int ti_dial_scroll(TWidget * wid, int dir)
{
	TTK_SCROLLMOD (dir, 4);
	
	if (dir<0) {
		if (ti_dial_cursormode()) {
			ttk_input_char(TTK_INPUT_LEFT);
		} else {
			ti_dial_prev_char();
			wid->dirty = 1;
		}
	} else {
		if (ti_dial_cursormode()) {
			ttk_input_char(TTK_INPUT_RIGHT);
		} else {
			ti_dial_next_char();
			wid->dirty = 1;
		}
	}
	return TTK_EV_CLICK;
}
예제 #4
0
int podwrite_widget_scroll(TWidget * wid, int dir)
{
	if (podwrite_mode == 0) { return ti_widget_start(wid); }
	
	TTK_SCROLLMOD (dir,4);
	switch (podwrite_mode) {
	case 1:
		ti_buffer_cmove((TiBuffer *)wid->data, dir);
		podwrite_check_bounds();
		wid->dirty = 1;
		break;
	case 2:
		podwrite_scroll += dir;
		if (podwrite_scroll < 0) podwrite_scroll = 0;
		if (podwrite_scroll > (podwrite_linecount - podwrite_screenlines)) podwrite_scroll = (podwrite_linecount - podwrite_screenlines);
		wid->dirty = 1;
		break;
	default:
		return TTK_EV_UNUSED;
		break;
	}
	return TTK_EV_CLICK;
}