GnuCash c935c2f+
Loading...
Searching...
No Matches
gnc-amount-edit.h
1/********************************************************************\
2 * gnc-amount-edit.h -- amount editor widget *
3 * *
4 * Copyright (C) 2000 Dave Peticolas <dave@krondo.com> *
5 * *
6 * This program is free software; you can redistribute it and/or *
7 * modify it under the terms of the GNU General Public License as *
8 * published by the Free Software Foundation; either version 2 of *
9 * the License, or (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License*
17 * along with this program; if not, contact: *
18 * *
19 * Free Software Foundation Voice: +1-617-542-5942 *
20 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
21 * Boston, MA 02110-1301, USA gnu@gnu.org *
22\********************************************************************/
23/*
24 @NOTATION@
25 */
26
27#ifndef GNC_AMOUNT_EDIT_H
28#define GNC_AMOUNT_EDIT_H
29
30#include "qof.h"
31#include "gnc-ui-util.h"
32
33#include <gtk/gtk.h>
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39#define GNC_TYPE_AMOUNT_EDIT (gnc_amount_edit_get_type ())
40G_DECLARE_FINAL_TYPE (GNCAmountEdit, gnc_amount_edit, GNC, AMOUNT_EDIT, GtkBox)
41
42
51GtkWidget *gnc_amount_edit_new (void);
52
59GtkWidget *gnc_amount_edit_gtk_entry (GNCAmountEdit *gae);
60
68void gnc_amount_edit_set_amount (GNCAmountEdit *gae,
69 gnc_numeric amount);
70
78void gnc_amount_edit_set_damount (GNCAmountEdit *gae,
79 double amount);
80
89gnc_numeric gnc_amount_edit_get_amount (GNCAmountEdit *gae);
90
99double gnc_amount_edit_get_damount (GNCAmountEdit *gae);
100
119gint gnc_amount_edit_expr_is_valid (GNCAmountEdit *gae,
120 gnc_numeric *amount,
121 gboolean empty_ok,
122 GError **error);
123
137gboolean gnc_amount_edit_evaluate (GNCAmountEdit *gae, GError **error);
138
146void gnc_amount_edit_set_print_info (GNCAmountEdit *gae,
147 GNCPrintAmountInfo print_info);
148
156void gnc_amount_edit_set_fraction (GNCAmountEdit *gae, int fraction);
157
165void gnc_amount_edit_set_evaluate_on_enter (GNCAmountEdit *gae,
166 gboolean evaluate_on_enter);
167
175void gnc_amount_edit_set_validate_on_change (GNCAmountEdit *gae,
176 gboolean validate_on_change);
177
186void gnc_amount_edit_select_region (GNCAmountEdit *gae,
187 gint start_pos,
188 gint end_pos);
189
197void gnc_amount_edit_show_warning_symbol (GNCAmountEdit *gae, gboolean show);
198
206void gnc_amount_edit_make_mnemonic_target (GNCAmountEdit *gae, GtkWidget *label);
207
208#ifdef __cplusplus
209}
210#endif
211
212#endif
utility functions for the GnuCash UI