PageRenderTime 44ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/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. * MODULE : tm_frame.hpp
  3. * DESCRIPTION: Routines for main TeXmacs frames
  4. * COPYRIGHT : (C) 1999 Joris van der Hoeven
  5. *******************************************************************************
  6. * This software falls under the GNU general public license version 3 or later.
  7. * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
  8. * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
  9. ******************************************************************************/
  10. #ifndef TM_FRAME_H
  11. #define TM_FRAME_H
  12. #include "server.hpp"
  13. class tm_frame_rep: virtual public server_rep {
  14. protected:
  15. bool full_screen; // full screen mode
  16. bool full_screen_edit; // full screen edit mode
  17. widget dialogue_win; // dialogue window
  18. widget dialogue_wid; // dialogue widget
  19. public:
  20. tm_frame_rep ();
  21. ~tm_frame_rep ();
  22. /* properties */
  23. int get_window_id ();
  24. void set_window_property (scheme_tree what, scheme_tree val);
  25. void set_bool_window_property (string what, bool val);
  26. void set_int_window_property (string what, int val);
  27. void set_string_window_property (string what, string val);
  28. scheme_tree get_window_property (scheme_tree what);
  29. bool get_bool_window_property (string what);
  30. int get_int_window_property (string what);
  31. string get_string_window_property (string what);
  32. /* menus */
  33. void show_header (bool flag);
  34. void show_icon_bar (int which, bool flag);
  35. bool visible_header ();
  36. bool visible_icon_bar (int which);
  37. void menu_widget (string menu, widget& w);
  38. void menu_main (string menu);
  39. void menu_icons (int which, string menu);
  40. /* canvas */
  41. void set_shrinking_factor (int sf);
  42. int get_shrinking_factor ();
  43. void set_scrollbars (int sb);
  44. void get_visible (SI& x1, SI& y1, SI& x2, SI& y2);
  45. void scroll_where (SI& x, SI& y);
  46. void scroll_to (SI x, SI y);
  47. void set_extents (SI x1, SI y1, SI x2, SI y2);
  48. void get_extents (SI& x1, SI& y1, SI& x2, SI& y2);
  49. void full_screen_mode (bool on, bool edit);
  50. bool in_full_screen_mode ();
  51. bool in_full_screen_edit_mode ();
  52. /* footer */
  53. void show_footer (bool flag);
  54. bool visible_footer ();
  55. void set_left_footer (string s);
  56. void set_right_footer (string s);
  57. void set_message (tree left, tree right, bool temp= false);
  58. void recall_message ();
  59. void dialogue_start (string name, widget wid);
  60. void dialogue_inquire (int i, string& arg);
  61. void dialogue_end ();
  62. void choose_file (object fun, string title, string type);
  63. void interactive (object fun, scheme_tree p);
  64. };
  65. widget box_widget (box b, bool trans);
  66. widget box_widget (scheme_tree p, string s, color col,
  67. bool trans= true, bool ink= false);
  68. #endif // defined TM_FRAME_H