00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00026 #ifndef __MLVIEW_NODE_EDITOR_H__
00027 #define __MLVIEW_NODE_EDITOR_H__
00028
00029 #include <gnome.h>
00030 #include <libxml/tree.h>
00031 #include "mlview-app-context.h"
00032 #include "mlview-xml-document.h"
00033
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037
00038
00039 #define MLVIEW_TYPE_NODE_EDITOR (mlview_node_editor_get_type())
00040 #define MLVIEW_NODE_EDITOR(object) (GTK_CHECK_CAST((object), MLVIEW_TYPE_NODE_EDITOR, MlViewNodeEditor))
00041 #define MLVIEW_NODE_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), MLVIEW_TYPE_NODE_EDITOR, MlViewNodeEditorClass))
00042 #define MLVIEW_IS_NODE_EDITOR(object) (GTK_CHECK_TYPE((object), MLVIEW_TYPE_NODE_EDITOR))
00043 #define MLVIEW_IS_NODE_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), MLVIEW_TYPE_NODE_EDITOR))
00044
00045 typedef struct _MlViewNodeEditorPrivate MlViewNodeEditorPrivate ;
00046 typedef struct _MlViewNodeEditor MlViewNodeEditor ;
00047 typedef struct _MlViewNodeEditorClass MlViewNodeEditorClass ;
00048
00049
00050
00051
00052 struct _MlViewNodeEditor
00053 {
00054 GtkHPaned hpaned ;
00055 MlViewNodeEditorPrivate *private;
00056 };
00057
00058
00059
00060
00061 guint
00062 mlview_node_editor_get_type (void) ;
00063
00064 GtkWidget *
00065 mlview_node_editor_new (MlViewAppContext * a_app_context) ;
00066
00067 void
00068 mlview_node_editor_set_application_context (MlViewNodeEditor *a_node_editor,
00069 MlViewAppContext *a_app_context) ;
00070
00071 MlViewAppContext *
00072 mlview_node_editor_get_application_context (MlViewNodeEditor *a_node_editor) ;
00073
00074 xmlNodePtr
00075 mlview_node_editor_get_current_xml_node (MlViewNodeEditor *a_editor) ;
00076
00077 void
00078 mlview_node_editor_edit_xml_node (MlViewNodeEditor *a_editor,
00079 MlViewXMLDocument *a_xml_doc,
00080 xmlNode *a_node) ;
00081
00082 void
00083 mlview_node_editor_clear (MlViewNodeEditor *a_editor) ;
00084
00085 void
00086 mlview_node_editor_set_editable (MlViewNodeEditor *a_editor,
00087 gboolean a_editable) ;
00088
00089 gpointer
00090 mlview_node_editor_get_attached_object (MlViewNodeEditor *a_editor, gchar *a_key) ;
00091
00092 void
00093 mlview_node_editor_set_left_right_percentage (MlViewNodeEditor* a_node_editor,
00094 const guint a_percentage) ;
00095
00096 struct _MlViewNodeEditorClass {
00097 GtkHPanedClass parent_class ;
00098
00099 void (*element_changed)(MlViewNodeEditor* a_editor, gpointer a_data) ;
00100 void (*element_name_changed)(MlViewNodeEditor *a_editor, xmlNodePtr a_node) ;
00101 void (*element_attribute_changed)(MlViewNodeEditor *a_editor, xmlNodePtr a_node) ;
00102 void (*element_content_changed)(MlViewNodeEditor *a_editor, xmlNodePtr a_node);
00103 void (*edit_state_changed)(MlViewNodeEditor* a_editor) ;
00104 };
00105
00106 #ifdef __cplusplus
00107 }
00108 #endif
00109 #endif