[Kst] branches/work/kst/1.6/kst/src/extensions/js
Andrew Walker
arwalker at sumusltd.com
Tue Jan 22 21:58:24 CET 2008
SVN commit 764916 by arwalker:
format changes
M +4 -0 bind_axislabel.h
M +11 -0 bind_datasource.h
M +15 -0 bind_datavector.h
M +3 -0 bind_equation.h
M +7 -0 bind_plot.h
M +4 -0 bind_plotlabel.h
M +1 -2 bind_pluginmanager.h
M +1 -0 bind_template.h
M +12 -0 bind_vector.h
--- branches/work/kst/1.6/kst/src/extensions/js/bind_axislabel.h #764915:764916
@@ -42,22 +42,26 @@
bool hasProperty(KJS::ExecState *exec, const KJS::Identifier& propertyName) const;
// member functions
+
/* @property string text
@description Contains the text contents of the label. This may include
scalar references of the form <i>[scalar_name]</i> and some basic LaTeX.
*/
void setText(KJS::ExecState *exec, const KJS::Value& value);
KJS::Value text(KJS::ExecState *exec) const;
+
/* @property string font
@description Used to set or get the current font used for the label.
*/
void setFont(KJS::ExecState *exec, const KJS::Value& value);
KJS::Value font(KJS::ExecState *exec) const;
+
/* @property number fontSize
@description Contains the size of the font used to draw the label.
*/
void setFontSize(KJS::ExecState *exec, const KJS::Value& value);
KJS::Value fontSize(KJS::ExecState *exec) const;
+
/* @property string type
@readonly
@description The type of axis - X or Y presently.
--- branches/work/kst/1.6/kst/src/extensions/js/bind_datasource.h #764915:764916
@@ -50,16 +50,19 @@
bool hasProperty(KJS::ExecState *exec, const KJS::Identifier& propertyName) const;
// member functions
+
/* @method isValidField
@returns boolean
@description Returns if the field is valid or not.
*/
KJS::Value isValidField(KJS::ExecState *exec, const KJS::List& args);
+
/* @method fieldList
@returns array[string]
@description Generates a list of the fields available from this source.
*/
KJS::Value fieldList(KJS::ExecState *exec, const KJS::List& args);
+
/* @method samplesPerFrame
@arg string field A field name to get the number of
samples per frame for. This is the same for every
@@ -68,6 +71,7 @@
@description The number of samples per frame for this field or source.
*/
KJS::Value samplesPerFrame(KJS::ExecState *exec, const KJS::List& args);
+
/* @method frameCount
@optarg string field An optional field name to get the number of
frames for. This is the same for every
@@ -79,36 +83,43 @@
KJS::Value frameCount(KJS::ExecState *exec, const KJS::List& args);
// properties
+
/* @property boolean valid
@readonly
@description True if the data source is valid.
*/
KJS::Value valid(KJS::ExecState *exec) const;
+
/* @property boolean empty
@readonly
@description True if the data source is empty.
*/
KJS::Value empty(KJS::ExecState *exec) const;
+
/* @property boolean completeFieldList
@readonly
@description True if the field list is complete.
*/
KJS::Value completeFieldList(KJS::ExecState *exec) const;
+
/* @property string fileName
@readonly
@description Name of the file.
*/
KJS::Value fileName(KJS::ExecState *exec) const;
+
/* @property string fileType
@readonly
@description The type (format) of the file, such as ASCII.
*/
KJS::Value fileType(KJS::ExecState *exec) const;
+
/* @property string source
@readonly
@description The name of the data source.
*/
KJS::Value source(KJS::ExecState *exec) const;
+
/* @property array[string] metaData
@readonly
@description Any metadata associated with the data source. This is an
--- branches/work/kst/1.6/kst/src/extensions/js/bind_datavector.h #764915:764916
@@ -56,15 +56,18 @@
bool hasProperty(KJS::ExecState *exec, const KJS::Identifier& propertyName) const;
// member functions
+
/* @method reload
description Triggers a reload of this vector from disk.
*/
KJS::Value reload(KJS::ExecState *exec, const KJS::List& args);
+
/* @method changeFile
@arg DataSource source The DataSource to switch to.
@description Switches this DataVector to a different DataSource.
*/
KJS::Value changeFile(KJS::ExecState *exec, const KJS::List& args);
+
/* @method changeFrames
@arg number start The starting frame.
@arg number count The number of frames to read.
@@ -80,67 +83,79 @@
@description True if the data vector is valid.
*/
KJS::Value valid(KJS::ExecState *exec) const;
+
/* @property boolean skip
@readonly
@description True if the vector should skip by <i>skipLength</i> samples
while reading from the data source.
*/
KJS::Value skip(KJS::ExecState *exec) const;
+
/* @property boolean boxcar
@readonly
@description True if the vector should be boxcar filtered.
*/
KJS::Value boxcar(KJS::ExecState *exec) const;
+
/* @property boolean readToEnd
@readonly
@description If true, the vector is read to the end of the source.
*/
KJS::Value readToEnd(KJS::ExecState *exec) const;
+
/* @property boolean countFromEnd
@readonly
@description If true, the vector reads only a maximum number of samples
from the end of the source.
*/
KJS::Value countFromEnd(KJS::ExecState *exec) const;
+
/* @property number skipLength
@readonly
@description The number of samples to skip by.
*/
KJS::Value skipLength(KJS::ExecState *exec) const;
+
/* @property number startFrame
@readonly
@description The starting frame number.
*/
KJS::Value startFrame(KJS::ExecState *exec) const;
+
/* @property number startFrameRequested
@readonly
@description The requested starting frame number. May not be the
actual <i>startFrame</i>.
*/
KJS::Value startFrameRequested(KJS::ExecState *exec) const;
+
/* @property number frames
@readonly
@description The number of frames read from the source.
*/
KJS::Value frames(KJS::ExecState *exec) const;
+
/* @property number framesRequested
@readonly
@description The number of frames requested to be read from the source.
May not be the actual <i>frames</i>.
*/
KJS::Value framesRequested(KJS::ExecState *exec) const;
+
/* @property number samplesPerFrame
@readonly
@description The number of samples per frame for the associated data
source.
*/
KJS::Value samplesPerFrame(KJS::ExecState *exec) const;
+
/* @property string field
@readonly
@description The field being read from the data source to create this
vector.
*/
KJS::Value field(KJS::ExecState *exec) const;
+
/* @property DataSource dataSource
@readonly
@description The data source object used by this DataVector.
--- branches/work/kst/1.6/kst/src/extensions/js/bind_equation.h #764915:764916
@@ -77,6 +77,7 @@
*/
void setEquation(KJS::ExecState *exec, const KJS::Value& value);
KJS::Value equation(KJS::ExecState *exec) const;
+
/* @property boolean valid
@readonly
@description True if the equation object is valid. If false, any
@@ -84,11 +85,13 @@
meaningless.
*/
KJS::Value valid(KJS::ExecState *exec) const;
+
/* @property Vector xVector
@readonly
@description The X vector (input vector) for the equation.
*/
KJS::Value xVector(KJS::ExecState *exec) const;
+
/* @property Vector yVector
@readonly
@description The Y vector (output vector) for the equation.
--- branches/work/kst/1.6/kst/src/extensions/js/bind_plot.h #764915:764916
@@ -57,37 +57,44 @@
@description A list of all the Curves used by the plot.
*/
KJS::Value curves(KJS::ExecState *exec) const;
+
/* @property Legend legend
@readonly
@description The Legend for this plot. May be null.
*/
KJS::Value legend(KJS::ExecState *exec) const;
+
/* @method createLegend
@returns Legend
@description Creates a Legend for this plot. If a legend already exists
then that one is returned.
*/
KJS::Value createLegend(KJS::ExecState *exec, const KJS::List& args);
+
/* @property string topLabel
@description The top label for this plot.
*/
void setTopLabel(KJS::ExecState *exec, const KJS::Value& value);
KJS::Value topLabel(KJS::ExecState *exec) const;
+
/* @property Axis xAxis
@readonly
@description The X-axis for this plot.
*/
KJS::Value xAxis(KJS::ExecState *exec) const;
+
/* @property Axis yAxis
@readonly
@description The Y-axis for this plot.
*/
KJS::Value yAxis(KJS::ExecState *exec) const;
+
/* @property PlotLabel title
@readonly
@description The title for this plot.
*/
KJS::Value title(KJS::ExecState *exec) const;
+
/* @property boolean tied
@description True if the plot zoom state is tied.
*/
--- branches/work/kst/1.6/kst/src/extensions/js/bind_plotlabel.h #764915:764916
@@ -42,6 +42,7 @@
bool hasProperty(KJS::ExecState *exec, const KJS::Identifier& propertyName) const;
// member functions
+
/* @property string text
@description Contains the text contents of the label. This may include
carriage returns (\n), scalar references of the form
@@ -49,16 +50,19 @@
*/
void setText(KJS::ExecState *exec, const KJS::Value& value);
KJS::Value text(KJS::ExecState *exec) const;
+
/* @property string font
@description Used to set or get the current font used for the label.
*/
void setFont(KJS::ExecState *exec, const KJS::Value& value);
KJS::Value font(KJS::ExecState *exec) const;
+
/* @property number fontSize
@description Contains the size of the font used to draw the label.
*/
void setFontSize(KJS::ExecState *exec, const KJS::Value& value);
KJS::Value fontSize(KJS::ExecState *exec) const;
+
/* @property number justification
@description The horizontal justification for the label. This is a bit field.
The values are as follows:
--- branches/work/kst/1.6/kst/src/extensions/js/bind_pluginmanager.h #764915:764916
@@ -43,10 +43,9 @@
bool hasProperty(KJS::ExecState *exec, const KJS::Identifier& propertyName) const;
// member functions
- // install
- // remove
// properties
+
/* @property PluginModuleCollection modules
@readonly
@description A list of all PluginModules available.
--- branches/work/kst/1.6/kst/src/extensions/js/bind_template.h #764915:764916
@@ -49,6 +49,7 @@
int propertyCount() const;
// member functions
+
/* @method name
@returns type
@arg type name description
--- branches/work/kst/1.6/kst/src/extensions/js/bind_vector.h #764915:764916
@@ -59,6 +59,7 @@
editable.
*/
KJS::Value resize(KJS::ExecState *exec, const KJS::List& args);
+
/* @method interpolate
@returns number
@description Interpolates the vector to <i>n</i> samples and
@@ -67,55 +68,66 @@
@arg number n The number of samples to interpolate to.
*/
KJS::Value interpolate(KJS::ExecState *exec, const KJS::List& args);
+
/* @method zero
@description Sets all values in the vector to zero.
@exception GeneralError Throws this exception if the vector is not editable.
*/
KJS::Value zero(KJS::ExecState *exec, const KJS::List& args);
+
/* @method update
@description Updates the statistical values associated with a vector.
@exception GeneralError Throws this exception if the vector is not editable.
*/
KJS::Value update(KJS::ExecState *exec, const KJS::List& args);
+
/* @property number length
@readonly
@description The number of samples in the vector.
*/
KJS::Value length(KJS::ExecState *exec) const;
+
/* @property number min
@readonly
@description The value of the smallest sample in the vector.
*/
KJS::Value min(KJS::ExecState *exec) const;
+
/* @property number max
@readonly
@description The value of the largest sample in the vector.
*/
KJS::Value max(KJS::ExecState *exec) const;
+
/* @property number mean
@readonly
@description The mean value of all samples in the vector.
*/
KJS::Value mean(KJS::ExecState *exec) const;
+
/* @property number numNew
@readonly
*/
KJS::Value numNew(KJS::ExecState *exec) const;
+
/* @property number numShifted
@readonly
*/
KJS::Value numShifted(KJS::ExecState *exec) const;
+
/* @property number editable
@readonly
@description True if the vector is editable by the user. This should be
checked before attempting to modify a vector in any way.
*/
KJS::Value editable(KJS::ExecState *exec) const;
+
/* @property number numNaN
@readonly
@description The number of NaN values in the vector.
*/
KJS::Value numNaN(KJS::ExecState *exec) const;
+
protected:
KstBindVector(int id, const char *name = 0L);
void addBindings(KJS::ExecState *exec, KJS::Object& obj);
More information about the Kst
mailing list