Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

mlview-tree-editor.c File Reference

#include <string.h>
#include <stdlib.h>
#include "mlview-tree-editor.h"
#include "mlview-node-type-picker.h"
#include "mlview-global-settings.h"
#include "utils.h"

Go to the source code of this file.

Data Structures

struct  _MlViewTreeEditorPrivate

Defines

#define SEARCH_IN_NAMES_CHECK_BUTTON   "search-in-names-check-box"
 This widget is the visual tree editor.

#define SEARCH_IN_ATTRIBUTES_NAMES_CHECK_BUTTON   "search-in-attributes-names-check-box"
#define SEARCH_IN_ATTRIBUTES_VALUES_CHECK_BUTTON   "search-in-attributes-values-check-box"
#define SEARCH_IN_CONTENT_CHECK_BUTTON   "search-in-content-check-box"
#define SEARCHED_TEXT_ENTRY   "searched-text-entry"
#define IS_THE_FIND_DIALOG   "is-the-find-dialog"
#define PRIVATE(mlview_tree_editor)   ((mlview_tree_editor)->private)
#define MLVIEW_TREE_EDITOR_NODE_CLIPBOARD_SIZE   128

Enumerations

enum  {
  TREE_CHANGED = 1, MARK_SET_TO_NODE, MARK_REMOVED_FROM_NODE, NODE_CUT,
  NODE_PASTED, NODE_ADDED, NODE_SELECTED, NODE_UNSELECTED,
  NUMBER_OF_SIGNALS
}

Functions

guint mlview_tree_editor_get_type (void)
 the standard type id builder of the MlViewTreeEditor object.

GtkWidget * mlview_tree_editor_new (MlViewAppContext *a_context)
 the public constructor of the MlViewTreeEditor.

void mlview_tree_editor_set_application_context (MlViewTreeEditor *a_tree_editor, MlViewAppContext *a_app_context)
MlViewAppContextmlview_tree_editor_get_application_context (MlViewTreeEditor *a_tree_editor)
void mlview_tree_editor_set_xml_document_path (MlViewTreeEditor *a_tree_editor, gchar *a_file_path)
 Sets the title of the xml DOM to @a_file_path.

guint mlview_tree_editor_edit_xml_doc (MlViewTreeEditor *a_editor, MlViewXMLDocument *a_mlview_xml_doc, gchar *a_doc_name)
 A very important method in this class (and even in the whole MlView software).

void mlview_tree_editor_update_visual_xml_node (MlViewTreeEditor *a_tree_editor, xmlNode *a_node)
void mlview_tree_editor_update_visual_node (MlViewTreeEditor *a_tree_editor, GtkCTreeNode *a_visual_node)
 Given a GtkCTreeNode which has been associated to an xmlNode (by calling gtk_ctree_node_set_row_data on the GtkCTreeNode with the xmlNode in param), this function redraws the GtkCTreeNode by updating the string representation of the xml node that apears in the column at the right of the node.

void mlview_tree_editor_destroy (GtkObject *a_object)
 the destroy signal handler of the mlviewTreeEditorClass.

void mlview_tree_editor_update_child_node_added (MlViewTreeEditor *a_tree_editor, xmlNode *a_parent_node, xmlNode *a_added_node)
 mlview_tree_editor_update_child_node_added : This method visually updates the tree editor to make the addition of child node visible.

void mlview_tree_editor_update_node_cut (MlViewTreeEditor *a_tree_editor, xmlNode *a_parent_node, xmlNode *a_cut_node)
void mlview_tree_editor_update_node_pasted (MlViewTreeEditor *a_tree_editor, xmlNode *a_parent_node, xmlNode *a_pasted_node)
void mlview_tree_editor_update_sibling_node_inserted (MlViewTreeEditor *a_tree_editor, xmlNode *a_sibling_node, xmlNode *a_inserted_node, gboolean a_previous)
gint mlview_tree_editor_add_child_node (MlViewTreeEditor *a_tree_editor, GtkCTreeNode *a_parent_node, xmlNode *a_xml_node)
 Adds a child node to the GtkCTreeNode a_parent_node.

xmlNode * mlview_tree_editor_insert_sibling_node (MlViewTreeEditor *a_tree_editor, GtkCTreeNode *a_sibling_node, xmlNodePtr a_xml_node, gboolean a_previous)
 Builds and inserts a sibling node after the a_sibling node in the current visual xml tree.

void mlview_tree_editor_cut_node (MlViewTreeEditor *a_tree_editor, GtkCTreeNode *a_visual_node)
 Removes the node a_visual_node given in argument and put it in the clipboard.

void mlview_tree_editor_copy_node (MlViewTreeEditor *a_tree_editor, GtkCTreeNode *a_visual_node, gboolean a_recursive)
GtkCTreeNode * mlview_tree_editor_get_current_selected_node (MlViewTreeEditor *a_tree_editor)
void mlview_tree_editor_create_new_xml_doc (MlViewTreeEditor *a_tree_editor, MlViewXMLDocument *a_xml_doc)
 Creates a new xml doc.

GtkCTreeNode * mlview_tree_editor_set_root_element (MlViewTreeEditor *a_tree_editor, xmlNodePtr a_xml_root_node)
 Set the root element to a visual node build from a_xml_node.

void mlview_tree_editor_paste_node_as_child (MlViewTreeEditor *a_tree_editor, GtkCTreeNode *a_visual_parent_node)
 Get the last node put into the clipboard and in insert it into the visual dom.

void mlview_tree_editor_paste_node_as_sibling (MlViewTreeEditor *a_tree_editor, GtkCTreeNode *a_visual_sibling_node, gboolean a_previous)
 Gets an xml node from the clipboard and pastes it as the previous sibling of the visual node given in argument.

GtkCTree * mlview_tree_editor_get_visual_tree (MlViewTreeEditor *a_tree_editor)
void mlview_tree_editor_add_child_node_interactive (MlViewTreeEditor *a_tree_editor)
 Asks the user for the type of node he wants to add and adds it.

void mlview_tree_editor_insert_prev_sibling_node_interactive (MlViewTreeEditor *a_tree_editor)
 Asks the user for the type of node he wants to insert and inserts it.

void mlview_tree_editor_insert_next_sibling_node_interactive (MlViewTreeEditor *a_tree_editor)
 Asks the user for the type of node he wants to insert and inserts it.

xmlDocPtr mlview_tree_editor_get_xml_document (MlViewTreeEditor *a_tree_editor)
void mlview_tree_editor_set_node_type_picker (MlViewTreeEditor *a_tree_editor, MlViewNodeTypePicker *a_node_type_picker)
MlViewNodeTypePickermlview_tree_editor_get_node_type_picker (MlViewTreeEditor *a_tree_editor)
GtkCTreeNode * mlview_tree_editor_find_xml_node_that_contains_str (MlViewTreeEditor *a_tree_editor, const gchar *a_str, const enum WhereInTheNodeBitmap a_where_in_node_bitmap, const gboolean a_start_after)
GtkCTreeNode * mlview_tree_editor_find_xml_node_that_contains_str_interactive (MlViewTreeEditor *a_tree_editor)
 mlview_tree_editor_find_xml_node_that_contains_str_interactive

void mlview_tree_editor_expand_tree_to_depth (MlViewTreeEditor *a_editor, gint a_depth)
 Expands the current selected visual xml tree to the depth specified by @a_a_depth.

void mlview_tree_editor_update_contextual_menu (MlViewTreeEditor *a_tree_editor, GtkMenu **a_menu_ptr)


Define Documentation

#define IS_THE_FIND_DIALOG   "is-the-find-dialog"
 

Definition at line 45 of file mlview-tree-editor.c.

#define MLVIEW_TREE_EDITOR_NODE_CLIPBOARD_SIZE   128
 

Definition at line 93 of file mlview-tree-editor.c.

#define PRIVATE mlview_tree_editor       ((mlview_tree_editor)->private)
 

Definition at line 51 of file mlview-tree-editor.c.

Referenced by mlview_tree_editor_add_child_node(), mlview_tree_editor_add_child_node_interactive(), mlview_tree_editor_copy_node(), mlview_tree_editor_cut_node(), mlview_tree_editor_destroy(), mlview_tree_editor_edit_xml_doc(), mlview_tree_editor_expand_tree_to_depth(), mlview_tree_editor_find_xml_node_that_contains_str_interactive(), mlview_tree_editor_get_application_context(), mlview_tree_editor_get_visual_tree(), mlview_tree_editor_insert_next_sibling_node_interactive(), mlview_tree_editor_insert_prev_sibling_node_interactive(), mlview_tree_editor_insert_sibling_node(), mlview_tree_editor_paste_node_as_child(), mlview_tree_editor_paste_node_as_sibling(), mlview_tree_editor_set_application_context(), mlview_tree_editor_set_xml_document_path(), mlview_tree_editor_update_child_node_added(), mlview_tree_editor_update_contextual_menu(), mlview_tree_editor_update_node_cut(), mlview_tree_editor_update_node_pasted(), mlview_tree_editor_update_sibling_node_inserted(), mlview_tree_editor_update_visual_node(), and mlview_tree_editor_update_visual_xml_node().

#define SEARCH_IN_ATTRIBUTES_NAMES_CHECK_BUTTON   "search-in-attributes-names-check-box"
 

Definition at line 40 of file mlview-tree-editor.c.

#define SEARCH_IN_ATTRIBUTES_VALUES_CHECK_BUTTON   "search-in-attributes-values-check-box"
 

Definition at line 41 of file mlview-tree-editor.c.

#define SEARCH_IN_CONTENT_CHECK_BUTTON   "search-in-content-check-box"
 

Definition at line 42 of file mlview-tree-editor.c.

#define SEARCH_IN_NAMES_CHECK_BUTTON   "search-in-names-check-box"
 

This widget is the visual tree editor.

It can load an xml tree, visualize it as a tree and allow the user to edit the tree. Each time one of the nodes of the tree is selected, cut, copied etc, this widget emits signals that can be caught and handler by the caller. See mlview-tree-editor.h for the declaration of the pulic services offered by this widget.

Definition at line 39 of file mlview-tree-editor.c.

#define SEARCHED_TEXT_ENTRY   "searched-text-entry"
 

Definition at line 43 of file mlview-tree-editor.c.


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
TREE_CHANGED 
MARK_SET_TO_NODE 
MARK_REMOVED_FROM_NODE 
NODE_CUT 
NODE_PASTED 
NODE_ADDED 
NODE_SELECTED 
NODE_UNSELECTED 
NUMBER_OF_SIGNALS 

Definition at line 75 of file mlview-tree-editor.c.


Function Documentation

gint mlview_tree_editor_add_child_node MlViewTreeEditor   a_tree_editor,
GtkCTreeNode *    a_parent_node,
xmlNode *    a_xml_node
 

Adds a child node to the GtkCTreeNode a_parent_node.

This function also associates the newly build child node (instance of GtkCTreeNode) to the xmlNodePtr given in argument by calling gtk_ctree_node_set_row_data(). Note that the child node is added at the end of the existing children nodes of a_parent_node. This method is not interactive.

Parameters:
a_xml_node  the xml node that is to be associated to the newly created visual node.
a_tree_editor  the current instance of GtkCTreeNode.
a_parent_node  the parent node of the node that is to be created.

Definition at line 1979 of file mlview-tree-editor.c.

References MLVIEW_IS_TREE_EDITOR, mlview_tree_editor_get_visual_tree(), mlview_xml_document_add_child_node(), and PRIVATE.

void mlview_tree_editor_add_child_node_interactive MlViewTreeEditor   a_tree_editor
 

Asks the user for the type of node he wants to add and adds it.

Parameters:
a_tree_editor  the current instance of MlViewTreeEditor

Definition at line 2294 of file mlview-tree-editor.c.

References ADD_CHILD, mlview_app_context_set_window_icon(), MLVIEW_IS_TREE_EDITOR, MLVIEW_NODE_TYPE_PICKER, mlview_node_type_picker_select_node_name_or_content_entry_text(), mlview_node_type_picker_set_title(), mlview_tree_editor_get_node_type_picker(), mlview_tree_editor_set_node_type_picker(), mvliew_node_type_picker_build_element_name_choice_list(), and PRIVATE.

Referenced by mlview_xml_doc_tree_view_add_child_node_interactive().

void mlview_tree_editor_copy_node MlViewTreeEditor   a_tree_editor,
GtkCTreeNode *    a_visual_node,
gboolean    a_recursive
 

Parameters:
a_tree_editor 
a_recursive 
a_visual_node 

Definition at line 2093 of file mlview-tree-editor.c.

References MLVIEW_IS_TREE_EDITOR, mlview_tree_editor_get_visual_tree(), mlview_xml_document_copy_node_to_clipboard(), and PRIVATE.

Referenced by mlview_xml_doc_tree_view_copy_node().

void mlview_tree_editor_create_new_xml_doc MlViewTreeEditor   a_tree_editor,
MlViewXMLDocument   a_xml_doc
 

Creates a new xml doc.

Parameters:
a_xml_doc 
a_tree_editor 

Definition at line 2140 of file mlview-tree-editor.c.

References mlview_tree_editor_edit_xml_doc(), and PRIVATE.

void mlview_tree_editor_cut_node MlViewTreeEditor   a_tree_editor,
GtkCTreeNode *    a_visual_node
 

Removes the node a_visual_node given in argument and put it in the clipboard.

Cut also the correponding xmlNode from the dom. Emits the signals "node-cut" and "tree-changed".

Parameters:
a_visual_editor 
a_tree_editor 

Definition at line 2063 of file mlview-tree-editor.c.

References MLVIEW_IS_TREE_EDITOR, mlview_tree_editor_get_visual_tree(), mlview_xml_document_cut_node(), and PRIVATE.

Referenced by mlview_xml_doc_tree_view_cut_node().

void mlview_tree_editor_destroy GtkObject *    a_object
 

the destroy signal handler of the mlviewTreeEditorClass.

Parameters:
a_object  the current instance of MlViewTreeEditor

Definition at line 1715 of file mlview-tree-editor.c.

References MLVIEW_TREE_EDITOR, and PRIVATE.

guint mlview_tree_editor_edit_xml_doc MlViewTreeEditor   a_editor,
MlViewXMLDocument   a_mlview_xml_doc,
gchar *    a_doc_name
 

A very important method in this class (and even in the whole MlView software).

It takes an xml document in parameter, builds the graphical view that matches it and displays it.

Parameters:
a_xmldoc  the xml document to edit.
a_editor  the current instance of MlViewTreeEditor.
Returns:
0 if OK or the error code.

Definition at line 1589 of file mlview-tree-editor.c.

References mlview_app_context_get_settings_hash_table(), MLVIEW_IS_TREE_EDITOR, MLVIEW_IS_XML_DOCUMENT, mlview_xml_document_get_xml_document(), and PRIVATE.

Referenced by mlview_tree_editor_create_new_xml_doc(), and mlview_xml_doc_tree_view_construct().

void mlview_tree_editor_expand_tree_to_depth MlViewTreeEditor   a_editor,
gint    a_depth
 

Expands the current selected visual xml tree to the depth specified by @a_a_depth.

If @a_depth is set to -1 the tree is expanded to the leaves.

Parameters:
a_editor  the current instance of MlViewTreeEditor.
a_depth  expansion depth.

Definition at line 2602 of file mlview-tree-editor.c.

References MLVIEW_IS_TREE_EDITOR, and PRIVATE.

Referenced by mlview_tree_editor_update_child_node_added(), and mlview_xml_doc_tree_view_expand_tree_to_depth_interactive().

GtkCTreeNode* mlview_tree_editor_find_xml_node_that_contains_str MlViewTreeEditor   a_tree_editor,
const gchar *    a_str,
const enum WhereInTheNodeBitmap    a_where_in_node_bitmap,
const gboolean    a_start_after
 

Parameters:
a_tree_editor  the current instance of MlViewTreeEditor
a_str  the string to search.

Definition at line 2515 of file mlview-tree-editor.c.

References mlview_tree_editor_get_current_selected_node(), mlview_tree_editor_get_xml_document(), PRIVATE, and WhereInTheNodeBitmap.

GtkCTreeNode* mlview_tree_editor_find_xml_node_that_contains_str_interactive MlViewTreeEditor   a_tree_editor
 

mlview_tree_editor_find_xml_node_that_contains_str_interactive

Definition at line 2546 of file mlview-tree-editor.c.

References mlview_app_context_set_window_icon(), MLVIEW_IS_TREE_EDITOR, and PRIVATE.

Referenced by mlview_xml_doc_tree_view_find_xml_node_that_contains_str_interactive().

MlViewAppContext* mlview_tree_editor_get_application_context MlViewTreeEditor   a_tree_editor
 

Definition at line 1538 of file mlview-tree-editor.c.

References MLVIEW_IS_TREE_EDITOR, and PRIVATE.

GtkCTreeNode* mlview_tree_editor_get_current_selected_node MlViewTreeEditor   a_tree_editor
 

Parameters:
a_tree_editor  the current instance of MlViewTreEditor

Definition at line 2122 of file mlview-tree-editor.c.

References PRIVATE.

Referenced by mlview_tree_editor_find_xml_node_that_contains_str(), mlview_xml_doc_tree_view_copy_node(), mlview_xml_doc_tree_view_cut_node(), mlview_xml_doc_tree_view_paste_node_as_child(), mlview_xml_doc_tree_view_paste_node_as_next_sibling(), and mlview_xml_doc_tree_view_paste_node_as_prev_sibling().

MlViewNodeTypePicker* mlview_tree_editor_get_node_type_picker MlViewTreeEditor   a_tree_editor
 

Parameters:
a_tree_editor  the current instance of MlViewTreeEditor
Returns:
the current node type picker associated to this tree editor. NULL if no node type picker is associated.

Definition at line 2500 of file mlview-tree-editor.c.

References PRIVATE.

Referenced by mlview_tree_editor_add_child_node_interactive(), mlview_tree_editor_insert_next_sibling_node_interactive(), and mlview_tree_editor_insert_prev_sibling_node_interactive().

guint mlview_tree_editor_get_type void   
 

the standard type id builder of the MlViewTreeEditor object.

Returns:
the type id of the MlViewTreeEditor object.

Definition at line 1483 of file mlview-tree-editor.c.

GtkCTree* mlview_tree_editor_get_visual_tree MlViewTreeEditor   a_tree_editor
 

Definition at line 2277 of file mlview-tree-editor.c.

References MLVIEW_IS_TREE_EDITOR, and PRIVATE.

Referenced by mlview_tree_editor_add_child_node(), mlview_tree_editor_copy_node(), mlview_tree_editor_cut_node(), mlview_tree_editor_insert_sibling_node(), mlview_tree_editor_update_child_node_added(), mlview_tree_editor_update_node_cut(), mlview_tree_editor_update_node_pasted(), and mlview_tree_editor_update_sibling_node_inserted().

xmlDocPtr mlview_tree_editor_get_xml_document MlViewTreeEditor   a_tree_editor
 

Parameters:
a_tree_editor 

Definition at line 2467 of file mlview-tree-editor.c.

References PRIVATE.

Referenced by mlview_tree_editor_find_xml_node_that_contains_str().

void mlview_tree_editor_insert_next_sibling_node_interactive MlViewTreeEditor   a_tree_editor
 

Asks the user for the type of node he wants to insert and inserts it.

Parameters:
a_tree_editor 

Definition at line 2417 of file mlview-tree-editor.c.

References INSERT_AFTER, mlview_app_context_set_window_icon(), MLVIEW_NODE_TYPE_PICKER, mlview_node_type_picker_new(), mlview_node_type_picker_select_node_name_or_content_entry_text(), mlview_node_type_picker_set_title(), mlview_tree_editor_get_node_type_picker(), mlview_tree_editor_set_node_type_picker(), mvliew_node_type_picker_build_element_name_choice_list(), and PRIVATE.

Referenced by mlview_xml_doc_tree_view_insert_next_sibling_node_interactive().

void mlview_tree_editor_insert_prev_sibling_node_interactive MlViewTreeEditor   a_tree_editor
 

Asks the user for the type of node he wants to insert and inserts it.

Parameters:
a_tree_editor 

Definition at line 2355 of file mlview-tree-editor.c.

References INSERT_BEFORE, mlview_app_context_set_window_icon(), MLVIEW_IS_TREE_EDITOR, MLVIEW_NODE_TYPE_PICKER, mlview_node_type_picker_new(), mlview_node_type_picker_select_node_name_or_content_entry_text(), mlview_node_type_picker_set_title(), mlview_tree_editor_get_node_type_picker(), mlview_tree_editor_set_node_type_picker(), mvliew_node_type_picker_build_element_name_choice_list(), and PRIVATE.

Referenced by mlview_xml_doc_tree_view_insert_prev_sibling_node_interactive().

xmlNode* mlview_tree_editor_insert_sibling_node MlViewTreeEditor   a_tree_editor,
GtkCTreeNode *    a_sibling_node,
xmlNodePtr    a_xml_node,
gboolean    a_previous
 

Builds and inserts a sibling node after the a_sibling node in the current visual xml tree.

The newly build node is a child node of a_parent_node and reflects the xml node a_xml_node given in argument. Emit the signals "node-added" and the signal "tree-changed".

Parameters:
a_xml_node  the xml node to insert.
a_tree_editor  the current instance of MlViewTreeEditor
a_sibling_node  the reference node after wich the newly build node will be inserted
a_parent_node  the parent of the viusal node to insert

Definition at line 2023 of file mlview-tree-editor.c.

References mlview_tree_editor_get_visual_tree(), mlview_xml_document_insert_next_sibling_node(), mlview_xml_document_insert_prev_sibling_node(), and PRIVATE.

GtkWidget* mlview_tree_editor_new MlViewAppContext   a_context
 

the public constructor of the MlViewTreeEditor.

Parameters:
a_context  the application context.
Returns:
the newly build instance of MlViewTreeEditor.

Definition at line 1511 of file mlview-tree-editor.c.

References MLVIEW_TYPE_TREE_EDITOR, and PRIVATE.

void mlview_tree_editor_paste_node_as_child MlViewTreeEditor   a_tree_editor,
GtkCTreeNode *    a_visual_parent_node
 

Get the last node put into the clipboard and in insert it into the visual dom.

Parameters:
a_tree 
a_visual_parent_node 

Definition at line 2213 of file mlview-tree-editor.c.

References MLVIEW_IS_TREE_EDITOR, mlview_xml_document_paste_node_as_child(), PRIVATE, and TREE_CHANGED.

Referenced by mlview_xml_doc_tree_view_paste_node_as_child().

void mlview_tree_editor_paste_node_as_sibling MlViewTreeEditor   a_tree_editor,
GtkCTreeNode *    a_visual_sibling_node,
gboolean    a_previous
 

Gets an xml node from the clipboard and pastes it as the previous sibling of the visual node given in argument.

If the node retrieved from the clipboard is NULL, does nothing.

Parameters:
a_tree_editor 
a_visual_sibling_node 

Definition at line 2247 of file mlview-tree-editor.c.

References MLVIEW_IS_TREE_EDITOR, mlview_xml_document_paste_node_as_sibling(), PRIVATE, and TREE_CHANGED.

Referenced by mlview_xml_doc_tree_view_paste_node_as_next_sibling(), and mlview_xml_doc_tree_view_paste_node_as_prev_sibling().

void mlview_tree_editor_set_application_context MlViewTreeEditor   a_tree_editor,
MlViewAppContext   a_app_context
 

Definition at line 1526 of file mlview-tree-editor.c.

References MLVIEW_IS_TREE_EDITOR, and PRIVATE.

Referenced by mlview_xml_doc_tree_view_set_app_context().

void mlview_tree_editor_set_node_type_picker MlViewTreeEditor   a_tree_editor,
MlViewNodeTypePicker   a_node_type_picker
 

Parameters:
a_tree_editor 
a_node_type_picker 

Definition at line 2483 of file mlview-tree-editor.c.

References PRIVATE.

Referenced by mlview_tree_editor_add_child_node_interactive(), mlview_tree_editor_insert_next_sibling_node_interactive(), and mlview_tree_editor_insert_prev_sibling_node_interactive().

GtkCTreeNode* mlview_tree_editor_set_root_element MlViewTreeEditor   a_tree_editor,
xmlNodePtr    a_xml_root_node
 

Set the root element to a visual node build from a_xml_node.

Also set the root element of the dom to a_xml_node.

Parameters:
a_xml_root_node  the xml node to set as root element.
a_tree_editor  the current instance of MlViewTreeEditor.

Definition at line 2161 of file mlview-tree-editor.c.

References NODE_ADDED, PRIVATE, and TREE_CHANGED.

void mlview_tree_editor_set_xml_document_path MlViewTreeEditor   a_tree_editor,
gchar *    a_file_path
 

Sets the title of the xml DOM to @a_file_path.

Updates this information in the tree editor and in the XML DOM.

Parameters:
a_file_path  the new file path of xml document.
a_tree_editor  the current tree editor.

Definition at line 1559 of file mlview-tree-editor.c.

References PRIVATE.

Referenced by mlview_xml_doc_tree_view_set_xml_document_path().

void mlview_tree_editor_update_child_node_added MlViewTreeEditor   a_tree_editor,
xmlNode *    a_parent_node,
xmlNode *    a_added_node
 

mlview_tree_editor_update_child_node_added : This method visually updates the tree editor to make the addition of child node visible.

If the node addition has been already updated, this method does nothing. Upon successfull update, this method makes a_tree_editor fire two signals : "node-added", "tree-changed".

Parameters:
a_tree_editor  the current instance of MlViewTreeEditor.
a_added_node  the added node.
a_parent_node  the parent node of the node added.
a_user_data 

Definition at line 1763 of file mlview-tree-editor.c.

References MLVIEW_IS_TREE_EDITOR, mlview_tree_editor_expand_tree_to_depth(), mlview_tree_editor_get_visual_tree(), mlview_tree_editor_update_visual_node(), NODE_ADDED, PRIVATE, and TREE_CHANGED.

Referenced by mlview_tree_editor_update_node_pasted().

void mlview_tree_editor_update_contextual_menu MlViewTreeEditor   a_tree_editor,
GtkMenu **    a_menu_ptr
 

Parameters:
a_menu_ptr 
a_tree_editor 

Definition at line 2637 of file mlview-tree-editor.c.

References ADD_CHILD, INSERT_AFTER, INSERT_BEFORE, MLVIEW_IS_TREE_EDITOR, and PRIVATE.

Referenced by mlview_xml_doc_tree_view_update_contextual_menu().

void mlview_tree_editor_update_node_cut MlViewTreeEditor   a_tree_editor,
xmlNode *    a_parent_node,
xmlNode *    a_cut_node
 

Parameters:
a_cut_node 
a_tree_editor 
a_parent_node 

Definition at line 1814 of file mlview-tree-editor.c.

References MLVIEW_IS_TREE_EDITOR, mlview_tree_editor_get_visual_tree(), mlview_tree_editor_update_visual_node(), NODE_CUT, PRIVATE, and TREE_CHANGED.

void mlview_tree_editor_update_node_pasted MlViewTreeEditor   a_tree_editor,
xmlNode *    a_parent_node,
xmlNode *    a_pasted_node
 

Parameters:
a_tree_editor  the current instance of MlViewTreeEditor.
a_added_node  the newly pasted node.
a_parent_node  the parent node of the pasted node.

Definition at line 1863 of file mlview-tree-editor.c.

References MLVIEW_IS_TREE_EDITOR, mlview_tree_editor_get_visual_tree(), mlview_tree_editor_update_child_node_added(), NODE_PASTED, and PRIVATE.

void mlview_tree_editor_update_sibling_node_inserted MlViewTreeEditor   a_tree_editor,
xmlNode *    a_sibling_node,
xmlNode *    a_inserted_node,
gboolean    a_previous
 

Definition at line 1894 of file mlview-tree-editor.c.

References mlview_app_context_get_xpm(), MLVIEW_IS_TREE_EDITOR, mlview_tree_editor_get_visual_tree(), mlview_tree_editor_update_visual_node(), and PRIVATE.

void mlview_tree_editor_update_visual_node MlViewTreeEditor   a_tree_editor,
GtkCTreeNode *    a_visual_node
 

Given a GtkCTreeNode which has been associated to an xmlNode (by calling gtk_ctree_node_set_row_data on the GtkCTreeNode with the xmlNode in param), this function redraws the GtkCTreeNode by updating the string representation of the xml node that apears in the column at the right of the node.

This method is to be called each time an xml node is modified (i.e name, attribute, or namespace def changes)

Parameters:
a_tree_editor  the current instance of MlViewTreeEditor to consider.
a_visual_node  the visual node to update

Definition at line 1672 of file mlview-tree-editor.c.

References MLVIEW_TREE_EDITOR, and PRIVATE.

Referenced by mlview_tree_editor_update_child_node_added(), mlview_tree_editor_update_node_cut(), mlview_tree_editor_update_sibling_node_inserted(), and mlview_tree_editor_update_visual_xml_node().

void mlview_tree_editor_update_visual_xml_node MlViewTreeEditor   a_tree_editor,
xmlNode *    a_node
 

Definition at line 1643 of file mlview-tree-editor.c.

References MLVIEW_IS_TREE_EDITOR, mlview_tree_editor_update_visual_node(), and PRIVATE.


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