Back to index

gcompris  8.2.2
money_widget.h
Go to the documentation of this file.
00001 /*
00002  * money_pocket.h
00003  *
00004  * Copyright (C) 2002 Bruno Coudoin
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 the
00009  * 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 GNU
00014  * General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public
00017  * License along with this program; if not, write to the
00018  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00019  * Boston, MA 02111-1307, USA.
00020  *
00021  * Authors: Bruno Coudoin
00022  *
00023  */
00024 
00025 #ifndef _MONEY_WIDGET_H_
00026 #define _MONEY_WIDGET_H_
00027 
00028 #include <gtk/gtk.h>
00029 #include "gcompris/gcompris.h"
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #pragma }
00034 #endif /* __cplusplus */
00035 
00036 #define TYPE_MONEY_WIDGET      (money_widget_get_type ())
00037 #define MONEY_WIDGET(obj)          GTK_CHECK_CAST (obj, TYPE_MONEY_WIDGET, Money_Widget)
00038 #define MONEY_WIDGET_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, TYPE_MONEY_WIDGET, Money_WidgetClass)
00039 #define IS_MONEY_WIDGET(obj)       GTK_CHECK_TYPE (obj, TYPE_MONEY_WIDGET)
00040 
00041 typedef struct _Money_Widget        Money_Widget;
00042 typedef struct _Money_WidgetClass   Money_WidgetClass;
00043 typedef struct _Money_WidgetPrivate Money_WidgetPrivate;
00044 
00045 struct _Money_WidgetClass {
00046        GtkObjectClass parent_class;
00047 };
00048 
00049 struct _Money_Widget {
00050        GtkObject        object;
00051 
00052        Money_WidgetPrivate *priv;
00053 };
00054 
00055 typedef enum {
00056   MONEY_EURO_COIN_1C,
00057   MONEY_EURO_COIN_2C,
00058   MONEY_EURO_COIN_5C,
00059   MONEY_EURO_COIN_10C,
00060   MONEY_EURO_COIN_20C,
00061   MONEY_EURO_COIN_50C,
00062   MONEY_EURO_COIN_1E,
00063   MONEY_EURO_COIN_2E,
00064   MONEY_EURO_PAPER_5E,
00065   MONEY_EURO_PAPER_10E,
00066   MONEY_EURO_PAPER_20E,
00067   MONEY_EURO_PAPER_50E,
00068 } MoneyEuroType;
00069 
00070 
00071 GtkType        money_widget_get_type             (void);    
00072 GtkObject     *money_widget_new                  (void);
00073 Money_Widget  *money_widget_copy                 (Money_Widget *moneyWidget);
00074 
00075 void          money_widget_set_target             (Money_Widget *moneyWidget,
00076                                              Money_Widget *targetWidget);
00077 void           money_widget_set_position         (Money_Widget *moneyWidget,
00078                                             GnomeCanvasGroup *rootItem,
00079                                             double x1,
00080                                             double y1,
00081                                             double x2,
00082                                             double y2,
00083                                             guint  colomns,
00084                                             guint  lines,
00085                                             gboolean display_total);
00086 void           money_widget_add                   (Money_Widget *moneyWidget, MoneyEuroType value);
00087 void           money_widget_remove         (Money_Widget *moneyWidget, MoneyEuroType value);
00088 
00089 /* Misc. accessors */
00090 double         money_widget_get_total           (Money_Widget *moneyWidget);
00091 
00092 #ifdef __cplusplus
00093 }
00094 #endif /* __cplusplus */
00095 
00096 #endif /* _MONEY_WIDGET_H_ */