1 /* This file is part of*
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 1997-2001 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"
23 #include "frontends/LyXView.h"
24 #include "support/LOstream.h"
25 #include "funcrequest.h"
32 InsetParent::InsetParent(InsetCommandParams const & p, Buffer const & bf, bool)
35 string const fn = p.getContents();
36 setContents(MakeAbsPath(fn, bf.filePath()));
40 string const InsetParent::getScreenLabel(Buffer const *) const
42 return string(_("Parent:")) + getContents();
46 void InsetParent::edit(BufferView * bv, int, int, mouse_button::state)
48 bv->owner()->dispatch(FuncRequest(LFUN_CHILDOPEN, getContents()));
52 void InsetParent::edit(BufferView * bv, bool)
54 edit(bv, 0, 0, mouse_button::none);
58 // LaTeX must just ignore this command
59 int InsetParent::latex(Buffer const * buf, ostream & os,
60 bool fragile, bool free_spc) const
63 InsetCommand::latex(buf, os, fragile, free_spc);