GnuCash c935c2f+
Loading...
Searching...
No Matches
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
40#ifdef __cplusplus
41extern "C"
42{
43#endif
44
64
65
105gnc_commodity *
106gnc_ui_select_commodity_modal_full(gnc_commodity * orig_sel,
107 GtkWidget * parent,
109 const char * user_message,
110 const char * cusip,
111 const char * fullname,
112 const char * mnemonic);
113
114
132gnc_commodity *
133gnc_ui_select_commodity_modal(gnc_commodity * orig_sel,
134 GtkWidget * parent,
168gnc_commodity *
169gnc_ui_new_commodity_modal_full(const char * name_space,
170 GtkWidget * parent,
171 const char * cusip,
172 const char * fullname,
173 const char * mnemonic,
174 const char * user_symbol,
175 int fraction);
176
188gnc_commodity *
189gnc_ui_new_commodity_modal(const char * default_namespace,
190 GtkWidget * parent);
191
206gboolean
207gnc_ui_edit_commodity_modal(gnc_commodity *commodity,
208 GtkWidget * parent);
227 const gchar *sel,
229
238gchar *gnc_ui_namespace_picker_ns (GtkWidget *cbwe);
239
251void gnc_ui_update_commodity_picker(GtkWidget *cbwe,
252 const gchar *name_space,
253 const gchar *sel);
256#ifdef __cplusplus
257}
258#endif
259
260#endif
Commodity handling public routines.
dialog_commodity_mode
The dialog commodity types are used to determine what commodity namespaces the currency dialog will p...
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...
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.
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.
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.
gchar * gnc_ui_namespace_picker_ns(GtkWidget *cbwe)
Given a combo box, return the currently selected namespaces.
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(const char *default_namespace, GtkWidget *parent)
Ask the user to provide the information necessary to create a new commodity.
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.
@ DIAG_COMM_NON_CURRENCY
Dialog box should allow selection of anything but a currency.
@ DIAG_COMM_CURRENCY
Dialog box should only allow selection of a currency.
@ DIAG_COMM_ALL
Dialog box should allow selection of anything.
@ DIAG_COMM_NON_CURRENCY_SELECT
Dialog box should allow selection of anything but a currency and should include the "ALL" namespace t...