]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetcharstyle.h
The speed patch: redraw only rows that have changed
[lyx.git] / src / insets / insetcharstyle.h
index c926e0ccf19c7b46682dcdca2feb561311c32ed3..84c20cbb588a3b10d3a0afa1f1f4fb8618bad423 100644 (file)
@@ -17,7 +17,8 @@
 #include "lyxtextclass.h"
 
 
-struct InsetCharStyleParams {
+class InsetCharStyleParams {
+public:
        ///
        void write(std::ostream & os) const;
        ///
@@ -42,12 +43,21 @@ struct InsetCharStyleParams {
 */
 class InsetCharStyle : public InsetCollapsable {
 public:
+       /// Construct an undefined character style
+       InsetCharStyle::InsetCharStyle(BufferParams const &, std::string const);
        ///
        InsetCharStyle(BufferParams const &, CharStyles::iterator);
+       /// Is this character style defined in the document's textclass?
+       /// May be wrong after textclass change or paste from another document
+       bool undefined() const;
+       /// Set the character style to "undefined"
+       void setUndefined();
+       /// (Re-)set the character style parameters from \p cs
+       void setDefined(CharStyles::iterator cs);
        ///
        std::string const editMessage() const;
        ///
-       InsetOld::Code lyxCode() const { return InsetOld::CHARSTYLE_CODE; }
+       InsetBase::Code lyxCode() const { return InsetBase::CHARSTYLE_CODE; }
        ///
        void write(Buffer const &, std::ostream &) const;
        ///
@@ -70,15 +80,21 @@ public:
        ///
        int plaintext(Buffer const &, std::ostream &,
                  OutputParams const &) const;
+       /// the string that is passed to the TOC
+       virtual int textString(Buffer const &, std::ostream & os,
+               OutputParams const &) const;
        ///
        void validate(LaTeXFeatures &) const;
 
        ///
        InsetCharStyleParams const & params() const { return params_; }
 
+       /// should paragraph indendation be ommitted in any case?
+       bool neverIndent() const { return true; }
+
 protected:
        InsetCharStyle(InsetCharStyle const &);
-       virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+       virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
        ///
        bool getStatus(LCursor & cur, FuncRequest const & cmd, FuncStatus &) const;