32 #ifndef _vdkdatabox_h_
33 #define _vdkdatabox_h_
36 #include <vdk/gtkdatabox.h>
109 VDKReadWriteValueProp<VDKDataBox, bool>
Rulers;
110 void SetRulers(
bool);
114 void SetScrollbars(
bool);
117 VDKReadWriteValueProp<VDKDataBox, bool>
Zoom;
121 VDKReadOnlyValueProp<VDKDataBox, GtkDataboxValue>
TopLeft;
127 VDKReadOnlyValueProp<VDKDataBox, GtkDataboxCoord>
Mark;
130 VDKReadOnlyValueProp<VDKDataBox, GtkDataboxCoord>
Select;
153 GtkDataboxValue
GetValue(GtkDataboxCoord coord);
162 void GetExtrema(GtkDataboxValue& min, GtkDataboxValue& max,
163 bool visible =
true);
169 void Rescale(GtkDataboxValue min, GtkDataboxValue max);
216 gint
AddXY(guint length, gfloat *X, gfloat *Y,
VDKColor *color,
217 GtkDataboxDataType type = GTK_DATABOX_POINTS, guint dotSize = 1);
232 gint
AddX (guint length, gfloat *X, guint indexSharedY,
VDKColor *color,
233 GtkDataboxDataType type = GTK_DATABOX_POINTS, guint dotSize = 1);
248 gint
AddY (guint length, gfloat *Y, guint indexSharedX,
VDKColor *color,
249 GtkDataboxDataType type = GTK_DATABOX_POINTS, guint dotSize = 1);
254 static gint _zoomed(GtkDatabox *box,
255 GtkDataboxValue *top_left,
256 GtkDataboxValue *bottom_right,
259 static gint _marked(GtkDatabox *,
260 GtkDataboxCoord *mark,
263 static gint _selectionStarted(GtkDatabox *,
264 GtkDataboxCoord *mark,
267 static gint _selectionChanged(GtkDatabox *,
268 GtkDataboxCoord *mark,
269 GtkDataboxCoord *select,
272 static gint _selectionStoped(GtkDatabox *,
273 GtkDataboxCoord *mark,
274 GtkDataboxCoord *select,
277 static gint _selectionCanceled(GtkDatabox *,
Databox widget.
Definition: vdkdatabox.h:100
void SetColor(int index, VDKColor *color, bool redraw=true)
Set the color of a dataset.
Definition: vdkdatabox.cc:155
VDKReadWriteValueProp< VDKDataBox, bool > Zoom
Enable or disable the zoom.
Definition: vdkdatabox.h:117
gint AddXY(guint length, gfloat *X, gfloat *Y, VDKColor *color, GtkDataboxDataType type=GTK_DATABOX_POINTS, guint dotSize=1)
Add a dataset.
Definition: vdkdatabox.cc:188
VDKReadOnlyValueProp< VDKDataBox, GtkDataboxCoord > Mark
Read the value of the marked (where you clicked down the mouse) point.
Definition: vdkdatabox.h:127
VDKReadOnlyValueProp< VDKDataBox, GtkDataboxCoord > Select
Read the value of the selection.
Definition: vdkdatabox.h:130
Provides a simple RGB color structure.
Definition: vdkutils.h:37
VDKReadOnlyValueProp< VDKDataBox, GtkDataboxValue > TopLeft
Read the value of the top left corner of the window after a zoom.
Definition: vdkdatabox.h:121
virtual void SetBackground(VDKRgb color, GtkStateType state)
Definition: vdkdatabox.cc:317
provides a raw color object
Definition: colors.h:36
void GetExtrema(GtkDataboxValue &min, GtkDataboxValue &max, bool visible=true)
Get the extreme values.
Definition: vdkdatabox.cc:111
gint AddX(guint length, gfloat *X, guint indexSharedY, VDKColor *color, GtkDataboxDataType type=GTK_DATABOX_POINTS, guint dotSize=1)
Add a dataset.
Definition: vdkdatabox.cc:199
VDKDataBox(VDKForm *owner)
Constructor.
Definition: vdkdatabox.cc:37
VDKColor * GetColor(int index)
Get the color of a dataset.
Definition: vdkdatabox.cc:138
VDKReadWriteValueProp< VDKDataBox, bool > Rulers
Shows or hides the rulers.
Definition: vdkdatabox.h:109
gint DestroyData()
Remove all datasets and destroy data associated with them.
Definition: vdkdatabox.cc:182
void Redraw()
Redraw the databox. Use it after you change your datas.
Definition: vdkdatabox.cc:132
~VDKDataBox()
Destructor.
Definition: vdkdatabox.cc:70
GtkDataboxValue GetValue(GtkDataboxCoord coord)
Get data value.
Definition: vdkdatabox.cc:103
VDKReadOnlyValueProp< VDKDataBox, GtkDataboxValue > BottomRight
Read the value of the bottom right corner of the window after a zoom.
Definition: vdkdatabox.h:124
VDKReadWriteValueProp< VDKDataBox, bool > Scrollbars
Show or hides the scrollbars.
Definition: vdkdatabox.h:113
gint RemoveData()
Remove all datasets.
Definition: vdkdatabox.cc:170
void Rescale()
Rescale the databox using the minimum and maximum values from the datasets associated with the databo...
Definition: vdkdatabox.cc:120
gint AddY(guint length, gfloat *Y, guint indexSharedX, VDKColor *color, GtkDataboxDataType type=GTK_DATABOX_POINTS, guint dotSize=1)
Add a dataset.
Definition: vdkdatabox.cc:209