]> git.lyx.org Git - lyx.git/blob - src/funcrequest.h
remove xforms check from qt config
[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 class BufferView;
16
17 /** 
18  * This class encapsulates a LyX action and its argument
19  * in order to pass it around easily.
20  */
21 class FuncRequest {
22 public:
23         /// just for putting thes things in std::container
24         FuncRequest();
25         /// actions without extra argument
26         explicit FuncRequest(kb_action act);
27         /// actions with extra argument
28         FuncRequest(kb_action act, string const & arg);
29         /// actions without extra argument
30         FuncRequest(BufferView * view, kb_action act);
31         /// actions with extra argument
32         FuncRequest(BufferView * view, kb_action act, string const & arg);
33         /// for mouse events
34         FuncRequest(BufferView * view, kb_action act, int ax, int ay, int aextra);
35         /// access to the view
36         BufferView * view() const;
37         /// access to the view
38         void setView(BufferView * view);
39
40 private:
41         /// the BufferView we are talking to
42         BufferView * view_;
43 public:  // should be private, too...
44         /// the action
45         kb_action action;
46         /// the action's string argument
47         string argument;
48         /// the x coordinate of a mouse press
49         int x;
50         /// the y coordinate of a mouse press
51         int y;
52         /// some extra information (like button number)
53         int extra;
54 };
55
56 #endif // FUNCREQUEST_H