GnuCash c935c2f+
Loading...
Searching...
No Matches
recncell.h
Go to the documentation of this file.
1/********************************************************************\
2 * recncell.h -- reconcile checkbox cell *
3 * *
4 * This program is free software; you can redistribute it and/or *
5 * modify it under the terms of the GNU General Public License as *
6 * published by the Free Software Foundation; either version 2 of *
7 * the License, or (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License*
15 * along with this program; if not, contact: *
16 * *
17 * Free Software Foundation Voice: +1-617-542-5942 *
18 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
19 * Boston, MA 02110-1301, USA gnu@gnu.org *
20 * *
21\********************************************************************/
22
31/* HISTORY:
32 * Copyright (c) 1998 Linas Vepstas
33 * Copyright (c) 2000 Dave Peticolas
34 * Copyright (c) 2001 Derek Atkins
35 */
36
37#ifndef RECN_CELL_H
38#define RECN_CELL_H
39
40#include <glib.h>
41
42#include "basiccell.h"
43
44typedef const char * (*RecnCellStringGetter) (char flag);
45typedef gboolean (*RecnCellConfirm) (char old_flag, gpointer data);
46
47typedef struct
48{
49 BasicCell cell;
50
51 char flag;
53 char * valid_flags;
54 char * flag_order;
57 RecnCellStringGetter get_string;
58 RecnCellConfirm confirm_cb;
59 gpointer confirm_data;
60 gboolean read_only;
61} RecnCell;
62
63BasicCell * gnc_recn_cell_new (void);
64
65void gnc_recn_cell_set_flag (RecnCell *cell, char flag);
66char gnc_recn_cell_get_flag (RecnCell *cell);
67
68void gnc_recn_cell_set_confirm_cb (RecnCell *cell,
69 RecnCellConfirm confirm_cb,
70 gpointer data);
71
72void gnc_recn_cell_set_string_getter (RecnCell *cell,
73 RecnCellStringGetter getter);
74
82void gnc_recn_cell_set_valid_flags (RecnCell *cell, const char *flags,
83 char default_flag);
84void gnc_recn_cell_set_flag_order (RecnCell *cell, const char *flags);
85
86void gnc_recn_cell_set_read_only (RecnCell *cell, gboolean read_only);
88#endif
void gnc_recn_cell_set_valid_flags(RecnCell *cell, const char *flags, char default_flag)
note that chars is copied into the RecnCell directly, but remains the "property" of the caller.
Definition recncell.c:196
The RecnCell object implements a cell handler that will cycle through a series of single-character va...
Definition recncell.h:48
char * flag_order
The list of valid flags.
Definition recncell.h:54
RecnCellStringGetter get_string
Default flag for unknown user input.
Definition recncell.h:57
char * valid_flags
The actual flag value.
Definition recncell.h:53
char default_flag
Automatic flag selection order.
Definition recncell.h:55