3 * \file insetcharstyle.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
8 * \author Martin Vermeer
10 * Full author contact details are available in file CREDITS.
13 #ifndef INSETCHARSTYLE_H
14 #define INSETCHARSTYLE_H
17 #include "insetcollapsable.h"
18 #include "lyxtextclass.h"
21 struct InsetCharStyleParams {
23 void write(std::ostream & os) const;
25 void read(LyXLex & lex);
29 std::string latextype;
31 std::string latexname;
39 /** The CharStyle inset, also XML short element
42 class InsetCharStyle : public InsetCollapsable {
47 InsetCharStyle(BufferParams const &, CharStyles::iterator);
49 InsetCharStyle(InsetCharStyle const &);
51 virtual std::auto_ptr<InsetBase> clone() const;
53 std::string const editMessage() const;
55 InsetOld::Code lyxCode() const { return InsetOld::CHARSTYLE_CODE; }
57 void write(Buffer const &, std::ostream &) const;
59 void read(Buffer const & buf, LyXLex & lex);
61 void setButtonLabel();
63 void metrics(MetricsInfo &, Dimension &) const;
65 void getDrawFont(LyXFont &) const;
67 int latex(Buffer const &, std::ostream &,
68 OutputParams const &) const;
70 int linuxdoc(Buffer const &, std::ostream &,
71 OutputParams const &) const;
73 int docbook(Buffer const &, std::ostream &,
74 OutputParams const &) const;
76 int plaintext(Buffer const &, std::ostream &,
77 OutputParams const &) const;
79 void validate(LaTeXFeatures &) const;
82 InsetCharStyleParams const & params() const { return params_; }
88 priv_dispatch(FuncRequest const &, idx_type &, pos_type &);
91 friend class InsetCharStyleParams;
93 /// used by the constructors
96 InsetCharStyleParams params_;