]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetbox.h
The speed patch: redraw only rows that have changed
[lyx.git] / src / insets / insetbox.h
index 7a1604f2df1937e41ca98be84cea8d21659a4b5a..044f0d4330456badeb563b1585fd72ab7e13ebb8 100644 (file)
 
 #include "insetcollapsable.h"
 #include "lyxlength.h"
-#include "support/translator.h"
 
 
-struct InsetBoxParams {
+class InsetBoxParams {
+public:
        ///
        InsetBoxParams(std::string const &);
        ///
@@ -57,16 +57,12 @@ class InsetBox : public InsetCollapsable {
 public:
        ///
        InsetBox(BufferParams const &, std::string const &);
-       /// Copy constructor
-       InsetBox(InsetBox const &);
        ///
        ~InsetBox();
        ///
-       virtual std::auto_ptr<InsetBase> clone() const;
-       ///
        std::string const editMessage() const;
        ///
-       InsetOld::Code lyxCode() const { return InsetOld::BOX_CODE; }
+       InsetBase::Code lyxCode() const { return InsetBase::BOX_CODE; }
        ///
        void write(Buffer const &, std::ostream &) const;
        ///
@@ -78,22 +74,30 @@ public:
        /// show the Box dialog
        bool showInsetDialog(BufferView * bv) const;
        ///
+       bool display() const { return false; }
+       ///
+       bool forceDefaultParagraphs(idx_type) const;
+       ///
+       bool neverIndent() const { return true; }
+       ///
        int latex(Buffer const &, std::ostream &,
-                       LatexRunParams const &) const;
+                       OutputParams const &) const;
        ///
        int linuxdoc(Buffer const &, std::ostream &,
-                    LatexRunParams const &) const;
+                    OutputParams const &) const;
        ///
        int docbook(Buffer const &, std::ostream &,
-                   LatexRunParams const &) const;
+                   OutputParams const &) const;
        ///
-       int ascii(Buffer const &, std::ostream &,
-                 LatexRunParams const & runparams) const;
+       int plaintext(Buffer const &, std::ostream &,
+                 OutputParams const & runparams) const;
        ///
        void validate(LaTeXFeatures &) const;
        ///
        InsetBoxParams const & params() const { return params_; }
        ///
+       bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
+       ///
        enum BoxType {
                Frameless,
                Boxed,
@@ -103,13 +107,13 @@ public:
                Doublebox
        };
 protected:
-       ///
-       virtual
-       DispatchResult
-       priv_dispatch(FuncRequest const &, idx_type &, pos_type &);
+       InsetBox(InsetBox const &);
+       virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
 private:
        friend class InsetBoxParams;
 
+       virtual std::auto_ptr<InsetBase> doClone() const;
+
        /// used by the constructors
        void init();
        ///
@@ -117,15 +121,6 @@ private:
 };
 
 
-namespace {
-
-typedef Translator<std::string, InsetBox::BoxType> BoxTranslator;
-BoxTranslator const & boxtranslator();
-BoxTranslator const & boxtranslator_loc();
-
-} // anon
-
-
 #include "mailinset.h"
 
 class InsetBoxMailer : public MailInset {