TSP: The Transport Sample Protocol



Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

gdisp_plot2D.h

Go to the documentation of this file.
00001 
00042 #ifndef __2D_PLOT_H__
00043 #define __2D_PLOT_H__
00044 
00045 #include "gdisp_pointArray.h"
00046 
00047 /*
00048  * Main principle of Y=f(t) Drawing :
00049  * There are three kinds of replotting actions :
00050  * ( GD_2D_FULL_REDRAW, GD_2D_SCROLL_X_AXIS, GD_2D_ADD_NEW_SAMPLES )
00051  */
00052 typedef enum {
00053 
00054   GD_2D_ADD_NEW_SAMPLES = 0, // Still in X range => draw new added samples
00055   GD_2D_SCROLL_X_AXIS,       // time increase outside limit => scroll X_AXIS
00056   GD_2D_FULL_REDRAW          // Everything has changed => need to plot all
00057 
00058 } KindOfRedraw_T;
00059 
00060 typedef enum {
00061 
00062   GD_2D_F2T = 0,
00063   GD_2D_F2X,
00064   GD_2D_OTHER,
00065 
00066 } KindOfPlot_T;
00067 
00068 /*
00069  * Private structure of a '2D plot'.
00070  */
00071 typedef struct Plot2D_T_ {
00072 
00073   /*
00074    * Attributes.
00075    */
00076   PlotType_T           p2dType;
00077   KindOfPlot_T         p2dSubType;
00078   gboolean             p2dHasFocus;
00079   gboolean             p2dIsWorking;
00080 
00081   /*
00082    * List of pointer on TSP_Symbol_T.
00083    */
00084   GList               *p2dXSymbolList;
00085   GList               *p2dYSymbolList;
00086   GList               *p2dSelectedSymbol;
00087   GdkWindow           *p2dXSymbolWindow;
00088   GdkWindow           *p2dYSymbolWindow;
00089 
00090   /*
00091    * Graphic widget.
00092    */
00093   GtkWidget           *p2dTable;
00094   GArray              *p2dSignalIdentities;
00095   gboolean             p2dSignalsAreBlocked;
00096   GtkWidget           *p2dArea;
00097   guint                p2dAreaWidth;
00098   guint                p2dAreaHeight;
00099   GtkWidget           *p2dHRuler;
00100   GtkWidget           *p2dVRuler;
00101 
00102   GdkGC               *p2dGContext;
00103   GdkFont             *p2dFont;
00104   GdkPixmap           *p2dBackBuffer;
00105 
00106   /*
00107    * Parent widget.
00108    */
00109   GtkWidget           *p2dParent;
00110 
00111   /*
00112    * Array for sample points.
00113    * - p2dPtMin       : The minium point in physical unit
00114    * - p2dPtMax       : The maximum point in physical unit
00115    * - p2PtSlope      : The slope used to convert physical2pixel
00116    * - p2dPtLast      : The last point in physical unit
00117    * - p2dPtRedrawMin : The minium in pixel unit, for redraw (plot back2front)
00118    * - p2dPtRedrawMax : The maximum in pixel unit, for redraw (plot back2front)
00119    *
00120    * GPtrArray : pointer array that grows automatically.
00121    *  struct GPtrArray {
00122    *            gpointer *pdata;
00123    *            guint    len;
00124    *  };
00125    * So, 'len' is the number of curves,
00126    *     'pdata' is the table of 'DoublePointArray_T*'.
00127    */
00128   GPtrArray           *p2dSampleArray;
00129   DoublePoint_T        p2dPtMin;
00130   DoublePoint_T        p2dPtMax;
00131   DoublePoint_T        p2dPtSlope;      
00132   DoublePoint_T        p2dPtLast;
00133   ShortPoint_T         p2dPtRedrawMin;
00134   ShortPoint_T         p2dPtRedrawMax;
00135 
00136 } Plot2D_T;
00137 
00138 
00139 #endif /* __2D_PLOT_H__ */
Framework Home Page.

Beware !! TSP wave is coming...