]> git.lyx.org Git - lyx.git/blob - src/funcrequest.h
* Fix reading of lyxsize_type in 1.2.0 documents.
[lyx.git] / src / funcrequest.h
1 /**
2  * \file funcrequest.h
3  * Copyright 2002 the LyX Team
4  * Read the file COPYING
5  *
6  * \author André Pönitz
7  */
8
9 #ifndef FUNCREQUEST_H
10 #define FUNCREQUEST_H
11
12 #include "commandtags.h"
13 #include "LString.h"
14
15 /** 
16  * This class encapsulates a LyX action and its argument
17  * in order to pass it around easily.
18  */
19 struct FuncRequest {
20
21         FuncRequest()
22                 : action(LFUN_UNKNOWN_ACTION)
23         {}
24
25         FuncRequest(kb_action act)
26                 : action(act)
27         {}
28
29         FuncRequest(kb_action act, string const & arg)
30                 : action(act), argument(arg)
31         {}
32
33         /// for mouse events
34         FuncRequest(kb_action act, int ax, int ay, int aextra)
35                 : action(act), argument(), x(ax), y(ay), extra(aextra)
36         {}
37
38         /// the action
39         kb_action action;
40         /// the action's string argument
41         string argument;
42         /// the x coordinate of a mouse press
43         int x;
44         /// the y coordinate of a mouse press
45         int y;
46         /// some extra information (like button number)
47         int extra;
48 };
49
50 #endif // FUNCREQUEST_H