Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

mlview-attributes-list.h File Reference

The declaration of the MlViewAttributesList class. More...

#include <gnome.h>
#include <libxml/tree.h>
#include "mlview-app-context.h"

Go to the source code of this file.

Data Structures

struct  _MlViewAttributesList
 This class is an attributes list editor. More...

struct  _MlViewAttributesListClass
 The vtable of the MlViewAttributesList class. More...


Defines

#define __MLVIEW__ATTRIBUTES_LIST_H__
#define MLVIEW_ATTRIBUTES_LIST_NULL_PARAMETER   -1
#define MLVIEW_ATTRIBUTES_LIST_OK   0
#define MLVIEW_ATTRIBUTES_LIST_NULL   -1
#define MLVIEW_ATTRIBUTES_LIST_NULL_XML_NODE   -2
#define MLVIEW_ATTRIBUTES_LIST_NULL_NAME_EDIT_ENTRY   -3
#define MLVIEW_ATTRIBUTES_LIST_NULL_VALUE_EDIT_ENTRY   -4
#define MLVIEW_ATTRIBUTES_LIST_NULL_ATTRIBUTE_VALUE   -5
#define MLVIEW_ATTRIBUTES_LIST_NULL_ATTRIBUTE_NAME   -6
#define MLVIEW_ATTRIBUTES_LIST_NEW_ATTRIBUTE_FAILED   -7
#define MLVIEW_ATTRIBUTES_LIST_READ_ONLY   -8
#define MLVIEW_TYPE_ATTRIBUTES_LIST   (mlview_attributes_list_get_type())
#define MLVIEW_ATTRIBUTES_LIST(object)   (GTK_CHECK_CAST(object,MLVIEW_TYPE_ATTRIBUTES_LIST,MlViewAttributesList))
#define MLVIEW_ATTRIBUTES_LIST_CLASS(klass)   (GTK_CHECK_CLASS_CAST(klass,MLVIEW_TYPE_ATTRIBUTES_LIST,MlViewAttributesListClass))
#define MLVIEW_IS_ATTRIBUTES_LIST(object)   (GTK_CHECK_TYPE((object), MLVIEW_TYPE_ATTRIBUTES_LIST))
#define MLVIEW_IS_ATTRIBUTES_LIST_CLASS(klass)   (GTK_CHECK_CLASS_TYPE((klass), MLVIEW_TYPE_ATTRIBUTES_LIST))

Typedefs

typedef _MlViewAttributesList MlViewAttributesList
typedef _MlViewAttributesListPrivate MlViewAttributesListPrivate
typedef _MlViewAttributesListClass MlViewAttributesListClass

Enumerations

enum  { ATTRIBUTE_NAME_OFFSET, ATTRIBUTE_VALUE_OFFSET }

Functions

guint mlview_attributes_list_get_type (void)
 type builder.

GtkWidget * mlview_attributes_list_new (gchar *a_names_title, gchar *a_values_title, MlViewAppContext *a_app_context)
 Creates a new MlViewAttributesList.

void mlview_attributes_list_set_app_context (MlViewAttributesList *a_attributes, MlViewAppContext *a_app_context)
 Sets a new application context to the current instance of MlViewAttributeLists.

void mlview_attributes_list_set_editable (MlViewAttributesList *attributes, gboolean editable)
 Sets the editable boolean to a_editable and emits the signal "edit-state-changed".

void mlview_attributes_list_set_titles (MlViewAttributesList *a_attributes, gchar *a_names_title, gchar *a_values_title)
 Sets the titles of the names and/or values of the attributes list.

void mlview_attributes_list_set_attribute (MlViewAttributesList *a_attributes, guint a_offset, const xmlAttrPtr a_xml_attr)
 sets a attribute name and value.

gint mlview_attributes_list_add_attribute_to_view (MlViewAttributesList *a_attributes, const xmlAttrPtr a_xml_attr)
 adds a new attribute to the attributes list .

gint mlview_attributes_list_create_attribute (MlViewAttributesList *a_attributes)
 Interactively creates a new attribute and inserts it at the end of the attribute list.

void mlview_attributes_list_remove_attribute (MlViewAttributesList *a_attributes, const guint a_attr_offset)
 Removes the attribute located at offset a_attr_offset in the attribute list.

void mlview_attributes_list_get_attribute (MlViewAttributesList *a_attributes, const guint a_offset, xmlAttrPtr *a_xml_attr_ptr)
 Gets the attribute that is at a given offset in the current instance of MlViewAttributesList.

void mlview_attributes_list_edit_xml_attributes (MlViewAttributesList *a_attributes_list, const xmlNodePtr a_xml_node)
 Edits the xml attributes hold by a given xml node.

void mlview_attributes_list_clear (MlViewAttributesList *a_attributes)
 clears all the attributes edited by the current instance of MlViewAttributesList.


Detailed Description

The declaration of the MlViewAttributesList class.

Definition in file mlview-attributes-list.h.


Define Documentation

#define __MLVIEW__ATTRIBUTES_LIST_H__
 

Definition at line 19 of file mlview-attributes-list.h.

#define MLVIEW_ATTRIBUTES_LIST object       (GTK_CHECK_CAST(object,MLVIEW_TYPE_ATTRIBUTES_LIST,MlViewAttributesList))
 

Definition at line 48 of file mlview-attributes-list.h.

#define MLVIEW_ATTRIBUTES_LIST_CLASS klass       (GTK_CHECK_CLASS_CAST(klass,MLVIEW_TYPE_ATTRIBUTES_LIST,MlViewAttributesListClass))
 

Definition at line 49 of file mlview-attributes-list.h.

#define MLVIEW_ATTRIBUTES_LIST_NEW_ATTRIBUTE_FAILED   -7
 

Definition at line 41 of file mlview-attributes-list.h.

#define MLVIEW_ATTRIBUTES_LIST_NULL   -1
 

Definition at line 35 of file mlview-attributes-list.h.

#define MLVIEW_ATTRIBUTES_LIST_NULL_ATTRIBUTE_NAME   -6
 

Definition at line 40 of file mlview-attributes-list.h.

#define MLVIEW_ATTRIBUTES_LIST_NULL_ATTRIBUTE_VALUE   -5
 

Definition at line 39 of file mlview-attributes-list.h.

#define MLVIEW_ATTRIBUTES_LIST_NULL_NAME_EDIT_ENTRY   -3
 

Definition at line 37 of file mlview-attributes-list.h.

#define MLVIEW_ATTRIBUTES_LIST_NULL_PARAMETER   -1
 

Definition at line 33 of file mlview-attributes-list.h.

Referenced by mlview_attributes_list_create_attribute().

#define MLVIEW_ATTRIBUTES_LIST_NULL_VALUE_EDIT_ENTRY   -4
 

Definition at line 38 of file mlview-attributes-list.h.

#define MLVIEW_ATTRIBUTES_LIST_NULL_XML_NODE   -2
 

Definition at line 36 of file mlview-attributes-list.h.

Referenced by mlview_attributes_list_create_attribute().

#define MLVIEW_ATTRIBUTES_LIST_OK   0
 

Definition at line 34 of file mlview-attributes-list.h.

#define MLVIEW_ATTRIBUTES_LIST_READ_ONLY   -8
 

Definition at line 42 of file mlview-attributes-list.h.

Referenced by mlview_attributes_list_create_attribute().

#define MLVIEW_IS_ATTRIBUTES_LIST object       (GTK_CHECK_TYPE((object), MLVIEW_TYPE_ATTRIBUTES_LIST))
 

Definition at line 50 of file mlview-attributes-list.h.

Referenced by mlview_attributes_list_edit_xml_attributes(), mlview_attributes_list_get_internal_clist(), mlview_attributes_list_set_app_context(), and mlview_attributes_list_set_editable().

#define MLVIEW_IS_ATTRIBUTES_LIST_CLASS klass       (GTK_CHECK_CLASS_TYPE((klass), MLVIEW_TYPE_ATTRIBUTES_LIST))
 

Definition at line 51 of file mlview-attributes-list.h.

#define MLVIEW_TYPE_ATTRIBUTES_LIST   (mlview_attributes_list_get_type())
 

Definition at line 47 of file mlview-attributes-list.h.

Referenced by mlview_attributes_list_new().


Typedef Documentation

typedef struct _MlViewAttributesList MlViewAttributesList
 

Definition at line 58 of file mlview-attributes-list.h.

typedef struct _MlViewAttributesListClass MlViewAttributesListClass
 

Definition at line 60 of file mlview-attributes-list.h.

typedef struct _MlViewAttributesListPrivate MlViewAttributesListPrivate
 

Definition at line 59 of file mlview-attributes-list.h.


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
ATTRIBUTE_NAME_OFFSET 
ATTRIBUTE_VALUE_OFFSET 

Definition at line 53 of file mlview-attributes-list.h.


Function Documentation

gint mlview_attributes_list_add_attribute_to_view MlViewAttributesList   a_attributes,
const xmlAttrPtr    a_xml_attr
 

adds a new attribute to the attributes list .

Parameters:
a_attributes  the current instance of MlViewAttributesList.
a_value  the value of the new attribute.
a_name  the name of the new attribute.

Definition at line 789 of file mlview-attributes-list.c.

References ATTRIBUTE_NAME_OFFSET, ATTRIBUTE_VALUE_OFFSET, and PRIVATE.

Referenced by mlview_attributes_list_create_attribute(), and mlview_attributes_list_edit_xml_attributes().

void mlview_attributes_list_clear MlViewAttributesList   a_attributes
 

clears all the attributes edited by the current instance of MlViewAttributesList.

Parameters:
a_attributes  the current instance of MlViewAttributesList.

Definition at line 845 of file mlview-attributes-list.c.

References PRIVATE.

gint mlview_attributes_list_create_attribute MlViewAttributesList   a_attributes
 

Interactively creates a new attribute and inserts it at the end of the attribute list.

The name and value of the attribute are the one entered by the user. Emits a "attribute-changed" signal on MlViewAttributesList.

Parameters:
a_attributes  the current instance of MlViewAttributesList

Definition at line 879 of file mlview-attributes-list.c.

References ATTRIBUTE_CHANGED, mlview_attributes_list_add_attribute_to_view(), MLVIEW_ATTRIBUTES_LIST_NULL_PARAMETER, MLVIEW_ATTRIBUTES_LIST_NULL_XML_NODE, MLVIEW_ATTRIBUTES_LIST_READ_ONLY, and PRIVATE.

void mlview_attributes_list_edit_xml_attributes MlViewAttributesList   a_attributes_list,
const xmlNodePtr    a_xml_node
 

Edits the xml attributes hold by a given xml node.

Parameters:
a_attributes_list  the current instance of MlViewAttributesList
a_xml_node  the xml node that holds the attributes list to edit.

Definition at line 756 of file mlview-attributes-list.c.

References mlview_attributes_list_add_attribute_to_view(), MLVIEW_IS_ATTRIBUTES_LIST, and PRIVATE.

void mlview_attributes_list_get_attribute MlViewAttributesList   a_attributes,
const guint    a_offset,
xmlAttrPtr *    a_xml_attr_ptr
 

Gets the attribute that is at a given offset in the current instance of MlViewAttributesList.

Parameters:
a_attributes  the current instance of MlViewAttributesList.
a_offset  the offset of the attribute.
a_xml_attr_ptr  out parameter. A pointer to the xmlAttrPtr (the libxml2 data structure that holds an attribute)

Definition at line 830 of file mlview-attributes-list.c.

References PRIVATE.

guint mlview_attributes_list_get_type void   
 

type builder.

Returns:
the id of the MlViewAttributesList type.

Definition at line 595 of file mlview-attributes-list.c.

GtkWidget* mlview_attributes_list_new gchar *    a_names_title,
gchar *    a_values_title,
MlViewAppContext   a_app_context
 

Creates a new MlViewAttributesList.

Parameters:
a_names_titles  the title of the names column
a_value_title  the title of the values column
Returns:
the newly created instance of MlViewAttributesList.

Definition at line 621 of file mlview-attributes-list.c.

References ATTRIBUTE_NAME_OFFSET, ATTRIBUTE_VALUE_OFFSET, mlview_attributes_list_set_app_context(), MLVIEW_TYPE_ATTRIBUTES_LIST, and PRIVATE.

void mlview_attributes_list_remove_attribute MlViewAttributesList   a_attributes,
const guint    a_attr_offset
 

Removes the attribute located at offset a_attr_offset in the attribute list.

If the removal succeeds, emits a "attribute-changed" signal on MlViewAttributesList.

Parameters:
a_attributes  the current instance of MlViewAttributesList.
a_attr_offset  the offset to consider.

Definition at line 914 of file mlview-attributes-list.c.

References ATTRIBUTE_CHANGED, and PRIVATE.

void mlview_attributes_list_set_app_context MlViewAttributesList   a_attributes,
MlViewAppContext   a_app_context
 

Sets a new application context to the current instance of MlViewAttributeLists.

Parameters:
a_attributes  the current instance of attribute list.
a_app_context  the new app context to set.

Definition at line 649 of file mlview-attributes-list.c.

References MLVIEW_IS_ATTRIBUTES_LIST, and PRIVATE.

Referenced by mlview_attributes_list_new().

void mlview_attributes_list_set_attribute MlViewAttributesList   a_attributes,
guint    a_offset,
const xmlAttrPtr    a_xml_attr
 

sets a attribute name and value.

Parameters:
a_offset  the attribute number (starting from 0)
a_attributes  the current instance of MlViewAttributesList.
a_value  the new attribute value . If NULL returns, a debug message is printed.
a_name  the new attribute name. If NULL, returns, a debug message is printed.

Definition at line 721 of file mlview-attributes-list.c.

References ATTRIBUTE_NAME_OFFSET, ATTRIBUTE_VALUE_OFFSET, and PRIVATE.

void mlview_attributes_list_set_editable MlViewAttributesList   a_attributes,
gboolean    a_editable
 

Sets the editable boolean to a_editable and emits the signal "edit-state-changed".

(if and only if a_editable != the previous editable state) After setting the editable boolean, emits the signal "edit-state-changed" on the current instance of MlViewAttributesList.

Parameters:
a_attributes  the current intance of MlViewAttributesList.
a_editable  the new editable state (TRUE=> the attributes list become editable FALSE=> it becomes read/only)

Definition at line 668 of file mlview-attributes-list.c.

References EDIT_STATE_CHANGED, MLVIEW_IS_ATTRIBUTES_LIST, and PRIVATE.

void mlview_attributes_list_set_titles MlViewAttributesList   a_attributes,
gchar *    a_names_title,
gchar *    a_values_title
 

Sets the titles of the names and/or values of the attributes list.

Parameters:
a_attributes  the current instance of MlViewAttributesList
a_names_title  the new names column title. If NULL or equal to "", the names column title is not changed.
a_values_titles  the new values title. If NULL or equal to "", the values column title is not changed.

Definition at line 689 of file mlview-attributes-list.c.

References PRIVATE.


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