Back to index

texmacs  1.0.7.15
edit_main.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : edit_main.hpp
00004 * DESCRIPTION: the main structure for the mathematical editor
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_MAIN_H
00013 #define EDIT_MAIN_H
00014 #include "Interface/edit_interface.hpp"
00015 #include "Interface/edit_cursor.hpp"
00016 #include "Interface/edit_graphics.hpp"
00017 #include "Editor/edit_typeset.hpp"
00018 #include "Modify/edit_modify.hpp"
00019 #include "Modify/edit_text.hpp"
00020 #include "Modify/edit_math.hpp"
00021 #include "Modify/edit_table.hpp"
00022 #include "Modify/edit_dynamic.hpp"
00023 #include "Process/edit_process.hpp"
00024 #include "Replace/edit_select.hpp"
00025 #include "Replace/edit_replace.hpp"
00026 
00027 class edit_main_rep:
00028   public edit_interface_rep,
00029   public edit_cursor_rep,
00030   public edit_graphics_rep,
00031   public edit_typeset_rep,
00032   public edit_modify_rep,
00033   public edit_text_rep,
00034   public edit_math_rep,
00035   public edit_table_rep,
00036   public edit_dynamic_rep,
00037   public edit_process_rep,
00038   public edit_select_rep,
00039   public edit_replace_rep
00040 {
00041 private:
00042   hashmap<tree,tree> props;   // properties associated to the editor
00043   observer           ed_obs;  // edit observer attached to root of tree
00044 
00045 public:
00046   edit_main_rep (server_rep* sv, tm_buffer buf);
00047   ~edit_main_rep ();
00048 
00049   void set_property (scheme_tree what, scheme_tree val);
00050   void set_bool_property (string what, bool val);
00051   void set_int_property (string what, int val);
00052   void set_string_property (string what, string val);
00053   scheme_tree get_property (scheme_tree what);
00054   bool get_bool_property (string what);
00055   int get_int_property (string what);
00056   string get_string_property (string what);
00057   
00058   void clear_buffer ();
00059   void new_window ();
00060   void clone_window ();
00061   void tex_buffer ();
00062   url  get_name ();
00063   void focus_on_this_editor ();
00064   void notify_page_change ();
00065 
00066   void print (url ps_name, bool to_file, int first, int last);
00067   void print_to_file (url ps_name, string first="1", string last="1000000");
00068   void print_buffer (string first="1", string last="1000000");
00069   void export_ps (url ps_name, string first="1", string last="1000000");
00070   array<int> print_snippet (url u, tree t);
00071 
00072   void footer_eval (string s);
00073   tree the_line ();
00074   tree the_root ();
00075   tree the_buffer ();
00076   tree the_subtree (path p);
00077   path the_buffer_path ();
00078   path the_path ();
00079   path the_shifted_path ();
00080 
00081   void show_tree ();
00082   void show_env ();
00083   void show_path ();
00084   void show_cursor ();
00085   void show_selection ();
00086   void show_meminfo ();
00087   void edit_special ();
00088   void edit_test ();
00089 
00090   friend class editor;
00091 };
00092 
00093 #endif // defined EDIT_MAIN_H