/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * filename: xreset.c * * * * UTIL C-source: Medical Image Conversion Utility * * * * purpose : reset file/structures routines * * * * project : (X)MedCon by Erik Nolf * * * * Functions : XMdcStructsReset() - Reset the global structures * * XMdcViewerReset() - Reset the viewer window * * XMdcFileReset() - Reset and close current file * * XMdcColorMapReset() - Reset to a new colormap * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* $Id: xreset.c,v 1.14 2007/05/21 20:16:19 enlf Exp $ */ /* Copyright (C) 1997-2007 by Erik Nolf This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Place - Suite 330, Boston, MA 02111-1307, USA. */ /**************************************************************************** H E A D E R S ****************************************************************************/ #include "m-depend.h" #include #ifdef HAVE_STDLIB_H #include #endif #include "xmedcon.h" /**************************************************************************** F U N C T I O N S ****************************************************************************/ void XMdcStructsReset(void) { my.viewbox = NULL; my.cmap = NULL; my.curpage = 0; my.prevpage = 0; my.scale_width = 1.; my.scale_height = 1.; my.RESIZE = MDC_YES; } void XMdcViewerReset(void) { Uint32 i; if (my.viewwindow != NULL) { MdcDebugPrint("Removing viewer box & images ..."); gtk_widget_destroy(my.viewbox); gtk_widget_unrealize(my.viewwindow); gdk_pixbuf_unref(my.imcmap); for (i=0; ipalette); my.fi->map = map; }