GnuCash 2.4.99
gnc-frequency.h
00001 /********************************************************************\
00002  * gnc-frequency.h -- GnuCash widget for frequency editing.         *
00003  * Copyright (C) 2001,2002 Joshua Sled <jsled@asynchronous.org>     *
00004  * Copyright (C) 2003 Linas Vepstas <linas@linas.org>               *
00005  *                                                                  *
00006  * This program is free software; you can redistribute it and/or    *
00007  * modify it under the terms of the GNU General Public License as   *
00008  * published by the Free Software Foundation; either version 2 of   *
00009  * the License, or (at your option) any later version.              *
00010  *                                                                  *
00011  * This program is distributed in the hope that it will be useful,  *
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
00014  * GNU General Public License for more details.                     *
00015  *                                                                  *
00016  * You should have received a copy of the GNU General Public License*
00017  * along with this program; if not, contact:                        *
00018  *                                                                  *
00019  * Free Software Foundation           Voice:  +1-617-542-5942       *
00020  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
00021  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
00022  *                                                                  *
00023 \********************************************************************/
00024 
00025 #ifndef GNC_FREQUENCY_H
00026 #define GNC_FREQUENCY_H
00027 
00028 #include "gnc-date-edit.h"
00029 #include "FreqSpec.h"
00030 #include "Recurrence.h"
00031 
00032 #define GNC_TYPE_FREQUENCY        (gnc_frequency_get_type())
00033 #define GNC_FREQUENCY(obj)        G_TYPE_CHECK_INSTANCE_CAST (obj, GNC_TYPE_FREQUENCY, GncFrequency)
00034 #define GNC_FREQENCY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, GNC_TYPE_FREQUENCY, GncFrequency)
00035 #define GNC_IS_FREQUENCY(obj)     G_TYPE_CHECK_INSTANCE_TYPE (obj, GNC_TYPE_FREQUENCY)
00036 
00043 typedef struct _GncFrequency
00044 {
00045     GtkVBox          widget;
00046     GtkVBox         *vb;
00047     GtkNotebook     *nb;
00048     GtkComboBox     *freqComboBox;
00049     GNCDateEdit     *startDate;
00050     GtkBuilder      *builder;
00051 } GncFrequency;
00052 
00053 typedef struct _GncFrequencyClass
00054 {
00055     GtkVBoxClass parent_class;
00056 
00057     void (*changed) (GncFrequency *gf);
00058 } GncFrequencyClass;
00059 
00060 struct pageDataTuple
00061 {
00062     int idx;
00063     UIFreqType uiFTVal;
00064     char *name;
00065 };
00066 
00067 GType gnc_frequency_get_type(void);
00068 
00072 GtkWidget* gnc_frequency_new(GList *recurrences, const GDate *start_date);
00073 GtkWidget* gnc_frequency_new_from_recurrence(GList *recurrences, const GDate *start_date);
00074 
00075 void gnc_frequency_init(GncFrequency *gf);
00076 
00082 void gnc_frequency_setup(GncFrequency *gf, GList *recurrences, const GDate *start_date);
00083 void gnc_frequency_setup_recurrence(GncFrequency *gf, GList *recurrences, const GDate *start_date);
00084 
00090 void gnc_frequency_save_to_recurrence(GncFrequency *gf, GList **recurrences, GDate *out_start_date);
00091 
00096 void gnc_frequency_set_frequency_label_text (GncFrequency *gf, const gchar *txt);
00097 
00102 void gnc_frequency_set_date_label_text (GncFrequency *gf, const gchar *txt);
00103 
00104 #endif /* !defined( GNC_FREQUENCY_H ) */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines