Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

vdkdatabox.h

00001 00002 /* 00003 * =========================== 00004 * VDK Visual Development Kit 00005 * Version 2.0.2 00006 * May 2002 00007 * =========================== 00008 * 00009 * Copyright (C) 1998, Mario Motta 00010 * Developed by Mario Motta <mmotta@guest.net> 00011 * Based on ISDataBox 00012 * Developed by Ionutz Borcoman <borco@borco-ei.eng.hokudai.ac.jp> 00013 * based on GtkDatabox - An extension to the gtk+ library 00014 * Copyright (C) 1998-1999 Roland Bock 00015 * 00016 * This library is free software; you can redistribute it and/or 00017 * modify it under the terms of the GNU Library General Public 00018 * License as published by the Free Software Foundation; either 00019 * version 2 of the License, or (at your option) any later version. 00020 * 00021 * This library is distributed in the hope that it will be useful, 00022 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00024 * Library General Public License for more details. 00025 * 00026 * You should have received a copy of the GNU Library General Public 00027 * License along with this library; if not, write to the Free Software 00028 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00029 * 02111-1307, USA. 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 // Signal handling functions 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

Generated on Wed Jul 28 17:23:53 2004 for vdk 2.0.3 by doxygen 1.3.7