1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of*
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Word Processor
|
|
|
|
*
|
1999-11-04 01:40:20 +00:00
|
|
|
* Copyright 1995 Matthias Ettrich
|
2000-03-16 04:29:22 +00:00
|
|
|
* Copyright 1996-2000 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_TOC_H
|
|
|
|
#define INSET_TOC_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "insetcommand.h"
|
|
|
|
|
2000-02-25 12:06:15 +00:00
|
|
|
class Buffer;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
/** Used to insert table of contents
|
|
|
|
*/
|
1999-11-24 22:14:46 +00:00
|
|
|
class InsetTOC : public InsetCommand {
|
1999-09-27 18:44:28 +00:00
|
|
|
public:
|
|
|
|
///
|
1999-11-24 22:14:46 +00:00
|
|
|
InsetTOC() : InsetCommand("tableofcontents") {}
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-04-08 17:02:02 +00:00
|
|
|
explicit
|
1999-11-24 22:14:46 +00:00
|
|
|
InsetTOC(Buffer * b) : InsetCommand("tableofcontents"), owner(b) {}
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-24 22:14:46 +00:00
|
|
|
Inset * Clone() const { return new InsetTOC(owner); }
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-04-04 00:19:15 +00:00
|
|
|
string getScreenLabel() const;
|
1999-09-27 18:44:28 +00:00
|
|
|
/// On edit, we open the TOC pop-up
|
2000-02-25 12:06:15 +00:00
|
|
|
void Edit(BufferView * bv, int, int, unsigned int);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-03-08 13:52:57 +00:00
|
|
|
EDITABLE Editable() const {
|
|
|
|
return IS_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
|
|
|
///
|
|
|
|
Inset::Code LyxCode() const { return Inset::TOC_CODE; }
|
2000-03-06 02:42:40 +00:00
|
|
|
///
|
2000-06-12 11:27:15 +00:00
|
|
|
int Linuxdoc(Buffer const *, std::ostream &) const;
|
2000-03-06 02:42:40 +00:00
|
|
|
///
|
2000-06-12 11:27:15 +00:00
|
|
|
int DocBook(Buffer const *, std::ostream &) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
private:
|
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
Buffer * owner;
|
1999-09-27 18:44:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|