+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la SantÈ)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B 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-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# The fact that you are presently reading this means that you have had
+# knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+
description "More complex test of wx::Slider widget"
author "jpr[at]creatis[dot]insa[dash]lyon[dot]fr"
-category "example;widget"
+category "example"
load wx
// std needed for <std::string> to <int> adaptor
connect s1.Widget left.Widget1
connect s1.Out o1.In
+
// -----------------------------------
new Slider s2
set s2.Min -110
set s2.Max 140
+ set s2.In -1
set s2.Title "s2 : Slider with Min, Max, ReactiveOnTrack, O.Text : Reactive"
set s2.ReactiveOnTrack 1
set o2.Title "Sortie s2"
set o2.BoxProcessMode Reactive
connect s2.Widget left.Widget2
-connect s2.Out o2.In
+connect s2.Out o2.In
+
// -----------------------------------
new Slider s3
set s3.Min 12
connect s3.Widget left.Widget3
connect s3.Out o3.In
+
// -----------------------------------
new Add a
- set a.In1 s1.Out
- set a.In2 s2.Out
-/*
+ connect s1.Out a.In1
+ connect s2.Out a.In2
+ set a.BoxProcessMode Reactive
-// Check later : no <double> to <int> adaptor available ?!?
new Slider s4
- set s4.Title "Slider pos s1+s2"
+ set s4.Title "s4 : Slider pos s1+s2"
set s4.BoxProcessMode Reactive
connect a.Out s4.In
+# Warning : 'In' is the initial position, nothing more
+# Don't try to modify it later!
connect s4.Widget left.Widget4
-*/
+
+new OutputText o4
+ set o4.Title "Entree s4 (Add s1, s2)"
+ set o4.BoxProcessMode Reactive
+connect a.Out o4.In
// -----------------------------------
connect o1.Widget left.Widget5
connect o2.Widget left.Widget6
connect o3.Widget left.Widget7
+connect o4.Widget left.Widget8
// =======================================================
// ---------------------------------------------------
+new CommandButton cmdBtn
+ set cmdBtn.In "exec s4; exec main"
+ set cmdBtn.Label "Refresh main"
+connect cmdBtn.Widget left.Widget9
+
exec main