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;
33 std::string latexparam;
41 /** The CharStyle inset, also XML short element
44 class InsetCharStyle : public InsetCollapsable {
49 InsetCharStyle(BufferParams const &, CharStyles::iterator);
51 InsetCharStyle(InsetCharStyle const &);
53 virtual std::auto_ptr<InsetBase> clone() const;
55 std::string const editMessage() const;
57 InsetOld::Code lyxCode() const { return InsetOld::CHARSTYLE_CODE; }
59 void write(Buffer const &, std::ostream &) const;
61 void read(Buffer const & buf, LyXLex & lex);
63 void metrics(MetricsInfo &, Dimension &) const;
65 void draw(PainterInfo &, int, int) const;
67 void getDrawFont(LyXFont &) const;
69 int latex(Buffer const &, std::ostream &,
70 OutputParams const &) const;
72 int linuxdoc(Buffer const &, std::ostream &,
73 OutputParams const &) const;
75 int docbook(Buffer const &, std::ostream &,
76 OutputParams const &) const;
78 int plaintext(Buffer const &, std::ostream &,
79 OutputParams const &) const;
81 void validate(LaTeXFeatures &) const;
84 InsetCharStyleParams const & params() const { return params_; }
90 priv_dispatch(BufferView & bv, FuncRequest const & cmd);
93 friend class InsetCharStyleParams;
95 /// used by the constructors
98 InsetCharStyleParams params_;