]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlTabular.h
Port the tabular dialog to the new scheme based on class Dialog.
[lyx.git] / src / frontends / controllers / ControlTabular.h
1 // -*- C++ -*-
2 /**
3  * \file ControlTabular.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS
10  *
11  * This is pretty icky, we should really be able to use
12  * ControlInset. We can't because there are no params for
13  * tabular inset.
14  */
15
16 #ifndef CONTROLTABULAR_H
17 #define CONTROLTABULAR_H
18
19 #include "Dialog.h"
20 #include "tabular.h"
21
22
23 class ControlTabular : public Dialog::Controller {
24 public:
25
26         ControlTabular(Dialog &);
27         ///
28         virtual void initialiseParams(string const & data);
29         /// clean-up on hide.
30         virtual void clearParams();
31         /// We use set() instead.
32         virtual void dispatchParams() {};
33         ///
34         virtual bool isBufferDependent() const { return true; }
35
36         ///
37         int getActiveCell() const;
38         /// get the contained tabular
39         LyXTabular const & tabular() const;
40         /// return true if units should default to metric
41         bool useMetricUnits() const;
42         /// set a parameter
43         void set(LyXTabular::Feature, string const & arg = string());
44
45 private:
46         ///
47         int active_cell_;
48         ///
49         boost::scoped_ptr<LyXTabular> params_;
50 };
51
52 #endif // CONTROLTABULAR_H