Back to index

texmacs  1.0.7.15
attribute_event.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : attribute_event.hpp
00004 * DESCRIPTION: Events for setting and retrieving attributes of a widget.
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 ATTRIBUTE_EVENT_H
00013 #define ATTRIBUTE_EVENT_H
00014 #include "Widkit/event.hpp"
00015 #include "Widkit/Event/event_codes.hpp"
00016 
00017 /******************************************************************************
00018 * Events for retrieving attributes
00019 ******************************************************************************/
00020 
00021 struct get_integer_event_rep: public event_rep {
00022   string which; int& i;
00023   get_integer_event_rep (string which, int& i);
00024   operator tree ();
00025 };
00026 EVENT(get_integer_event);
00027 
00028 struct get_double_event_rep: public event_rep {
00029   string which; double& x;
00030   get_double_event_rep (string which, double& x);
00031   operator tree ();
00032 };
00033 EVENT(get_double_event);
00034 
00035 struct get_string_event_rep: public event_rep {
00036   string which; string& s;
00037   get_string_event_rep (string which, string& s);
00038   operator tree ();
00039 };
00040 EVENT(get_string_event);
00041 
00042 struct get_command_event_rep: public event_rep {
00043   string which; command& cmd;
00044   get_command_event_rep (string which, command& cmd);
00045   operator tree ();
00046 };
00047 EVENT(get_command_event);
00048 
00049 struct get_coord1_event_rep: public event_rep {
00050   string which; SI& c1;
00051   get_coord1_event_rep (string which, SI& c1);
00052   operator tree ();
00053 };
00054 EVENT(get_coord1_event);
00055 
00056 struct get_coord2_event_rep: public event_rep {
00057   string which; SI& c1; SI& c2;
00058   get_coord2_event_rep (string which, SI& c1, SI& c2);
00059   operator tree ();
00060 };
00061 EVENT(get_coord2_event);
00062 
00063 struct get_coord3_event_rep: public event_rep {
00064   string which; SI& c1; SI& c2; SI& c3;
00065   get_coord3_event_rep (string which, SI& c1, SI& c2, SI& c3);
00066   operator tree ();
00067 };
00068 EVENT(get_coord3_event);
00069 
00070 struct get_coord4_event_rep: public event_rep {
00071   string which; SI& c1; SI& c2; SI& c3; SI& c4;
00072   get_coord4_event_rep (string which, SI& c1, SI& c2, SI& c3, SI& c4);
00073   operator tree ();
00074 };
00075 EVENT(get_coord4_event);
00076 
00077 /******************************************************************************
00078 * Events for setting attributes
00079 ******************************************************************************/
00080 
00081 struct set_integer_event_rep: public event_rep {
00082   string which; int i;
00083   set_integer_event_rep (string which, int i);
00084   operator tree ();
00085 };
00086 EVENT(set_integer_event);
00087 
00088 struct set_double_event_rep: public event_rep {
00089   string which; double x;
00090   set_double_event_rep (string which, double x);
00091   operator tree ();
00092 };
00093 EVENT(set_double_event);
00094 
00095 struct set_string_event_rep: public event_rep {
00096   string which; string s;
00097   set_string_event_rep (string which, string s);
00098   operator tree ();
00099 };
00100 EVENT(set_string_event);
00101 
00102 struct set_command_event_rep: public event_rep {
00103   string which; command cmd;
00104   set_command_event_rep (string which, command cmd);
00105   operator tree ();
00106 };
00107 EVENT(set_command_event);
00108 
00109 struct set_coord1_event_rep: public event_rep {
00110   string which; SI c1;
00111   set_coord1_event_rep (string which, SI c1);
00112   operator tree ();
00113 };
00114 EVENT(set_coord1_event);
00115 
00116 struct set_coord2_event_rep: public event_rep {
00117   string which; SI c1; SI c2;
00118   set_coord2_event_rep (string which, SI c1, SI c2);
00119   operator tree ();
00120 };
00121 EVENT(set_coord2_event);
00122 
00123 struct set_coord3_event_rep: public event_rep {
00124   string which; SI c1; SI c2; SI c3;
00125   set_coord3_event_rep (string which, SI c1, SI c2, SI c3);
00126   operator tree ();
00127 };
00128 EVENT(set_coord3_event);
00129 
00130 struct set_coord4_event_rep: public event_rep {
00131   string which; SI c1; SI c2; SI c3; SI c4;
00132   set_coord4_event_rep (string which, SI c1, SI c2, SI c3, SI c4);
00133   operator tree ();
00134 };
00135 EVENT(set_coord4_event);
00136 
00137 #endif // defined ATTRIBUTE_EVENT_H