1 /* This file is part of*
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 1997-2000 The LyX Team.
8 * ====================================================== */
11 // Created by asierra 970813
17 #pragma implementation
20 #include "insetparent.h"
21 #include "support/filetools.h"
22 #include "BufferView.h"
25 #include "commandtags.h"
32 InsetParent::InsetParent(InsetCommandParams const & p, Buffer * bf)
35 string fn = p.getContents();
37 setContents(MakeAbsPath(fn, OnlyPath(bf->fileName())));
43 string const InsetParent::getScreenLabel() const
45 return string(_("Parent:")) + getContents();
49 void InsetParent::Edit(BufferView * bv, int, int, unsigned int)
51 bv->owner()->getLyXFunc()->
52 Dispatch(LFUN_CHILDOPEN, getContents().c_str());
56 // LaTeX must just ignore this command
57 int InsetParent::Latex(Buffer const * buf, ostream & os,
58 bool fragile, bool free_spc) const
61 InsetCommand::Latex(buf, os, fragile, free_spc);