Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

mlview-editor.h

Go to the documentation of this file.
00001 /*This file is part of GNU MlView
00002  *
00003  *GNU MlView is free software; you can redistribute it and/or modify it under the terms of 
00004  *the GNU General Public License as published by the Free Software Foundation; either version 2, 
00005  *or (at your option) any later version.
00006  *
00007  *GNU MlView is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
00008  *without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00009  *See the GNU General Public License for more details.
00010  *
00011  *You should have received a copy of the GNU General Public License along with MlView; 
00012  *see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00013  *
00014  *
00015  *Copyright 2001-2002 Dodji Seketeli.
00016  */
00017 
00018 #ifndef __MLVIEW_EDITOR_H__
00019 #define __MLVIEW_EDITOR_H__
00020 
00021 #include <gnome.h>
00022 #include <libxml/parser.h>
00023 
00024 #include "mlview-node-editor.h"
00025 #include "mlview-file-selection.h"
00026 #include "mlview-app-context.h"
00027 #include "mlview-xml-document.h"
00028 #include "mlview-xml-document-view.h"
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif /*__cpluscplus*/
00033   
00040         /*Macros for casting a GtkWidget or GtkWidgetClass pointer to a MlViewEditor or MlviewClass pointer.
00041          *Macros for testing wheter 'widget' or 'klass' are of type MLVIEW_TYPE_EDITOR.
00042          */
00043 #define MLVIEW_TYPE_EDITOR (mlview_editor_get_type ())
00044 #define MLVIEW_EDITOR(widget) (GTK_CHECK_CAST ((widget), MLVIEW_TYPE_EDITOR, MlViewEditor))
00045 #define MLVIEW_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), MLVIEW_TYPE_EDITOR, MlViewEditorClass))
00046 #define MLVIEW_IS_EDITOR(widget) (GTK_CHECK_TYPE ((widget), MLVIEW_TYPE_EDITOR))
00047 #define MLVIEW_IS_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), MLVIEW_TYPE_EDITOR))
00048         
00049         typedef struct _MlViewEditorPrivate MlViewEditorPrivate ;
00050         typedef struct _MlViewEditor MlViewEditor ;
00051         typedef struct _MlViewEditorClass MlViewEditorClass  ;
00052         
00053         enum MLVIEW_XML_DOC_VIEW_TYPE {
00054                 MLVIEW_XML_DOC_TREE_VIEW
00055         } ;
00056 
00065         struct _MlViewEditor
00066         {
00067                 GtkVBox box ;
00068                 MlViewEditorPrivate * private ;
00069         };
00070 
00071         struct _MlViewEditorClass
00072         {
00073                 GtkVBoxClass parent_class ;             
00074                 /*signal default handlers*/
00075                 void (*document_changed)(MlViewEditor* editor, gpointer data);
00076         };
00077 
00078 
00079         guint 
00080         mlview_editor_get_type (void);
00081 
00082         GtkWidget *
00083         mlview_editor_new (gchar *a_title, MlViewAppContext *a_context) ;
00084 
00085         void 
00086         mlview_editor_create_new_xml_document (MlViewEditor * a_editor) ;
00087 
00088         MlViewXMLDocumentView *
00089         mlview_editor_create_new_view_on_document (MlViewEditor *a_editor, 
00090                                                    MlViewXMLDocument *a_xml_doc,
00091                                                    enum MLVIEW_XML_DOC_VIEW_TYPE) ;
00092 
00093         MlViewXMLDocumentView *
00094         mlview_editor_create_new_view_on_current_document_interactive (MlViewEditor *a_editor) ;
00095 
00096         void 
00097         mlview_editor_load_xml_file (MlViewEditor *a_editor, 
00098                                      gchar * a_file_path) ;
00099 
00100         void 
00101         mlview_editor_open_local_xml_document_interactive (MlViewEditor * editor)  ;
00102 
00103         void 
00104         mlview_editor_add_xml_document_view (MlViewEditor * a_editor, 
00105                                              MlViewXMLDocumentView * a_xml_doc_view) ;
00106 
00107         void 
00108         mlview_editor_remove_xml_document_view (MlViewEditor * a_editor, 
00109                                                 MlViewXMLDocumentView * a_xml_doc_view) ;
00110 
00111         void
00112         mlview_editor_set_current_view_name (MlViewEditor *a_editor, 
00113                                              gchar * a_name) ;
00114 
00115         void
00116         mlview_editor_set_current_view_name_interactive (MlViewEditor *a_editor) ;
00117 
00118         void
00119         mlview_editor_add_child_node_interactive (MlViewEditor *a_editor) ;
00120 
00121         void 
00122         mlview_editor_insert_sibling_node_interactive (MlViewEditor *a_editor) ;
00123 
00124         void 
00125         mlview_editor_insert_prev_sibling_node_interactive (MlViewEditor *a_editor) ;
00126 
00127         void
00128         mlview_editor_insert_next_sibling_node_interactive (MlViewEditor *a_editor) ;
00129 
00130         void 
00131         mlview_editor_cut_node (MlViewEditor *a_editor) ;
00132 
00133         void 
00134         mlview_editor_copy_node (MlViewEditor *a_editor) ;
00135 
00136         xmlDocPtr 
00137         mlview_editor_get_current_xml_doc (MlViewEditor *a_editor) ;
00138 
00139         void 
00140         mlview_editor_edit_xml_document (MlViewEditor *a_editor, 
00141                                          xmlDocPtr a_doc, gchar * a_doc_name) ;
00142 
00143         void
00144         mlview_editor_save_xml_document (MlViewEditor *a_editor) ;      
00145 
00146         void 
00147         mlview_editor_save_xml_document_as (MlViewEditor *a_editor, 
00148                                             gchar *a_file_path) ;
00149 
00150         void 
00151         mlview_editor_save_xml_document_as_interactive (MlViewEditor *a_editor) ;
00152 
00153         gchar *
00154         mlview_editor_get_current_xml_doc_file_path (MlViewEditor *a_editor) ;
00155 
00156         void 
00157         mlview_editor_close_xml_document_without_saving (MlViewEditor * a_editor) ;
00158 
00159         void 
00160         mlview_editor_save_and_close_xml_document (MlViewEditor *a_editor) ;
00161 
00162         void 
00163         mlview_editor_create_new_xml_document (MlViewEditor *a_editor) ;
00164 
00165         void 
00166         mlview_editor_close_xml_document_interactive (MlViewEditor * a_editor) ;
00167 
00168         void
00169         mlview_editor_close_all_xml_documents_interactive (MlViewEditor *a_editor) ;
00170 
00171         void 
00172         mlview_editor_paste_node_as_prev_sibling (MlViewEditor *a_editor) ;
00173 
00174         void 
00175         mlview_editor_paste_node_as_child (MlViewEditor *a_editor) ;
00176 
00177         void 
00178         mlview_editor_paste_node_as_next_sibling (MlViewEditor *a_editor) ;
00179 
00180         void 
00181         mlview_editor_expand_tree_to_depth_interactive (MlViewEditor *a_editor) ;
00182 
00183         GtkCTreeNode * 
00184         mlview_editor_find_xml_node_that_contains_str_interactive (MlViewEditor *a_editor) ;
00185 
00186         void 
00187         mlview_editor_edit_settings_interactive (MlViewEditor *a_editor) ;
00188 
00189         MlViewFileSelection *
00190         mlview_editor_get_file_selector (MlViewEditor * a_editor,
00191                                          gchar * a_title) ;
00192         gint 
00193         mlview_editor_associate_dtd_interactive (MlViewEditor * a_editor) ;
00194 
00195         gint 
00196         mlview_editor_validate (MlViewEditor * a_editor) ;
00197         
00198         void 
00199         mlview_editor_set_app_context (MlViewEditor * a_editor, 
00200                                        MlViewAppContext *a_context) ;
00201 
00202         MlViewAppContext * 
00203         mlview_editor_get_app_context (MlViewEditor *a_editor) ;
00204 
00205 #ifdef __cplusplus
00206 }
00207 
00208 #endif /*__cplusplus*/
00209 #endif /*__MLVIEW_EDITOR_H__*/

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