1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of*
|
1999-11-15 10:58:38 +00:00
|
|
|
* ======================================================
|
1999-09-27 18:44:28 +00:00
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
1999-11-04 01:40:20 +00:00
|
|
|
* Copyright 1995 Matthias Ettrich
|
2001-05-30 13:53:44 +00:00
|
|
|
* Copyright 1996-2001 the LyX Team.
|
1999-09-27 18:44:28 +00:00
|
|
|
*
|
1999-11-15 10:58:38 +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
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "insetcommand.h"
|
|
|
|
|
|
|
|
struct LaTeXFeatures;
|
|
|
|
|
|
|
|
/** Used to insert index labels
|
|
|
|
*/
|
2000-08-04 13:12:30 +00:00
|
|
|
class InsetIndex : public InsetCommand {
|
1999-09-27 18:44:28 +00:00
|
|
|
public:
|
|
|
|
///
|
2001-07-06 15:57:54 +00:00
|
|
|
InsetIndex(InsetCommandParams const &, bool same_id = false);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2001-07-06 15:57:54 +00:00
|
|
|
virtual Inset * clone(Buffer const &, bool same_id = false) const {
|
|
|
|
return new InsetIndex(params(), same_id);
|
2000-10-10 11:50:43 +00:00
|
|
|
}
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-09-14 17:53:12 +00:00
|
|
|
string const getScreenLabel() 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
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
void edit(BufferView *, int, int, unsigned int);
|
2001-07-20 14:18:48 +00:00
|
|
|
///
|
|
|
|
void edit(BufferView * bv, bool front = true);
|
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:
|
|
|
|
///
|
2001-07-06 15:57:54 +00:00
|
|
|
InsetPrintIndex(InsetCommandParams const &, bool same_id = false);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2001-07-06 15:57:54 +00:00
|
|
|
virtual Inset * clone(Buffer const &, bool same_id = false) const {
|
|
|
|
return new InsetPrintIndex(params(), same_id);
|
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
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
void edit(BufferView *, int, int, unsigned int) {}
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2001-07-20 14:18:48 +00:00
|
|
|
void edit(BufferView * bv, bool front = true) {}
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
EDITABLE editable() const{ return NOT_EDITABLE; }
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-22 16:19:48 +00:00
|
|
|
bool display() const { return true; }
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
Inset::Code lyxCode() const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-09-14 17:53:12 +00:00
|
|
|
string const getScreenLabel() const;
|
1999-09-27 18:44:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|