Back to index

texmacs  1.0.7.15
edit_modify.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : edit_modify.hpp
00004 * DESCRIPTION: Main routines for the modification of the edit tree
00005 * COPYRIGHT  : (C) 1999  Joris van der Hoeven
00006 *******************************************************************************
00007 * This software falls under the GNU general public license version 3 or later.
00008 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
00009 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
00010 ******************************************************************************/
00011 
00012 #ifndef EDIT_MODIFY_H
00013 #define EDIT_MODIFY_H
00014 #include "editor.hpp"
00015 #include "archiver.hpp"
00016 
00017 path inner_paragraph (tree t, path p);
00018 
00019 class edit_modify_rep: virtual public editor_rep {
00020 protected:
00021   observer cur_pos;  // tree_position corresponding to tp
00022   double   author;   // the author identifier associated to this view
00023   archiver arch;     // archiver attached to the editor
00024 
00025 public:
00026   edit_modify_rep ();
00027   ~edit_modify_rep ();
00028   double this_author ();
00029 
00030   void notify_assign      (path p, tree u);
00031   void notify_insert      (path p, tree u);
00032   void notify_remove      (path p, int nr);
00033   void notify_split       (path p);
00034   void notify_join        (path p);
00035   void notify_assign_node (path p, tree_label op);
00036   void notify_insert_node (path p, tree t);
00037   void notify_remove_node (path p);
00038   void notify_set_cursor  (path p, tree data);
00039   void post_notify        (path p);
00040 
00041   void clear_undo_history ();
00042   void archive_state ();
00043   void start_editing ();
00044   void end_editing ();
00045   void start_slave (double a);
00046   void mark_start (double a);
00047   bool mark_cancel (double a);
00048   void mark_end (double a);
00049   void add_undo_mark ();
00050   void remove_undo_mark ();
00051   int  undo_possibilities ();
00052   void undo (bool redoable);
00053   void unredoable_undo ();
00054   void undo (int i);
00055   int  redo_possibilities ();
00056   void redo (int i);
00057   void require_save ();
00058   void notify_save (bool real_save= true);
00059   bool need_save (bool real_save= true);
00060   void show_history ();
00061 
00062   observer position_new (path p);
00063   void position_delete (observer o);
00064   void position_set (observer o, path p);
00065   path position_get (observer o);
00066 };
00067 
00068 #endif // defined EDIT_MODIFY_H