Exemplo n.º 1
0
static int slider_select( GWidget* wp, UAtom atom, UCell* res )
{
    EX_PTR;
    if( atom == UR_ATOM_VALUE )
    {
        ur_setId(res, ep->dataType);
        if( ep->dataType == UT_INT )
            ur_int(res) = (int32_t) ep->data.val;
        else
            ur_decimal(res) = ep->data.val;
        return UR_OK;
    }
    return gui_areaSelect( wp, atom, res );
}
Exemplo n.º 2
0
static int ledit_select( GWidget* wp, UAtom atom, UCell* res )
{
    if( atom == UR_ATOM_TEXT )
    {
        EX_PTR;
        ur_setId(res, UT_STRING);
        ur_setSeries(res, ep->strN, 0);
        return UR_OK;
    }
    else if( atom == UR_ATOM_ACTION )
    {
        EX_PTR;
        ur_setId(res, UT_BLOCK);
        ur_setSeries(res, ep->codeN, 0);
        return UR_OK;
    }
    return gui_areaSelect( wp, atom, res );
}
Exemplo n.º 3
0
static int itemview_select( GWidget* wp, UAtom atom, UCell* res )
{
    if( atom == UR_ATOM_VALUE /*selection*/ )
    {
        EX_PTR;

        if( ep->selRow > -1 )
        {
            UThread* ut = glEnv.guiUT;
            const UBuffer* items = ur_buffer( ep->dataBlkN );
            *res = items->ptr.cell[ ep->selRow ];
        }
        else
        {
            ur_setId( res, UT_NONE );
        }
        return UR_OK;
    }
    return gui_areaSelect( wp, atom, res );
}