00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
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
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
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