Back to index

texmacs  1.0.7.15
tm_frame.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : tm_frame.hpp
00004 * DESCRIPTION: Routines for main TeXmacs frames
00005 * COPYRIGHT  : (C) 1999  Joris van der Hoeven
00006 *******************************************************************************
00007 * This software falls under the GNU general public license version 3 or later.
00008 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
00009 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
00010 ******************************************************************************/
00011 
00012 #ifndef TM_FRAME_H
00013 #define TM_FRAME_H
00014 #include "server.hpp"
00015 
00016 class tm_frame_rep: virtual public server_rep {
00017 protected:
00018   bool full_screen;        // full screen mode
00019   bool full_screen_edit;   // full screen edit mode
00020   widget dialogue_win;     // dialogue window
00021   widget dialogue_wid;     // dialogue widget
00022 
00023 public:
00024   tm_frame_rep ();
00025   ~tm_frame_rep ();
00026 
00027   /* properties */
00028   int get_window_id ();
00029   void set_window_property (scheme_tree what, scheme_tree val);
00030   void set_bool_window_property (string what, bool val);
00031   void set_int_window_property (string what, int val);
00032   void set_string_window_property (string what, string val);
00033   scheme_tree get_window_property (scheme_tree what);
00034   bool get_bool_window_property (string what);
00035   int get_int_window_property (string what);
00036   string get_string_window_property (string what);
00037 
00038   /* menus */
00039   void show_header (bool flag);
00040   void show_icon_bar (int which, bool flag);
00041   void show_side_tools (int which, bool flag);
00042   bool visible_header ();
00043   bool visible_icon_bar (int which);
00044   bool visible_side_tools (int which);
00045   void menu_widget (string menu, widget& w);
00046   void menu_main (string menu);
00047   void menu_icons (int which, string menu);
00048   void side_tools (int which, string menu);
00049 
00050   /* canvas */
00051   void set_shrinking_factor (int sf);
00052   int  get_shrinking_factor ();
00053   void set_scrollbars (int sb);
00054   void get_visible (SI& x1, SI& y1, SI& x2, SI& y2);
00055   void scroll_where (SI& x, SI& y);
00056   void scroll_to (SI x, SI y);
00057   void set_extents (SI x1, SI y1, SI x2, SI y2);
00058   void get_extents (SI& x1, SI& y1, SI& x2, SI& y2);
00059   void full_screen_mode (bool on, bool edit);
00060   bool in_full_screen_mode ();
00061   bool in_full_screen_edit_mode ();
00062 
00063   /* footer */
00064   void show_footer (bool flag);
00065   bool visible_footer ();
00066   void set_left_footer (string s);
00067   void set_right_footer (string s);
00068   void set_message (tree left, tree right, bool temp= false);
00069   void recall_message ();
00070   void dialogue_start (string name, widget wid);
00071   void dialogue_inquire (int i, string& arg);
00072   void dialogue_end ();
00073   void choose_file (object fun, string title, string type);
00074   void interactive (object fun, scheme_tree p);
00075 };
00076 
00077 widget box_widget (box b, bool trans);
00078 widget box_widget (scheme_tree p, string s, color col,
00079                  bool trans= true, bool ink= false);
00080 
00081 #endif // defined TM_FRAME_H