3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Alejandro Aguilar Sierra
8 * Full author contact details are available in file CREDITS
12 // Created by asierra 970813
16 #include "insetparent.h"
17 #include "BufferView.h"
18 #include "frontends/LyXView.h"
19 #include "support/LOstream.h"
20 #include "funcrequest.h"
24 #include "support/filetools.h"
25 #include "support/lstrings.h"
30 InsetParent::InsetParent(InsetCommandParams const & p, Buffer const & bf)
33 string const fn = p.getContents();
34 setContents(MakeAbsPath(fn, bf.filePath()));
38 // InsetParent::InsetParent(InsetCommandParams const & p, Buffer const & bf, bool)
39 // : InsetCommand(p, false)
41 // string const fn = p.getContents();
42 // setContents(MakeAbsPath(fn, bf.filePath()));
46 string const InsetParent::getScreenLabel(Buffer const *) const
48 return bformat(_("Parent: %1$s"), getContents());
52 dispatch_result InsetParent::localDispatch(FuncRequest const & cmd)
56 cmd.view()->owner()->dispatch(FuncRequest(LFUN_CHILDOPEN, getContents()));
64 // LaTeX must just ignore this command
65 int InsetParent::latex(Buffer const * buf, ostream & os,
66 LatexRunParams const & runparams) const
69 InsetCommand::latex(buf, os, runparams);