]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCommandParams.h
Circumvent odd stmary font metrics (part of #9990).
[lyx.git] / src / insets / InsetCommandParams.h
index 8d2aaa8fa246cb5268a68296ff8fc1c9f871f9b3..4107378487d0f8195454ea34860d3497888dc06c 100644 (file)
 namespace lyx {
 
 class Lexer;
+class Buffer;
 
 class ParamInfo {
 public:
+       ///
+       ParamInfo() {}
        /// Types of parameters
        enum ParamType {
                LATEX_OPTIONAL,    /// normal optional argument
@@ -110,11 +113,14 @@ public:
        std::string insetType() const;
        ///
        InsetCode code() const { return insetCode_; }
-       ///
-       void read(Lexer &);
        /// Parse the command
+       void read(Lexer &);
+       ///
+       void Read(Lexer &, Buffer const *);
        ///
        void write(std::ostream &) const;
+       ///
+       void Write(std::ostream & os, Buffer const * buf) const;
        /// Build the complete LaTeX command
        docstring getCommand(OutputParams const &) const;
        /// Return the command name
@@ -140,16 +146,16 @@ public:
        void clear();
        ///
        static bool isCompatibleCommand(InsetCode code, std::string const & s);
-
+       /// 
+       ParamInfo const & info() const { return info_; }
+       ///
+       docstring prepareCommand(OutputParams const & runparams,
+               docstring const & command, ParamInfo::ParamHandling handling) const;
 private:
        std::string getDefaultCmd(InsetCode code);
        /// checks whether we need to write an empty optional parameter
        /// \return true if a non-empty optional parameter follows ci
        bool writeEmptyOptional(ParamInfo::const_iterator ci) const;
-       ///
-       docstring prepareCommand(OutputParams const & runparams,
-                                            docstring const & command,
-                                            ParamInfo::ParamHandling handling) const;
 
        /// Description of all command properties
        ParamInfo info_;