Back to index

texmacs  1.0.7.15
Public Member Functions | Public Attributes | Protected Attributes
tm_config_rep Class Reference

#include <tm_config.hpp>

Inheritance diagram for tm_config_rep:
Inheritance graph
[legend]
Collaboration diagram for tm_config_rep:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 tm_config_rep ()
 ~tm_config_rep ()
void set_font_rules (scheme_tree rules)
bool kbd_get_command (string which, string &help, command &cmd)
void insert_kbd_wildcard (string key, string im, bool post, bool l, bool r)
object find_key_binding (string key)
string kbd_pre_rewrite (string l)
string kbd_post_rewrite (string l, bool var_flag)
tree kbd_system_rewrite (string l)
void set_variant_keys (string var, string unvar)
void variant_simplification (string &which)
void get_keycomb (string &which, int &status, command &cmd, string &shorth, string &help)
virtual server_repget_server ()=0
virtual bool has_view ()=0
virtual bool has_window ()=0
virtual tm_view get_view (bool must_be_valid=true)=0
virtual void set_view (tm_view vw)=0
virtual tm_buffer get_buffer ()=0
virtual editor get_editor ()=0
virtual tm_window get_window ()=0
virtual int get_nr_windows ()=0
virtual int get_window_id ()=0
virtual void set_window_property (scheme_tree what, scheme_tree val)=0
virtual void set_bool_window_property (string what, bool val)=0
virtual void set_int_window_property (string what, int val)=0
virtual void set_string_window_property (string what, string val)=0
virtual scheme_tree get_window_property (scheme_tree what)=0
virtual bool get_bool_window_property (string what)=0
virtual int get_int_window_property (string what)=0
virtual string get_string_window_property (string what)=0
virtual void show_header (bool flag)=0
virtual void show_icon_bar (int which, bool flag)=0
virtual void show_side_tools (int which, bool flag)=0
virtual bool visible_header ()=0
virtual bool visible_icon_bar (int which)=0
virtual bool visible_side_tools (int which)=0
virtual void menu_widget (string menu, widget &w)=0
virtual void menu_main (string menu)=0
virtual void menu_icons (int which, string menu)=0
virtual void side_tools (int which, string menu)=0
virtual void set_shrinking_factor (int sf)=0
virtual int get_shrinking_factor ()=0
virtual void set_scrollbars (int sb)=0
virtual void get_visible (SI &x1, SI &y1, SI &x2, SI &y2)=0
virtual void scroll_where (SI &x, SI &y)=0
virtual void scroll_to (SI x, SI y)=0
virtual void set_extents (SI x1, SI y1, SI x2, SI y2)=0
virtual void get_extents (SI &x1, SI &y1, SI &x2, SI &y2)=0
virtual void full_screen_mode (bool on, bool edit)=0
virtual bool in_full_screen_mode ()=0
virtual bool in_full_screen_edit_mode ()=0
virtual void show_footer (bool flag)=0
virtual bool visible_footer ()=0
virtual void set_left_footer (string s)=0
virtual void set_right_footer (string s)=0
virtual void set_message (tree left, tree right, bool temp=false)=0
virtual void recall_message ()=0
virtual void dialogue_start (string name, widget wid)=0
virtual void dialogue_inquire (int i, string &arg)=0
virtual void dialogue_end ()=0
virtual void choose_file (object fun, string title, string type)=0
virtual void interactive (object fun, scheme_tree p)=0
virtual void style_clear_cache ()=0
virtual void refresh ()=0
virtual void interpose_handler ()=0
virtual void wait_handler (string message, string arg)=0
virtual void set_script_status (int i)=0
virtual void focus_on_editor (editor ed)=0
virtual void set_printing_command (string s)=0
virtual void set_printer_page_type (string s)=0
virtual string get_printer_page_type ()=0
virtual void set_printer_dpi (string dpi)=0
virtual void set_default_shrinking_factor (int sf)=0
virtual int get_default_shrinking_factor ()=0
virtual void image_gc (string which="*")=0
virtual void inclusions_gc (string which="*")=0
virtual void typeset_update (path p)=0
virtual void typeset_update_all ()=0
virtual bool is_yes (string s)=0
virtual void quit ()=0
virtual void shell (string s)=0

Public Attributes

int ref_count

Protected Attributes

string var_suffix
string unvar_suffix
hashmap< string, treepre_kbd_wildcards
hashmap< string, treepost_kbd_wildcards
hashmap< string, treesystem_kbd_decode

Detailed Description

Definition at line 18 of file tm_config.hpp.


Constructor & Destructor Documentation

Definition at line 19 of file tm_config.cpp.

                             :
  var_suffix (" tab"), unvar_suffix (" S-tab") {}

Definition at line 22 of file tm_config.cpp.

{}

Member Function Documentation

virtual void server_rep::choose_file ( object  fun,
string  title,
string  type 
) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::dialogue_end ( ) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::dialogue_inquire ( int  i,
string arg 
) [pure virtual, inherited]

Implemented in tm_frame_rep.

Here is the caller graph for this function:

virtual void server_rep::dialogue_start ( string  name,
widget  wid 
) [pure virtual, inherited]

Implemented in tm_frame_rep.

Definition at line 137 of file tm_config.cpp.

                                           {
  return call ("kbd-find-key-binding", key);
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void server_rep::focus_on_editor ( editor  ed) [pure virtual, inherited]

Implemented in tm_server_rep.

Here is the caller graph for this function:

virtual void server_rep::full_screen_mode ( bool  on,
bool  edit 
) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual bool server_rep::get_bool_window_property ( string  what) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual tm_buffer server_rep::get_buffer ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual int server_rep::get_default_shrinking_factor ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual editor server_rep::get_editor ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

Here is the caller graph for this function:

virtual void server_rep::get_extents ( SI x1,
SI y1,
SI x2,
SI y2 
) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual int server_rep::get_int_window_property ( string  what) [pure virtual, inherited]

Implemented in tm_frame_rep.

void tm_config_rep::get_keycomb ( string which,
int &  status,
command cmd,
string shorth,
string help 
) [virtual]

Implements server_rep.

Definition at line 153 of file tm_config.cpp.

{
  string orig= which;
  if (DEBUG_KEYBOARD) cout << "        ] " << which;
  variant_simplification (which);
  if (DEBUG_KEYBOARD) cout << " -> " << which;
  string rew= apply_wildcards (which, post_kbd_wildcards);
  bool no_var= false;
  if (rew * var_suffix == orig) {
    no_var= true;
    rew= var_suffix (1, N(var_suffix));
  }
  if (rew * unvar_suffix == orig) {
    no_var= true;
    rew= unvar_suffix (1, N(unvar_suffix));
  }
  if (DEBUG_KEYBOARD) cout << " -> " << rew << LF;
  object obj= find_key_binding (rew);
  //cout << rew << " => " << obj << LF;
  //if (obj == object (false) || (orig != which && !is_string (car (obj)))) {
  if (obj == object (false)) {
    status= 0;
    cmd   = command ();
    shorth= copy (rew);
    help  = "";
  }
  else if (!is_string (car (obj))) {
    status= 1;
    cmd   = as_command (car (obj));
    shorth= copy (rew);
    help  = as_string (cadr (obj));
  }
  else {
    status= 2;
    cmd   = command ();
    shorth= as_string (car (obj));
    help  = as_string (cadr (obj));
  }
  if (no_var) status += 3;
}

Here is the call graph for this function:

virtual int server_rep::get_nr_windows ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual string server_rep::get_printer_page_type ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual server_rep* server_rep::get_server ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

Here is the caller graph for this function:

virtual int server_rep::get_shrinking_factor ( ) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual string server_rep::get_string_window_property ( string  what) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual tm_view server_rep::get_view ( bool  must_be_valid = true) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual void server_rep::get_visible ( SI x1,
SI y1,
SI x2,
SI y2 
) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual tm_window server_rep::get_window ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

Here is the caller graph for this function:

virtual int server_rep::get_window_id ( ) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual scheme_tree server_rep::get_window_property ( scheme_tree  what) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual bool server_rep::has_view ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

Here is the caller graph for this function:

virtual bool server_rep::has_window ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

Here is the caller graph for this function:

virtual void server_rep::image_gc ( string  which = "*") [pure virtual, inherited]

Implemented in tm_server_rep.

virtual bool server_rep::in_full_screen_edit_mode ( ) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual bool server_rep::in_full_screen_mode ( ) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::inclusions_gc ( string  which = "*") [pure virtual, inherited]

Implemented in tm_server_rep.

void tm_config_rep::insert_kbd_wildcard ( string  key,
string  im,
bool  post,
bool  l,
bool  r 
) [virtual]

Implements server_rep.

Definition at line 85 of file tm_config.cpp.

{
  //cout << "Wildcard " << key << " -> " << im << "\n";
  tree t= tuple (im,
               l? string ("*"): string (""),
               r? string ("*"): string (""));
  if (post) post_kbd_wildcards (key)= t;
  else pre_kbd_wildcards (key)= t;
}

Here is the call graph for this function:

virtual void server_rep::interactive ( object  fun,
scheme_tree  p 
) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::interpose_handler ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual bool server_rep::is_yes ( string  s) [pure virtual, inherited]

Implemented in tm_server_rep.

bool tm_config_rep::kbd_get_command ( string  which,
string help,
command cmd 
) [virtual]

Implements server_rep.

Definition at line 44 of file tm_config.cpp.

                                                                        {
  object im= call ("kbd-get-command", which);
  if (im == object (false)) return false;
  help= as_string (car (im));
  cmd = as_command (cdr (im));
  return true;
}

Here is the call graph for this function:

string tm_config_rep::kbd_post_rewrite ( string  l,
bool  var_flag 
) [virtual]

Implements server_rep.

Definition at line 147 of file tm_config.cpp.

                                                        {
  if (var_flag) variant_simplification (s);
  return apply_wildcards (s, post_kbd_wildcards);
}

Here is the call graph for this function:

Implements server_rep.

Definition at line 142 of file tm_config.cpp.

Here is the call graph for this function:

Implements server_rep.

Definition at line 312 of file tm_config.cpp.

                                           {
  system_kbd_initialize (system_kbd_decode);
  int start= 0, i;
  for (i=0; i <= N(s); i++)
    if (i == N(s) || s[i] == ' ') {
      string ss= s (start, i);
      string rr= kbd_system_prevails (ss);
      if (rr != ss)
       return kbd_system_rewrite (s (0, start) * rr * s (i, N(s)));
      start= i+1;
    }

  tree k (CONCAT);
  tree r (CONCAT);
  start= i= 0;
  while (true)
    if (i == N(s) || s[i] == '-' || s[i] == ' ') {
      if (i < N(s) && s[i] == '-') i++;
      string ss= s (start, i);
      if (system_kbd_decode->contains (ss)) r << system_kbd_decode[ss];
      else if (N(ss) == 1 && (use_macos_fonts () || gui_is_qt ())) {
       if (is_locase (ss[0])) r << upcase_all (ss);
       else if (is_upcase (ss[0])) r << system_kbd_decode ("S-") << ss;
       else r << ss;
      }
      else r << ss;
      if (i == N(s) || s[i] == ' ') {
       k << kbd_render (simplify_concat (r));
       r= tree (CONCAT);
       if (i == N(s)) break;
       i++;
      }
      start= i;
    }
    else i++;
  return simplify_concat (k);
}

Here is the call graph for this function:

virtual void server_rep::menu_icons ( int  which,
string  menu 
) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::menu_main ( string  menu) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::menu_widget ( string  menu,
widget w 
) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::quit ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual void server_rep::recall_message ( ) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::refresh ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual void server_rep::scroll_to ( SI  x,
SI  y 
) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::scroll_where ( SI x,
SI y 
) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::set_bool_window_property ( string  what,
bool  val 
) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::set_default_shrinking_factor ( int  sf) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual void server_rep::set_extents ( SI  x1,
SI  y1,
SI  x2,
SI  y2 
) [pure virtual, inherited]

Implemented in tm_frame_rep.

void tm_config_rep::set_font_rules ( scheme_tree  rules) [virtual]

Implements server_rep.

Definition at line 29 of file tm_config.cpp.

                                                {
  int i, n= arity (rules);
  for (i=0; i<n; i++)
    if (arity (rules [i]) == 2) {
      tree l= (tree) rules[i][0];
      tree r= (tree) rules[i][1];
      font_rule (l, r);
    }  
}

Here is the call graph for this function:

virtual void server_rep::set_int_window_property ( string  what,
int  val 
) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::set_left_footer ( string  s) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::set_message ( tree  left,
tree  right,
bool  temp = false 
) [pure virtual, inherited]

Implemented in tm_frame_rep.

Here is the caller graph for this function:

virtual void server_rep::set_printer_dpi ( string  dpi) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual void server_rep::set_printer_page_type ( string  s) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual void server_rep::set_printing_command ( string  s) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual void server_rep::set_right_footer ( string  s) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::set_script_status ( int  i) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual void server_rep::set_scrollbars ( int  sb) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::set_shrinking_factor ( int  sf) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::set_string_window_property ( string  what,
string  val 
) [pure virtual, inherited]

Implemented in tm_frame_rep.

void tm_config_rep::set_variant_keys ( string  var,
string  unvar 
) [virtual]

Implements server_rep.

Definition at line 101 of file tm_config.cpp.

                                                         {
  var_suffix= " " * var;
  unvar_suffix= " " * unvar;
}
virtual void server_rep::set_view ( tm_view  vw) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual void server_rep::set_window_property ( scheme_tree  what,
scheme_tree  val 
) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::shell ( string  s) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual void server_rep::show_footer ( bool  flag) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::show_header ( bool  flag) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::show_icon_bar ( int  which,
bool  flag 
) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::show_side_tools ( int  which,
bool  flag 
) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::side_tools ( int  which,
string  menu 
) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::style_clear_cache ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual void server_rep::typeset_update ( path  p) [pure virtual, inherited]

Implemented in tm_server_rep.

virtual void server_rep::typeset_update_all ( ) [pure virtual, inherited]

Implemented in tm_server_rep.

Definition at line 110 of file tm_config.cpp.

                                                    {
  if (ends (which, var_suffix)) {
    object obj= rewrite_find_key_binding (which);
    // cout << which << " => " << obj << LF;
    if (obj == object (false))
      while (ends (which, var_suffix))
       which= which (0, N(which) - N(var_suffix));
  }
  if (ends (which, unvar_suffix)) {
    if (ends (which, var_suffix * unvar_suffix))
      which= which (0, N(which) - N(var_suffix) - N(unvar_suffix));
    else {
      which= which (0, N(which) - N(unvar_suffix));
      while (true) {
       if (rewrite_find_key_binding (which * var_suffix) == object (false))
         break;
       which= which * var_suffix;
      }
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual bool server_rep::visible_footer ( ) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual bool server_rep::visible_header ( ) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual bool server_rep::visible_icon_bar ( int  which) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual bool server_rep::visible_side_tools ( int  which) [pure virtual, inherited]

Implemented in tm_frame_rep.

virtual void server_rep::wait_handler ( string  message,
string  arg 
) [pure virtual, inherited]

Implemented in tm_server_rep.


Member Data Documentation

Definition at line 23 of file tm_config.hpp.

Definition at line 22 of file tm_config.hpp.

int abstract_struct::ref_count [inherited]

Definition at line 142 of file basic.hpp.

Definition at line 24 of file tm_config.hpp.

Definition at line 21 of file tm_config.hpp.

Definition at line 20 of file tm_config.hpp.


The documentation for this class was generated from the following files: