Back to index

texmacs  1.0.7.15
edit_graphics.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : edit_graphics.hpp
00004 * DESCRIPTION: the interface for TeXmacs
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 EDIT_GRAPHICS_H
00013 #define EDIT_GRAPHICS_H
00014 #include "editor.hpp"
00015 #include "timer.hpp"
00016 
00017 class edit_graphics_rep: virtual public editor_rep {
00018 private:
00019   box go_box;           // The graphical object typesetted as a box
00020   double gr_x, gr_y;    // Last (x, y) position of the mouse
00021   gr_selections gs;     // Last graphical_select (x, y)
00022   grid gr0;             // Last grid
00023 
00024 protected:
00025   point cur_pos;
00026   tree graphical_object;
00027 
00028 public:
00029   edit_graphics_rep ();
00030   ~edit_graphics_rep ();
00031 
00032   path   graphics_path ();
00033   bool   inside_graphics (bool b);
00034   bool   inside_active_graphics (bool b);
00035   bool   over_graphics (SI x, SI y);
00036   tree   get_graphics ();
00037   double get_x ();
00038   double get_y ();
00039   frame  find_frame (bool last= false);
00040   grid   find_grid ();
00041   void   find_limits (point& lim1, point& lim2);
00042   bool   find_graphical_region (SI& x1, SI& y1, SI& x2, SI& y2);
00043   point  adjust (point p);
00044   tree   find_point (point p);
00045   tree   graphical_select (double x, double y);
00046   tree   graphical_select (double x1, double y1, double x2, double y2);
00047   tree   get_graphical_object ();
00048   void   set_graphical_object (tree t);
00049   void   invalidate_graphical_object ();
00050   void   draw_graphical_object (renderer ren);
00051   bool   mouse_graphics (string s, SI x, SI y, int mods, time_t t);
00052   void   back_in_text_at (tree t, path p, bool forward);
00053 };
00054 
00055 #endif // defined EDIT_GRAPHICS_H