]> git.lyx.org Git - lyx.git/blob - src/mathed/command_inset.h
mathed uglyfication
[lyx.git] / src / mathed / command_inset.h
1 // -*- C++ -*-
2 /**
3  * \file command_inset.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12
13 #ifndef COMMAND_INSET_H
14 #define COMMAND_INSET_H
15
16 #include "math_nestinset.h"
17 #include "insets/render_button.h"
18
19
20 /// Inset for things like \name[options]{contents}
21 class CommandInset : public MathNestInset {
22 public:
23         ///
24         explicit CommandInset(std::string const & name);
25         ///
26         virtual std::auto_ptr<InsetBase> clone() const;
27         ///
28         void metrics(MetricsInfo & mi, Dimension & dim) const;
29         ///
30         void draw(PainterInfo & pi, int x, int y) const;
31         ///
32         void write(WriteStream & os) const;
33         //
34         // void infoize(std::ostream & os) const;
35         ///
36         virtual std::string const screenLabel() const;
37         /// generate something that will be understood by the Dialogs.
38         std::string const createDialogStr(std::string const & name) const;
39
40         std::string const & commandname() const { return name_; }
41 protected:
42         ///
43         virtual
44         DispatchResult
45         priv_dispatch(BufferView & bv, FuncRequest const & cmd);
46 private:
47         std::string name_;
48         mutable bool set_label_;
49         mutable RenderButton button_;
50 };
51
52 #endif