GnuCash  4.8a-134-g214de30c7+
dialog-commodity.h
Go to the documentation of this file.
1 /********************************************************************
2  * dialog-commodity.h -- "select" and "new" commodity windows *
3  * (GnuCash) *
4  * Copyright (C) 2000 Bill Gribble <grib@billgribble.com> *
5  * Copyright (c) 2006 David Hampton <hampton@employees.org> *
6  * *
7  * This program is free software; you can redistribute it and/or *
8  * modify it under the terms of the GNU General Public License as *
9  * published by the Free Software Foundation; either version 2 of *
10  * the License, or (at your option) any later version. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License*
18  * along with this program; if not, contact: *
19  * *
20  * Free Software Foundation Voice: +1-617-542-5942 *
21  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
22  * Boston, MA 02110-1301, USA gnu@gnu.org *
23  ********************************************************************/
24 
34 #ifndef GNC_DIALOG_COMMODITY_H
35 #define GNC_DIALOG_COMMODITY_H
36 
37 #include <gtk/gtk.h>
38 #include "gnc-commodity.h"
39 
46 typedef enum
47 {
59 
60 
100 gnc_commodity *
101 gnc_ui_select_commodity_modal_full(gnc_commodity * orig_sel,
102  GtkWidget * parent,
104  const char * user_message,
105  const char * cusip,
106  const char * fullname,
107  const char * mnemonic);
108 
109 
127 gnc_commodity *
128 gnc_ui_select_commodity_modal(gnc_commodity * orig_sel,
129  GtkWidget * parent,
130  dialog_commodity_mode mode);
163 gnc_commodity *
164 gnc_ui_new_commodity_modal_full(const char * name_space,
165  GtkWidget * parent,
166  const char * cusip,
167  const char * fullname,
168  const char * mnemonic,
169  const char * user_symbol,
170  int fraction);
171 
183 gnc_commodity *
184 gnc_ui_new_commodity_modal(const char * default_namespace,
185  GtkWidget * parent);
186 
201 gboolean
202 gnc_ui_edit_commodity_modal(gnc_commodity *commodity,
203  GtkWidget * parent);
221 void gnc_ui_update_namespace_picker(GtkWidget *cbwe,
222  const gchar *sel,
223  dialog_commodity_mode mode);
224 
233 gchar *gnc_ui_namespace_picker_ns (GtkWidget *cbwe);
234 
246 void gnc_ui_update_commodity_picker(GtkWidget *cbwe,
247  const gchar *name_space,
248  const gchar *sel);
251 #endif
252 
Dialog box should only allow selection of a currency.
void gnc_ui_update_commodity_picker(GtkWidget *cbwe, const gchar *name_space, const gchar *init_string)
Given a combo box, fill in all the known commodities for the specified namespace, and then select one...
Dialog box should allow selection of anything but a currency.
gchar * gnc_ui_namespace_picker_ns(GtkWidget *cbwe)
Given a combo box, return the currently selected namespaces.
gnc_commodity * gnc_ui_new_commodity_modal(const char *default_namespace, GtkWidget *parent)
Ask the user to provide the information necessary to create a new commodity.
gboolean gnc_ui_edit_commodity_modal(gnc_commodity *commodity, GtkWidget *parent)
Given an existing commodity, uses the gnc_ui_build_commodity_dialog() routine to build a basic edit d...
gnc_commodity * gnc_ui_new_commodity_modal_full(const char *name_space, GtkWidget *parent, const char *cusip, const char *fullname, const char *mnemonic, const char *user_symbol, int fraction)
Ask the user to provide the information necessary to create a new commodity.
Dialog box should allow selection of anything.
Dialog box should allow selection of anything but a currency and should include the "ALL" namespace t...
gnc_commodity * gnc_ui_select_commodity_modal_full(gnc_commodity *orig_sel, GtkWidget *parent, dialog_commodity_mode mode, const char *user_message, const char *cusip, const char *fullname, const char *mnemonic)
Ask the user to select a commodity from the existing set of commodities.
dialog_commodity_mode
The dialog commodity types are used to determine what commodity namespaces the currency dialog will p...
gnc_commodity * gnc_ui_select_commodity_modal(gnc_commodity *orig_sel, GtkWidget *parent, dialog_commodity_mode mode)
Ask the user to select a commodity from the existing set of commodities.
void gnc_ui_update_namespace_picker(GtkWidget *cbwe, const gchar *sel, dialog_commodity_mode mode)
Given a combo box, fill in the known commodity namespaces and then select one.
Commodity handling public routines.