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"
28 InsetParent::InsetParent(string const & fn, Buffer * owner)
29 : InsetCommand("lyxparent")
32 setContents(MakeAbsPath(fn, OnlyPath(owner->fileName())));
38 void InsetParent::Edit(BufferView * bv, int, int, unsigned int)
40 bv->owner()->getLyXFunc()->
41 Dispatch(LFUN_CHILDOPEN, getContents().c_str());
45 // LaTeX must just ignore this command
46 int InsetParent::Latex(ostream & os, signed char fragile, bool free_spc) const
49 InsetCommand::Latex(os, fragile, free_spc);
54 #ifndef USE_OSTREAM_ONLY
55 // LaTeX must just ignore this command
56 int InsetParent::Latex(string & file, signed char fragile, bool free_spc) const
59 InsetCommand::Latex(file, fragile, free_spc);