1 /* tsdisplay.h */ 2 /* 3 * ggobi 4 * Copyright (C) AT&T, Duncan Temple Lang, Dianne Cook 1999-2005 5 * 6 * ggobi is free software; you may use, redistribute, and/or modify it 7 * under the terms of the Eclipse Public License, which is distributed 8 * with the source code and displayed on the ggobi web site, 9 * www.ggobi.org. For more information, contact the authors: 10 * 11 * Deborah F. Swayne dfs@research.att.com 12 * Di Cook dicook@iastate.edu 13 * Duncan Temple Lang duncan@wald.ucdavis.edu 14 * Andreas Buja andreas.buja@wharton.upenn.edu 15 * 16 * Contributing author of time series code: Nicholas Lewin-Koh 17 */ 18 19 20 #ifndef GGOBI_TSDISPLAY_H 21 #define GGOBI_TSDISPLAY_H 22 23 /** 24 This defines a new class of display (GGobiTimeSeriesDisplay) 25 which is the top-level container for multiple time series plots. 26 This extends the windowed display class (GGobiWindowDisplay). 27 */ 28 29 30 31 #define GGOBI_TYPE_TIME_SERIES_SPLOT (ggobi_time_series_splot_get_type()) 32 #define GGOBI_TIME_SERIES_SPLOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GGOBI_TYPE_TIME_SERIES_SPLOT, timeSeriesSPlotd)) 33 #define GGOBI_TIME_SERIES_SPLOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GGOBI_TYPE_TIME_SERIES_SPLOT, GGobiTimeSeriesSPlotClass)) 34 #define GGOBI_IS_TIME_SERIES_SPLOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GGOBI_TYPE_TIME_SERIES_SPLOT)) 35 #define GGOBI_IS_TIME_SERIES_SPLOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GGOBI_TYPE_TIME_SERIES_SPLOT)) 36 #define GGOBI_TIME_SERIES_SPLOT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GGOBI_TYPE_TIME_SERIES_SPLOT, GGobiTimeSeriesSPlotClass)) 37 38 GType ggobi_time_series_splot_get_type(void); 39 40 typedef struct 41 { 42 GGobiExtendedSPlotClass extendedSPlotClass; 43 44 } GGobiTimeSeriesSPlotClass; 45 46 typedef struct { 47 48 extendedSPlotd extendedSPlot; 49 50 } timeSeriesSPlotd; 51 52 53 54 55 #define GGOBI_TYPE_TIME_SERIES_DISPLAY (ggobi_time_series_display_get_type ()) 56 #define GGOBI_TIME_SERIES_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GGOBI_TYPE_TIME_SERIES_DISPLAY, timeSeriesDisplayd)) 57 #define GGOBI_TIME_SERIES_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GGOBI_TYPE_TIME_SERIES_DISPLAY, GGobiTimeSeriesDisplayClass)) 58 #define GGOBI_IS_TIME_SERIES_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GGOBI_TYPE_TIME_SERIES_DISPLAY)) 59 #define GGOBI_IS_TIME_SERIES_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GGOBI_TYPE_TIME_SERIES_DISPLAY)) 60 #define GGOBI_TIME_SERIES_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GGOBI_TYPE_TIME_SERIES_DISPLAY, GGobiTimeSeriesDisplayClass)) 61 62 GType ggobi_time_series_display_get_type(); 63 displayd *ggobi_time_series_display_new(gint type, gboolean missing_p, GGobiData *d, ggobid *gg); 64 65 typedef struct 66 { 67 GGobiExtendedDisplayClass parent_class; 68 69 70 } GGobiTimeSeriesDisplayClass; 71 72 73 typedef struct _timeSeriesDisplayd { 74 75 extendedDisplayd extendedDpy; 76 77 } timeSeriesDisplayd; 78 79 80 /* Making these available to ggobiClass.c */ 81 displayd *timeSeriesDisplayCreate(gboolean use_window, gboolean missing_p, splotd *sp, GGobiData *d, ggobid *gg); 82 gint tsplotIsVarPlotted(displayd *display, gint *cols, gint ncols, GGobiData *d); 83 gboolean tsplotCPanelSet(displayd *dpy, cpaneld *cpanel, ggobid *gg); 84 void tsplotDisplaySet(displayd *dpy, ggobid *gg); 85 void tsplotVarpanelRefresh(displayd *display, splotd *sp, GGobiData *d); 86 gboolean tsplotHandlesProjection(displayd *dpy, ProjectionMode mode); 87 gboolean tsplotHandlesInteraction(displayd *, InteractionMode); 88 89 #ifdef STORE_SESSION_ENABLED 90 void add_xml_tsplot_variables(xmlNodePtr node, GList *plots, displayd *dpy); 91 #endif 92 void tsplotVarpanelTooltipsSet(displayd *dpy, ggobid *gg, GtkWidget *wx, GtkWidget *wy, GtkWidget *wz, GtkWidget *label); 93 gint tsplotPlottedColsGet(displayd *display, gint *cols, GGobiData *d, ggobid *gg); 94 95 //GtkWidget *tsplotMenusMake(displayd *dpy, ggobid *gg); 96 97 GtkWidget *tsplotCPanelWidget(displayd *dpy, gchar **modeName, ggobid *gg); 98 99 gboolean tsplotEventHandlersToggle(displayd *dpy, splotd *sp, gboolean state, ProjectionMode, InteractionMode imode); 100 gboolean tsplotKeyEventHandled(GtkWidget *, displayd *, splotd *sp, GdkEventKey *, ggobid *); 101 gchar *tsplot_tree_label(splotd *sp, GGobiData *d, ggobid *gg); 102 103 GdkSegment * tsplotAllocWhiskers(displayd *dpy, splotd *sp, gint nrows, GGobiData *d); 104 void tsplotAddPlotLabels(displayd *display, splotd *sp, GdkDrawable *drawable, GGobiData *d, ggobid *gg); 105 106 107 108 splotd *ggobi_time_series_splot_new(displayd *dpy, ggobid *gg); 109 110 #endif 111 112