/TeXmacs-1.0.7.11-src/src/Texmacs/tm_frame.hpp
C++ Header | 78 lines | 55 code | 10 blank | 13 comment | 0 complexity | cdf64768c2070cd094895bab075dda28 MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, MPL-2.0-no-copyleft-exception
1
2/******************************************************************************
3* MODULE : tm_frame.hpp
4* DESCRIPTION: Routines for main TeXmacs frames
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_FRAME_H
13#define TM_FRAME_H
14#include "server.hpp"
15
16class tm_frame_rep: virtual public server_rep {
17protected:
18 bool full_screen; // full screen mode
19 bool full_screen_edit; // full screen edit mode
20 widget dialogue_win; // dialogue window
21 widget dialogue_wid; // dialogue widget
22
23public:
24 tm_frame_rep ();
25 ~tm_frame_rep ();
26
27 /* properties */
28 int get_window_id ();
29 void set_window_property (scheme_tree what, scheme_tree val);
30 void set_bool_window_property (string what, bool val);
31 void set_int_window_property (string what, int val);
32 void set_string_window_property (string what, string val);
33 scheme_tree get_window_property (scheme_tree what);
34 bool get_bool_window_property (string what);
35 int get_int_window_property (string what);
36 string get_string_window_property (string what);
37
38 /* menus */
39 void show_header (bool flag);
40 void show_icon_bar (int which, bool flag);
41 bool visible_header ();
42 bool visible_icon_bar (int which);
43 void menu_widget (string menu, widget& w);
44 void menu_main (string menu);
45 void menu_icons (int which, string menu);
46
47 /* canvas */
48 void set_shrinking_factor (int sf);
49 int get_shrinking_factor ();
50 void set_scrollbars (int sb);
51 void get_visible (SI& x1, SI& y1, SI& x2, SI& y2);
52 void scroll_where (SI& x, SI& y);
53 void scroll_to (SI x, SI y);
54 void set_extents (SI x1, SI y1, SI x2, SI y2);
55 void get_extents (SI& x1, SI& y1, SI& x2, SI& y2);
56 void full_screen_mode (bool on, bool edit);
57 bool in_full_screen_mode ();
58 bool in_full_screen_edit_mode ();
59
60 /* footer */
61 void show_footer (bool flag);
62 bool visible_footer ();
63 void set_left_footer (string s);
64 void set_right_footer (string s);
65 void set_message (tree left, tree right, bool temp= false);
66 void recall_message ();
67 void dialogue_start (string name, widget wid);
68 void dialogue_inquire (int i, string& arg);
69 void dialogue_end ();
70 void choose_file (object fun, string title, string type);
71 void interactive (object fun, scheme_tree p);
72};
73
74widget box_widget (box b, bool trans);
75widget box_widget (scheme_tree p, string s, color col,
76 bool trans= true, bool ink= false);
77
78#endif // defined TM_FRAME_H