Exemplo n.º 1
0
static void DestroyTracks()
{
    Track *trk;
    int i;
    for(i=0; i < NumTracks; i++) {
	trk= tracks[i];
	xv_destroy_safe(trk->canvas);
	xv_destroy_safe(trk->TxtCanvas);
	XFreeGC(theDisp, trk->gc);
	XFreeGC(theDisp, trk->ovrGC);
	XFreeGC(theDisp, trk->txtgc);
	free(trk);
    }
    free(tracks);
    if (Mode_align) DestroyTimeScale();
}
Exemplo n.º 2
0
void GetString(char *label, char *str, int numch)
{
    Panel in_panel;
    int x, y;

    in_buf=(char *)Malloc(numch+1);
    if (in_buf==NULL) return;	/* not enuff mem */
    in_numch= numch;
    *in_buf='\0';
    x= (int)xv_get(tracesFrame,XV_X);
    y= (int)xv_get(tracesFrame,XV_Y);
    in_frame=(Frame)xv_create(tracesFrame, FRAME_CMD,
	FRAME_LABEL, "",
	FRAME_DONE_PROC, in_done_proc,
	XV_X, FrmWidth/2+x-150, XV_Y, FrmHeight/2+y-50,
	XV_HEIGHT, 100, XV_WIDTH, 300,
	NULL);
    in_panel=(Panel)xv_get(in_frame, FRAME_CMD_PANEL);
    in_text=(Panel_item)xv_create(in_panel, PANEL_TEXT,
	XV_X, 10, XV_Y, 40,
	PANEL_LAYOUT, PANEL_VERTICAL,
	PANEL_LABEL_STRING, label,
	PANEL_VALUE_DISPLAY_WIDTH, 280,
	PANEL_NOTIFY_PROC, in_notify_proc,
	NULL);
    xv_set(in_frame, XV_SHOW, TRUE, NULL);
    in_loop=1;
    (void)xv_window_loop(in_frame);
    in_loop=0;
    xv_destroy_safe(in_frame);
    strncpy(str, in_buf, numch);
    free(in_buf);
}
Exemplo n.º 3
0
static void close_gsr_win(Panel_item item)
{
    Frame t_frame = (Frame)xv_get(item,PANEL_CLIENT_DATA);

    /* clear the region from memory */
    Destroy_gsr_win(t_frame);
    xv_destroy_safe(t_frame);
    return ;
}
Exemplo n.º 4
0
void DestroyZTrkLab()
{
    int i;

    if(ZLab_canvas==NULL)return;
    for(i=0; i < NumZTracks; i++) {
	xv_destroy_safe(ZLab_canvas[i]);
    }
    free(ZLab_win);
    free(ZLab_canvas);
    free(ZLab_panel);
}
Exemplo n.º 5
0
/************************************************************************
*									*
*  Destroy the object handler.						*
*									*/
void
filelist_win_destroy(void)
{
    (void) xv_destroy_safe(fhdl->popup);
    (void) free((char *) fhdl);
    fhdl = NULL;

    while (curfinfo = finfoheader){
	finfoheader = finfoheader->next;
	if (curfinfo->dirpath){
	    free(curfinfo->dirpath);
	}
	free((char *) curfinfo);
    }
}
Exemplo n.º 6
0
/************************************************************************
*									*
*  Update the panel file list.						*
*									*/
static void
file_list_update(char **filename, int nfile)
{
    int i;				/* loop counter */
    char msg[60];			/* message to user */

    /* sort directory files by file name */
    if (nfile > 1)
	qsort((char *) filename, nfile, sizeof(char **),
	      (int (*) (const void *, const void *)) str_cmp);

    /* Save the current file number */
    numfile = nfile;

    // Delete the current list and create a new one
    xv_set(fhdl->dirlist, PANEL_SHOW_ITEM, FALSE, 0);
    xv_destroy_safe(fhdl->dirlist); // Destroy after return from this routine
    fhdl->dirlist = xv_create(fhdl->panel, PANEL_LIST,
			      XV_X, fhdl->filename_xpos,
			      XV_Y, fhdl->filename_ypos,
			      PANEL_LIST_WIDTH, fhdl->filename_wd,
			      PANEL_LIST_DISPLAY_ROWS, fhdl->filename_num,
			      PANEL_NOTIFY_PROC, file_select_proc,
			      PANEL_SHOW_ITEM, FALSE,
			      NULL);

    /* Put all files into panel list */
    for (i = 0; i < numfile; i++){
	xv_set(fhdl->dirlist,
	       PANEL_LIST_INSERT, i,
	       PANEL_LIST_STRING, i, filename[i],
	       PANEL_LIST_SELECT, i, FALSE,
	       NULL);
    }
    //xv_set(fhdl->dirlist, PANEL_LIST_SORT, PANEL_FORWARD, 0);//Not implemented
    xv_set(fhdl->dirlist, PANEL_SHOW_ITEM, TRUE, 0);

    /* Print number of files */
    (void) sprintf(msg, "%d files.", numfile);
    xv_set(fhdl->msg, PANEL_LABEL_STRING, msg, NULL);
}
Exemplo n.º 7
0
/************************************************************************
 *                                                                      *
 *  Destructor of window.						*
 *									*/
VolData::~VolData(void)
{
    xv_destroy_safe(frame);
}
Exemplo n.º 8
0
/************************************************************************
*                                                                       *
*  Destructor of window.						*
*									*/
Win_histenhance::~Win_histenhance(void)
{
   xv_destroy_safe(frame);
}
Exemplo n.º 9
0
/************************************************************************
*                                                                       *
*  Destructor of window.						*
*									*/
Win_arith::~Win_arith(void)
{
   xv_destroy_safe(frame);
}
Exemplo n.º 10
0
/************************************************************************
*                                                                       *
*  Destructor of window.						*
*									*/
Win_movie::~Win_movie(void)
{
   framelist_win_destroy () ;
   xv_destroy_safe(frame);
}
Exemplo n.º 11
0
/************************************************************************
 *                                                                       *
 *  Destructor of window.						*
 *									*/
Win_rot::~Win_rot(void)
{
    xv_destroy_safe(frame);
}