Пример #1
0
static void GRowColSetList(GGadget *g,GTextInfo **ti,int docopy) {
    GRowCol *grc = (GRowCol *) g;
    int same;

    GTextInfoArrayFree(grc->ti);
    if ( docopy || ti==NULL )
	ti = GTextInfoArrayCopy(ti);
    grc->ti = ti;
    grc->ltot = GTextInfoArrayCount(ti);
    if ( grc->orderer!=NULL )
	GRowColOrderIt(grc);
    grc->loff = grc->xoff = 0;
    grc->hmax = GTextInfoGetMaxHeight(g->base,ti,grc->font,&same);
    grc->sameheight = same;
    GRowColCheckSB(grc);
    _ggadget_redraw(&grc->g);
}
Пример #2
0
static void GListSetList(GGadget *g,GTextInfo **ti,int32_t docopy) {
    GDList *gl = (GDList *) g;
    int same;

    GTextInfoArrayFree(gl->ti);
    if ( docopy || ti==NULL )
	ti = GTextInfoArrayCopy(ti);
    gl->ti = ti;
    gl->ltot = GTextInfoArrayCount(ti);
    if ( gl->orderer!=NULL )
	GListOrderIt(gl);
    gl->loff = gl->xoff = 0;
    gl->hmax = GTextInfoGetMaxHeight(g->base,ti,gl->font,&same);
    gl->sameheight = same;
    GListCheckSB(gl);
    _ggadget_redraw(&gl->g);
}