1 /* This file is part of*
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright (C) 1997-1998 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 fn, Buffer* owner): InsetCommand("lyxparent")
34 setContents(MakeAbsPath(fn, OnlyPath(owner->getFileName())));
39 void InsetParent::Edit(int, int)
41 current_view->getOwner()->getLyXFunc()->Dispatch(LFUN_CHILDOPEN,
42 getContents().c_str());
45 // LaTeX must just ignore this command
46 int InsetParent::Latex(FILE *file, signed char fragile)
48 fprintf(file, "%%#{lyx}");
49 InsetCommand::Latex(file, fragile);
53 // LaTeX must just ignore this command
54 int InsetParent::Latex(string &file, signed char fragile)
57 InsetCommand::Latex(file, fragile);