[2] | 1 | PRO doubleclickaction, event |
---|
| 2 | ;------------------------------------------------------------ |
---|
[114] | 3 | ; |
---|
| 4 | compile_opt idl2, strictarrsubs |
---|
| 5 | ; |
---|
[69] | 6 | widget_control, event.id , get_uvalue = uval |
---|
| 7 | widget_control, event.top, get_uvalue = top_uvalue |
---|
[2] | 8 | ; on active la bonne fenetre |
---|
[69] | 9 | widget_control, event.id, get_value = win |
---|
[2] | 10 | wset, win |
---|
| 11 | ; quel est le dessin selectionne?? |
---|
[49] | 12 | smallin = extractatt(top_uvalue, 'smallin') |
---|
| 13 | smallout = extractatt(top_uvalue, 'smallout') |
---|
[2] | 14 | x = (convert_coord(uval.x[0],uval.y[0], /device, /to_normal))[0] |
---|
| 15 | y = (convert_coord(uval.x[0],uval.y[0], /device, /to_normal))[1] |
---|
[49] | 16 | numcolonne = n_elements(where(findgen(smallin[0])/smallin[0] lt x))-1 |
---|
| 17 | numligne = n_elements(where(findgen(smallin[1])/smallin[1] lt 1-y))-1 |
---|
| 18 | numdessin = numcolonne+numligne*smallin[0]+1 |
---|
[2] | 19 | ; choix du type d''action |
---|
| 20 | case uval.press of |
---|
| 21 | 1:BEGIN |
---|
[49] | 22 | ; if top_uvalue.smallin[2] NE numdessin then begin |
---|
| 23 | tracecadre, smallin, /erase |
---|
| 24 | if total(smallin EQ smallout) EQ 3 then $ |
---|
| 25 | tracecadre, smallout, /out |
---|
| 26 | smallin = [smallin[0:1], numdessin] |
---|
| 27 | *top_uvalue[1, findline(top_uvalue, 'smallin')] = smallin |
---|
| 28 | tracecadre, smallin |
---|
[2] | 29 | !p = (extractatt(top_uvalue, 'penvs'))[numdessin-1] |
---|
| 30 | !x = (extractatt(top_uvalue, 'xenvs'))[numdessin-1] |
---|
| 31 | !y = (extractatt(top_uvalue, 'yenvs'))[numdessin-1] |
---|
| 32 | ; |
---|
| 33 | END |
---|
| 34 | 2:BEGIN |
---|
[49] | 35 | ; if top_uvalue.smallout[2] NE numdessin then begin |
---|
| 36 | tracecadre, smallout, /erase |
---|
| 37 | if total(smallin EQ smallout) EQ 3 then $ |
---|
| 38 | tracecadre, smallin |
---|
| 39 | smallout = [smallin[0:1], numdessin] |
---|
| 40 | *top_uvalue[1, findline(top_uvalue, 'smallout')] = smallout |
---|
| 41 | tracecadre, smallout, /out |
---|
[2] | 42 | ; endif |
---|
| 43 | END |
---|
| 44 | 4:BEGIN |
---|
[49] | 45 | tracecadre, [smallin[0:1], numdessin], /fill |
---|
[2] | 46 | inserthistory, event.top, ';', '; beginning of '+strtrim(numdessin, 2) $ |
---|
| 47 | , '; end of '+strtrim(numdessin, 2) |
---|
| 48 | ; remise a 0 des attributs de la uvalue concernant ce dessin: |
---|
| 49 | |
---|
| 50 | numdessin = numdessin-1 |
---|
[69] | 51 | (*top_uvalue[1, findline(top_uvalue, 'varinfo')])[*, numdessin] = ['', ''] |
---|
[2] | 52 | (*top_uvalue[1, findline(top_uvalue, 'dates')])[*, numdessin] = [0l, 0l] |
---|
| 53 | (*top_uvalue[1, findline(top_uvalue, 'nameprocedures')])[numdessin] = '' |
---|
| 54 | (*top_uvalue[1, findline(top_uvalue, 'types')])[numdessin] = '' |
---|
| 55 | (*top_uvalue[1, findline(top_uvalue, 'domaines')])[*, numdessin] = fltarr(6) |
---|
[69] | 56 | (*top_uvalue[1, findline(top_uvalue, 'txtcmd')])[numdessin] = '' |
---|
[2] | 57 | |
---|
[49] | 58 | if numdessin EQ smallin[2] then $ |
---|
| 59 | tracecadre, smallin |
---|
| 60 | if numdessin EQ smallout[2] then $ |
---|
| 61 | tracecadre, smallout, /out |
---|
| 62 | END |
---|
| 63 | ELSE: |
---|
[2] | 64 | endcase |
---|
| 65 | updatewidget, event.top |
---|
| 66 | ;------------------------------------------------------------ |
---|
| 67 | return |
---|
| 68 | end |
---|