]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetIndex.h
New DocBook support
[lyx.git] / src / insets / InsetIndex.h
index 9b106915253c0dfdad8eef77e84b751e3532d0cf..a999ee5bb3195b77793c26a64c4ad727733e1559 100644 (file)
@@ -13,7 +13,7 @@
 #define INSET_INDEX_H
 
 
-#include "InsetCollapsable.h"
+#include "InsetCollapsible.h"
 #include "InsetCommand.h"
 
 
@@ -35,7 +35,7 @@ public:
 
 /** Used to insert index labels
   */
-class InsetIndex : public InsetCollapsable {
+class InsetIndex : public InsetCollapsible {
 public:
        ///
        InsetIndex(Buffer *, InsetIndexParams const &);
@@ -49,7 +49,7 @@ private:
        ///
        InsetCode lyxCode() const { return INDEX_CODE; }
        ///
-       docstring name() const { return from_ascii("Index"); }
+       docstring layoutName() const { return from_ascii("Index"); }
        ///
        ColorCode labelColor() const;
        ///
@@ -57,29 +57,34 @@ private:
        ///
        void read(Lexer & lex);
        ///
-       int docbook(odocstream &, OutputParams const &) const;
-       /// 
-       docstring xhtml(XHTMLStream &, OutputParams const &) const;
+       void docbook(XMLStream &, OutputParams const &) const;
        ///
-       int latex(odocstream &, OutputParams const &) const;
+       docstring xhtml(XMLStream &, OutputParams const &) const;
+       ///
+       void latex(otexstream &, OutputParams const &) const;
        ///
        bool showInsetDialog(BufferView *) const;
        ///
        bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
        ///
        void doDispatch(Cursor & cur, FuncRequest & cmd);
-       /// should paragraph indendation be omitted in any case?
+       /// should paragraph indentation be omitted in any case?
        bool neverIndent() const { return true; }
        ///
-       void addToToc(DocIterator const &);
+       void addToToc(DocIterator const & di, bool output_active,
+                                 UpdateType utype, TocBackend & backend) const;
        ///
        docstring toolTip(BufferView const & bv, int x, int y) const;
+       ///
+       docstring const buttonLabel(BufferView const & bv) const;
        /// Updates needed features for this inset.
        void validate(LaTeXFeatures & features) const;
        ///
-       docstring contextMenu(BufferView const & bv, int x, int y) const;
+       std::string contextMenuName() const;
        ///
        Inset * clone() const { return new InsetIndex(*this); }
+       /// Is the content of this inset part of the immediate text sequence?
+       bool isPartOfTextSequence() const { return false; }
 
        ///
        friend class InsetIndexParams;
@@ -92,37 +97,53 @@ class InsetPrintIndex : public InsetCommand {
 public:
        ///
        InsetPrintIndex(Buffer * buf, InsetCommandParams const &);
-       ///
-       InsetCode lyxCode() const { return INDEX_PRINT_CODE; }
 
+       /// \name Public functions inherited from Inset class
+       //@{
        ///
-       static ParamInfo const & findInfo(std::string const &);
-       ///
-       static std::string defaultCommand() { return "printindex"; }
+       InsetCode lyxCode() const { return INDEX_PRINT_CODE; }
        ///
-       static bool isCompatibleCommand(std::string const & s);
+       void latex(otexstream &, OutputParams const &) const;
        ///
-       int latex(odocstream &, OutputParams const &) const;
-       /// 
-       docstring xhtml(XHTMLStream &, OutputParams const &) const;
+       docstring xhtml(XMLStream &, OutputParams const &) const;
        ///
        void doDispatch(Cursor & cur, FuncRequest & cmd);
        ///
        bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
        ///
-       virtual docstring contextMenu(BufferView const & bv, int x, int y) const;
-private:
+       void updateBuffer(ParIterator const & it, UpdateType, bool const deleted = false);
+       ///
+       std::string contextMenuName() const;
        /// Updates needed features for this inset.
        void validate(LaTeXFeatures & features) const;
        ///
        bool hasSettings() const;
+       ///
+       RowFlags rowFlags() const { return Display; }
+       //@}
 
+       /// \name Static public methods obligated for InsetCommand derived classes
+       //@{
        ///
-       DisplayType display() const { return AlignCenter; }
+       static ParamInfo const & findInfo(std::string const &);
        ///
-       docstring screenLabel() const;
+       static std::string defaultCommand() { return "printindex"; }
+       ///
+       static bool isCompatibleCommand(std::string const & s);
+       //@}
+
+private:
+       /// \name Private functions inherited from Inset class
+       //@{
        ///
        Inset * clone() const { return new InsetPrintIndex(*this); }
+       //@}
+
+       /// \name Private functions inherited from InsetCommand class
+       //@{
+       ///
+       docstring screenLabel() const;
+       //@}
 };