Commit c48fbda2 authored by whitlocb's avatar whitlocb

Massive XML tool improvements.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@3464 18c085ea-50e0-402c-830e-de6fd14e8384
parent e5d087d4
......@@ -647,6 +647,7 @@ $fullusage = "$usage
-gdb-viewer Run the viewer under gdb.
-gdb-engine Run the engine under gdb.
-gdb-mdserver Run the mdserver under gdb.
-gdb-xmledit Run xmledit under gdb.
-break <funcname> Add the specified breakpoint in gdb.
-xterm Run gdb in an xterm window.
-newconsole Run any VisIt component in a new console window.
......@@ -817,6 +818,7 @@ while (scalar(@ARGV) > 0) {
elsif ($arg eq "-gdb-viewer") { if($exe_name eq "viewer") {$debug_gdb = 1;} else {push @visitargs, $arg;}}
elsif ($arg eq "-gdb-engine") { if($exe_name eq "engine") {$debug_gdb = 1;} else {push @visitargs, $arg;}}
elsif ($arg eq "-gdb-mdserver") { if($exe_name eq "mdserver") {$debug_gdb = 1;} else {push @visitargs, $arg;}}
elsif ($arg eq "-gdb-xmledit") { if($exe_name eq "xmledit") {$debug_gdb = 1;} else {push @visitargs, $arg;}}
elsif ($arg eq "-gdb-vcl") { if($exe_name eq "vcl") {$debug_gdb = 1;} else {push @visitargs, $arg;}}
elsif ($arg eq "-xterm") { if($debug_gdb) {$gdb_xterm = 1;} else {push @visitargs, $arg;}}
elsif ($arg eq "-newconsole") { $use_new_console = 1; }
......@@ -2095,6 +2097,11 @@ else
{
print GDBFILE "directory $ENV{VISITHOME}/visitpy\n";
}
if ($exe_name eq "xmledit")
{
print GDBFILE "directory $ENV{VISITHOME}/tools/xml\n";
print GDBFILE "directory $ENV{VISITHOME}/tools/xmledit\n";
}
print GDBFILE "directory $ENV{VISITHOME}/visit_vtk/full\n";
print GDBFILE "directory $ENV{VISITHOME}/visit_vtk/lightweight\n";
print GDBFILE "directory $ENV{VISITHOME}/vtkqt\n";
......
Target: xml2java
Initialization: databaseInfoFont
databaseInfoFont = new FontAttributes();
databaseInfoFont.SetHeight(0.07);
Initialization: userInfoFont
userInfoFont = new FontAttributes();
userInfoFont.SetHeight(0.05);
Target: xml2atts
Initialization: databaseInfoFont
databaseInfoFont.SetHeight(0.07);
......
This diff is collapsed.
......@@ -8,6 +8,18 @@
</Function>
<Function name="IndexForName" user="true" member="true">
</Function>
<Function name="GetAnnotation2" user="true" member="true">
</Function>
<Function name="SetTimeSliderOptions" user="true" member="true">
</Function>
<Function name="SetText2DOptions" user="true" member="true">
</Function>
<Function name="SetText3DOptions" user="true" member="true">
</Function>
<Function name="SetLine2DOptions" user="true" member="true">
</Function>
<Function name="SetImageOptions" user="true" member="true">
</Function>
<Include file="source" quoted="false">
snprintf.h
</Include>
......
......@@ -1272,3 +1272,66 @@ ColorAttribute::RgbToRgbStr(unsigned char rgb[3], char *s)
}
}
Target: xml2java
Function: Red
Declaration: Red
Definition:
public int Red()
{
int mask = 0xff;
return mask & color[0];
}
Function: Green
Declaration: Green
Definition:
public int Green()
{
int mask = 0xff;
return mask & color[1];
}
Function: Blue
Declaration: Blue
Definition:
public int Blue()
{
int mask = 0xff;
return mask & color[2];
}
Function: Alpha
Declaration: Alpha
Definition:
public int Alpha()
{
int mask = 0xff;
return mask & color[3];
}
Function: ColorAttribute2
Declaration: ColorAttribute2
Definition:
public ColorAttribute(int r, int g, int b)
{
super(1);
color = new byte[4];
color[0] = (byte)(0xff & r);
color[1] = (byte)(0xff & g);
color[2] = (byte)(0xff & b);
color[3] = (byte)(0xff & 255);
}
Function: ColorAttribute3
Declaration: ColorAttribute3
Definition:
public ColorAttribute(int r, int g, int b, int a)
{
super(1);
color = new byte[4];
color[0] = (byte)(0xff & r);
color[1] = (byte)(0xff & g);
color[2] = (byte)(0xff & b);
color[3] = (byte)(0xff & a);
}
......@@ -8,6 +8,10 @@
</Field>
<Function name="ColorAttribute" user="true" member="true">
</Function>
<Function name="ColorAttribute2" user="true" member="true">
</Function>
<Function name="ColorAttribute3" user="true" member="true">
</Function>
<Function name="SetRgb" user="true" member="true">
</Function>
<Function name="SetRgba" user="true" member="true">
......
......@@ -477,3 +477,120 @@ ColorTableAttributes::SetFromNode(DataNode *parentNode)
if((node = searchNode->GetNode("activeColorTable")) != 0)
SetActiveContinuous(node->AsString());
}
Target: xml2java
Function: GetColorTableIndex
Declaration: GetColorTableIndex
Definition:
public int GetColorTableIndex(String name)
{
int retval = -1;
for(int i = 0; i < names.size(); ++i)
{
String n = (String)names.elementAt(i);
if(n.equals(name))
{
retval = i;
break;
}
}
return retval;
}
Function: GetColorControlPoints1
Declaration: GetColorControlPoints1
Definition:
public ColorControlPointList GetColorControlPoints(int index)
{
if(index >= 0 && index < colorTables.size())
return (ColorControlPointList)colorTables.elementAt(index);
else
return null;
}
Function: GetColorControlPoints2
Declaration: GetColorControlPoints2
Definition:
public ColorControlPointList GetColorControlPoints(String name)
{
int index = GetColorTableIndex(name);
if(index >= 0 && index < colorTables.size())
return (ColorControlPointList)colorTables.elementAt(index);
else
return null;
}
Function: GetActiveColorControlPoints
Declaration: GetActiveColorControlPoints
Definition:
public ColorControlPointList GetActiveColorControlPoints()
{
int index = GetColorTableIndex(activeContinuous);
if(index >= 0 && index < colorTables.size())
return (ColorControlPointList)colorTables.elementAt(index);
else
return null;
}
Function: AddColorTable
Declaration: AddColorTable
Definition:
public void AddColorTable(String name, ColorControlPointList cpts)
{
names.addElement(new String(name));
Select(0);
AddColorTables(cpts);
}
Function: RemoveColorTable1
Declaration: RemoveColorTable1
Definition:
public void RemoveColorTable(String name)
{
int index = GetColorTableIndex(name);
RemoveColorTable(index);
}
Function: RemoveColorTable2
Declaration: RemoveColorTable2
Definition:
public void RemoveColorTable(int index)
{
if(index >= 0 && index < names.size())
{
String nameAt = (String)names.elementAt(index);
boolean isActiveContinuous = nameAt.equals(activeContinuous);
boolean isActiveDiscrete = nameAt.equals(activeDiscrete);
// Remove the name from the vector.
names.remove(index);
Select(0);
// Remove the color table from the vector.
RemoveColorTables(index);
// If it is the active color table that was removed, reset the
// active color table to the first element.
if(isActiveContinuous)
{
if(names.size() > 0)
{
nameAt = (String)names.elementAt(0);
SetActiveContinuous(nameAt);
}
else
SetActiveContinuous("");
}
if(isActiveDiscrete)
{
if(names.size() > 0)
{
nameAt = (String)names.elementAt(0);
SetActiveDiscrete(nameAt);
}
else
SetActiveDiscrete("");
}
}
}
......@@ -7,6 +7,7 @@
<Function name="GetColorTableIndex" user="true"></Function>
<Function name="GetColorControlPoints1" user="true"></Function>
<Function name="GetColorControlPoints2" user="true"></Function>
<Function name="GetActiveColorControlPoints" user="true"></Function>
<Function name="AddColorTable" user="true"></Function>
<Function name="RemoveColorTable1" user="true"></Function>
<Function name="RemoveColorTable2" user="true"></Function>
......
Initialization: light0
Initialization: light7
SetDefaultEnabledStates();
Target: xml2java
Initialization: light7
light7 = new LightAttributes();
SetDefaultEnabledStates();
Target: xml2atts
Function: GetLight
Declaration: const LightAttributes &GetLight(int i) const;
Definition:
......@@ -123,3 +129,34 @@ LightList::SetDefaultEnabledStates()
light7.SetEnabledFlag(false);
}
Target: xml2java
Function: SetAllEnabled
Declaration: SetAllEnabled
Definition:
public void SetAllEnabled(boolean val)
{
light0.SetEnabledFlag(val);
light1.SetEnabledFlag(val);
light2.SetEnabledFlag(val);
light3.SetEnabledFlag(val);
light4.SetEnabledFlag(val);
light5.SetEnabledFlag(val);
light6.SetEnabledFlag(val);
light7.SetEnabledFlag(val);
SelectAll();
}
Function: SetDefaultEnabledStates
Declaration: SetDefaultEnabledStates
Definition:
public void SetDefaultEnabledStates()
{
light0.SetEnabledFlag(true);
light1.SetEnabledFlag(false);
light2.SetEnabledFlag(false);
light3.SetEnabledFlag(false);
light4.SetEnabledFlag(false);
light5.SetEnabledFlag(false);
light6.SetEnabledFlag(false);
light7.SetEnabledFlag(false);
}
<?xml version="1.0"?>
<Attribute name="LightList" purpose="This class contains a list of LightAttributes." persistent="true" exportAPI="STATE_API" exportInclude="state_exports.h" codefile="LightList.code">
<Field name="light0" label="light0" type="att" subtype="LightAttributes" init="true">
<Field name="light0" label="light0" type="att" subtype="LightAttributes">
</Field>
<Field name="light1" label="light1" type="att" subtype="LightAttributes">
</Field>
......@@ -14,7 +14,7 @@
</Field>
<Field name="light6" label="light6" type="att" subtype="LightAttributes">
</Field>
<Field name="light7" label="light7" type="att" subtype="LightAttributes">
<Field name="light7" label="light7" type="att" subtype="LightAttributes" init="true">
</Field>
<Function name="GetLight" user="true" member="true">
</Function>
......@@ -28,4 +28,6 @@
</Function>
<Function name="SetDefaultEnabledStates" user="true" member="true">
</Function>
<Function name="SetAllEnabled" user="true" member="true">
</Function>
</Attribute>
......@@ -3,11 +3,24 @@ Declaration: static const int DEFAULT_SCALABLE_AUTO_THRESHOLD;
Definition: const int RenderingAttributes::DEFAULT_SCALABLE_AUTO_THRESHOLD = 2000000;
Target: xml2java
Constant: DEFAULT_SCALABLE_AUTO_THRESHOLD
Declaration: DEFAULT_SCALABLE_AUTO_THRESHOLD
Definition: public final static int DEFAULT_SCALABLE_AUTO_THRESHOLD = 2000000;
Target: xml2atts
Constant: DEFAULT_SCALABLE_ACTIVATION_MODE
Declaration: static const int DEFAULT_SCALABLE_ACTIVATION_MODE;
Definition: const int RenderingAttributes::DEFAULT_SCALABLE_ACTIVATION_MODE = Auto;
Target: xml2java
Constant: DEFAULT_SCALABLE_ACTIVATION_MODE
Declaration: DEFAULT_SCALABLE_ACTIVATION_MODE
Definition: public final static int DEFAULT_SCALABLE_ACTIVATION_MODE = TRISTATEMODE_AUTO;
Target: xml2atts
Function: GetEffectiveScalableThreshold
Declaration: static int GetEffectiveScalableThreshold(TriStateMode mode, int autoThreshold);
Definition:
......
<?xml version="1.0"?>
<Attribute name="RenderingAttributes" purpose="This class contains special rendering attributes like antialiasing and stero settings." persistent="true" exportAPI="STATE_API" exportInclude="state_exports.h" codefile="RenderingAttributes.code">
<Attribute name="RenderingAttributes" purpose="This class contains special rendering attributes like antialiasing and stero settings." persistent="true" keyframe="true" exportAPI="STATE_API" exportInclude="state_exports.h" codefile="RenderingAttributes.code">
<Enum name="GeometryRepresentation">
Surfaces
Wireframe
......@@ -49,7 +49,7 @@
<Field name="specularPower" label="specularPower" type="float">
10.000000
</Field>
<Field name="specularColor" label="specularColor" type="color">
<Field name="specularColor" label="specularColor" type="color" length="4">
255
255
255
......@@ -64,15 +64,15 @@
<Field name="doDepthCueing" label="Do Depth Cueing" type="bool">
false
</Field>
<Field name="startCuePoint" type="doubleArray" length="3">
-10.
0.
0.
<Field name="startCuePoint" label="startCuePoint" type="doubleArray" length="3">
-10.000000
0.000000
0.000000
</Field>
<Field name="endCuePoint" type="doubleArray" length="3">
10.
0.
0.
<Field name="endCuePoint" label="endCuePoint" type="doubleArray" length="3">
10.000000
0.000000
0.000000
</Field>
<Field name="compressionActivationMode" label="compressionActivationMode" type="enum" subtype="TriStateMode">
Never
......
......@@ -2,3 +2,9 @@ Constant: DEFAULT_DURATION
Declaration: static const int DEFAULT_DURATION;
Definition: const int StatusAttributes::DEFAULT_DURATION = 5000;
Target: xml2java
Constant: DEFAULT_DURATION
Declaration: DEFAULT_DURATION
Definition:
public final static int DEFAULT_DURATION = 5000;
Target: xml2java
Constant: DEFAULT_FULL_FRAME_AUTO_THRESHOLD
Declaration: DEFAULT_FULL_FRAME_AUTO_THRESHOLD
Definition:
public final static double DEFAULT_FULL_FRAME_AUTO_THRESHOLD = 100.0;
Target: xml2atts
Constant: DEFAULT_FULL_FRAME_AUTO_THRESHOLD
Declaration: static const double DEFAULT_FULL_FRAME_AUTO_THRESHOLD;
Definition: const double View2DAttributes::DEFAULT_FULL_FRAME_AUTO_THRESHOLD = 100.0;
......
......@@ -48,7 +48,7 @@ package llnl.visit;
// Notes: Autogenerated by xml2java.
//
// Programmer: xml2java
// Creation: Mon Feb 25 15:14:55 PST 2008
// Creation: omitted
//
// Modifications:
//
......
......@@ -48,7 +48,7 @@ package llnl.visit;
// Notes: Autogenerated by xml2java.
//
// Programmer: xml2java
// Creation: Mon Feb 25 15:14:55 PST 2008
// Creation: omitted
//
// Modifications:
//
......@@ -83,8 +83,10 @@ public class AnnotationAttributes extends AttributeSubject
axes3D = new Axes3D();
userInfoFlag = true;
userInfoFont = new FontAttributes();
userInfoFont.SetHeight(0.05);
databaseInfoFlag = true;
databaseInfoFont = new FontAttributes();
databaseInfoFont.SetHeight(0.07);
databaseInfoExpansionMode = PATHEXPANSIONMODE_FILE;
legendInfoFlag = true;
backgroundColor = new ColorAttribute(255, 255, 255);
......@@ -126,12 +128,12 @@ public class AnnotationAttributes extends AttributeSubject
public boolean equals(AnnotationAttributes obj)
{
// Create the return value
return ((axes2D == obj.axes2D) &&
(axes3D == obj.axes3D) &&
return ((axes2D.equals(obj.axes2D)) &&
(axes3D.equals(obj.axes3D)) &&
(userInfoFlag == obj.userInfoFlag) &&
(userInfoFont == obj.userInfoFont) &&
(userInfoFont.equals(obj.userInfoFont)) &&
(databaseInfoFlag == obj.databaseInfoFlag) &&
(databaseInfoFont == obj.databaseInfoFont) &&
(databaseInfoFont.equals(obj.databaseInfoFont)) &&
(databaseInfoExpansionMode == obj.databaseInfoExpansionMode) &&
(legendInfoFlag == obj.legendInfoFlag) &&
(backgroundColor == obj.backgroundColor) &&
......@@ -140,7 +142,7 @@ public class AnnotationAttributes extends AttributeSubject
(gradientColor1 == obj.gradientColor1) &&
(gradientColor2 == obj.gradientColor2) &&
(backgroundMode == obj.backgroundMode) &&
(backgroundImage == obj.backgroundImage) &&
(backgroundImage.equals(obj.backgroundImage)) &&
(imageRepeatX == obj.imageRepeatX) &&
(imageRepeatY == obj.imageRepeatY));
}
......
......@@ -49,7 +49,7 @@ import java.util.Vector;
// Notes: Autogenerated by xml2java.
//
// Programmer: xml2java
// Creation: Mon Feb 25 15:14:55 PST 2008
// Creation: omitted
//
// Modifications:
//
......@@ -155,8 +155,17 @@ public class AnnotationObject extends AttributeSubject
for(i = 0; i < 3 && position2_equal; ++i)
position2_equal = (position2[i] == obj.position2[i]);
// Compare the elements in the text vector.
boolean text_equal = (obj.text.size() == text.size());
for(i = 0; (i < text.size()) && text_equal; ++i)
{
// Make references to String from Object.
String text1 = (String)text.elementAt(i);
String text2 = (String)obj.text.elementAt(i);
text_equal = text1.equals(text2);
}
// Create the return value
return ((objectName == obj.objectName) &&
return ((objectName.equals(obj.objectName)) &&
(objectType == obj.objectType) &&
(visible == obj.visible) &&
(active == obj.active) &&
......@@ -166,7 +175,7 @@ public class AnnotationObject extends AttributeSubject
(useForegroundForTextColor == obj.useForegroundForTextColor) &&
(color1 == obj.color1) &&
(color2 == obj.color2) &&
(text == obj.text) &&
text_equal &&
(fontFamily == obj.fontFamily) &&
(fontBold == obj.fontBold) &&
(fontItalic == obj.fontItalic) &&
......
This diff is collapsed.
......@@ -48,7 +48,7 @@ package llnl.visit;
// Notes: Autogenerated by xml2java.
//
// Programmer: xml2java
// Creation: Mon Feb 25 15:14:55 PST 2008
// Creation: omitted
//
// Modifications:
//
......@@ -83,10 +83,10 @@ public class AppearanceAttributes extends AttributeSubject
public boolean equals(AppearanceAttributes obj)
{
// Create the return value
return ((background == obj.background) &&
(foreground == obj.foreground) &&
(fontName == obj.fontName) &&
(style == obj.style) &&
return ((background.equals(obj.background)) &&
(foreground.equals(obj.foreground)) &&
(fontName.equals(obj.fontName)) &&
(style.equals(obj.style)) &&
(orientation == obj.orientation));
}
......
......@@ -364,7 +364,7 @@ public abstract class AttributeSubject extends java.lang.Object
protected String ucharToString(String name, byte val, String indent)
{
Byte iv = new Byte(val);
Integer iv = new Integer((int)val);
return indent + name + " = " + iv.toString();
}
......@@ -373,7 +373,7 @@ public abstract class AttributeSubject extends java.lang.Object
String s = indent + name + " = {";
for(int i = 0; i < val.length; ++i)
{
Byte v = new Byte(val[i]);
Integer v = new Integer((int)val[i]);
s = s + v.toString();
if(i < val.length - 1)
s = s + ", ";
......@@ -387,7 +387,9 @@ public abstract class AttributeSubject extends java.lang.Object
String s = indent + name + " = {";
for(int i = 0; i < val.size(); ++i)
{
s = s + val.elementAt(i).toString();
Byte b = (Byte)val.elementAt(i);
Integer v = new Integer(b.intValue());
s = s + v.toString();
if(i < val.size() - 1)
s = s + ", ";
}
......