]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/Kernel.h
Port the tabular dialog to the new scheme based on class Dialog.
[lyx.git] / src / frontends / controllers / Kernel.h
1 // -*- C++ -*-
2
3 #ifndef KERNEL_H
4 #define KERNEL_H
5
6
7 #include "LString.h"
8
9
10 class Buffer;
11 class BufferView;
12 class FuncRequest;
13 class LyXView;
14
15
16 class Kernel {
17 public:
18         ///
19         enum DocTypes {
20                 ///
21                 LATEX,
22                 ///
23                 LITERATE,
24                 ///
25                 LINUXDOC,
26                 ///
27                 DOCBOOK
28         };
29
30         ///
31         Kernel(LyXView &);
32         ///
33         void dispatch(FuncRequest const &, bool verbose = false) const;
34         /** The Dialog has received a request from the user to update
35             its contents. It must, therefore, ask the kernel to provide
36             this information to Dialog 'name'.
37          */
38         void updateDialog(string const & name) const;
39         ///
40         void disconnect(string const & name) const;
41         ///
42         bool isBufferAvailable() const;
43         ///
44         bool isBufferReadonly() const;
45         ///
46         DocTypes docType() const;
47         ///
48         LyXView & lyxview() { return lyxview_; }
49         ///
50         LyXView const & lyxview() const { return lyxview_; }
51         ///
52         Buffer * buffer();
53         ///
54         Buffer const * buffer() const;
55         ///
56         BufferView * bufferview();
57         ///
58         BufferView const * bufferview() const;
59
60 private:
61         LyXView & lyxview_;
62 };
63
64
65 #endif // KERNEL_H