#include "mlview-node-editor.h"
#include "mlview-xml-document.h"
#include "mlview-attributes-list.h"
#include "mlview-namespace-editor.h"
#include "utils.h"
#include <libxml/tree.h>
#include <ctype.h>
Go to the source code of this file.
Data Structures | |
struct | _MlViewNodeEditorPrivate |
struct | _XMLCDataSectionNodeView |
The cdata section node view. More... | |
struct | _XMLCommentNodeView |
The comment node view. More... | |
struct | _XMLDocNodeView |
struct | _XMLElementNodeView |
This structure represents the element node view. More... | |
struct | _XMLPINodeView |
The processing instruction node. More... | |
struct | _XMLTextNodeView |
The text node view. More... | |
Defines | |
#define | PRIVATE(node_editor) (node_editor->private) |
#define | ELEMENT_NODE_VIEW(node_editor) (PRIVATE(node_editor)->element_node_view) |
#define | TEXT_NODE_VIEW(node_editor) (PRIVATE(node_editor)->text_node_view) |
#define | COMMENT_NODE_VIEW(node_editor) (PRIVATE(node_editor)->comment_node_view) |
#define | CDATA_SECTION_NODE_VIEW(node_editor) (PRIVATE(node_editor)->cdata_section_node_view) |
#define | PI_NODE_VIEW(node_editor) (PRIVATE(node_editor)->pi_node_view) |
#define | DOC_NODE_VIEW(node_editor) (PRIVATE(node_editor)->doc_node_view) |
#define | CURRENT_XML_NODE(node_editor) (PRIVATE(node_editor)->curr_xml_node) |
#define | IS_EDITABLE(node_editor) (PRIVATE(node_editor)->iseditable) |
#define | DEFAULT_LEFT_RIGHT_PERCENTAGE 20 |
Typedefs | |
typedef _XMLElementNodeView | XMLElementNodeView |
This widget edits a given xml node. | |
typedef _XMLCommentNodeView | XMLCommentNodeView |
typedef _XMLCDataSectionNodeView | XMLCDataSectionNodeView |
typedef _XMLTextNodeView | XMLTextNodeView |
typedef _XMLPINodeView | XMLPINodeView |
typedef _XMLDocNodeView | XMLDocNodeView |
Enumerations | |
enum | { ELEMENT_CHANGED, EDIT_STATE_CHANGED, ELEMENT_NAME_CHANGED, ELEMENT_ATTRIBUTE_CHANGED, ELEMENT_CONTENT_CHANGED, NUMBER_OF_SIGNALS } |
enum | { ELEMENT_NODE_VIEW_PAGE, TEXT_NODE_VIEW_PAGE, COMMENT_NODE_VIEW_PAGE, CDATA_SECTION_VIEW_PAGE, PI_NODE_VIEW_PAGE, DOC_NODE_VIEW_PAGE } |
Functions | |
guint | mlview_node_editor_get_type (void) |
Classical dynamic type allocator. | |
GtkWidget * | mlview_node_editor_new (MlViewAppContext *a_app_context) |
Simple instance builder. | |
void | mlview_node_editor_set_application_context (MlViewNodeEditor *a_node_editor, MlViewAppContext *a_app_context) |
mlview_node_editor_set_application_context | |
MlViewAppContext * | mlview_node_editor_get_application_context (MlViewNodeEditor *a_node_editor) |
xmlNodePtr | mlview_node_editor_get_current_xml_node (MlViewNodeEditor *a_editor) |
xmlNodePtr mlview_node_editor_get_current_xml_node: | |
void | mlview_node_editor_edit_xml_node (MlViewNodeEditor *a_editor, MlViewXMLDocument *a_xml_doc, xmlNode *a_node) |
Edits the node current node. | |
void | mlview_node_editor_clear (MlViewNodeEditor *a_editor) |
Visualy (only) Clears the element editor. | |
void | mlview_node_editor_set_editable (MlViewNodeEditor *a_editor, gboolean a_editable) |
Sets the new editable state of the current instance of MlViewNodeEditor. | |
void | mlview_node_editor_set_left_right_percentage (MlViewNodeEditor *a_node_editor, const guint a_percentage) |
|
Definition at line 198 of file mlview-node-editor.c. |
|
Definition at line 197 of file mlview-node-editor.c. |
|
Definition at line 201 of file mlview-node-editor.c. |
|
Definition at line 203 of file mlview-node-editor.c. |
|
Definition at line 200 of file mlview-node-editor.c. |
|
Definition at line 195 of file mlview-node-editor.c. |
|
Definition at line 202 of file mlview-node-editor.c. |
|
Definition at line 199 of file mlview-node-editor.c. |
|
Definition at line 194 of file mlview-node-editor.c. Referenced by mlview_node_editor_edit_xml_node(), mlview_node_editor_get_application_context(), and mlview_node_editor_set_application_context(). |
|
Definition at line 196 of file mlview-node-editor.c. |
|
Definition at line 45 of file mlview-node-editor.c. |
|
Definition at line 44 of file mlview-node-editor.c. |
|
Definition at line 48 of file mlview-node-editor.c. |
|
This widget edits a given xml node. Some of it methods take an xmlNodePtr in parameter and allow the user to interactively edit the xml node. It emits signal whenever the xml node being edited changes. The user of this widget can thus catch and handle the emitted signals. An xml node can have several types (element node, text node, processing instruction node, comment node). Each type of node is edited using what i call a view. As they are several types of nodes, they are several types of view; one for each type of node. A particular view is a widget that can edit a particular type of xml node. Each view is abstracted by a structure that holds the view widget. The MlViewElementWidget contains all the possible views it can handle. Whenever an xml node is to be edited, the proper view is then selected and used to edit the node. The selection of the right view is done in the method mlview_node_editor_edit_xml_node(). Definition at line 43 of file mlview-node-editor.c. |
|
Definition at line 47 of file mlview-node-editor.c. |
|
Definition at line 46 of file mlview-node-editor.c. |
|
Definition at line 167 of file mlview-node-editor.c. |
|
Definition at line 184 of file mlview-node-editor.c. |
|
Visualy (only) Clears the element editor. Does not free anything. Definition at line 1662 of file mlview-node-editor.c. |
|
Edits the node current node.
Definition at line 1597 of file mlview-node-editor.c. References MLVIEW_IS_NODE_EDITOR, MLVIEW_IS_XML_DOCUMENT, and PRIVATE. |
|
Definition at line 1570 of file mlview-node-editor.c. References MLVIEW_IS_NODE_EDITOR, and PRIVATE. |
|
xmlNodePtr mlview_node_editor_get_current_xml_node:
Definition at line 1585 of file mlview-node-editor.c. References PRIVATE. |
|
Classical dynamic type allocator.
Definition at line 1363 of file mlview-node-editor.c. |
|
Simple instance builder.
Definition at line 1542 of file mlview-node-editor.c. References MLVIEW_TYPE_NODE_EDITOR. |
|
mlview_node_editor_set_application_context
Definition at line 1558 of file mlview-node-editor.c. References MLVIEW_IS_NODE_EDITOR, and PRIVATE. Referenced by mlview_xml_doc_tree_view_set_app_context(). |
|
Sets the new editable state of the current instance of MlViewNodeEditor. Actually, it the current view of the element editor that is set to the editable/non editable state. Also emits the signal "edit state changes". Definition at line 1679 of file mlview-node-editor.c. References EDIT_STATE_CHANGED, _MlViewNodeEditorPrivate::iseditable, and PRIVATE. |
|
Definition at line 1701 of file mlview-node-editor.c. References PRIVATE. Referenced by mlview_xml_doc_tree_view_set_all_paned_proportions(). |