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