]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetIndex.h
de.po
[lyx.git] / src / insets / InsetIndex.h
index 0f4d52059d6df81b79f6c687865e6ee0044db8c5..01bf7096b08b5d0b8f074b92103df8f2d2eb53e2 100644 (file)
@@ -13,7 +13,7 @@
 #define INSET_INDEX_H
 
 
-#include "InsetCollapsable.h"
+#include "InsetCollapsible.h"
 #include "InsetCommand.h"
 
 
@@ -35,10 +35,10 @@ public:
 
 /** Used to insert index labels
   */
-class InsetIndex : public InsetCollapsable {
+class InsetIndex : public InsetCollapsible {
 public:
        ///
-       InsetIndex(Buffer const &, InsetIndexParams const &);
+       InsetIndex(Buffer *, InsetIndexParams const &);
        ///
        static std::string params2string(InsetIndexParams const &);
        ///
@@ -49,18 +49,19 @@ private:
        ///
        InsetCode lyxCode() const { return INDEX_CODE; }
        ///
-       docstring name() const { return from_ascii("Index"); }
+       docstring layoutName() const { return from_ascii("Index"); }
+       ///
+       ColorCode labelColor() const;
        ///
        void write(std::ostream & os) const;
        ///
        void read(Lexer & lex);
        ///
        int docbook(odocstream &, OutputParams const &) const;
-       /// At the moment, this does nothing. See development/HTML.notes
-       /// for some remarks on what could be done.
-       void xhtml(odocstream &, OutputParams const &) const { return; }
        ///
-       int latex(odocstream &, OutputParams const &) const;
+       docstring xhtml(XHTMLStream &, OutputParams const &) const;
+       ///
+       void latex(otexstream &, OutputParams const &) const;
        ///
        bool showInsetDialog(BufferView *) const;
        ///
@@ -70,17 +71,20 @@ private:
        /// should paragraph indendation be omitted in any case?
        bool neverIndent() const { return true; }
        ///
-       void addToToc(DocIterator const &);
-       ///
-       docstring const buttonLabel(BufferView const & bv) 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,38 +96,54 @@ private:
 class InsetPrintIndex : public InsetCommand {
 public:
        ///
-       InsetPrintIndex(InsetCommandParams const &);
-       ///
-       InsetCode lyxCode() const { return INDEX_PRINT_CODE; }
+       InsetPrintIndex(Buffer * buf, InsetCommandParams const &);
 
+       /// \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;
-       /// Does nothing yet.
-       void xhtml(odocstream &, OutputParams const &) const { return; }
+       docstring xhtml(XHTMLStream &, 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);
+       ///
+       std::string contextMenuName() const;
        /// Updates needed features for this inset.
        void validate(LaTeXFeatures & features) const;
        ///
        bool hasSettings() const;
-
        ///
        DisplayType display() const { return AlignCenter; }
+       //@}
+
+       /// \name Static public methods obligated for InsetCommand derived classes
+       //@{
        ///
-       docstring screenLabel() const;
+       static ParamInfo const & findInfo(std::string 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;
+       //@}
 };