1 /* This file is part of*
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright (C) 1997-1999 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 extern BufferView * current_view;
31 InsetParent::InsetParent(string const & fn, Buffer * owner)
32 : InsetCommand("lyxparent")
35 setContents(MakeAbsPath(fn, OnlyPath(owner->fileName())));
41 void InsetParent::Edit(int, int)
43 current_view->owner()->getLyXFunc()->Dispatch(LFUN_CHILDOPEN,
44 getContents().c_str());
48 // LaTeX must just ignore this command
49 int InsetParent::Latex(ostream & os, signed char fragile)
52 InsetCommand::Latex(os, fragile);
57 // LaTeX must just ignore this command
58 int InsetParent::Latex(string & file, signed char fragile)
61 InsetCommand::Latex(file, fragile);