00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
#ifndef _vdkdatabox_h_
00033
#define _vdkdatabox_h_
00034
00035
#include <vdk/vdk.h>
00036
#include <vdk/gtkdatabox.h>
00037
00038
00100 class VDKDataBox:
public VDKObject
00101 {
00102
public:
00104
VDKDataBox(
VDKForm *owner);
00106
~VDKDataBox();
00107
00109 VDKReadWriteValueProp<VDKDataBox, bool>
Rulers;
00110
void SetRulers(
bool);
00111
00113 VDKReadWriteValueProp<VDKDataBox, bool>
Scrollbars;
00114
void SetScrollbars(
bool);
00115
00117 VDKReadWriteValueProp<VDKDataBox, bool>
Zoom;
00118
void SetZoom(
bool);
00119
00121 VDKReadOnlyValueProp<VDKDataBox, GtkDataboxValue>
TopLeft;
00122
00124 VDKReadOnlyValueProp<VDKDataBox, GtkDataboxValue>
BottomRight;
00125
00127 VDKReadOnlyValueProp<VDKDataBox, GtkDataboxCoord>
Mark;
00128
00130 VDKReadOnlyValueProp<VDKDataBox, GtkDataboxCoord>
Select;
00131
00133
00139
VDKColor*
GetColor(
int index);
00140
00142
00147
void SetColor(
int index,
VDKColor *color,
bool redraw =
true);
00148
00150
00153 GtkDataboxValue
GetValue(GtkDataboxCoord coord);
00154
00156
00162
void GetExtrema(GtkDataboxValue& min, GtkDataboxValue& max,
00163
bool visible =
true);
00164
00166
00169
void Rescale(GtkDataboxValue min, GtkDataboxValue max);
00170
00174
void Rescale();
00175
00177
void Redraw();
00178
00180
00183 gint
RemoveData(gint index);
00184
00186
00188 gint
RemoveData();
00189
00191
00197 gint
DestroyData(gint index);
00198
00200
00203 gint
DestroyData();
00204
00206
00216 gint
AddXY(guint length, gfloat *X, gfloat *Y,
VDKColor *color,
00217 GtkDataboxDataType type = GTK_DATABOX_POINTS, guint dotSize = 1);
00218
00220
00232 gint
AddX (guint length, gfloat *X, guint indexSharedY,
VDKColor *color,
00233 GtkDataboxDataType type = GTK_DATABOX_POINTS, guint dotSize = 1);
00234
00236
00248 gint
AddY (guint length, gfloat *Y, guint indexSharedX,
VDKColor *color,
00249 GtkDataboxDataType type = GTK_DATABOX_POINTS, guint dotSize = 1);
00250
00251
virtual void SetBackground(
VDKRgb color, GtkStateType state);
00252
protected:
00253
00254
static gint _zoomed(GtkDatabox *box,
00255 GtkDataboxValue *top_left,
00256 GtkDataboxValue *bottom_right,
00257 gpointer);
00258
00259
static gint _marked(GtkDatabox *,
00260 GtkDataboxCoord *mark,
00261 gpointer gp);
00262
00263
static gint _selectionStarted(GtkDatabox *,
00264 GtkDataboxCoord *mark,
00265 gpointer gp);
00266
00267
static gint _selectionChanged(GtkDatabox *,
00268 GtkDataboxCoord *mark,
00269 GtkDataboxCoord *select,
00270 gpointer gp);
00271
00272
static gint _selectionStoped(GtkDatabox *,
00273 GtkDataboxCoord *mark,
00274 GtkDataboxCoord *select,
00275 gpointer gp);
00276
00277
static gint _selectionCanceled(GtkDatabox *,
00278 gpointer gp);
00279
00280 };
00281
#endif