Back to index

texmacs  1.0.7.15
modifier.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : modifier.hpp
00004 * DESCRIPTION: a modifier box modifies the behaviour of another box
00005 *              as to cursor movements etc. , but displays in the same way
00006 * COPYRIGHT  : (C) 1999  Joris van der Hoeven
00007 *******************************************************************************
00008 * This software falls under the GNU general public license version 3 or later.
00009 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
00010 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
00011 ******************************************************************************/
00012 
00013 #ifndef MODIFIER_H
00014 #define MODIFIER_H
00015 #include "boxes.hpp"
00016 
00017 class modifier_box_rep: public box_rep {
00018 public:
00019   box b;
00020 
00021   modifier_box_rep (path ip, box b);
00022   ~modifier_box_rep ();
00023 
00024   int       subnr ();
00025   box       subbox (int i);
00026   void      display (renderer ren);  
00027   operator  tree ();
00028   tree      action (tree t, SI x, SI y, SI delta);
00029   void      loci (SI x, SI y, SI delta, list<string>& ids, rectangles& rs);
00030   void      collect_page_numbers (hashmap<string,tree>& h, tree page);
00031   path      find_tag (string name);
00032 
00033   virtual path            find_box_path (SI x, SI y, SI delta, bool force);
00034   virtual path            find_lip ();
00035   virtual path            find_rip ();
00036   virtual path            find_left_box_path ();
00037   virtual path            find_right_box_path ();
00038   virtual path            find_box_path (path p, bool& found);
00039   virtual path            find_tree_path (path bp);
00040   virtual cursor          find_cursor (path bp);
00041   virtual selection       find_selection (path lbp, path rbp);
00042   virtual gr_selections   graphical_select (SI x, SI y, SI dist);
00043   virtual gr_selections   graphical_select (SI x1, SI y1, SI x2, SI y2);
00044 
00045   double    left_slope ();
00046   double    right_slope ();
00047   SI        left_correction ();
00048   SI        right_correction ();
00049   SI        lsub_correction ();
00050   SI        lsup_correction ();
00051   SI        rsub_correction ();
00052   SI        rsup_correction ();
00053   SI        sub_lo_base (int level);
00054   SI        sub_hi_lim  (int level);
00055   SI        sup_lo_lim  (int level);
00056   SI        sup_lo_base (int level);
00057   SI        sup_hi_lim  (int level);
00058 
00059   virtual int   anim_length ();
00060   virtual bool  anim_started ();
00061   virtual bool  anim_finished ();
00062   virtual void  anim_start_at (time_t at);
00063   virtual void  anim_finish_now ();
00064   virtual void  anim_get_invalid (bool& flag, time_t& at, rectangles& rs);
00065 };
00066 
00067 #endif // defined MODIFIER_H