GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
search-string.h
1 /*
2  * Copyright (C) 2002 Derek Atkins
3  *
4  * Authors: Derek Atkins <[email protected]>
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 GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public
17  * License along with this program; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef _GNCSEARCH_STRING_H
23 #define _GNCSEARCH_STRING_H
24 
25 #include "search-core-type.h"
26 
27 #define GNC_TYPE_SEARCH_STRING (gnc_search_string_get_type ())
28 #define GNCSEARCH_STRING(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, GNC_TYPE_SEARCH_STRING, GNCSearchString)
29 #define GNCSEARCH_STRING_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, GNC_TYPE_SEARCH_STRING, GNCSearchStringClass)
30 #define IS_GNCSEARCH_STRING(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, GNC_TYPE_SEARCH_STRING)
31 
32 typedef struct _GNCSearchString GNCSearchString;
34 
35 typedef enum _search_string_how
36 {
37  SEARCH_STRING_CONTAINS,
38  SEARCH_STRING_NOT_CONTAINS,
39  SEARCH_STRING_MATCHES_REGEX,
40  SEARCH_STRING_NOT_MATCHES_REGEX,
41  SEARCH_STRING_EQUAL,
42  SEARCH_STRING_NOT_EQUAL
43 } GNCSearchString_Type;
44 
46 {
47  GNCSearchCoreType parent;
48 
49  GNCSearchString_Type how;
50  gboolean ign_case;
51  char * value;
52 };
53 
55 {
56  GNCSearchCoreTypeClass parent_class;
57 
58  /* virtual methods */
59 
60  /* signals */
61 };
62 
63 GType gnc_search_string_get_type (void);
64 GNCSearchString *gnc_search_string_new (void);
65 
66 /* methods */
67 void gnc_search_string_set_value(GNCSearchString *fi, const char *value);
68 void gnc_search_string_set_how (GNCSearchString *fi, GNCSearchString_Type how);
69 void gnc_search_string_set_case (GNCSearchString *fi, gboolean ignore_case);
70 
71 #endif /* ! _GNCSEARCH_STRING_H */
72