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-01-24 18:34:46 +00:00
|
|
|
* Copyright 1997-1999 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"
|
|
|
|
#include "gettext.h"
|
|
|
|
// Created by asierra 970813
|
|
|
|
|
|
|
|
/** 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:
|
|
|
|
/// Non-standard LyX macro
|
1999-11-24 22:14:46 +00:00
|
|
|
InsetParent() : InsetCommand("lyxparent") {}
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-12-07 00:44:53 +00:00
|
|
|
InsetParent(string const & fn, Buffer * owner = 0);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-02-18 22:22:42 +00:00
|
|
|
int Latex(ostream &, signed char fragile) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-02-18 22:22:42 +00:00
|
|
|
int Latex(string & file, signed char fragile) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-24 22:14:46 +00:00
|
|
|
Inset * Clone() const { return new InsetParent(getContents()); }
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-24 22:14:46 +00:00
|
|
|
string getScreenLabel() const {
|
|
|
|
return string(_("Parent:")) + getContents();
|
|
|
|
}
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-02-22 00:36:17 +00:00
|
|
|
void Edit(BufferView *, int, int);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
unsigned char Editable() const {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
///
|
|
|
|
Inset::Code LyxCode() const { return Inset::PARENT_CODE; }
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
void setParent(string fn) { setContents(fn); }
|
1999-09-27 18:44:28 +00:00
|
|
|
};
|
|
|
|
#endif
|