gtk-azel-plot.h
1 /* 2 Gpredict: Real-time satellite tracking and orbit prediction program 3 4 Copyright (C) 2001-2009 Alexandru Csete, OZ9AEC. 5 6 Authors: Alexandru Csete <oz9aec@gmail.com> 7 8 Comments, questions and bugreports should be submitted via 9 http://sourceforge.net/projects/gpredict/ 10 More details can be found at the project home page: 11 12 http://gpredict.oz9aec.net/ 13 14 This program is free software; you can redistribute it and/or modify 15 it under the terms of the GNU General Public License as published by 16 the Free Software Foundation; either version 2 of the License, or 17 (at your option) any later version. 18 19 This program is distributed in the hope that it will be useful, 20 but WITHOUT ANY WARRANTY; without even the implied warranty of 21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 GNU General Public License for more details. 23 24 You should have received a copy of the GNU General Public License 25 along with this program; if not, visit http://www.fsf.org/ 26 */ 27 #ifndef __GTK_AZEL_PLOT_H__ 28 #define __GTK_AZEL_PLOT_H__ 1 29 30 #include <glib.h> 31 #include <glib/gi18n.h> 32 #include <goocanvas.h> 33 #include <gtk/gtk.h> 34 35 #include "gtk-sat-data.h" 36 #include "predict-tools.h" 37 38 /* *INDENT-OFF* */ 39 #ifdef __cplusplus 40 extern "C" { 41 #endif 42 /* *INDENT-ON* */ 43 44 /* number of ticks excluding end points */ 45 #define AZEL_PLOT_NUM_TICKS 5 46 47 #define GTK_AZEL_PLOT(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_azel_plot_get_type (), GtkAzelPlot) 48 #define GTK_AZEL_PLOT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_azel_plot_get_type (), GtkAzelPlotClass) 49 #define GTK_IS_AZEL_PLOT(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_azel_plot_get_type ()) 50 #define GTK_TYPE_AZEL_PLOT (gtk_azel_plot_get_type ()) 51 #define IS_GTK_AZEL_PLOT(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_azel_plot_get_type ()) 52 53 typedef struct _GtkAzelPlot GtkAzelPlot; 54 typedef struct _GtkAzelPlotClass GtkAzelPlotClass; 55 56 struct _GtkAzelPlot { 57 GtkBox box; 58 59 GtkWidget *canvas; /*!< The canvas widget */ 60 61 GooCanvasItemModel *bgd; /*!< Rectangle used to paint background */ 62 GooCanvasItemModel *curs; /*!< cusor info */ 63 GooCanvasItemModel *frame; /*!< frame */ 64 GooCanvasItemModel *azg; /*!< Az graph */ 65 GooCanvasItemModel *elg; /*!< El graph */ 66 GooCanvasItemModel *xticksb[AZEL_PLOT_NUM_TICKS]; /*!< x tick marks bottom */ 67 GooCanvasItemModel *xtickst[AZEL_PLOT_NUM_TICKS]; /*!< x tick marks top */ 68 GooCanvasItemModel *xlabels[AZEL_PLOT_NUM_TICKS]; /*!< x tick labels */ 69 GooCanvasItemModel *yticksl[AZEL_PLOT_NUM_TICKS]; /*!< x tick marks left */ 70 GooCanvasItemModel *yticksr[AZEL_PLOT_NUM_TICKS]; /*!< x tick marks right */ 71 GooCanvasItemModel *ylabelsl[AZEL_PLOT_NUM_TICKS]; /*!< left y tick labels */ 72 GooCanvasItemModel *ylabelsr[AZEL_PLOT_NUM_TICKS]; /*!< right y tick labels */ 73 74 GooCanvasItemModel *xlab[AZEL_PLOT_NUM_TICKS]; /*!< x tick labels */ 75 GooCanvasItemModel *azlab[AZEL_PLOT_NUM_TICKS]; /*!< Az tick labels */ 76 GooCanvasItemModel *ellab[AZEL_PLOT_NUM_TICKS]; /*!< El tick labels */ 77 GooCanvasItemModel *azleg, *elleg, *xleg; /*!< Az and El legend */ 78 79 qth_t *qth; /*!< Pointer to current location. */ 80 pass_t *pass; 81 82 guint width; /*!< width of the box */ 83 guint height; /*!< height of the box */ 84 85 guint x0, y0, xmax, ymax; 86 87 gdouble maxaz; /*!< max Az 360 or 180 */ 88 89 gboolean qthinfo; /*!< Show the QTH info. */ 90 gboolean cursinfo; /*!< Track the mouse cursor. */ 91 gboolean extratick; /*!< Show extra ticks */ 92 }; 93 94 struct _GtkAzelPlotClass { 95 GtkBoxClass parent_class; 96 }; 97 98 GType gtk_azel_plot_get_type(void); 99 GtkWidget *gtk_azel_plot_new(qth_t * qth, pass_t * pass); 100 101 /* *INDENT-OFF* */ 102 #ifdef __cplusplus 103 } 104 #endif 105 /* *INDENT-ON* */ 106 107 #endif /* __GTK_AZEL_PLOT_H__ */