/*   EXTRAITS DE LA LICENCE
	Copyright CEA, contributeurs : Luc BILLARD, Damien
	CALISTE, Olivier D'Astier, laboratoire L_Sim, (2001-2006)
  
	Adresses mèl :
	BILLARD, non joignable par mèl ;
	CALISTE, damien P caliste AT cea P fr.
	D'ASTIER, dastier AT iie P cnam P fr.

	Ce logiciel est un programme informatique servant à visualiser des
	structures atomiques dans un rendu pseudo-3D. 

	Ce logiciel est régi par la licence CeCILL soumise au droit français et
	respectant les principes de diffusion des logiciels libres. Vous pouvez
	utiliser, modifier et/ou redistribuer ce programme sous les conditions
	de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA 
	sur le site "http://www.cecill.info".

	Le fait que vous puissiez accéder à cet en-tête signifie que vous avez 
	pris connaissance de la licence CeCILL, et que vous en avez accepté les
	termes (cf. le fichier Documentation/licence.fr.txt fourni avec ce logiciel).
*/

/*   LICENCE SUM UP
	Copyright CEA, contributors : Luc BILLARD and Damien
	CALISTE and Olivier D'Astier, laboratoire L_Sim, (2001-2006)

	E-mail addresses :
	BILLARD, not reachable any more ;
	CALISTE, damien P caliste AT cea P fr.
	D'ASTIER, dastier AT iie P cnam P fr.

	This software is a computer program whose purpose is to visualize atomic
	configurations in 3D.

	This software is governed by the CeCILL  license under French law and
	abiding by the rules of distribution of free software.  You can  use, 
	modify and/ or redistribute the software under the terms of the CeCILL
	license as circulated by CEA, CNRS and INRIA at the following URL
	"http://www.cecill.info". 

	The fact that you are presently reading this means that you have had
	knowledge of the CeCILL license and that you accept its terms. You can
	find a copy of this licence shipped with this software at Documentation/licence.en.txt.
*/
#ifndef PANELSURFACES_H
#define PANELSURFACES_H

#include <gtk/gtk.h>
#include <visu_data.h>

/**
 * isosurfaces_try_file:
 * @file_name: the file you want to try to load
 * @fit_to_box: whether these isosurfaces should be resized in order 
 * to fit to the current VisuBox ;
 * @data: the #VisuData to fit the box to (can be NULL if @fit_to_box
 *        is false.
 * 
 * Tries to load the given @file_name  and if it succeeds, adds loaded surfaces 
 * to the isosurfaces panel. In all cases, all previously loaded surfaces are 
 * removed from the panel (and from memory).
 * 
 * Return value: 0 in case of success, n != 0 otherwise.
 **/
int isosurfaces_try_file(const char* file_name, gboolean fit_to_box, VisuData *data);

/**
 * isosurfaces_show_hide_all:
 * @useless: parameter unused by the function (present for compatibility with gtk callbacks)
 * @visibility: 0 if you want to show surfaces, 1 if you want to hide them
 * 
 * Shows or hides all surfaces and check their "draw" status in the panel accordingly.
 * This function should be called using the GINT_TO_POINTER() macro as the second argument.
 * For example : isosurfaces_show_hide_all(NULL, GINT_TO_POINTER(0)) will hide all surfaces.
 **/
void isosurfaces_show_hide_all(gpointer useless, gpointer visibility);

/**
 * isosurfaces_show_next:
 * 
 * Selects the next surface in the list. If the current surface selected is the last one,
 * selects the first one in the list. If no surface is selected, does nothing.
 * 
 * Return value: TRUE if a surface has been selected, FALSE otherwise.
 **/
gboolean isosurfaces_show_next();

/**
 * isosurfaces_open_file_chooser:
 * 
 * Opens a file chooser to ask the user to open a .surf file. Then tries to load
 * that .surf file.
 **/
void isosurfaces_open_file_chooser();

/**
 * isosurfaces_edit_interface:
 * @flag: single edit mode if flag == GPOINTER_TO_INT(1), multi edit mode if flag == GPOINTER_TO_INT(0)
 *
 * Opens a new window allowing to edit the current selected surface or all surfaces properties.
 **/
void isosurfaces_edit_interface(gpointer flag);

#endif
