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
|
|
|
|
*
|
2000-03-16 04:29:22 +00:00
|
|
|
* Copyright 1997-2000 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_PARENT_H
|
|
|
|
#define INSET_PARENT_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
|
|
|
|
|
|
|
/** Reference to the parent document.
|
|
|
|
|
|
|
|
Useful to load a parent document from a child document and to
|
|
|
|
share parent's properties between preambleless children.
|
|
|
|
*/
|
1999-11-24 22:14:46 +00:00
|
|
|
class InsetParent : public InsetCommand {
|
1999-09-27 18:44:28 +00:00
|
|
|
public:
|
|
|
|
///
|
2000-08-04 13:12:30 +00:00
|
|
|
InsetParent(InsetCommandParams const &, Buffer * owner = 0);
|
|
|
|
///
|
|
|
|
Inset * Clone() const { return new InsetParent(params()); }
|
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
|
|
|
///
|
2000-08-04 13:12:30 +00:00
|
|
|
EDITABLE Editable() const { return IS_EDITABLE; }
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
Inset::Code LyxCode() const { return Inset::PARENT_CODE; }
|
|
|
|
///
|
2000-08-04 13:12:30 +00:00
|
|
|
void Edit(BufferView *, int, int, unsigned int);
|
|
|
|
///
|
|
|
|
int Latex(Buffer const *, std::ostream &,
|
|
|
|
bool fragile, bool free_spc) const;
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
void setParent(string fn) { setContents(fn); }
|
1999-09-27 18:44:28 +00:00
|
|
|
};
|
|
|
|
#endif
|