[Gpredict-svn] SF.net SVN: gpredict: [50] trunk
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
From: <cs...@us...> - 2008-05-01 14:53:11
|
Revision: 50 http://gpredict.svn.sourceforge.net/gpredict/?rev=50&view=rev Author: csete Date: 2008-05-01 07:52:48 -0700 (Thu, 01 May 2008) Log Message: ----------- Added master rotator control UI widget. Modified Paths: -------------- trunk/src/Makefile.am trunk/win32/Makefile Added Paths: ----------- trunk/src/gtk-rot-ctrl.c trunk/src/gtk-rot-ctrl.h Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2008-05-01 14:10:48 UTC (rev 49) +++ trunk/src/Makefile.am 2008-05-01 14:52:48 UTC (rev 50) @@ -40,6 +40,7 @@ gtk-polar-plot.c gtk-polar-plot.h \ gtk-polar-view.c gtk-polar-view.h \ gtk-polar-view-popup.c gtk-polar-view-popup.h \ + gtk-rot-ctrl.c gtk-rot-ctrl.h \ gtk-rot-knob.c gtk-rot-knob.h \ gtk-sat-data.c gtk-sat-data.h \ gtk-sat-list.c gtk-sat-list.h \ Added: trunk/src/gtk-rot-ctrl.c =================================================================== --- trunk/src/gtk-rot-ctrl.c (rev 0) +++ trunk/src/gtk-rot-ctrl.c 2008-05-01 14:52:48 UTC (rev 50) @@ -0,0 +1,136 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + Gpredict: Real-time satellite tracking and orbit prediction program + + Copyright (C) 2001-2007 Alexandru Csete, OZ9AEC. + + Authors: Alexandru Csete <oz...@gm...> + + Comments, questions and bugreports should be submitted via + http://sourceforge.net/projects/groundstation/ + More details can be found at the project home page: + + http://groundstation.sourceforge.net/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, visit http://www.fsf.org/ +*/ +/** \brief ROTOR control window. + * \ingroup widgets + * + * The master rotator control UI is implemented as a Gtk+ Widget in order + * to allow multiple instances. The widget is created from the module + * popup menu and each module can have several rotator control windows + * attached to it. + * + */ +#include <gtk/gtk.h> +#include <glib/gi18n.h> +#include <math.h> +#include "gtk-rot-ctrl.h" +#ifdef HAVE_CONFIG_H +# include <build-config.h> +#endif + + + +static void gtk_rot_ctrl_class_init (GtkRotCtrlClass *class); +static void gtk_rot_ctrl_init (GtkRotCtrl *list); +static void gtk_rot_ctrl_destroy (GtkObject *object); + + +static GtkVBoxClass *parent_class = NULL; + + +GType +gtk_rot_ctrl_get_type () +{ + static GType gtk_rot_ctrl_type = 0; + + if (!gtk_rot_ctrl_type) { + + static const GTypeInfo gtk_rot_ctrl_info = { + sizeof (GtkRotCtrlClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) gtk_rot_ctrl_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GtkRotCtrl), + 5, /* n_preallocs */ + (GInstanceInitFunc) gtk_rot_ctrl_init, + }; + + gtk_rot_ctrl_type = g_type_register_static (GTK_TYPE_VBOX, + "GtkRotCtrl", + >k_rot_ctrl_info, + 0); + } + + return gtk_rot_ctrl_type; +} + + +static void +gtk_rot_ctrl_class_init (GtkRotCtrlClass *class) +{ + GObjectClass *gobject_class; + GtkObjectClass *object_class; + GtkWidgetClass *widget_class; + GtkContainerClass *container_class; + + gobject_class = G_OBJECT_CLASS (class); + object_class = (GtkObjectClass*) class; + widget_class = (GtkWidgetClass*) class; + container_class = (GtkContainerClass*) class; + + parent_class = g_type_class_peek_parent (class); + + object_class->destroy = gtk_rot_ctrl_destroy; + +} + + + +static void +gtk_rot_ctrl_init (GtkRotCtrl *ctrl) +{ + + +} + +static void +gtk_rot_ctrl_destroy (GtkObject *object) +{ + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); +} + + + +/** \brief Create a new rotor control widget. + * \return A new rotor control window. + * + */ +GtkWidget * +gtk_rot_ctrl_new () +{ + GtkWidget *widget; + GtkWidget *table; + guint i; + + widget = g_object_new (GTK_TYPE_ROT_CTRL, NULL); + + + return widget; +} + Added: trunk/src/gtk-rot-ctrl.h =================================================================== --- trunk/src/gtk-rot-ctrl.h (rev 0) +++ trunk/src/gtk-rot-ctrl.h 2008-05-01 14:52:48 UTC (rev 50) @@ -0,0 +1,81 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + Gpredict: Real-time satellite tracking and orbit prediction program + + Copyright (C) 2001-2007 Alexandru Csete, OZ9AEC. + + Authors: Alexandru Csete <oz...@gm...> + + Comments, questions and bugreports should be submitted via + http://sourceforge.net/projects/groundstation/ + More details can be found at the project home page: + + http://groundstation.sourceforge.net/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, visit http://www.fsf.org/ +*/ +#ifndef __GTK_ROT_CTRL_H__ +#define __GTK_ROT_CTRL_H__ 1 + +#include <glib.h> +#include <glib/gi18n.h> +#include <gtk/gtk.h> + + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + + + +#define GTK_TYPE_ROT_CTRL (gtk_rot_ctrl_get_type ()) +#define GTK_ROT_CTRL(obj) GTK_CHECK_CAST (obj,\ + gtk_rot_ctrl_get_type (),\ + GtkRotCtrl) + +#define GTK_ROT_CTRL_CLASS(klass) GTK_CHECK_CLASS_CAST (klass,\ + gtk_rot_ctrl_get_type (),\ + GtkRotCtrlClass) + +#define IS_GTK_ROT_CTRL(obj) GTK_CHECK_TYPE (obj, gtk_rot_ctrl_get_type ()) + + +typedef struct _gtk_rot_ctrl GtkRotCtrl; +typedef struct _GtkRotCtrlClass GtkRotCtrlClass; + + + +struct _gtk_rot_ctrl +{ + GtkVBox vbox; + +}; + +struct _GtkRotCtrlClass +{ + GtkVBoxClass parent_class; +}; + + + +GtkType gtk_rot_ctrl_get_type (void); +GtkWidget* gtk_rot_ctrl_new (void); + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __GTK_ROT_ctrl_H__ */ Modified: trunk/win32/Makefile =================================================================== --- trunk/win32/Makefile 2008-05-01 14:10:48 UTC (rev 49) +++ trunk/win32/Makefile 2008-05-01 14:52:48 UTC (rev 50) @@ -90,6 +90,7 @@ gtk-polar-plot.c \ gtk-polar-view.c \ gtk-polar-view-popup.c \ + gtk-rot-ctrl.c \ gtk-rot-knob.c \ gtk-sat-data.c \ gtk-sat-list.c \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |