# --------------------------------------------------------------------- # # 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 "A tour of wx boxes" author "laurent.guigues@creatis.insa-lyon.fr" category "demo" include wx #================================================================== print " " print "============================" print "A Slider whose output is plugged into an OutputText" print "============================" print " " #================================================================== message echo 2 # Create the Slider new Slider slider # Make it signal it has changed when it is moved (not only released) set slider.ReactiveOnTrack 1 # Create the OutputText new OutputText text # Add the Layout new LayoutLine main # Make it a Dialog set main.WinDialog true # Setting up the Layout connect slider.Widget main.Widget1 connect text.Widget main.Widget2 #The output of the slider is plugged into the input of the text #To do this, we must have an int to string adaptor, hence load std load std connect slider.Out text.In # Any change of the slider must update the text connect slider.BoxChange text.BoxExecute # Go! exec main #================================================================== message echo 0 clear print " " print "============================" print "Splitting a window into two adjustable parts" print "============================" print " " #================================================================== message echo 2 new LayoutSplit main new Slider slider1 new Slider slider2 connect slider1.Widget main.Widget1 connect slider2.Widget main.Widget2 set main.Proportion 75 set main.Orientation Horizontal set main.WinDialog true exec main #================================================================== message echo 0 clear #==================================================================