subr t3d_list_entry_cb
 ;list entry callback
 iq = $list_item_position - 1
 ;alas, in case the file got changed
 if $t3d_file_name ne $t3d_list_file_name then {
   ;break into path and name and load the text widgets
   ;xmtextfieldsetstring, $t3dtext1, getfilepath($t3d_list_file_name)
   ;xmtextfieldsetstring, $t3dtext2, removepath($t3d_list_file_name)
   $t3d_file_name = $t3d_list_file_name
   if t3d_open_file() ne 1 then errormess,'problem opening file'
   }
 xmtextfieldsetstring, $t3d_image, string(iq)
 if $t3d_view_flag eq 0 or $t3d_view_flag eq 2 then t3d_inspect, iq
 if $t3d_view_flag gt 0 then t3d_view, iq
 ;also keep the position and file for possible logging
 ;actually already have the file name in $t3d_list_file_name
 $t3d_list_file_image = iq
 endsubr
 ;======================================================= 
