/*   EXTRAITS DE LA LICENCE
	Copyright CEA, contributeurs : Luc BILLARD et Damien
	CALISTE, laboratoire L_Sim, (2001-2006)
  
	Adresse mèl :
	BILLARD, non joignable par mèl ;
	CALISTE, damien P caliste AT cea 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 et Damien
	CALISTE, laboratoire L_Sim, (2001-2006)

	E-mail address:
	BILLARD, not reachable any more ;
	CALISTE, damien P caliste AT cea 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 VISUCONFIG_H
#define VISUCONFIG_H

#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <visu_tools.h>
#include <visu_rendering.h>
#include <gtk_renderingWindowWidget.h>

#include "visuElements.h"

/* This subpanel module allow the user to deal
   with the configurable parameters of visu, such
   as theme, subpanel rendering...*/

subPanel *visuConfigData;

/**
 * destroyFunc:
 *
 * Prototype of method called when the rendering method widget is destroyed.
 */
typedef void (*destroyFunc)(void);

/**
 * panelConfigSet_renderingInterface:
 * @method: a #RenderingMethod ;
 * @create: a method returning a widget ;
 * @destroy: a method to detached, signals, free everything from the
 *           created widget.
 *
 * This method allows to initiate the method to deal with the interface.
 */
void panelConfigSet_renderingInterface(RenderingMethod *method,
				       createGtkWidgetFunc create,
				       destroyFunc destroy);
/**
 * panelConfigGet_renderingInterfaceCreate:
 * @method: a #RenderingMethod ;
 * @create: a pointer to store the create method.
 *
 * It reads the value of the create method for the given rendering method.
 */
void panelConfigGet_renderingInterfaceCreate(RenderingMethod *method,
					     createGtkWidgetFunc *create);
/**
 * panelConfigGet_renderingInterfaceDestroy:
 * @method: a #RenderingMethod ;
 * @destroy: a pointer to store the create method.
 *
 * It reads the value of the destroy method for the given rendering method.
 */
void panelConfigGet_renderingInterfaceDestroy(RenderingMethod *method,
					      destroyFunc *destroy);

/**
 * panelConfigSet_tabView:
 * @viewed: a boolean value.
 *
 * The note can show its tabs or not. Change this with that method.
 */
void panelConfigSet_tabView(gboolean viewed);
/**
 * panelConfigSet_automaticRefresh:
 * @window: the #RenderingWindow to associated the auto refresh ;
 * @bool: a boolean value.
 *
 * V_Sim can poll the rendered file at periodic intervals to check if the file
 * has been modified. If true, the file is reloaded. Turn this functionality on or off
 * with this method. See panelConfigSet_refreshPeriod() to tune the period of the polling.
 */
void panelConfigSet_automaticRefresh(RenderingWindow *window, int bool);
/**
 * panelConfigSet_refreshPeriod:
 * @window: the #RenderingWindow to associated the auto refresh ;
 * @val: a floating point value in milliseconds.
 *
 * V_Sim can poll the rendered file at periodic intervals. Use this method to tune
 * the period. See panelConfigSet_automaticRefresh() to enable this functionality.
 */
void panelConfigSet_refreshPeriod(RenderingWindow *window, float val);
/**
 * configPanelSet_spinBoundsValue:
 * @val : a floating point value.
 *
 * Some spins in V_Sim refer to values that depends on the size and the unit of the box.
 * The basic boundings (basic_min and basic_max) of such spins are hard coded, but
 * the used boundings can be changed by changing a parameter (alpha) with a call to this method.
 * The real boundings are then basic_min * alpha and basic_max * alpha.
 * A call to this method is automatically followed by a signal "spinBoundsChanged".
 */
void panelConfigSet_spinBoundsValue(gdouble val);
/**
 * configPanelGet_spinBoundsValue:
 *
 * Use this method to retrieve the multiplier factor for spin bounds.
 * See configPanelSet_spinBoundsValue() for further details.
 *
 * Returns: a floating point value, used as multiplier for spin buttons.
 */
gdouble panelConfigGet_spinBoundsValue();

#endif

