1 2 /****************************************************************************** 3 * MODULE : tm_config.hpp 4 * DESCRIPTION: Configuration routines for TeXmacs server 5 * COPYRIGHT : (C) 1999 Joris van der Hoeven 6 ******************************************************************************* 7 * This software falls under the GNU general public license version 3 or later. 8 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE 9 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>. 10 ******************************************************************************/ 11 12 #ifndef TM_CONFIG_H 13 #define TM_CONFIG_H 14 #include "server.hpp" 15 #include "hashmap.hpp" 16 #include "hashset.hpp" 17 18 class tm_config_rep: virtual public server_rep { 19 protected: 20 string var_suffix; // space + the variant key 21 string unvar_suffix; // space + the unvariant key 22 hashmap<string,tree> pre_kbd_wildcards; // wildcards applied to defns 23 hashmap<string,tree> post_kbd_wildcards; // wildcards applied at lookup 24 hashmap<string,tree> system_kbd_decode; // for printing of shortcuts 25 26 public: 27 tm_config_rep (); 28 ~tm_config_rep (); 29 30 /* Font setup */ 31 void set_font_rules (scheme_tree rules); 32 33 /* Keyboard behaviour */ 34 bool kbd_get_command (string which, string& help, command& cmd); 35 36 void insert_kbd_wildcard (string key, string im, bool post, bool l, bool r); 37 object find_key_binding (string key); 38 string kbd_pre_rewrite (string l); 39 string kbd_post_rewrite (string l, bool var_flag); 40 tree kbd_system_rewrite (string l); 41 void set_variant_keys (string var, string unvar); 42 void variant_simplification (string& which); 43 void get_keycomb (string& which, int& status, 44 command& cmd, string& shorth, string& help); 45 }; 46 47 #endif // defined TM_CONFIG_H 48