Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

mlview-attributes-list.h

Go to the documentation of this file.
00001 /*This file is part of MlView
00002  *
00003  *MlView is free software; you can redistribute it and/or modify it under the terms of 
00004  *the GNU General Public License as published by the Free Software Foundation; either version 2, 
00005  *or (at your option) any later version.
00006  *
00007  *MlView is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
00008  *without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00009  *See the GNU General Public License for more details.
00010  *
00011  *You should have received a copy of the GNU General Public License along with MlView; 
00012  *see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00013  *
00014  *
00015  *Copyright 2001-2002 Dodji Seketeli.
00016  */
00017 
00018 #ifndef __MLVIEW_ATTRIBUTES_LIST_H__
00019 #define __MLVIEW__ATTRIBUTES_LIST_H__
00020 #include <gnome.h>
00021 #include <libxml/tree.h>
00022 #include "mlview-app-context.h"
00023 
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027 
00033 #define MLVIEW_ATTRIBUTES_LIST_NULL_PARAMETER -1
00034 #define MLVIEW_ATTRIBUTES_LIST_OK 0
00035 #define MLVIEW_ATTRIBUTES_LIST_NULL -1
00036 #define MLVIEW_ATTRIBUTES_LIST_NULL_XML_NODE -2
00037 #define MLVIEW_ATTRIBUTES_LIST_NULL_NAME_EDIT_ENTRY -3
00038 #define MLVIEW_ATTRIBUTES_LIST_NULL_VALUE_EDIT_ENTRY -4
00039 #define MLVIEW_ATTRIBUTES_LIST_NULL_ATTRIBUTE_VALUE -5
00040 #define MLVIEW_ATTRIBUTES_LIST_NULL_ATTRIBUTE_NAME -6
00041 #define MLVIEW_ATTRIBUTES_LIST_NEW_ATTRIBUTE_FAILED -7
00042 #define MLVIEW_ATTRIBUTES_LIST_READ_ONLY -8
00043 
00044         /*
00045          *compulsory macro to comply with GTK type system.
00046          */
00047 #define MLVIEW_TYPE_ATTRIBUTES_LIST (mlview_attributes_list_get_type())
00048 #define MLVIEW_ATTRIBUTES_LIST(object) (GTK_CHECK_CAST(object,MLVIEW_TYPE_ATTRIBUTES_LIST,MlViewAttributesList))
00049 #define MLVIEW_ATTRIBUTES_LIST_CLASS(klass) (GTK_CHECK_CLASS_CAST(klass,MLVIEW_TYPE_ATTRIBUTES_LIST,MlViewAttributesListClass))
00050 #define MLVIEW_IS_ATTRIBUTES_LIST(object) (GTK_CHECK_TYPE((object), MLVIEW_TYPE_ATTRIBUTES_LIST))
00051 #define MLVIEW_IS_ATTRIBUTES_LIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), MLVIEW_TYPE_ATTRIBUTES_LIST))
00052 
00053         enum {
00054                 ATTRIBUTE_NAME_OFFSET,
00055                 ATTRIBUTE_VALUE_OFFSET
00056         };
00057 
00058         typedef struct _MlViewAttributesList MlViewAttributesList ;
00059         typedef struct _MlViewAttributesListPrivate MlViewAttributesListPrivate ;
00060         typedef struct _MlViewAttributesListClass MlViewAttributesListClass ;
00061 
00067         struct _MlViewAttributesList {
00069                 GtkVBox container ;
00071                 MlViewAttributesListPrivate *private ;          
00072         };
00073 
00077         struct _MlViewAttributesListClass{
00078                 GtkVBoxClass parent_class ;
00079                 /*This class signals*/
00080                 void (*edit_state_changed)(MlViewAttributesList* a_attributes_list,gpointer a_data) ;
00081                 void (*attribute_changed)(MlViewAttributesList* a_attributes_list, gpointer a_data) ;
00082         };
00083   
00084         guint mlview_attributes_list_get_type (void) ;
00085         GtkWidget * mlview_attributes_list_new (gchar *a_names_title,
00086                                                 gchar *a_values_title,
00087                                                 MlViewAppContext * a_app_context) ;
00088         void mlview_attributes_list_set_app_context (MlViewAttributesList * a_attributes,
00089                                                      MlViewAppContext *a_app_context) ;
00090 
00091         void mlview_attributes_list_set_editable (MlViewAttributesList *attributes,
00092                                                   gboolean editable) ;
00093         void mlview_attributes_list_set_titles (MlViewAttributesList *a_attributes,
00094                                                 gchar *a_names_title,
00095                                                 gchar *a_values_title) ;
00096         void mlview_attributes_list_set_attribute (MlViewAttributesList *a_attributes, guint a_offset,
00097                                                    const xmlAttrPtr a_xml_attr) ;
00098         gint mlview_attributes_list_add_attribute_to_view (MlViewAttributesList *a_attributes,
00099                                                           const xmlAttrPtr a_xml_attr) ;
00100         gint mlview_attributes_list_create_attribute (MlViewAttributesList *a_attributes) ;
00101         void mlview_attributes_list_remove_attribute (MlViewAttributesList *a_attributes,const guint a_attr_offset) ;
00102         void mlview_attributes_list_get_attribute (MlViewAttributesList *a_attributes,
00103                                                    const guint a_offset,
00104                                                    xmlAttrPtr *a_xml_attr_ptr) ;
00105         void mlview_attributes_list_edit_xml_attributes (MlViewAttributesList *a_attributes_list,
00106                                                          const xmlNodePtr a_xml_node);
00107         void mlview_attributes_list_clear (MlViewAttributesList *a_attributes) ;
00108 
00109 #ifdef __cplusplus
00110 }
00111 #endif
00112 
00113 #endif

Generated on Sat Jul 6 09:57:32 2002 for Gnome-MlView by doxygen1.2.16