1999-09-27 18:44:28 +00:00
|
|
|
|
// -*- C++ -*-
|
2002-09-25 14:26:13 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file insetindex.h
|
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
1999-09-27 18:44:28 +00:00
|
|
|
|
*
|
2002-09-25 14:26:13 +00:00
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes
|
2002-03-21 17:09:55 +00:00
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-09-25 14:26:13 +00:00
|
|
|
|
*/
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
1999-11-04 01:40:20 +00:00
|
|
|
|
#ifndef INSET_INDEX_H
|
|
|
|
|
#define INSET_INDEX_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "insetcommand.h"
|
|
|
|
|
|
|
|
|
|
struct LaTeXFeatures;
|
|
|
|
|
|
2002-03-21 17:09:55 +00:00
|
|
|
|
/** Used to insert index labels
|
1999-09-27 18:44:28 +00:00
|
|
|
|
*/
|
2000-08-04 13:12:30 +00:00
|
|
|
|
class InsetIndex : public InsetCommand {
|
1999-09-27 18:44:28 +00:00
|
|
|
|
public:
|
|
|
|
|
///
|
2003-05-26 09:13:55 +00:00
|
|
|
|
InsetIndex(InsetCommandParams const &);
|
|
|
|
|
///
|
2003-02-25 14:51:38 +00:00
|
|
|
|
~InsetIndex();
|
|
|
|
|
///
|
2003-07-25 17:11:25 +00:00
|
|
|
|
virtual std::auto_ptr<InsetBase> clone() const {
|
|
|
|
|
return std::auto_ptr<InsetBase>(new InsetIndex(params()));
|
2000-10-10 11:50:43 +00:00
|
|
|
|
}
|
1999-09-27 18:44:28 +00:00
|
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
|
std::string const getScreenLabel(Buffer const &) const;
|
2000-07-07 07:46:37 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
EDITABLE editable() const { return IS_EDITABLE; }
|
2000-07-07 07:46:37 +00:00
|
|
|
|
///
|
2003-07-25 21:20:24 +00:00
|
|
|
|
InsetOld::Code lyxCode() const;
|
2001-11-02 16:11:19 +00:00
|
|
|
|
///
|
2003-10-31 18:45:43 +00:00
|
|
|
|
int docbook(Buffer const &, std::ostream &,
|
|
|
|
|
LatexRunParams const &) const;
|
2003-10-17 18:01:15 +00:00
|
|
|
|
protected:
|
|
|
|
|
///
|
|
|
|
|
virtual
|
2003-10-29 10:47:21 +00:00
|
|
|
|
DispatchResult
|
2003-10-17 18:01:15 +00:00
|
|
|
|
priv_dispatch(FuncRequest const & cmd, idx_type &, pos_type &);
|
1999-09-27 18:44:28 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2000-08-04 13:12:30 +00:00
|
|
|
|
class InsetPrintIndex : public InsetCommand {
|
1999-09-27 18:44:28 +00:00
|
|
|
|
public:
|
|
|
|
|
///
|
2003-05-26 09:13:55 +00:00
|
|
|
|
InsetPrintIndex(InsetCommandParams const &);
|
|
|
|
|
///
|
2003-05-16 07:44:00 +00:00
|
|
|
|
~InsetPrintIndex();
|
|
|
|
|
///
|
2003-07-25 17:11:25 +00:00
|
|
|
|
virtual std::auto_ptr<InsetBase> clone() const {
|
|
|
|
|
return std::auto_ptr<InsetBase>(new InsetPrintIndex(params()));
|
2000-10-10 11:50:43 +00:00
|
|
|
|
}
|
1999-09-27 18:44:28 +00:00
|
|
|
|
/// Updates needed features for this inset.
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void validate(LaTeXFeatures & features) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
///
|
2002-05-01 22:17:09 +00:00
|
|
|
|
EDITABLE editable() const { return NOT_EDITABLE; }
|
1999-09-27 18:44:28 +00:00
|
|
|
|
///
|
2003-07-25 21:20:24 +00:00
|
|
|
|
InsetOld::Code lyxCode() const;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
///
|
2003-10-22 10:22:09 +00:00
|
|
|
|
bool display() const { return true; }
|
|
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
|
std::string const getScreenLabel(Buffer const &) const;
|
2002-05-01 22:17:09 +00:00
|
|
|
|
///
|
2003-09-09 18:27:24 +00:00
|
|
|
|
void metrics(MetricsInfo &, Dimension &) const;
|
2003-08-26 10:33:59 +00:00
|
|
|
|
///
|
|
|
|
|
void draw(PainterInfo & pi, int x, int y) const;
|
|
|
|
|
private:
|
|
|
|
|
///
|
|
|
|
|
mutable unsigned int center_indent_;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|