]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetRef.h
Loop refactoring
[lyx.git] / src / insets / InsetRef.h
index 5836d2ecfb219a71ab85b63880bce2b018ccdee1..d18f61939c86a72c6c1bbc0caff5ba780512be52 100644 (file)
@@ -29,51 +29,54 @@ public:
                std::string short_gui_name;
        };
        static const type_info types[];
-       ///
-       static int getType(std::string const & name);
-       ///
-       static std::string const & getName(int type);
 
        ///
        InsetRef(Buffer * buffer, InsetCommandParams const &);
 
+       ///
+       void changeTarget(docstring const & new_label);
+
        /// \name Public functions inherited from Inset class
        //@{
        ///
-       bool isLabeled() const { return true; }
+       docstring layoutName() const override;
        ///
-       docstring toolTip(BufferView const &, int, int) const
-               { return tooltip_; }
+       void doDispatch(Cursor & cur, FuncRequest & cmd) override;
        ///
-  docstring getTOCString() const;
+       bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const override;
        ///
-       bool hasSettings() const { return true; }
+       bool isLabeled() const override { return true; }
        ///
-       InsetCode lyxCode() const { return REF_CODE; }
+       docstring toolTip(BufferView const &, int, int) const override
+               { return tooltip_; }
        ///
-       DisplayType display() const { return Inline; }
+       docstring getTOCString() const;
        ///
-       void latex(otexstream &, OutputParams const &) const;
+       bool hasSettings() const override { return true; }
+       ///
+       InsetCode lyxCode() const override { return REF_CODE; }
+       ///
+       void latex(otexstream &, OutputParams const &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
-                     size_t max_length = INT_MAX) const;
+                     size_t max_length = INT_MAX) const override;
+       ///
+       void docbook(XMLStream &, OutputParams const &) const override;
        ///
-       int docbook(odocstream &, OutputParams const &) const;
+       docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
-       docstring xhtml(XHTMLStream &, OutputParams const &) const;
-       /// 
-       void toString(odocstream &) const;
+       void toString(odocstream &) const override;
        ///
-       void forOutliner(docstring &, size_t) const;
+       void forOutliner(docstring &, size_t const, bool const) const override;
        ///
-       void validate(LaTeXFeatures & features) const;
+       void validate(LaTeXFeatures & features) const override;
        ///
-       void updateBuffer(ParIterator const & it, UpdateType);
+       void updateBuffer(ParIterator const & it, UpdateType, bool const deleted = false) override;
        ///
        void addToToc(DocIterator const & di, bool output_active,
-                                 UpdateType utype) const;
+                                 UpdateType utype, TocBackend & backend) const override;
        ///
-       bool forceLTR() const { return true; }
+       bool forceLTR(OutputParams const &) const override;
        //@}
 
        /// \name Static public methods obligated for InsetCommand derived classes
@@ -85,13 +88,8 @@ public:
        ///
        static bool isCompatibleCommand(std::string const & s);
        //@}
-
-       //FIXME: private
-       /// \name Private functions inherited from InsetCommand class
-       //@{
        ///
-       docstring screenLabel() const { return screen_label_; }
-       //@}
+       bool outputActive() const { return active_; }
 
 protected:
        ///
@@ -101,9 +99,15 @@ private:
        /// \name Private functions inherited from Inset class
        //@{
        ///
-       Inset * clone() const { return new InsetRef(*this); }
+       Inset * clone() const override { return new InsetRef(*this); }
+       //@}
+
+       /// \name Private functions inherited from InsetCommand class
+       //@{
+       ///
+       docstring screenLabel() const override;
        //@}
-       
+
        /// \return the label with things that need to be escaped escaped
        docstring getEscapedLabel(OutputParams const &) const;
        /// \return the command for a formatted reference to ref
@@ -111,11 +115,15 @@ private:
        /// \param argument for reference command
        /// \param prefix of the label (before :)
        docstring getFormattedCmd(docstring const & ref, docstring & label,
-                       docstring & prefix) const;
+                       docstring & prefix, docstring const & caps) const;
 
        ///
        mutable docstring screen_label_;
        ///
+       mutable bool broken_;
+       ///
+       mutable bool active_;
+       ///
        mutable docstring tooltip_;
 };