Commit 6d172160 authored by hrchilds's avatar hrchilds

Update from March 16, 2006

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@638 18c085ea-50e0-402c-830e-de6fd14e8384
parent 7c9e8f25
......@@ -17052,7 +17052,7 @@ OPERATOR_FILES="operators/Makefile"
DATABASE_FILES="databases/Makefile"
DATA_FILES="data/Makefile"
SIMULATION_PROTOTYPE_FILES="sim/Makefile"
SIMULATION_PROTOTYPE_FILES="sim/lib/Makefile"
CQSCORE_FILES="cqscore/Makefile"
THIRD_PARTY_BUILTIN_FILES="third_party_builtin/Makefile
third_party_builtin/bzip2/Makefile"
......
......@@ -604,6 +604,9 @@ dnl
dnl Hank Childs, Mon Feb 13 20:58:37 PST 2006
dnl Added subdirectory /components/DDF.
dnl
dnl Shelly Prevost, Mon Mar 13 16:14:47 PST 2006
dnl Moved the location of the simulation Makefile from sim to sim/lib.
dnl
dnl --------------------------------------------------------------------------
dnl
......@@ -3292,7 +3295,7 @@ OPERATOR_FILES="operators/Makefile"
DATABASE_FILES="databases/Makefile"
DATA_FILES="data/Makefile"
SIMULATION_PROTOTYPE_FILES="sim/Makefile"
SIMULATION_PROTOTYPE_FILES="sim/lib/Makefile"
CQSCORE_FILES="cqscore/Makefile"
THIRD_PARTY_BUILTIN_FILES="third_party_builtin/Makefile
third_party_builtin/bzip2/Makefile"
......
......@@ -136,10 +136,6 @@ QvisSimulationWindow::CreateWindowContents()
simInfo->setResizeMode(QListView::AllColumns);
topLayout->addWidget(simInfo, 10);
// Create the status bars.
//QLabel *totalStatusLabel = new QLabel("Total progress:", central, "totalStatusLabel");
//topLayout->addWidget(totalStatusLabel);
simulationMode = new QLabel("Simulation Status: ", central);
topLayout->addWidget(simulationMode);
......@@ -212,6 +208,9 @@ QvisSimulationWindow::CreateWindowContents()
// Brad Whitlock, Tue Jan 31 16:40:02 PST 2006
// Refactored code from elsewhere into this method.
//
// Shelly Prevost, Mon Mar 13 14:49:07 PST 2006
// Changed the default directory to check for ui files from UI to ui.
//
// ****************************************************************************
QString
......@@ -223,13 +222,13 @@ QvisSimulationWindow::GetUIFileDirectory() const
if (dirName.isEmpty())
{
dirName = getenv("HOME");
if (!dirName.isEmpty()) dirName += "/.visit/UI/";
if (!dirName.isEmpty()) dirName += "/.visit/ui/";
}
// if not defined then look in global location
if ( dirName.isEmpty())
{
dirName = getenv("VISITDIR");
if (!dirName.isEmpty()) dirName += "/UI/";
if (!dirName.isEmpty()) dirName += "/ui/";
}
return dirName;
......
# Copyright 2000 - 2006
# The Regents of the University of California.
# All rights reserved.
#
# This work was produced at the University of California, Lawrence Livermore
# National Laboratory (UC LLNL) under contract no. W-7405-ENG-48 (Contract
# 48) between the U.S. Department of Energy (DOE) and The Regents of the
# University of California (University) for the operation of UC LLNL.
# Copyright is reserved to the University for purposes of controlled
# dissemination, commercialization through formal licensing, or other
# disposition under terms of Contract 48; DOE policies, regulations and
# orders; and U.S. statutes. The rights of the Federal Government are
# reserved under Contract 48 subject to the restrictions agreed upon by DOE
# and University.
#
# DISCLAIMER
#
# This software was prepared as an account of work sponsored by an agency of
# the United States Government. Neither the United States Government nor the
# University of California nor any of their employees, makes any warranty,
# express or implied, or assumes any liability or responsiblity for the
# accuracy, completeness, or usefullness of any information, apparatus,
# product, or process disclosed, or represents that its use would not infringe
# privately owned rights. Reference herein to any specific commercial
# products, process, or service by trade name, trademark, manufacturer, or
# otherwise, does not necessarily constitute or imply its endorsement,
# recommendation, or favoring by the United States Government or the
# University of California. The views and opinions of authors expressed herein
# do not necessarily state or reflect those of the United States Government or
# the University of California, and shall not be used for advertising or
# product endorsement purposes.
#
##############################################################################
# set TOPDIR to point to where vist is installed
# The standard place is /usr/gapps/visit/current/<plateform> where plateform
# should be replaced with the type of plateform you are running on, eg.
# linux-intel
TOPDIR=../..
## -*- makefile -*-
## Variables
##
CC=gcc
SIMSER=simulation
SIMPAR=psimulation
SIMLIB=libsim
SIMLIBSHARED=$(SIMLIB).so
SIMLIBSTATIC=$(SIMLIB).a
SIMSRC=sim.c simconnection.c
SIMLIBSCR=VisItControlInterface_V1.c UI_Connection.c SimHelperFunc.c
SIMSEROBJ=$(SIMSRC:.c=.o)
SIMPAROBJ=$(SIMSRC:.c=_par.o)
SIMLIBOBJ=$(SIMLIBSCR:.c=.o)
SIMFSER=simf
SIMFSRC=simf.f
SIMFSEROBJ=$(SIMFSRC:.f=.o)
CPPFLAGS= -I.
F77FLAGS= -I$(TOPDIR)/include/visit
LDFLAGS=-L. -L$(TOPDIR)/archives
SERLIBS=
PARLIBS=
CFLAGS=-g -I. -I$(TOPDIR)/include/visit -Wimplicit-function-declaration
#PARLIBS=-lmpich
LIBS=-ldl -lpthread -lm -lsim
FLIBS=-ldl -lpthread -lm -lsimf -lsim
# override for suns:
#PARLIBS=-L/usr/gapps/mpich/1.2.4/SunOS/serial/default/optim/lib -lmpich -lrt -lthread
#CFLAGS=-g -I. -I../include/visit -Wimplicit-function-declaration -I/usr/gapps/mpich/1.2.4/SunOS/serial/default/optim/include
all: $(SIMSER) $(SIMPAR) $(SIMFSER)
$(SIMSER): $(SIMSEROBJ)
$(CC) -Wl,--export-dynamic $(SIMSEROBJ) $(LDFLAGS) $(LIBS) -o $@
$(SIMPAR): $(SIMPAROBJ)
$(CC) -Wl,--export-dynamic $(LDFLAGS) $(SIMPAROBJ) $(LIBS) -o $@
$(SIMSER).pure: $(SIMSEROBJ)
purify $(LD) $(LDFLAGS) $(SIMSEROBJ) $(LIBS) -o $@
$(SIMFSER): $(SIMFSEROBJ)
$(F77) -Wl,--export-dynamic $(SIMFSEROBJ) $(LDFLAGS) $(FLIBS) $(SERLIBS) -o $@
clean:
rm -f $(SIMSEROBJ) $(SIMSER) $(SIMSER).pure
rm -f $(SIMPAROBJ) $(SIMPAR)
rm -f $(SIMFSEROBJ) $(SIMFSER)
## -*- makefile -*-
## The following targets come from `include/targets'
##
install: install_lib install_bin
##
## Targets `install_lib' and `install_bin' are specified here with
## no dependencies and no commands so that they don't have to be
## defined in every Makefile.in.
##
install_lib:
install_bin:
##
## Same as `clean' and then remove Emacs backup files, .depend files,
## core dumps, Makefiles, and any files listed in DISTCLEAN_FILES. Then
## go to the temporary include directory and remove those copies of the
## public header files.
##
## The Makefile line is separate from the *~, .depend and core line
## because some rm's won't get to Makefile if there are no backup files,
## .depend files, or core files.
##
## The DISTCLEAN_FILES variable is something that only exists in some
## Makefiles. It is used to specify additional files that need to be
## removed when doing a distclean. Since distclean is used to get rid of
## anything that can be automatically generated, the files that are in
## DISTCLEAN_FILES are things that are generated through *.in files by
## configure.
##
distclean: clean
-$(RM) $(DISTCLEAN_FILES) *~ .depend core
-$(RM) Makefile
##
## Suffixes
##
.SUFFIXES: .C _mds.o _par.o _ogl.o _mesa.o _par_ogl.o _par_mesa.o
##
## We separate C compiler flags from C preprocessor flags and most
## make's don't have the correct implicit rules, so we redefine them
## here. If you don't like seeing the `ar' and `rm' commands when
## you run make, just add a `@' to the beginning of the line.
##
.c.a:
false
##
## We separate C++ compiler flags from C preprocessor flags and most
## make's don't have the correct implicit rules, so we redefine them
## here. If you don't like seeing the `ar' and `rm' commands when
## you run make, just add a `@' to the beginning of the line.
##
## Jeremy Meredith, Wed Jul 7 16:13:53 PDT 2004
## Removed the "_ser.o" build line because it was inefficient.
## Added a "_mds.o" build line to reduce the number of libraries
## needed by the mdserver by using preprocessor wrappers in plugins.
##
.C.a:
false
.c.o:
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
.c_mds.o:
$(CC) $(CFLAGS) $(CPPFLAGS) -DMDSERVER -c $< -o $@
.c_par.o:
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
# There cannot be a tab before the OS_RULE line. The rule contains its own
# tab character.
.C.o:
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
: Linux 2.6.9-23chaos
.C_mds.o:
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -DMDSERVER -c $< -o $@
: Linux 2.6.9-23chaos
.C_par.o:
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
: Linux 2.6.9-23chaos
.C_ogl.o:
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
: Linux 2.6.9-23chaos
.C_mesa.o:
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(MESA_INCLUDE) -c $< -o $@
: Linux 2.6.9-23chaos
.C_par_ogl.o:
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
: Linux 2.6.9-23chaos
.C_par_mesa.o:
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(MESA_INCLUDE) -c $< -o $@
: Linux 2.6.9-23chaos
.f.o:
$(F77) $(F77FLAGS) -c $<
$(IDSO) noidso: $(IOBJ)
$(CXX) -shared -o $@ $(LDFLAGS) $(IOBJ)
sleep 1
$(GDSO) nogdso: $(GOBJ) $(MOCOBJ)
$(CXX) -shared -o $@ $(LDFLAGS) $(GOBJ) $(MOCOBJ) $(SHLIB_FORCED)
sleep 1
$(MDSO) nomdso: $(MOBJ) $(MOCOBJ)
$(CXX) -shared -o $@ $(LDFLAGS) $(MOBJ) $(SHLIB_FORCED)
sleep 1
$(SDSO) nosdso: $(SOBJ)
$(CXX) -shared -o $@ $(LDFLAGS) $(CXXFLAGS) $(SOBJ) $(SHLIB_FORCED)
sleep 1
$(VDSO) novdso: $(VOBJ)
$(CXX) -shared -o $@ $(LDFLAGS) $(VOBJ) $(SHLIB_FORCED)
sleep 1
$(ESERDSO) noedso_ser: $(ESEROBJ)
$(CXX) -shared -o $@ $(LDFLAGS) $(ESEROBJ) $(SHLIB_FORCED)
sleep 1
$(EPARDSO) noedso_par: $(EPAROBJ)
$(CXX) -shared -o $@ $(LDFLAGS) $(EPAROBJ) $(SHLIB_FORCED)
sleep 1
## Brad Whitlock, Wed Aug 14 16:26:55 PST 2002
## I added the Java target.
java:
$(JAVAC) $(JAVAFLAGS) $(JAVAPLUGINFLAGS) $(JAVASRC)
## ------------------------------------------------------------------
## Maintaining source dependencies... either GNU, generic, or none...
## ------------------------------------------------------------------
## -*- makefile -*-
## Automatic dependencies... We keep a list of dependencies in `.depend'
## for each of the source files on which it depends. When one of the source
## files is modified we remove its record from .depend and regenerate the
## dependencies, tacking them onto the end of .depend. By including the
## .depend file into the makefile, we're telling make that the makefile
## depends on the dependency list in the .depend file.
##
## This is as fast as the `.d' method described in the GNU make manual
## for automatic dependencies, but has the added advantage that all
## dependencies are stored in one place. The advantage over the
## `makedepend' program is that only those files that are out of date
## have dependency information rebuilt, and the Makefile is not modified.
##
## Modifications:
## Jeremy Meredith, Thu May 9 11:58:51 PDT 2002
## 1) Made it work with .C, not .c files
## 2) Made it work correctly with subdirectories, e.g. "dir/file.C"
##
.PRECIOUS: .depend
dep depend: .depend
.depend: $(SRC)
@touch .depend
@for dep in $? dummy; do \
if [ $$dep != "dummy" ]; then \
echo Building dependencies for $$dep ;\
obj=`echo $$dep | sed 's/\.C/.o/'` ;\
sed "\|^$$obj|,\|[^\\]$$|d" <$@ > $@- && mv $@- $@ ;\
dir=`dirname $$obj`;\
if [ $$dir != "." ]; then \
printf "$$dir/" >> $@;\
fi;\
$(CXX) -M -MG $(CXXFLAGS) $(CPPFLAGS) $$dep >>$@;\
fi;\
done
-include .depend
$(SUBDIRS:=_obj) nosubdirs:
$(MAKE) $($(@:_obj=_src):.C=.o)
if [ -n "" ]; then $(MAKE) $($(@:_obj=_src):.C=_par.o); fi
## We need different ones for the serial and parallel versions.
$(LIBSHAREDSER) nolibsharedser: $(SEROBJ)
$(CXX) -shared -o $(LIBSHAREDTEMPSER) $(LDFLAGS) $(SEROBJ)
mv $(LIBSHAREDTEMPSER) $@
$(LIBSHAREDPAR) nolibsharedpar: $(PAROBJ)
$(CXX) -shared -o $(LIBSHAREDTEMPPAR) $(LDFLAGS) $(PAROBJ)
mv $(LIBSHAREDTEMPPAR) $@
......@@ -27,6 +27,10 @@
// Major reorg in the main routine because I drastically updated
// VisItControlInterface_V1.
//
// Shelly Prevost, Jan 28. 2006
// Added code to respond to the larger number of VisIt commands that are
// reflected back due to interface updates generated by the simulations.
//
// ****************************************************************************
......@@ -75,34 +79,34 @@ float *p_nvalues;
int numdomains = 1;
void testSlot ( char *cmd )
void testSlot( char *cmd )
{
printf ( "sim >>>> inside simulation pushButton code callback slot1.... \n");
printf( "sim >>>> inside simulation pushButton code callback slot1.... \n");
}
void testSlot2 ( char *cmd )
void testSlot2( char *cmd )
{
printf ( "sim >>>> inside simulation code callback slot2 .... \n");
printf( "sim >>>> inside simulation code callback slot2 .... \n");
}
void apply ( char *cmd )
void apply( char *cmd )
{
printf ( "sim >>>> inside simulation apply code callback .... \n");
printf( "sim >>>> inside simulation apply code callback .... \n");
}
void valueChanged ( char *cmd )
void valueChanged( char *cmd )
{
printf ( "sim >>>> inside simulation valueChanged code callback .... \n");
printf( "sim >>>> inside simulation valueChanged code callback .... \n");
}
void currentChanged ( char *cmd )
void currentChanged( char *cmd )
{
printf ( "sim >>>> inside simulation currentChanged code callback .... \n");
printf( "sim >>>> inside simulation currentChanged code callback .... \n");
}
......@@ -160,18 +164,26 @@ void RunSingleCycle()
{
// Wait
}
// If the cycle times are long you may want
// to check for commands from the Visit program
// periodically.
//VisItCheckForNewVisItCommand();
for (i=0; i<p_nx; i++)
{
int ii = (i + (p_nx-1)*par_rank);
p_xcoords[i] = ii * 2.0 + (ii*ii*0.1 * (double)(cycle));
}
// If the cycle times are long you may want
// to check for commands from the Visit program
// periodically.
//VisItCheckForNewVisItCommand();
for (i=0; i<p_nx; i++)
{
p_zvalues[i] = p_zvalues[i] + sqrt(i);
}
printf(" ... Finished cycle %d\n", cycle);
#ifdef PARALLEL
MPI_Barrier(MPI_COMM_WORLD);
printf(" and both processors synchronized.\n");
......@@ -219,6 +231,7 @@ void ProcessCommand(const char *cmd)
else if (!strcmp(cmd, "step"))
{
RunSingleCycle();
runflag = 0;
}
else if (!strcmp(cmd, "run"))
{
......@@ -257,7 +270,7 @@ void ProcessCommand(const char *cmd)
}
else
{
ProcessCustomCommand(cmd );
VisItProcessCustomCommand(cmd );
}
}
......@@ -303,7 +316,6 @@ void ControlCommandCallback(const char *cmd,
float float_data,
const char *string_data)
{
fprintf(stderr, "ControlCommandCallback(cmd=%s)\n",cmd);
// Ignore int/float/string_data
ProcessCommand(cmd);
}
......@@ -347,6 +359,24 @@ int ProcessVisItCommand(void)
}
}
int VisItCheckForNewVisItCommand()
{
int visitState;
if (par_rank == 0)
{
do
{
int blocking = runflag ? FALSE : TRUE;
visitState = VisItDetectInput(blocking, fileno(stdin));
if ( visitState == 2 ) ProcessVisItCommand();
}
while ( visitState == 2 );
printf("visitState = %d \n", visitState);
}
return visitState;
}
void MainLoop()
{
if (par_rank == 0)
......@@ -357,16 +387,11 @@ void MainLoop()
while (!quitflag)
{
int visitstate;
if (par_rank == 0)
{
int blocking = runflag ? FALSE : TRUE;
visitstate = VisItDetectInput(blocking, fileno(stdin));
}
int visitstate = VisItCheckForNewVisItCommand( );
#ifdef PARALLEL
MPI_Bcast(&visitstate, 1, MPI_INT, 0, MPI_COMM_WORLD);
#endif
switch (visitstate)
{
case -5:
......@@ -421,7 +446,6 @@ void MainLoop()
case 2:
// VisIt wants to tell the engine something
runflag = 0;
if (!ProcessVisItCommand())
{
// Disconnect on an error or closed connection
......@@ -474,28 +498,28 @@ int main(int argc, char *argv[])
// make a connection between the UI component, the signal and the function to call
// when the signal from that component is recieved.
addConnection ( "Shelly_Button_3", "clicked()", testSlot);
addConnection ( "Shelly_Button_3", "clicked()", testSlot2);
addConnection ( "Top_Button_1", "clicked()", testSlot2);
addConnection ( "Bottom_Button_2", "clicked()", testSlot);
addConnection ( "RadioButton1", "clicked()", testSlot2);
addConnection ( "RadioButton2", "clicked()", testSlot2);
addConnection ( "RadioButton3", "clicked()", testSlot2);
VisItAddConnection( "Shelly_Button_2", "clicked()", testSlot);
VisItAddConnection( "Shelly_Button_3", "clicked()", testSlot2);
VisItAddConnection( "Top_Button_1", "clicked()", testSlot2);
VisItAddConnection( "Bottom_Button_2", "clicked()", testSlot);
VisItAddConnection( "RadioButton1", "clicked()", testSlot2);
VisItAddConnection( "RadioButton2", "clicked()", testSlot2);
VisItAddConnection( "RadioButton3", "clicked()", testSlot2);
// monitor value changed if you care about a change
// when some other radio button is pressed.
addConnection ( "RadioButton1", "stateChanged()", testSlot2);
addConnection ( "RadioButton2", "stateChanged()", testSlot2);
addConnection ( "RadioButton3", "stateChanged()", testSlot2);
addConnection ( "ShellyLineEdit1","textChanged()", valueChanged);
addConnection ( "ShellyTable_1","currentChanged()", currentChanged);
addConnection ( "ShellySlider_1","valueChanged()", valueChanged);
addConnection ( "ShellyDial_1","valueChanged()", valueChanged);
addConnection ( "apply", "clicked()", apply);
addConnection ( "timeEdit1" ,"valueChanged()", valueChanged);
addConnection ( "dateEdit1" ,"valueChanged()", valueChanged);
addConnection ( " CheckBox1", "clicked()" , testSlot2);
VisItAddConnection( "RadioButton1", "stateChanged()", testSlot2);
VisItAddConnection( "RadioButton2", "stateChanged()", testSlot2);
VisItAddConnection( "RadioButton3", "stateChanged()", testSlot2);
VisItAddConnection( "ShellyLineEdit1","textChanged()", valueChanged);
VisItAddConnection( "ShellyTable_1","currentChanged()", currentChanged);
VisItAddConnection( "ShellySlider_1","valueChanged()", valueChanged);
VisItAddConnection( "ShellyDial_1","valueChanged()", valueChanged);
VisItAddConnection( "apply", "clicked()", apply);
VisItAddConnection( "timeEdit1" ,"valueChanged()", valueChanged);
VisItAddConnection( "dateEdit1" ,"valueChanged()", valueChanged);
VisItAddConnection( "CheckBox1", "clicked()" , testSlot2);
if (par_rank == 0)
{
......
......@@ -17,5 +17,4 @@ extern float *p_nvalues;
extern int numdomains;
extern int par_rank;
extern VisIt_SimulationMetaData *md;
void Update_UI_Commands();
......@@ -11,6 +11,7 @@
* Shelly Prevost added custom command updating
*/
#include "sim.h"
#include "SimHelperFunc.h"
#include <VisItControlInterface_V1.h>
#include <VisItDataInterface_V1.h>
......@@ -19,12 +20,14 @@
#include <string.h>
VisIt_SimulationMetaData *md = NULL;
void Update_UI_Commands();
// Here is where you add all the initialization code you
// want to run only once.
void InitializeMD(int MaxNumCustCMD )
{
md = malloc(sizeof(VisIt_SimulationMetaData));
md->currentCycle = cycle;
md->currentTime = 0;
md->currentMode = runflag ? VISIT_SIMMODE_RUNNING : VISIT_SIMMODE_STOPPED;
......@@ -64,45 +67,43 @@ void InitializeMD(int MaxNumCustCMD )
// this will set up the generic and custom
// commands
initAllCMD(MaxNumCustCMD);
VisItInitAllCMD(md, MaxNumCustCMD);
}
VisIt_SimulationMetaData *VisItGetMetaData()
{
// maximum number of UI components connections
// that you will be creating
int MAX_NUMBER_CUST_CMD = 15;
// if the first time setup the meta data
// and create meta data slots for the UI control
// Do this only once.
if (md == NULL )
{
InitializeMD(MAX_NUMBER_CUST_CMD);
// set up the specific ui channel to control the
// ui compenents in the VisIt custom commands dialog
// These names should be the exact same name as defined
// in the interface file.
createCMD ( "MainTextLabel");
createCMD ( "ShellySpinBox1");
createCMD ( "progressBar1");
createCMD ( "Top_Button_1");
createCMD ( "ShellySlider_1");
createCMD ( "ShellyDial_1");
createCMD ( "ShellyLineEdit1");
createCMD ( "ShellyText_2");
createCMD ( "RadioButton1");
createCMD ( "RadioButton2");
createCMD ( "RadioButton3");
createCMD ( "LCDNumber1");
createCMD ( "CheckBox1");
createCMD ( "timeEdit1");
createCMD ( "dateEdit1");
}
// maximum number of UI components connections
// that you will be creating
int MAX_NUMBER_CUST_CMD = 15;
// if the first time setup the meta data
// and create meta data slots for the UI control
// Do this only once.
if (md == NULL )
{
InitializeMD(MAX_NUMBER_CUST_CMD);
// set up the specific ui channel to control the
// ui compenents in the VisIt custom commands dialog
// These names should be the exact same name as defined
// in the interface file.
VisItCreateCMD( *md, "MainTextLabel");
VisItCreateCMD( *md, "ShellySpinBox1");
VisItCreateCMD( *md, "progressBar1");
VisItCreateCMD( *md, "Top_Button_1");
VisItCreateCMD( *md, "ShellySlider_1");
VisItCreateCMD( *md, "ShellyDial_1");
VisItCreateCMD( *md, "ShellyLineEdit1");
VisItCreateCMD( *md, "ShellyText_2");
VisItCreateCMD( *md, "RadioButton1");
VisItCreateCMD( *md, "RadioButton2");
VisItCreateCMD( *md, "RadioButton3");
VisItCreateCMD( *md, "LCDNumber1");
VisItCreateCMD( *md, "CheckBox1");
VisItCreateCMD( *md, "timeEdit1");
VisItCreateCMD( *md, "dateEdit1");
}
// now update the meta data so that the custom
// command interface will be brought up to date
......@@ -124,42 +125,40 @@ void Update_UI_Commands()
static int timeStep = 0;
char value[MAX_CMD_STR_LEN];
char modValue[MAX_CMD_STR_LEN];
#ifdef DEBUG_PRINT
printf ( "updating UI command data \n");
#endif
// move the progess bar and update the value in the spin box
setCMDValue ("progressBar1", (timeStep *10)% 100);
setCMDValue ("ShellySpinBox1", timeStep);
setCMDValue ("LCDNumber1",timeStep);
VisItSetCMDValue (*md, "progressBar1", (timeStep *10)% 100);
VisItSetCMDValue (*md, "ShellySpinBox1", timeStep);
VisItSetCMDValue (*md, "LCDNumber1",timeStep);
// change the lable on the pushbutton
setCMDText ("Top_Button_1", "Simulation Text");
setCMDEnable ("Top_Button_1", 0);
setCMDIsOn ("CheckBox1", 0);
setCMDIsOn ("RadioButton1", 1);
setCMDIsOn ("RadioButton2", 0);
setCMDText ("RadioButton1", "Label 1");
setCMDText ("RadioButton2", "Label 2");
setCMDText ("RadioButton3", "Label 3");
VisItSetCMDText(*md, "Top_Button_1", "Simulation Text");
VisItSetCMDEnable(*md, "Top_Button_1", 0);
VisItSetCMDIsOn(*md, "CheckBox1", 0);
VisItSetCMDIsOn(*md, "RadioButton1", 1);
VisItSetCMDIsOn(*md, "RadioButton2", 0);
VisItSetCMDText(*md, "RadioButton1", "Label 1");
VisItSetCMDText(*md, "RadioButton2", "Label 2");
VisItSetCMDText(*md, "RadioButton3", "Label 3");
// set the text on the lable
sprintf ( value, "%5d", timeStep *10);
strcat( value, " Simulation Label");
setCMDText ("MainTextLabel", value);
setCMDText ("CheckBox1", "New Label");
setCMDText ("timeEdit1", "11:06:03");
setCMDText ("dateEdit1", "Mon Jan 23 2006");
sprintf(value, "%5d", timeStep *10);
strcat( value, "Simulation Label");
VisItSetCMDText(*md, "MainTextLabel", value);
VisItSetCMDText(*md, "CheckBox1", "New Label");
VisItSetCMDText(*md, "timeEdit1", "11:06:03");
VisItSetCMDText(*md, "dateEdit1", "Mon Jan 23 2006");
// move the slider and dial
setCMDValue ( "ShellySlider_1",(timeStep * 10) % 100);
setCMDValue ( "ShellyDial_1",timeStep % 360);
sprintf ( modValue, "%5d", timeStep % 360);
setCMDText ( "ShellyLineEdit1",modValue);
setCMDText ( "ShellyText_2",modValue);
VisItSetCMDValue(*md, "ShellySlider_1",(timeStep * 10) % 100);
VisItSetCMDValue(*md, "ShellyDial_1",timeStep % 360);
sprintf (modValue, "%5d", timeStep % 360);
VisItSetCMDText(*md, "ShellyLineEdit1",modValue);
VisItSetCMDText(*md, "ShellyText_2",modValue);
md->currentCycle = cycle;
md->currentTime = timeStep;
md->currentMode = runflag ? VISIT_SIMMODE_RUNNING : VISIT_SIMMODE_STOPPED;
......