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 ); }
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 ); }
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 ); }