Back to index

texmacs  1.0.7.15
tm_config.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : tm_config.hpp
00004 * DESCRIPTION: Configuration routines for TeXmacs server
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 TM_CONFIG_H
00013 #define TM_CONFIG_H
00014 #include "server.hpp"
00015 #include "hashmap.hpp"
00016 #include "hashset.hpp"
00017 
00018 class tm_config_rep: virtual public server_rep {
00019 protected:
00020   string var_suffix;                        // space + the variant key
00021   string unvar_suffix;                      // space + the unvariant key
00022   hashmap<string,tree> pre_kbd_wildcards;   // wildcards applied to defns
00023   hashmap<string,tree> post_kbd_wildcards;  // wildcards applied at lookup
00024   hashmap<string,tree> system_kbd_decode;   // for printing of shortcuts
00025 
00026 public:
00027   tm_config_rep ();
00028   ~tm_config_rep ();
00029 
00030   /* Font setup */
00031   void set_font_rules (scheme_tree rules);
00032 
00033   /* Keyboard behaviour */
00034   bool kbd_get_command (string which, string& help, command& cmd);
00035 
00036   void insert_kbd_wildcard (string key, string im, bool post, bool l, bool r);
00037   object find_key_binding (string key);
00038   string kbd_pre_rewrite (string l);
00039   string kbd_post_rewrite (string l, bool var_flag);
00040   tree kbd_system_rewrite (string l);
00041   void set_variant_keys (string var, string unvar);
00042   void variant_simplification (string& which);
00043   void get_keycomb (string& which, int& status,
00044                   command& cmd, string& shorth, string& help);
00045 };
00046 
00047 #endif // defined TM_CONFIG_H