Beispiel #1
0
static void show_page(int page)
{
    enum {
        COL1 = (10 + ((LCD_WIDTH - 320) / 2)),
        COL2 = (90 + ((LCD_WIDTH - 320) / 2)),
        COL3 = (196 + ((LCD_WIDTH - 320) / 2)),
        LABEL_WIDTH = (COL2 - COL1),
        ROW1 = (56 + ((LCD_HEIGHT - 240) / 2)),
        ROW_HEIGHT = 22,
    };
    struct mixer_page * mp = &pagemem.u.mixer_page;
    if (mp->firstObj) {
        GUI_RemoveHierObjects(mp->firstObj);
        mp->firstObj = NULL;       
    }   
    for (long i = 0; i < ENTRIES_PER_PAGE; i++) {
        int row = ROW1 + ROW_HEIGHT * i;
        long ch = page  + i;
        if (ch >= Model.num_channels)
            break;
        mp->limit = MIXER_GetLimit(ch);
        guiObject_t *obj = GUI_CreateLabelBox(&gui->name[i], COL1, row, LABEL_WIDTH, 16, &LABEL_FONT, STDMIX_channelname_cb, NULL, (void *)ch);
        if (! mp->firstObj)
            mp->firstObj = obj;
        GUI_CreateTextSelect(&gui->down[i], COL2, row, TEXTSELECT_96, NULL, traveldown_cb, (void *)ch);
        GUI_CreateTextSelect(&gui->up[i], COL3, row, TEXTSELECT_96, NULL, travelup_cb, (void *)ch);
    }
}
Beispiel #2
0
static int row_cb(int absrow, int relrow, int y, void *data)
{
    (void)data;
    u8 w = 35;
    u8 x = 50;
    MIXER_GetLimit(absrow, &mp->limit);
    GUI_CreateLabelBox(&gui->chan[relrow], 0, y,
            0, LINE_HEIGHT, &DEFAULT_FONT, STDMIX_channelname_cb, NULL, (void *)(long)absrow);
    GUI_CreateTextSelectPlate(&gui->dn[relrow], x, y,
            w, LINE_HEIGHT, &DEFAULT_FONT, NULL, traveldown_cb, (void *)(long)absrow);
    GUI_CreateTextSelectPlate(&gui->up[relrow], x + w + 3, y,
            w, LINE_HEIGHT, &DEFAULT_FONT, NULL, travelup_cb, (void *)(long)absrow);
    return 2;
}
Beispiel #3
0
static void show_page(int page)
{
    struct mixer_page * mp = &pagemem.u.mixer_page;
    if (mp->firstObj) {
        GUI_RemoveHierObjects(mp->firstObj);
        mp->firstObj = NULL;       
    }   
    for (long i = 0; i < ENTRIES_PER_PAGE; i++) {
        int row = 56 + ((LCD_HEIGHT - 240) / 2) + 22 * i;
        long ch = page  + i;
        if (ch >= Model.num_channels)
            break;
        mp->limit = MIXER_GetLimit(ch);
        guiObject_t *obj = GUI_CreateLabelBox(&gui->name[i], 10 + ((LCD_WIDTH - 320) / 2), row, 0, 16, &DEFAULT_FONT, STDMIX_channelname_cb, NULL, (void *)ch);
        if (! mp->firstObj)
            mp->firstObj = obj;
        GUI_CreateTextSelect(&gui->down[i], 90 + ((LCD_WIDTH - 320) / 2), row, TEXTSELECT_96, NULL, traveldown_cb, (void *)ch);
        GUI_CreateTextSelect(&gui->up[i], 196 + ((LCD_WIDTH - 320) / 2), row, TEXTSELECT_96, NULL, travelup_cb, (void *)ch);
    }
}