4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS
20 /** Dispatch result codes
21 DISPATCHED = the inset catched the action
22 DISPATCHED_NOUPDATE = the inset catched the action and no update
23 is needed here to redraw the inset
24 FINISHED = the inset must be unlocked as a result
26 FINISHED_RIGHT = FINISHED, but put the cursor to the RIGHT of
28 FINISHED_UP = FINISHED, but put the cursor UP of
30 FINISHED_DOWN = FINISHED, but put the cursor DOWN of
32 UNDISPATCHED = the action was not catched, it should be
33 dispatched by lower level insets
35 enum dispatch_result {
47 /// Common base class to all insets
50 /// type for cell indices
51 typedef size_t idx_type;
52 /// type for cursor positions
53 typedef size_t pos_type;
54 /// type for row numbers
55 typedef size_t row_type;
56 /// type for column numbers
57 typedef size_t col_type;
59 // the real dispatcher
60 virtual dispatch_result dispatch
61 (FuncRequest const & cmd, idx_type & idx, pos_type & pos);
63 /// small wrapper for the time being
64 virtual dispatch_result localDispatch(FuncRequest const & cmd);
67 virtual ~InsetBase() {}
69 /// Methods to cache and retrieve a cached BufferView.
70 virtual void cache(BufferView *) const {}
72 virtual BufferView * view() const { return 0; }