Back to index

texmacs  1.0.7.15
edit_text.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : edit_text.hpp
00004 * DESCRIPTION: Main routines for the manipulation of "ordinary" text
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_TEXT_H
00013 #define EDIT_TEXT_H
00014 #include "editor.hpp"
00015 
00016 class edit_text_rep: virtual public editor_rep {
00017 protected:
00018   void correct_concat (path p, int done=0);
00019   void correct (path p);
00020   bool pure_line (path p);
00021   bool accepts_return (path p);
00022   path prepare_for_insert ();
00023   void get_deletion_point (path& p, int& l, int& r, tree& t, tree& u, bool f);
00024 
00025 public:
00026   edit_text_rep ();
00027   ~edit_text_rep ();
00028 
00029   /********************************* text ************************************/
00030   bool insert_return ();
00031   void remove_return (path p);
00032   void insert_tree (tree t, path p_in_t);
00033   void var_insert_tree (tree t, path p_in_t);
00034   void insert_tree (tree t);
00035   void remove_text (bool forward);
00036   void remove_structure (bool forward);
00037   void remove_structure_upwards ();
00038 
00039   /******************************** format ***********************************/
00040   void make_space (tree t);
00041   void make_space (string w);
00042   void make_space (string w, string y1, string y2);
00043   void make_hspace (string s);
00044   void make_hspace (string smin, string sdef, string smax);
00045   void make_vspace_before (string s);
00046   void make_vspace_before (string smin, string sdef, string smax);
00047   void make_vspace_after (string s);
00048   void make_vspace_after (string smin, string sdef, string smax);
00049   void make_htab (string spc);
00050   void make_image (string file_name, bool link,
00051                  string w, string h, string x, string y);
00052 };
00053 
00054 #endif // defined EDIT_TEXT_H