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