![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces |
gtk_curveWidgetgtk_curveWidget — A specialised curve widget to draw distance distribution for pairs. |
enum CurveFrameStyle; #define CURVE_FRAME_TYPE #define CURVE_FRAME (obj) #define CURVE_FRAME_CLASS (obj) #define IS_CURVE_FRAME (obj) #define IS_CURVE_FRAME_CLASS (obj) #define CURVE_FRAME_GET_CLASS CurveFrame; CurveFrameClass; GType curveFrame_get_type (void
); GtkWidget * curveFrameNew (float distMin
,float distMax
); void curveFrameRedraw (CurveFrame *curve
); gboolean curveFrameSet_span (CurveFrame *curve
,float span[2]
); void curveFrameGet_span (CurveFrame *curve
,float span[2]
); gboolean curveFrameHas_data (CurveFrame *curve
); void curveFrameSet_data (CurveFrame *curve
,float step
,float min
,float max
); void curveFrameAdd_data (CurveFrame *curve
,const gchar *eleName
,const gchar *lkName
,const guint *data
,guint nSteps
,float init
,float step
); gboolean curveFrameSet_style (CurveFrame *curve
,CurveFrameStyle style
); gboolean curveFrameSet_filter (CurveFrame *curve
,const gchar *filter
); gboolean curveFrameSet_highlightRange (CurveFrame *curve
,float range[2]
); gboolean curveFrameGet_highlightRange (CurveFrame *curve
,float range[2]
); void curveFrameSet_nNodes (CurveFrame *curve
,const gchar *ele
,guint n
); float curveFrameGet_integralInRange (CurveFrame *curve
,gchar **label
); float curveFrameGet_meanInRange (CurveFrame *curve
,gchar **label
);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkDrawingArea +----CurveFrame
typedef enum { CURVE_LINEAR, CURVE_BAR, CURVE_GAUSS } CurveFrameStyle;
Possible styles for the curve rendering, see curveFrameSet_style()
.
#define CURVE_FRAME_TYPE (curveFrame_get_type())
Return the associated GType to the CurveFrame objects.
Since 3.6
#define CURVE_FRAME(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CURVE_FRAME_TYPE, CurveFrame))
Cast the given object to a CurveFrame object.
|
the widget to cast. |
Since 3.6
#define CURVE_FRAME_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST((obj), CURVE_FRAME, CurveFrameClass))
Cast the given class to a CurveFrame object.
|
the class to cast. |
Since 3.6
#define IS_CURVE_FRAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), CURVE_FRAME_TYPE))
Return if the given object is a valid CurveFrame object.
|
the object to test. |
Since 3.6
#define IS_CURVE_FRAME_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((obj), CURVE_FRAME_TYPE))
Return if the given class is a valid CurveFrameClass class.
|
the class to test. |
Since 3.6
#define CURVE_FRAME_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS((obj), CURVE_FRAME_TYPE, CurveFrameClass))
Get the class of the given object.
|
the widget to get the class of. |
Since 3.6
typedef struct _CurveFrame CurveFrame;
An opaque structure defining a CurveFrame widget.
Since 3.6
typedef struct _CurveFrameClass CurveFrameClass;
An opaque structure defining the class of a CurveFrame widget.
Since 3.6
GType curveFrame_get_type (void
);
Internal routine to get CURVE_FRAME_TYPE value.
Since 3.6
GtkWidget * curveFrameNew (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 CurveFrame widget. |
Since 3.6
void curveFrameRedraw (CurveFrame *curve
);
Forces to redraw the widget.
|
a CurveFrame widget. |
Since 3.6
gboolean curveFrameSet_span (CurveFrame *curve
,float span[2]
);
Changes the distance range that is displayed on the curve.
|
a CurveFrame widget. |
|
two floats. |
Returns : |
TRUE if the distance displayed is actually changed. |
Since 3.6
void curveFrameGet_span (CurveFrame *curve
,float span[2]
);
Retrieves the distances inside which the distribution is displayed.
|
a CurveFrame widget. |
|
a location for two floats. |
Since 3.6
gboolean curveFrameHas_data (CurveFrame *curve
);
Retrieve if some distance data have been added to the curve
.
|
a CurveFrame widget. |
Returns : |
TRUE if the curve has some data associated.
|
Since 3.6
void curveFrameSet_data (CurveFrame *curve
,float step
,float min
,float max
);
Compute and allocate the required size to store distributions, see
curveFrameAdd_data()
to actually setup the distribution values.
|
a CurveFrame widget. |
|
the stepping distance. |
|
the minimum distance for the distribution. |
|
the maximum distance for the distribution. |
Since 3.6
void curveFrameAdd_data (CurveFrame *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 CurveFrame 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
gboolean curveFrameSet_style (CurveFrame *curve
,CurveFrameStyle style
);
Modify the rendering style of the graph.
|
a CurveFrame object. |
|
a style id. |
Returns : |
TRUE if the style is actually changed. |
Since 3.5
gboolean curveFrameSet_filter (CurveFrame *curve
,const gchar *filter
);
Modify the filter used to draw all or single VisuElement distribution.
|
a CurveFrame widget. |
|
a string. |
Returns : |
TRUE if filter is actually changed. |
Since 3.6
gboolean curveFrameSet_highlightRange (CurveFrame *curve
,float range[2]
);
Modify the distance span that is used for highlight rendering and
calculation, see curveFrameGet_meanInRange()
.
|
a CurveFrame widget. |
|
two floats. |
Returns : |
TRUE if range is actually changed. |
Since 3.6
gboolean curveFrameGet_highlightRange (CurveFrame *curve
,float range[2]
);
Retrieves the distance span that is used for highlight rendering and
calculation, see curveFrameSet_highlightRange()
.
|
a CurveFrame widget. |
|
a location for two floats. |
Returns : |
TRUE if range has been set already. |
Since 3.6
void curveFrameSet_nNodes (CurveFrame *curve
,const gchar *ele
,guint n
);
Modify the number of ... TODO
|
a CurveFrame widget. |
|
a string. |
|
a number. |
Since 3.6
float curveFrameGet_integralInRange (CurveFrame *curve
,gchar **label
);
Calculates the integral of the displayed distribution (see
curveFrameSet_filter()
) in the given range (see
curveFrameSet_highlightRange()
). If label
is present, it will points on a
string labeling the displayed distribution. The string is owned by V_Sim.
|
a CurveFrame widget. |
|
a location to a string. |
Returns : |
the integral. |
Since 3.6
float curveFrameGet_meanInRange (CurveFrame *curve
,gchar **label
);
Calculates the average distance value of the displayed distribution (see
curveFrameSet_filter()
) in the given range (see
curveFrameSet_highlightRange()
). If label
is present, it will points on a
string labeling the displayed distribution. The string is owned by V_Sim.
|
a CurveFrame widget. |
|
a location to a string. |
Returns : |
the average distance value. |
Since 3.6