00001 00002 /****************************************************************************** 00003 * MODULE : interactive.hpp 00004 * DESCRIPTION: Main routines for interactive mode 00005 * COPYRIGHT : (C) 2010 Gregoire Lecerf 00006 ******************************************************************************* 00007 * This software falls under the GNU general public license and comes WITHOUT 00008 * ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for more details. 00009 * If you don't have this file, write to the Free Software Foundation, Inc., 00010 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00011 ******************************************************************************/ 00012 00013 #ifndef __MMX__INTERACTIVE__HPP 00014 #define __MMX__INTERACTIVE__HPP 00015 #include <basix/system.hpp> 00016 #include <basix/string.hpp> 00017 #include <basix/vector.hpp> 00018 #include <basix/table.hpp> 00019 00020 namespace mmx { 00021 extern bool script_mode; 00022 extern bool quiet_mode; 00023 extern bool debug_mode; 00024 extern bool type_mode; 00025 extern bool time_mode; 00026 extern bool texmacs_mode; 00027 extern nat history_size; 00028 00029 extern bool completion_mode; 00030 extern bool batch_mode; 00031 00032 extern list<string> identifiers_for_completion; 00033 extern table<generic,generic> strings_for_completion; 00034 00035 // Classical text terminal 00036 bool shell_terminal_input (string& in); 00037 00038 // Texmacs interface 00039 extern string shell_mmx_prompt; 00040 void shell_texmacs_initialize (void); 00041 bool shell_texmacs_input (string& in); 00042 void shell_texmacs_output (const generic& g, const generic& t); 00043 00044 // History 00045 void shell_save_history (); 00046 void shell_load_history (); 00047 00048 // Session 00049 void shell_save_session (); 00050 vector<string> shell_load_session (); 00051 00052 // Determine if in batch mode or not 00053 void batch_mode_initialize (); 00054 00055 } // namespace mmx 00056 #endif // __MMX__INTERACTIVE__HPP