Back to index

texmacs  1.0.7.15
canvas_properties.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : canvas_properties.hpp
00004 * DESCRIPTION: Container for canvas properties
00005 * COPYRIGHT  : (C) 2007  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 CANVAS_PROPERTIES_H
00013 #define CANVAS_PROPERTIES_H
00014 #include "env.hpp"
00015 
00016 class canvas_properties_rep: public concrete_struct {
00017 public:
00018   edit_env env;
00019   string   type;
00020   tree     x1, y1, x2, y2;
00021   tree     scx, scy;
00022   tree     xt, yt;
00023   SI       hpadding;
00024   SI       vpadding;
00025   SI       border;
00026   tree     bg;
00027   int      alpha;
00028   color    sunny;
00029   color    shadow;
00030   SI       bar_width;
00031   SI       bar_padding;
00032   tree     bar_bg;
00033   tree     bar_button;
00034 
00035 public:
00036   inline canvas_properties_rep () {}
00037 };
00038 
00039 class canvas_properties {
00040 CONCRETE(canvas_properties);
00041   inline canvas_properties (): rep (tm_new<canvas_properties_rep> ()) {}
00042 };
00043 CONCRETE_CODE(canvas_properties);
00044 
00045 canvas_properties get_canvas_properties (edit_env env, tree t);
00046 void get_canvas_horizontal (canvas_properties props,
00047                          SI bx1, SI bx2, SI& x1, SI& x2, SI& scx);
00048 void get_canvas_vertical (canvas_properties props,
00049                        SI by1, SI by2, SI& y1, SI& y2, SI& scy);
00050 box put_scroll_bars (canvas_properties props, box b, path ip,
00051                    box inner, SI scx, SI scy);
00052 
00053 #endif // defined CANVAS_PROPERTIES_H