]> 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 7c684b81508b20de6b1bdd784bf79f6aabc3d98c..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;
        ///
@@ -80,6 +76,10 @@ public:
        ///
        bool display() const { return false; }
        ///
+       bool forceDefaultParagraphs(idx_type) const;
+       ///
+       bool neverIndent() const { return true; }
+       ///
        int latex(Buffer const &, std::ostream &,
                        OutputParams const &) const;
        ///
@@ -96,6 +96,8 @@ public:
        ///
        InsetBoxParams const & params() const { return params_; }
        ///
+       bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
+       ///
        enum BoxType {
                Frameless,
                Boxed,
@@ -105,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();
        ///
@@ -119,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 {