GnuCash 2.4.99
search-string.h
00001 /*
00002  *  Copyright (C) 2002 Derek Atkins
00003  *
00004  *  Authors: Derek Atkins <warlord@MIT.EDU>
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License as
00008  * published by the Free Software Foundation; either version 2 of
00009  * the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public
00017  * License along with this program; if not, write to the
00018  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020  */
00021 
00022 #ifndef _GNCSEARCH_STRING_H
00023 #define _GNCSEARCH_STRING_H
00024 
00025 #include "search-core-type.h"
00026 
00027 #define GNC_TYPE_SEARCH_STRING          (gnc_search_string_get_type ())
00028 #define GNCSEARCH_STRING(obj)           GTK_CHECK_CAST (obj, GNC_TYPE_SEARCH_STRING, GNCSearchString)
00029 #define GNCSEARCH_STRING_CLASS(klass)   GTK_CHECK_CLASS_CAST (klass, GNC_TYPE_SEARCH_STRING, GNCSearchStringClass)
00030 #define IS_GNCSEARCH_STRING(obj)        GTK_CHECK_TYPE (obj, GNC_TYPE_SEARCH_STRING)
00031 
00032 typedef struct _GNCSearchString GNCSearchString;
00033 typedef struct _GNCSearchStringClass    GNCSearchStringClass;
00034 
00035 typedef enum _search_string_how
00036 {
00037     SEARCH_STRING_CONTAINS,
00038     SEARCH_STRING_NOT_CONTAINS,
00039     SEARCH_STRING_MATCHES_REGEX,
00040     SEARCH_STRING_NOT_MATCHES_REGEX
00041 } GNCSearchString_Type;
00042 
00043 struct _GNCSearchString
00044 {
00045     GNCSearchCoreType parent;
00046 
00047     GNCSearchString_Type        how;
00048     gboolean            ign_case;
00049     char *              value;
00050 };
00051 
00052 struct _GNCSearchStringClass
00053 {
00054     GNCSearchCoreTypeClass parent_class;
00055 
00056     /* virtual methods */
00057 
00058     /* signals */
00059 };
00060 
00061 GType           gnc_search_string_get_type      (void);
00062 GNCSearchString *gnc_search_string_new  (void);
00063 
00064 /* methods */
00065 void    gnc_search_string_set_value(GNCSearchString *fi, const char *value);
00066 void    gnc_search_string_set_how (GNCSearchString *fi, GNCSearchString_Type how);
00067 void    gnc_search_string_set_case (GNCSearchString *fi, gboolean ignore_case);
00068 
00069 #endif /* ! _GNCSEARCH_STRING_H */
00070 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines