Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

mlview-editor.h File Reference

The declaration of the MlViewEditor class. More...

#include <gnome.h>
#include <libxml/parser.h>
#include "mlview-node-editor.h"
#include "mlview-file-selection.h"
#include "mlview-app-context.h"
#include "mlview-xml-document.h"
#include "mlview-xml-document-view.h"

Go to the source code of this file.

Data Structures

struct  _MlViewEditor
 The data members of the class MlViewEditor. More...

struct  _MlViewEditorClass

Defines

#define MLVIEW_TYPE_EDITOR   (mlview_editor_get_type ())
#define MLVIEW_EDITOR(widget)   (GTK_CHECK_CAST ((widget), MLVIEW_TYPE_EDITOR, MlViewEditor))
#define MLVIEW_EDITOR_CLASS(klass)   (GTK_CHECK_CLASS_CAST ((klass), MLVIEW_TYPE_EDITOR, MlViewEditorClass))
#define MLVIEW_IS_EDITOR(widget)   (GTK_CHECK_TYPE ((widget), MLVIEW_TYPE_EDITOR))
#define MLVIEW_IS_EDITOR_CLASS(klass)   (GTK_CHECK_CLASS_TYPE ((klass), MLVIEW_TYPE_EDITOR))

Typedefs

typedef _MlViewEditorPrivate MlViewEditorPrivate
typedef _MlViewEditor MlViewEditor
typedef _MlViewEditorClass MlViewEditorClass

Enumerations

enum  MLVIEW_XML_DOC_VIEW_TYPE { MLVIEW_XML_DOC_TREE_VIEW }

Functions

guint mlview_editor_get_type (void)
 the standard type builder of MlViewEditor

GtkWidget * mlview_editor_new (gchar *a_title, MlViewAppContext *a_context)
 Creates and returns a new instance of MlViewEditor.

void mlview_editor_create_new_xml_document (MlViewEditor *a_editor)
 Interactively create a new document.

MlViewXMLDocumentViewmlview_editor_create_new_view_on_document (MlViewEditor *a_editor, MlViewXMLDocument *a_xml_doc, enum MLVIEW_XML_DOC_VIEW_TYPE)
 Creates a new view on an existing document.

MlViewXMLDocumentViewmlview_editor_create_new_view_on_current_document_interactive (MlViewEditor *a_editor)
 Interactively creates a new view on an existing xml document.

void mlview_editor_load_xml_file (MlViewEditor *a_editor, gchar *a_file_path)
 Opens the xml file a_file_path, loads it, build a view to edit it and adds this new view to the editor.

void mlview_editor_open_local_xml_document_interactive (MlViewEditor *editor)
 interactively open/edit a local xml file name.

void mlview_editor_add_xml_document_view (MlViewEditor *a_editor, MlViewXMLDocumentView *a_xml_doc_view)
 Adds a document view to the editor.

void mlview_editor_remove_xml_document_view (MlViewEditor *a_editor, MlViewXMLDocumentView *a_xml_doc_view)
 removes the document view a_xml_doc_view from the editor.

void mlview_editor_set_current_view_name (MlViewEditor *a_editor, gchar *a_name)
 Setter of the name of the currently selected view.

void mlview_editor_set_current_view_name_interactive (MlViewEditor *a_editor)
 Interactively sets the name of the view currently selected in the mlview editor.

void mlview_editor_add_child_node_interactive (MlViewEditor *a_editor)
 Adds a child node to the currently selected node of the currently selected document view.

void mlview_editor_insert_sibling_node_interactive (MlViewEditor *a_editor)
void mlview_editor_insert_prev_sibling_node_interactive (MlViewEditor *a_editor)
 Inserts a node as a previous sibling of the node currently selected in the view currently selected.

void mlview_editor_insert_next_sibling_node_interactive (MlViewEditor *a_editor)
 Insert a node as the next sibling of the node currently selected in the view currently selected.

void mlview_editor_cut_node (MlViewEditor *a_editor)
 Cuts the current selected node and it child subtree.

void mlview_editor_copy_node (MlViewEditor *a_editor)
 Copy the current selected node and it children into the node clipboard.

xmlDocPtr mlview_editor_get_current_xml_doc (MlViewEditor *a_editor)
void mlview_editor_edit_xml_document (MlViewEditor *a_editor, xmlDocPtr a_doc, gchar *a_doc_name)
 Edits the xml document given in argument.

void mlview_editor_save_xml_document (MlViewEditor *a_editor)
 Interactively saves the underlying xml document of the currently selected document view.

void mlview_editor_save_xml_document_as (MlViewEditor *a_editor, gchar *a_file_path)
 Classical "save as" functionnality.

void mlview_editor_save_xml_document_as_interactive (MlViewEditor *a_editor)
 Interactively saves the underlying document of the currently selected view.

gchar * mlview_editor_get_current_xml_doc_file_path (MlViewEditor *a_editor)
 Getter of the file path of the document associated to the currently selected view.

void mlview_editor_close_xml_document_without_saving (MlViewEditor *a_editor)
 closes the current view without saving the underlying document.

void mlview_editor_save_and_close_xml_document (MlViewEditor *a_editor)
 Saves the underlying document of the currently selected view and closes the view.

void mlview_editor_close_xml_document_interactive (MlViewEditor *a_editor)
 Interactively closes the current document view.

void mlview_editor_close_all_xml_documents_interactive (MlViewEditor *a_editor)
 Closes all the views (and their underlying documents).

void mlview_editor_paste_node_as_prev_sibling (MlViewEditor *a_editor)
 Pastes the last copied/cut as the previous sibling node the of current selected node in the current selected view.

void mlview_editor_paste_node_as_child (MlViewEditor *a_editor)
 pastes the last copied node as a child of the current selected node of the current selected view.

void mlview_editor_paste_node_as_next_sibling (MlViewEditor *a_editor)
 Pastes the last copied/paste node as the next sibling node of the current selected node in the current selected view.

void mlview_editor_expand_tree_to_depth_interactive (MlViewEditor *a_editor)
 Interactively expands the tree beneath the current selected node to the depth graphically selected by the user.

GtkCTreeNode * mlview_editor_find_xml_node_that_contains_str_interactive (MlViewEditor *a_editor)
 Interactively Finds and xml node that contains a given string.

void mlview_editor_edit_settings_interactive (MlViewEditor *a_editor)
 Interactively edits the editor settings.

MlViewFileSelectionmlview_editor_get_file_selector (MlViewEditor *a_editor, gchar *a_title)
gint mlview_editor_associate_dtd_interactive (MlViewEditor *a_editor)
 Associates a dtd to the current mlview xml document.

gint mlview_editor_validate (MlViewEditor *a_editor)
 validate the current selected document against the dtd it is associated to.

void mlview_editor_set_app_context (MlViewEditor *a_editor, MlViewAppContext *a_context)
 The setter of the application context associated to the current mlview editor.

MlViewAppContextmlview_editor_get_app_context (MlViewEditor *a_editor)
 The getter of the application context associated to the current mlview editor.


Detailed Description

The declaration of the MlViewEditor class.

Definition in file mlview-editor.h.


Define Documentation

#define MLVIEW_EDITOR widget       (GTK_CHECK_CAST ((widget), MLVIEW_TYPE_EDITOR, MlViewEditor))
 

Definition at line 44 of file mlview-editor.h.

Referenced by mlview_app_new(), and mlview_editor_close_all_xml_documents_interactive().

#define MLVIEW_EDITOR_CLASS klass       (GTK_CHECK_CLASS_CAST ((klass), MLVIEW_TYPE_EDITOR, MlViewEditorClass))
 

Definition at line 45 of file mlview-editor.h.

#define MLVIEW_IS_EDITOR widget       (GTK_CHECK_TYPE ((widget), MLVIEW_TYPE_EDITOR))
 

Definition at line 46 of file mlview-editor.h.

Referenced by mlview_editor_add_child_node_interactive(), mlview_editor_add_xml_document_view(), mlview_editor_associate_dtd_interactive(), mlview_editor_close_xml_document_interactive(), mlview_editor_close_xml_document_without_saving(), mlview_editor_copy_node(), mlview_editor_create_new_view_on_current_document_interactive(), mlview_editor_create_new_view_on_document(), mlview_editor_create_new_xml_document(), mlview_editor_cut_node(), mlview_editor_edit_settings_interactive(), mlview_editor_edit_xml_document(), mlview_editor_expand_tree_to_depth_interactive(), mlview_editor_find_xml_node_that_contains_str_interactive(), mlview_editor_get_app_context(), mlview_editor_get_current_xml_doc_file_path(), mlview_editor_insert_next_sibling_node_interactive(), mlview_editor_insert_prev_sibling_node_interactive(), mlview_editor_load_xml_file(), mlview_editor_open_local_xml_document_interactive(), mlview_editor_paste_node_as_child(), mlview_editor_paste_node_as_next_sibling(), mlview_editor_paste_node_as_prev_sibling(), mlview_editor_remove_xml_document_view(), mlview_editor_save_and_close_xml_document(), mlview_editor_save_xml_document(), mlview_editor_save_xml_document_as(), mlview_editor_save_xml_document_as_interactive(), mlview_editor_set_app_context(), mlview_editor_set_current_view_name(), mlview_editor_set_current_view_name_interactive(), and mlview_editor_validate().

#define MLVIEW_IS_EDITOR_CLASS klass       (GTK_CHECK_CLASS_TYPE ((klass), MLVIEW_TYPE_EDITOR))
 

Definition at line 47 of file mlview-editor.h.

#define MLVIEW_TYPE_EDITOR   (mlview_editor_get_type ())
 

Definition at line 43 of file mlview-editor.h.

Referenced by mlview_editor_new().


Typedef Documentation

typedef struct _MlViewEditor MlViewEditor
 

Definition at line 50 of file mlview-editor.h.

typedef struct _MlViewEditorClass MlViewEditorClass
 

Definition at line 51 of file mlview-editor.h.

typedef struct _MlViewEditorPrivate MlViewEditorPrivate
 

Definition at line 49 of file mlview-editor.h.


Enumeration Type Documentation

enum MLVIEW_XML_DOC_VIEW_TYPE
 

Enumeration values:
MLVIEW_XML_DOC_TREE_VIEW 

Definition at line 53 of file mlview-editor.h.

Referenced by mlview_editor_create_new_view_on_document().


Function Documentation

void mlview_editor_add_child_node_interactive MlViewEditor   a_editor
 

Adds a child node to the currently selected node of the currently selected document view.

It displays a node type picker to let the user choose the type of node he wants.

Parameters:
a_editor  the current mlview editor.

Definition at line 1368 of file mlview-editor.c.

References MLVIEW_IS_EDITOR, mlview_xml_doc_tree_view_add_child_node_interactive(), and PRIVATE.

void mlview_editor_add_xml_document_view MlViewEditor   a_editor,
MlViewXMLDocumentView   a_xml_doc_view
 

Adds a document view to the editor.

If a_xml_doc_view is a new document view, adds a new notebook page to the MlViewEditor notebook. The base name of the document is shown in the notebook page tab. If the underlying document of a_xml_doc_view has the same base name as a document already opened, the notebook page tab string will be "basename<nb>" where 'nb' is the number of docs that have the same name in the editor (like in emacs). If a_xml_doc_view is already loaded in the current instance of MlViewEditor, the old instance of a_xml_doc is destroyed (as well as the notebook page that contains it) and the new instance of a_xml_doc is added to the editor.

Parameters:
a_editor  the current mlview editor.
a_xml_doc_view  the document view to be added to the editor.

Definition at line 927 of file mlview-editor.c.

References mlview_editor_remove_xml_document_view(), mlview_file_descriptor_get_file_path(), MLVIEW_IS_EDITOR, MLVIEW_IS_XML_DOCUMENT_VIEW, mlview_xml_doc_tree_view_set_all_paned_proportions(), mlview_xml_document_view_get_document(), mlview_xml_document_view_get_file_descriptor(), mlview_xml_document_view_set_name(), and PRIVATE.

Referenced by mlview_editor_create_new_view_on_document(), mlview_editor_create_new_xml_document(), mlview_editor_edit_xml_document(), and mlview_editor_load_xml_file().

gint mlview_editor_associate_dtd_interactive MlViewEditor   a_editor
 

Associates a dtd to the current mlview xml document.

Parameters:
a_editor  the current mlview editor.
Returns:
0 if association worked, 1 if not xml document is opened,

Definition at line 1860 of file mlview-editor.c.

References MLVIEW_IS_EDITOR, mlview_xml_document_associate_dtd_interactive(), mlview_xml_document_view_get_document(), and PRIVATE.

void mlview_editor_close_all_xml_documents_interactive MlViewEditor   a_editor
 

Closes all the views (and their underlying documents).

Save the documents if needed before closing the views.

Parameters:
a_editor  the current mlview editor.

Definition at line 1735 of file mlview-editor.c.

References MLVIEW_EDITOR, mlview_editor_close_xml_document_interactive(), and PRIVATE.

void mlview_editor_close_xml_document_interactive MlViewEditor   a_editor
 

Interactively closes the current document view.

Saves the underlying document if needed.

Parameters:
a_editor  the current mlview editor.

Definition at line 1767 of file mlview-editor.c.

References mlview_app_context_set_window_icon(), mlview_editor_close_xml_document_without_saving(), mlview_editor_save_and_close_xml_document(), MLVIEW_IS_EDITOR, mlview_xml_document_needs_saving(), mlview_xml_document_view_get_document(), and PRIVATE.

Referenced by mlview_editor_close_all_xml_documents_interactive().

void mlview_editor_close_xml_document_without_saving MlViewEditor   a_editor
 

closes the current view without saving the underlying document.

Parameters:
a_editor  the current mlview editor.

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

References mlview_editor_remove_xml_document_view(), MLVIEW_IS_EDITOR, and PRIVATE.

Referenced by mlview_editor_close_xml_document_interactive(), and mlview_editor_save_and_close_xml_document().

void mlview_editor_copy_node MlViewEditor   a_editor
 

Copy the current selected node and it children into the node clipboard.

Parameters:
a_editor  the current mlview editor.

Definition at line 1440 of file mlview-editor.c.

References MLVIEW_IS_EDITOR, mlview_xml_doc_tree_view_copy_node(), and PRIVATE.

MlViewXMLDocumentView* mlview_editor_create_new_view_on_current_document_interactive MlViewEditor   a_editor
 

Interactively creates a new view on an existing xml document.

The view will be created if and only if an non empty document is currently selected in the editor.

Parameters:
a_editor  the current mlview editor.
Returns:
the newly created view or NULL if it could not be created.

Definition at line 847 of file mlview-editor.c.

References mlview_editor_create_new_view_on_document(), MLVIEW_IS_EDITOR, mlview_xml_document_view_get_document(), and PRIVATE.

MlViewXMLDocumentView* mlview_editor_create_new_view_on_document MlViewEditor   a_editor,
MlViewXMLDocument   a_xml_doc,
enum MLVIEW_XML_DOC_VIEW_TYPE    a_view_type
 

Creates a new view on an existing document.

Parameters:
a_editor  the current mlview editor.
a_xml_doc  the xml document on which the new view must be created.
a_view_type  the type of view.

Definition at line 809 of file mlview-editor.c.

References mlview_editor_add_xml_document_view(), MLVIEW_IS_EDITOR, MLVIEW_IS_XML_DOCUMENT, MLVIEW_XML_DOC_VIEW_TYPE, MLVIEW_XML_DOCUMENT_VIEW, and PRIVATE.

Referenced by mlview_editor_create_new_view_on_current_document_interactive().

void mlview_editor_create_new_xml_document MlViewEditor   a_editor
 

Interactively create a new document.

Asks the user for info like root element, dtd (if validation is switched on) ...etc.

Parameters:
a_editor  the current mlview editor.

Definition at line 1243 of file mlview-editor.c.

References mlview_app_context_get_settings_value(), mlview_app_context_set_window_icon(), mlview_editor_add_xml_document_view(), MLVIEW_IS_EDITOR, mlview_xml_document_add_child_node(), mlview_xml_document_associate_dtd_interactive(), mlview_xml_document_new(), MLVIEW_XML_DOCUMENT_VIEW, PRIVATE, and utils_is_white_string().

void mlview_editor_cut_node MlViewEditor   a_editor
 

Cuts the current selected node and it child subtree.

The cut tree is put in the node clipboard.

Parameters:
a_editor  the current mlview editor.

Definition at line 1422 of file mlview-editor.c.

References MLVIEW_IS_EDITOR, mlview_xml_doc_tree_view_cut_node(), and PRIVATE.

void mlview_editor_edit_settings_interactive MlViewEditor   a_editor
 

Interactively edits the editor settings.

Parameters:
a_editor  the current mlview editor.

Definition at line 1842 of file mlview-editor.c.

References MLVIEW_IS_EDITOR, mlview_settings_manager_edit_settings_interactive(), and PRIVATE.

void mlview_editor_edit_xml_document MlViewEditor   a_editor,
xmlDocPtr    a_doc,
gchar *    a_doc_name
 

Edits the xml document given in argument.

Actually, this method creates a view on this document and adds the view to the editor.

Parameters:
a_editor  the current mlview editor.
a_doc  the xml document to edit. This is an object of the libxml2
a_doc_name  the name of the xml document to edit.

Definition at line 1338 of file mlview-editor.c.

References mlview_editor_add_xml_document_view(), MLVIEW_IS_EDITOR, mlview_xml_document_new(), MLVIEW_XML_DOCUMENT_VIEW, and PRIVATE.

void mlview_editor_expand_tree_to_depth_interactive MlViewEditor   a_editor
 

Interactively expands the tree beneath the current selected node to the depth graphically selected by the user.

Parameters:
a_editor  the current mlview editor.

Definition at line 1509 of file mlview-editor.c.

References MLVIEW_IS_EDITOR, MLVIEW_IS_XML_DOC_TREE_VIEW, mlview_xml_doc_tree_view_expand_tree_to_depth_interactive(), and PRIVATE.

GtkCTreeNode* mlview_editor_find_xml_node_that_contains_str_interactive MlViewEditor   a_editor
 

Interactively Finds and xml node that contains a given string.

Parameters:
a_editor  the current mlview editor.
Returns:
the visual node where the xml node has been found or NULL if no node matching the criteria have been found.
Parameters:
a_editor  the current mlview editor.

Definition at line 1825 of file mlview-editor.c.

References MLVIEW_IS_EDITOR, mlview_xml_doc_tree_view_find_xml_node_that_contains_str_interactive(), and PRIVATE.

MlViewAppContext* mlview_editor_get_app_context MlViewEditor   a_editor
 

The getter of the application context associated to the current mlview editor.

Parameters:
a_editor  the current instance of MlViewEditor.
Returns:
the application context associated to the editor.

Definition at line 690 of file mlview-editor.c.

References MLVIEW_IS_EDITOR, and PRIVATE.

xmlDocPtr mlview_editor_get_current_xml_doc MlViewEditor   a_editor
 

gchar* mlview_editor_get_current_xml_doc_file_path MlViewEditor   a_editor
 

Getter of the file path of the document associated to the currently selected view.

Parameters:
a_editor  the current mlview editor.

Definition at line 1530 of file mlview-editor.c.

References MLVIEW_IS_EDITOR, mlview_xml_document_get_file_path(), mlview_xml_document_view_get_document(), and PRIVATE.

Referenced by mlview_editor_save_xml_document().

MlViewFileSelection* mlview_editor_get_file_selector MlViewEditor   a_editor,
gchar *    a_title
 

guint mlview_editor_get_type void   
 

the standard type builder of MlViewEditor

Returns:
the type id of MlViewEditor.

Definition at line 602 of file mlview-editor.c.

void mlview_editor_insert_next_sibling_node_interactive MlViewEditor   a_editor
 

Insert a node as the next sibling of the node currently selected in the view currently selected.

Parameters:
a_editor  the current mlview editor.

Definition at line 1404 of file mlview-editor.c.

References MLVIEW_IS_EDITOR, mlview_xml_doc_tree_view_insert_next_sibling_node_interactive(), and PRIVATE.

void mlview_editor_insert_prev_sibling_node_interactive MlViewEditor   a_editor
 

Inserts a node as a previous sibling of the node currently selected in the view currently selected.

Parameters:
a_editor  the current mlview editor.

Definition at line 1386 of file mlview-editor.c.

References MLVIEW_IS_EDITOR, mlview_xml_doc_tree_view_insert_prev_sibling_node_interactive(), and PRIVATE.

void mlview_editor_insert_sibling_node_interactive MlViewEditor   a_editor
 

void mlview_editor_load_xml_file MlViewEditor   a_editor,
gchar *    a_file_path
 

Opens the xml file a_file_path, loads it, build a view to edit it and adds this new view to the editor.

Parameters:
a_editor  the current instance of MlViewEditor.
a_file_path  the path of the file to open.

Definition at line 708 of file mlview-editor.c.

References mlview_app_context_sbar_pop_message(), mlview_app_context_sbar_push_message(), mlview_editor_add_xml_document_view(), MLVIEW_IS_EDITOR, mlview_xml_document_open(), MLVIEW_XML_DOCUMENT_VIEW, and PRIVATE.

Referenced by main(), and mlview_editor_open_local_xml_document_interactive().

GtkWidget* mlview_editor_new gchar *    a_title,
MlViewAppContext   a_context
 

Creates and returns a new instance of MlViewEditor.

Parameters:
a_title  the title of the editor (not used yet).
a_context  the current instance of MlViewApplicationContext.

Definition at line 629 of file mlview-editor.c.

References mlview_app_context_get_element(), mlview_settings_builder_build_settings(), mlview_settings_builder_get_settings_manager(), mlview_settings_builder_new(), MLVIEW_TYPE_EDITOR, and PRIVATE.

Referenced by mlview_app_new().

void mlview_editor_open_local_xml_document_interactive MlViewEditor   a_editor
 

interactively open/edit a local xml file name.

Parameters:
a_editor  the current mlview editor.

Definition at line 762 of file mlview-editor.c.

References CANCEL_BUTTON, mlview_app_context_get_file_selector(), mlview_app_context_sbar_pop_message(), mlview_app_context_sbar_push_message(), mlview_app_context_set_window_icon(), mlview_editor_load_xml_file(), MLVIEW_FILE_SELECTION, mlview_file_selection_run(), MLVIEW_IS_EDITOR, MLVIEW_SELECTED_BUTTON, OK_BUTTON, PRIVATE, and WINDOW_CLOSED.

void mlview_editor_paste_node_as_child MlViewEditor   a_editor
 

pastes the last copied node as a child of the current selected node of the current selected view.

Parameters:
a_editor  the current mlview editor.

Definition at line 1459 of file mlview-editor.c.

References MLVIEW_IS_EDITOR, mlview_xml_doc_tree_view_paste_node_as_child(), and PRIVATE.

void mlview_editor_paste_node_as_next_sibling MlViewEditor   a_editor
 

Pastes the last copied/paste node as the next sibling node of the current selected node in the current selected view.

Parameters:
a_editor  the current mlview editor.

Definition at line 1492 of file mlview-editor.c.

References MLVIEW_IS_EDITOR, mlview_xml_doc_tree_view_paste_node_as_next_sibling(), and PRIVATE.

void mlview_editor_paste_node_as_prev_sibling MlViewEditor   a_editor
 

Pastes the last copied/cut as the previous sibling node the of current selected node in the current selected view.

Parameters:
a_editor  the mlview editor.

Definition at line 1475 of file mlview-editor.c.

References MLVIEW_IS_EDITOR, mlview_xml_doc_tree_view_paste_node_as_prev_sibling(), and PRIVATE.

void mlview_editor_remove_xml_document_view MlViewEditor   a_editor,
MlViewXMLDocumentView   a_xml_doc_view
 

removes the document view a_xml_doc_view from the editor.

This method does not save the document.

Parameters:
a_editor  the current mlview editor.
a_xml_doc_view  the document view to remove from the editor.

Definition at line 1129 of file mlview-editor.c.

References mlview_file_descriptor_get_file_path(), MLVIEW_IS_EDITOR, MLVIEW_IS_XML_DOCUMENT_VIEW, mlview_xml_document_view_get_document(), mlview_xml_document_view_get_file_descriptor(), and PRIVATE.

Referenced by mlview_editor_add_xml_document_view(), and mlview_editor_close_xml_document_without_saving().

void mlview_editor_save_and_close_xml_document MlViewEditor   a_editor
 

Saves the underlying document of the currently selected view and closes the view.

Parameters:
a_editor  the current mlview editor.

Definition at line 1689 of file mlview-editor.c.

References CANCEL_BUTTON, mlview_app_context_get_file_selector(), mlview_app_context_set_window_icon(), mlview_editor_close_xml_document_without_saving(), mlview_file_selection_run(), MLVIEW_IS_EDITOR, MLVIEW_SELECTED_BUTTON, mlview_xml_document_save_as(), mlview_xml_document_view_get_document(), OK_BUTTON, PRIVATE, and WINDOW_CLOSED.

Referenced by mlview_editor_close_xml_document_interactive().

void mlview_editor_save_xml_document MlViewEditor   a_editor
 

Interactively saves the underlying xml document of the currently selected document view.

If the document has an associated file name, save it in that file or else, asks the user where to save it.

Parameters:
a_editor  the current mlview editor.

Definition at line 1554 of file mlview-editor.c.

References mlview_editor_get_current_xml_doc_file_path(), mlview_editor_save_xml_document_as_interactive(), MLVIEW_IS_EDITOR, mlview_xml_document_save(), mlview_xml_document_view_get_document(), and PRIVATE.

void mlview_editor_save_xml_document_as MlViewEditor   a_editor,
gchar *    a_file_path
 

Classical "save as" functionnality.

Saves the underlying document of the currently selected view into the file denoted by the file path a_file_path.

Parameters:
a_editor  the current mlview editor.
a_file_path  file path where to save the document.

Definition at line 1586 of file mlview-editor.c.

References mlview_app_context_sbar_pop_message(), mlview_app_context_sbar_push_message(), MLVIEW_IS_EDITOR, mlview_xml_document_save_as(), mlview_xml_document_view_get_document(), mlview_xml_document_view_get_file_descriptor(), mlview_xml_document_view_set_name(), and PRIVATE.

Referenced by mlview_editor_save_xml_document_as_interactive().

void mlview_editor_save_xml_document_as_interactive MlViewEditor   a_editor
 

Interactively saves the underlying document of the currently selected view.

Graphically asks the user where to save the document and saves it.

Parameters:
a_editor  the current mlview editor.

Definition at line 1633 of file mlview-editor.c.

References CANCEL_BUTTON, mlview_app_context_get_file_selector(), mlview_app_context_set_window_icon(), mlview_editor_save_xml_document_as(), mlview_file_selection_run(), MLVIEW_IS_EDITOR, MLVIEW_SELECTED_BUTTON, OK_BUTTON, PRIVATE, and WINDOW_CLOSED.

Referenced by mlview_editor_save_xml_document().

void mlview_editor_set_app_context MlViewEditor   a_editor,
MlViewAppContext   a_context
 

The setter of the application context associated to the current mlview editor.

Parameters:
a_editor  the current instance of MlViewEditor.
a_context  the new application context.

Definition at line 669 of file mlview-editor.c.

References MLVIEW_IS_APP_CONTEXT, MLVIEW_IS_EDITOR, and PRIVATE.

Referenced by mlview_app_new().

void mlview_editor_set_current_view_name MlViewEditor   a_editor,
gchar *    a_name
 

Setter of the name of the currently selected view.

Parameters:
a_editor  the current mlview editor.
a_name  the new name of the view.

Definition at line 875 of file mlview-editor.c.

References MLVIEW_IS_EDITOR, mlview_xml_document_view_set_name(), and PRIVATE.

void mlview_editor_set_current_view_name_interactive MlViewEditor   a_editor
 

Interactively sets the name of the view currently selected in the mlview editor.

Parameters:
a_editor  the current mlview editor.

Definition at line 897 of file mlview-editor.c.

References MLVIEW_IS_EDITOR, mlview_xml_document_view_set_name_interactive(), and PRIVATE.

gint mlview_editor_validate MlViewEditor   a_editor
 

validate the current selected document against the dtd it is associated to.

If there is no dtd associated to the document, the functions asks the user to associate a dtd to it and then, does the validation

Parameters:
a_editor  the current mlview editor.

Definition at line 1888 of file mlview-editor.c.

References MLVIEW_IS_EDITOR, mlview_xml_document_validate(), mlview_xml_document_view_get_document(), and PRIVATE.


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