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
|
|
|
|
* Copyright 1996-1999 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"
|
|
|
|
#include "gettext.h"
|
|
|
|
|
|
|
|
// Created by Lgb 970527
|
|
|
|
|
|
|
|
/** 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
|
|
|
///
|
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
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string getScreenLabel() const { return _("Table of Contents"); }
|
1999-09-27 18:44:28 +00:00
|
|
|
/// On edit, we open the TOC pop-up
|
|
|
|
void Edit(int, int);
|
|
|
|
///
|
|
|
|
unsigned char Editable() const {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
///
|
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-02-21 13:53:54 +00:00
|
|
|
int Linuxdoc(string & file) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-02-21 13:53:54 +00:00
|
|
|
int DocBook(string & file) 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
|