1999-09-27 18:44:28 +00:00
|
|
|
|
// -*- C++ -*-
|
2002-09-25 14:26:13 +00:00
|
|
|
|
/**
|
2007-04-25 01:24:38 +00:00
|
|
|
|
* \file InsetIndex.h
|
2002-09-25 14:26:13 +00:00
|
|
|
|
* 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
|
|
|
|
|
|
|
|
|
|
2007-10-03 13:38:19 +00:00
|
|
|
|
#include "InsetCollapsable.h"
|
2007-04-25 01:24:38 +00:00
|
|
|
|
#include "InsetCommand.h"
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
|
2005-01-19 15:03:31 +00:00
|
|
|
|
class LaTeXFeatures;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2002-03-21 17:09:55 +00:00
|
|
|
|
/** Used to insert index labels
|
1999-09-27 18:44:28 +00:00
|
|
|
|
*/
|
2007-10-03 13:38:19 +00:00
|
|
|
|
class InsetIndex : public InsetCollapsable {
|
1999-09-27 18:44:28 +00:00
|
|
|
|
public:
|
|
|
|
|
///
|
2007-10-03 13:38:19 +00:00
|
|
|
|
InsetIndex(BufferParams const &);
|
2003-05-26 09:13:55 +00:00
|
|
|
|
///
|
2007-10-03 13:38:19 +00:00
|
|
|
|
InsetIndex(InsetIndex 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
|
|
|
|
///
|
2007-04-29 13:39:47 +00:00
|
|
|
|
Inset::Code lyxCode() const;
|
2001-11-02 16:11:19 +00:00
|
|
|
|
///
|
2007-10-03 13:38:19 +00:00
|
|
|
|
///
|
|
|
|
|
void metrics(MetricsInfo &, Dimension &) const;
|
|
|
|
|
///
|
|
|
|
|
void draw(PainterInfo &, int, int) const;
|
|
|
|
|
///
|
|
|
|
|
docstring name() const { return from_ascii("Index"); }
|
|
|
|
|
///
|
|
|
|
|
void getDrawFont(Font &) const;
|
|
|
|
|
///
|
|
|
|
|
void write(Buffer const & buf, std::ostream & os) const;
|
|
|
|
|
///
|
2006-10-21 00:16:43 +00:00
|
|
|
|
int docbook(Buffer const &, odocstream &,
|
2003-11-05 12:06:20 +00:00
|
|
|
|
OutputParams const &) const;
|
2007-10-03 13:38:19 +00:00
|
|
|
|
/// should paragraph indendation be omitted in any case?
|
|
|
|
|
bool neverIndent(Buffer const &) const { return true; }
|
|
|
|
|
|
2004-11-23 23:04:52 +00:00
|
|
|
|
private:
|
2007-10-03 13:38:19 +00:00
|
|
|
|
///
|
|
|
|
|
bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
|
|
|
|
|
///
|
|
|
|
|
virtual Inset * clone() const;
|
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 &);
|
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
|
|
|
|
///
|
2007-04-29 13:39:47 +00:00
|
|
|
|
Inset::Code lyxCode() const;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
///
|
2007-05-18 14:32:29 +00:00
|
|
|
|
DisplayType display() const { return AlignCenter; }
|
2003-10-22 10:22:09 +00:00
|
|
|
|
///
|
2006-10-21 00:16:43 +00:00
|
|
|
|
docstring const getScreenLabel(Buffer const &) const;
|
2004-11-23 23:04:52 +00:00
|
|
|
|
private:
|
2007-08-30 18:03:17 +00:00
|
|
|
|
virtual Inset * clone() const {
|
|
|
|
|
return new InsetPrintIndex(params());
|
2004-11-23 23:04:52 +00:00
|
|
|
|
}
|
1999-09-27 18:44:28 +00:00
|
|
|
|
};
|
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
|
#endif
|