| V_Sim API - Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | ||||
gtk_curveWidgetgtk_curveWidget — A specialised curve widget to draw distance distribution for pairs. |
VisuUiCurveFrame; VisuUiCurveFrameClass; enum VisuUiCurveFrameStyle; void visu_ui_curve_frame_addData (VisuUiCurveFrame *curve,const gchar *eleName,const gchar *lkName,const guint *data,guint nSteps,float init,float step); void visu_ui_curve_frame_draw (VisuUiCurveFrame *curve); gboolean visu_ui_curve_frame_getHighlightRange (VisuUiCurveFrame *curve,float range[2]); float visu_ui_curve_frame_getIntegralInRange (VisuUiCurveFrame *curve,gchar **label); float visu_ui_curve_frame_getMeanInRange (VisuUiCurveFrame *curve,gchar **label); void visu_ui_curve_frame_getSpan (VisuUiCurveFrame *curve,float span[2]); gboolean visu_ui_curve_frame_hasData (VisuUiCurveFrame *curve); GtkWidget * visu_ui_curve_frame_new (float distMin,float distMax); void visu_ui_curve_frame_setData (VisuUiCurveFrame *curve,float step,float min,float max); gboolean visu_ui_curve_frame_setFilter (VisuUiCurveFrame *curve,const gchar *filter); gboolean visu_ui_curve_frame_setHighlightRange (VisuUiCurveFrame *curve,float range[2]); void visu_ui_curve_frame_setNNodes (VisuUiCurveFrame *curve,const gchar *ele,guint n); gboolean visu_ui_curve_frame_setSpan (VisuUiCurveFrame *curve,float span[2]); gboolean visu_ui_curve_frame_setStyle (VisuUiCurveFrame *curve,VisuUiCurveFrameStyle style);
GObject +----GInitiallyUnowned +----GtkWidget +----GtkDrawingArea +----VisuUiCurveFrame
typedef struct _VisuUiCurveFrame VisuUiCurveFrame;
An opaque structure defining a VisuUiCurveFrame widget.
Since 3.6
typedef struct _VisuUiCurveFrameClass VisuUiCurveFrameClass;
An opaque structure defining the class of a VisuUiCurveFrame widget.
Since 3.6
typedef enum {
CURVE_LINEAR,
CURVE_BAR,
CURVE_GAUSS
} VisuUiCurveFrameStyle;
Possible styles for the curve rendering, see visu_ui_curve_frame_setStyle().
void visu_ui_curve_frame_addData (VisuUiCurveFrame *curve,const gchar *eleName,const gchar *lkName,const guint *data,guint nSteps,float init,float step);
This routine changes the distribution for element eleName, with
respect to element lkName. data is an array that gives the number data[i]
of pairs eleName - lkName which distance is in (init + step * i).
|
a VisuUiCurveFrame widget. |
|
a string. |
|
a string. |
|
an array of frequencies. |
|
the size of data. |
|
the initial x value for array data. |
|
the step value to increase x for array data. |
Since 3.6
void visu_ui_curve_frame_draw (VisuUiCurveFrame *curve);
Forces to redraw the widget.
|
a VisuUiCurveFrame widget. |
Since 3.6
gboolean visu_ui_curve_frame_getHighlightRange (VisuUiCurveFrame *curve,float range[2]);
Retrieves the distance span that is used for highlight rendering and
calculation, see visu_ui_curve_frame_setHighlightRange().
|
a VisuUiCurveFrame widget. |
|
a location for two floats. |
Returns : |
TRUE if range has been set already. |
Since 3.6
float visu_ui_curve_frame_getIntegralInRange (VisuUiCurveFrame *curve,gchar **label);
Calculates the integral of the displayed distribution (see
visu_ui_curve_frame_setFilter()) in the given range (see
visu_ui_curve_frame_setHighlightRange()). If label is present, it will points on a
string labeling the displayed distribution. The string is owned by V_Sim.
|
a VisuUiCurveFrame widget. |
|
a location to a string. |
Returns : |
the integral. |
Since 3.6
float visu_ui_curve_frame_getMeanInRange (VisuUiCurveFrame *curve,gchar **label);
Calculates the average distance value of the displayed distribution (see
visu_ui_curve_frame_setFilter()) in the given range (see
visu_ui_curve_frame_setHighlightRange()). If label is present, it will points on a
string labeling the displayed distribution. The string is owned by V_Sim.
|
a VisuUiCurveFrame widget. |
|
a location to a string. |
Returns : |
the average distance value. |
Since 3.6
void visu_ui_curve_frame_getSpan (VisuUiCurveFrame *curve,float span[2]);
Retrieves the distances inside which the distribution is displayed.
|
a VisuUiCurveFrame widget. |
|
a location for two floats. |
Since 3.6
gboolean visu_ui_curve_frame_hasData (VisuUiCurveFrame *curve);
Retrieve if some distance data have been added to the curve.
|
a VisuUiCurveFrame widget. |
Returns : |
TRUE if the curve has some data associated. |
Since 3.6
GtkWidget * visu_ui_curve_frame_new (float distMin,float distMax);
It creates a graph that can display distances distribution for
VisuElement pairing. The display span is given by distMin and distMax.
|
a float. |
|
a float (bigger than distMin). |
Returns : |
a newly craeted VisuUiCurveFrame widget. |
Since 3.6
void visu_ui_curve_frame_setData (VisuUiCurveFrame *curve,float step,float min,float max);
Compute and allocate the required size to store distributions, see
visu_ui_curve_frame_addData() to actually setup the distribution values.
|
a VisuUiCurveFrame widget. |
|
the stepping distance. |
|
the minimum distance for the distribution. |
|
the maximum distance for the distribution. |
Since 3.6
gboolean visu_ui_curve_frame_setFilter (VisuUiCurveFrame *curve,const gchar *filter);
Modify the filter used to draw all or single VisuElement distribution.
|
a VisuUiCurveFrame widget. |
|
a string. |
Returns : |
TRUE if filter is actually changed. |
Since 3.6
gboolean visu_ui_curve_frame_setHighlightRange (VisuUiCurveFrame *curve,float range[2]);
Modify the distance span that is used for highlight rendering and
calculation, see visu_ui_curve_frame_getMeanInRange().
|
a VisuUiCurveFrame widget. |
|
two floats. |
Returns : |
TRUE if range is actually changed. |
Since 3.6
void visu_ui_curve_frame_setNNodes (VisuUiCurveFrame *curve,const gchar *ele,guint n);
Modify the number of ... TODO
|
a VisuUiCurveFrame widget. |
|
a string. |
|
a number. |
Since 3.6
gboolean visu_ui_curve_frame_setSpan (VisuUiCurveFrame *curve,float span[2]);
Changes the distance range that is displayed on the curve.
|
a VisuUiCurveFrame widget. |
|
two floats. |
Returns : |
TRUE if the distance displayed is actually changed. |
Since 3.6
gboolean visu_ui_curve_frame_setStyle (VisuUiCurveFrame *curve,VisuUiCurveFrameStyle style);
Modify the rendering style of the graph.
|
a VisuUiCurveFrame object. |
|
a style id. |
Returns : |
TRUE if the style is actually changed. |
Since 3.5