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
******************************************************************************/
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"
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
35
hashmap<tree,hashmap<string,tree> > style_cache; // style environments cache
36
hashmap<tree,tree> style_drd; // style drd cache
39
tm_server_rep (display dis);
41
void advance_banner ();
43
/* Get and set objects associated to server */
44
server_rep* get_server ();
45
display get_display ();
47
tm_view get_view (bool must_be_valid= true);
48
void set_view (tm_view vw);
49
tm_buffer get_buffer ();
51
tm_window get_window ();
52
tm_widget get_meta ();
53
color get_color (string s);
54
int get_nr_windows ();
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);
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 ();
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);
89
tree evaluate (string name, string session, tree expr);
90
void shell (string s);
93
#endif // defined TM_SERVER_H