namespace lyx {
-class LaTeXFeatures;
-
/** Used to insert index labels
*/
class InsetIndex : public InsetCollapsable {
public:
///
- InsetIndex(BufferParams const &);
- ///
- InsetIndex(InsetIndex const &);
+ InsetIndex(Buffer const &);
+private:
///
- EDITABLE editable() const { return IS_EDITABLE; }
+ EDITABLE editable() const { return HIGHLY_EDITABLE; }
///
InsetCode lyxCode() const { return INDEX_CODE; }
///
- ///
- void metrics(MetricsInfo &, Dimension &) const;
- ///
- void draw(PainterInfo &, int, int) const;
- ///
docstring name() const { return from_ascii("Index"); }
///
- void getDrawFont(Font &) const;
+ void write(std::ostream & os) const;
///
- void write(Buffer const & buf, std::ostream & os) const;
+ int docbook(odocstream &, OutputParams const &) const;
///
- int docbook(Buffer const &, odocstream &,
- OutputParams const &) const;
+ int latex(odocstream &, OutputParams const &) const;
/// should paragraph indendation be omitted in any case?
- bool neverIndent(Buffer const &) const { return true; }
-private:
+ bool neverIndent() const { return true; }
///
- bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
+ void addToToc(DocIterator const &);
///
- virtual Inset * clone() const;
+ Inset * clone() const { return new InsetIndex(*this); }
};
public:
///
InsetPrintIndex(InsetCommandParams const &);
+
+ ///
+ static ParamInfo const & findInfo(std::string const &);
+ ///
+ static std::string defaultCommand() { return "printindex"; };
+ ///
+ static bool isCompatibleCommand(std::string const & s)
+ { return s == "printindex"; }
+private:
/// Updates needed features for this inset.
void validate(LaTeXFeatures & features) const;
///
///
DisplayType display() const { return AlignCenter; }
///
- docstring const getScreenLabel(Buffer const &) const;
- ///
- static CommandInfo const * findInfo(std::string const & cmdName = "");
+ docstring screenLabel() const;
///
- static std::string defaultCommand() { return "printindex"; };
- ///
- static bool isCompatibleCommand(std::string const & s)
- { return s == "printindex"; }
-private:
- virtual Inset * clone() const {
- return new InsetPrintIndex(params());
- }
+ Inset * clone() const { return new InsetPrintIndex(*this); }
};