~ubuntu-branches/ubuntu/hardy/texmacs/hardy

« back to all changes in this revision

Viewing changes to src/Texmacs/tm_server.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Ralf Treinen
  • Date: 2004-04-19 20:34:00 UTC
  • Revision ID: james.westby@ubuntu.com-20040419203400-g4e34ih0315wcn8v
Tags: upstream-1.0.3-R2
ImportĀ upstreamĀ versionĀ 1.0.3-R2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/******************************************************************************
 
3
* MODULE     : tm_server.hpp
 
4
* DESCRIPTION: Main current graphical interface for user applications
 
5
* COPYRIGHT  : (C) 1999  Joris van der Hoeven
 
6
*******************************************************************************
 
7
* This software falls under the GNU general public license and comes WITHOUT
 
8
* ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for more details.
 
9
* If you don't have this file, write to the Free Software Foundation, Inc.,
 
10
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
11
******************************************************************************/
 
12
 
 
13
#ifndef TM_SERVER_H
 
14
#define TM_SERVER_H
 
15
#include "timer.hpp"
 
16
#include "tm_config.hpp"
 
17
#include "tm_buffer.hpp"
 
18
#include "tm_layout.hpp"
 
19
#include "tm_scheme.hpp"
 
20
#include "tm_data.hpp"
 
21
 
 
22
class tm_server_rep:
 
23
  public tm_config_rep,
 
24
  public tm_data_rep,
 
25
  public tm_layout_rep,
 
26
  public tm_scheme_rep
 
27
{
 
28
protected:
 
29
  display dis;       // current display
 
30
  tm_view vw;        // current editor
 
31
  int banner_nr;     // how far in banner
 
32
  bool full_screen;  // full screen mode
 
33
  int def_sfactor;   // default shrinking factor
 
34
 
 
35
  hashmap<tree,hashmap<string,tree> > style_cache; // style environments cache
 
36
  hashmap<tree,tree> style_drd;                    // style drd cache
 
37
 
 
38
public:
 
39
  tm_server_rep (display dis);
 
40
  ~tm_server_rep ();
 
41
  void advance_banner ();
 
42
 
 
43
  /* Get and set objects associated to server */
 
44
  server_rep* get_server ();
 
45
  display     get_display ();
 
46
  bool        has_view ();
 
47
  tm_view     get_view (bool must_be_valid= true);
 
48
  void        set_view (tm_view vw);
 
49
  tm_buffer   get_buffer ();
 
50
  editor      get_editor ();
 
51
  tm_window   get_window ();
 
52
  tm_widget   get_meta ();
 
53
  color       get_color (string s);
 
54
  int         get_nr_windows ();
 
55
 
 
56
  /* Caching style files */
 
57
  void style_update_menu ();
 
58
  void style_clear_cache ();
 
59
  void style_set_cache (tree st, hashmap<string,tree> H, tree t);
 
60
  void style_get_cache (tree st, hashmap<string,tree>& H, tree& t, bool& flag);
 
61
 
 
62
  /* Routines concerning the current editor widget */
 
63
  void get_visible (SI& x1, SI& y1, SI& x2, SI& y2);
 
64
  void scroll_where (SI& x, SI& y);
 
65
  void scroll_to (SI x, SI y);
 
66
  void set_extents (SI x1, SI y1, SI x2, SI y2);
 
67
  void set_left_footer (string s);
 
68
  void set_right_footer (string s);
 
69
  void set_message (string left, string right);
 
70
  void interactive (string name, string& s, command call_back);
 
71
  void full_screen_mode (bool on);
 
72
  bool in_full_screen_mode ();
 
73
 
 
74
  /* Miscellaneous routines */
 
75
  void   interpose_handler ();
 
76
  void   wait_handler (string message, string arg);
 
77
  void   set_script_status (int i);
 
78
  void   focus_on_editor (editor ed);
 
79
  void   set_printing_command (string s);
 
80
  void   set_printer_page_type (string s);
 
81
  void   set_printer_dpi (string dpi);
 
82
  void   set_default_shrinking_factor (int sf);
 
83
  int    get_default_shrinking_factor ();
 
84
  void   postscript_gc (string which);
 
85
  void   inclusions_gc (string which);
 
86
  string translate (string which, string from, string to);
 
87
  bool   is_yes (string s);
 
88
  void   quit ();
 
89
  tree   evaluate (string name, string session, tree expr);
 
90
  void   shell    (string s);
 
91
};
 
92
 
 
93
#endif // defined TM_SERVER_H