]> git.lyx.org Git - lyx.git/blob - src/insets/insetbase.h
First step towards unified insets...
[lyx.git] / src / insets / insetbase.h
1 // -*- C++ -*-
2 /**
3  * \file insetbase.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author none
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef INSETBASE_H
13 #define INSETBASE_H
14
15
16 /// Common base class to all insets
17 class InsetBase {
18 public:
19         /** Dispatch result codes
20             DISPATCHED          = the inset catched the action
21             DISPATCHED_NOUPDATE = the inset catched the action and no update
22                                   is needed here to redraw the inset
23             FINISHED            = the inset must be unlocked as a result
24                                   of the action
25             FINISHED_RIGHT      = FINISHED, but put the cursor to the RIGHT of
26                                   the inset.
27             FINISHED_UP         = FINISHED, but put the cursor UP of
28                                   the inset.
29             FINISHED_DOWN       = FINISHED, but put the cursor DOWN of
30                                   the inset.
31             UNDISPATCHED        = the action was not catched, it should be
32                                   dispatched by lower level insets
33         */
34         enum dispatch_result {
35                 UNDISPATCHED = 0,
36                 DISPATCHED,
37                 DISPATCHED_NOUPDATE,
38                 FINISHED,
39                 FINISHED_RIGHT,
40                 FINISHED_UP,
41                 FINISHED_DOWN,
42                 DISPATCHED_POP
43         };
44
45         ///
46         virtual ~InsetBase() {}
47 };
48
49 #endif