Commit 5b77c61f authored by js9's avatar js9

Updating java and python bindings from previous change.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@3176 18c085ea-50e0-402c-830e-de6fd14e8384
parent f52e2ffa
......@@ -48,7 +48,7 @@ package llnl.visit;
// Notes: Autogenerated by xml2java.
//
// Programmer: xml2java
// Creation: Wed Mar 14 17:54:56 PST 2007
// Creation: Thu Feb 7 18:18:25 PST 2008
//
// Modifications:
//
......@@ -64,22 +64,24 @@ public class InteractorAttributes extends AttributeSubject
public InteractorAttributes()
{
super(4);
super(5);
showGuidelines = true;
clampSquare = false;
fillViewportOnZoom = true;
navigationMode = NAVIGATIONMODE_TRACKBALL;
axisArraySnap = true;
}
public InteractorAttributes(InteractorAttributes obj)
{
super(4);
super(5);
showGuidelines = obj.showGuidelines;
clampSquare = obj.clampSquare;
fillViewportOnZoom = obj.fillViewportOnZoom;
navigationMode = obj.navigationMode;
axisArraySnap = obj.axisArraySnap;
SelectAll();
}
......@@ -90,7 +92,8 @@ public class InteractorAttributes extends AttributeSubject
return ((showGuidelines == obj.showGuidelines) &&
(clampSquare == obj.clampSquare) &&
(fillViewportOnZoom == obj.fillViewportOnZoom) &&
(navigationMode == obj.navigationMode));
(navigationMode == obj.navigationMode) &&
(axisArraySnap == obj.axisArraySnap));
}
// Property setting methods
......@@ -118,11 +121,18 @@ public class InteractorAttributes extends AttributeSubject
Select(3);
}
public void SetAxisArraySnap(boolean axisArraySnap_)
{
axisArraySnap = axisArraySnap_;
Select(4);
}
// Property getting methods
public boolean GetShowGuidelines() { return showGuidelines; }
public boolean GetClampSquare() { return clampSquare; }
public boolean GetFillViewportOnZoom() { return fillViewportOnZoom; }
public int GetNavigationMode() { return navigationMode; }
public boolean GetAxisArraySnap() { return axisArraySnap; }
// Write and read methods.
public void WriteAtts(CommunicationBuffer buf)
......@@ -135,6 +145,8 @@ public class InteractorAttributes extends AttributeSubject
buf.WriteBool(fillViewportOnZoom);
if(WriteSelect(3, buf))
buf.WriteInt(navigationMode);
if(WriteSelect(4, buf))
buf.WriteBool(axisArraySnap);
}
public void ReadAtts(int n, CommunicationBuffer buf)
......@@ -156,6 +168,9 @@ public class InteractorAttributes extends AttributeSubject
case 3:
SetNavigationMode(buf.ReadInt());
break;
case 4:
SetAxisArraySnap(buf.ReadBool());
break;
}
}
}
......@@ -166,5 +181,6 @@ public class InteractorAttributes extends AttributeSubject
private boolean clampSquare;
private boolean fillViewportOnZoom;
private int navigationMode;
private boolean axisArraySnap;
}
......@@ -49,7 +49,7 @@
// Note: Autogenerated by xml2python. Do not modify by hand!
//
// Programmer: xml2python
// Creation: Wed Mar 14 16:03:20 PST 2007
// Creation: Thu Feb 7 18:18:05 PST 2008
//
// ****************************************************************************
......@@ -107,6 +107,11 @@ PyInteractorAttributes_ToString(const InteractorAttributes *atts, const char *pr
str += tmpStr;
}
if(atts->GetAxisArraySnap())
SNPRINTF(tmpStr, 1000, "%saxisArraySnap = 1\n", prefix);
else
SNPRINTF(tmpStr, 1000, "%saxisArraySnap = 0\n", prefix);
str += tmpStr;
return str;
}
......@@ -224,6 +229,30 @@ InteractorAttributes_GetNavigationMode(PyObject *self, PyObject *args)
return retval;
}
static PyObject *
InteractorAttributes_SetAxisArraySnap(PyObject *self, PyObject *args)
{
InteractorAttributesObject *obj = (InteractorAttributesObject *)self;
int ival;
if(!PyArg_ParseTuple(args, "i", &ival))
return NULL;
// Set the axisArraySnap in the object.
obj->data->SetAxisArraySnap(ival != 0);
Py_INCREF(Py_None);
return Py_None;
}
static PyObject *
InteractorAttributes_GetAxisArraySnap(PyObject *self, PyObject *args)
{
InteractorAttributesObject *obj = (InteractorAttributesObject *)self;
PyObject *retval = PyInt_FromLong(obj->data->GetAxisArraySnap()?1L:0L);
return retval;
}
static struct PyMethodDef InteractorAttributes_methods[] = {
......@@ -236,6 +265,8 @@ static struct PyMethodDef InteractorAttributes_methods[] = {
{"GetFillViewportOnZoom", InteractorAttributes_GetFillViewportOnZoom, METH_VARARGS},
{"SetNavigationMode", InteractorAttributes_SetNavigationMode, METH_VARARGS},
{"GetNavigationMode", InteractorAttributes_GetNavigationMode, METH_VARARGS},
{"SetAxisArraySnap", InteractorAttributes_SetAxisArraySnap, METH_VARARGS},
{"GetAxisArraySnap", InteractorAttributes_GetAxisArraySnap, METH_VARARGS},
{NULL, NULL}
};
......@@ -279,6 +310,8 @@ InteractorAttributes_getattr(PyObject *self, char *name)
else if(strcmp(name, "Flythrough") == 0)
return PyInt_FromLong(long(InteractorAttributes::Flythrough));
if(strcmp(name, "axisArraySnap") == 0)
return InteractorAttributes_GetAxisArraySnap(self, NULL);
return Py_FindMethod(InteractorAttributes_methods, self, name);
}
......@@ -301,6 +334,8 @@ InteractorAttributes_setattr(PyObject *self, char *name, PyObject *args)
retval = (InteractorAttributes_SetFillViewportOnZoom(self, tuple) != NULL);
else if(strcmp(name, "navigationMode") == 0)
retval = (InteractorAttributes_SetNavigationMode(self, tuple) != NULL);
else if(strcmp(name, "axisArraySnap") == 0)
retval = (InteractorAttributes_SetAxisArraySnap(self, tuple) != NULL);
Py_DECREF(tuple);
return retval ? 0 : -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment