]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlShowFile.C
port the various dialogs to display the contents of an external file to the new Dialo...
[lyx.git] / src / frontends / controllers / ControlShowFile.C
1 /**
2  * \file ControlShowFile.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Herbert Voss
7  *
8  * Full author contact details are available in file CREDITS
9  */
10
11 #include <config.h>
12
13 #include "ControlShowFile.h"
14 #include "support/filetools.h"
15
16
17 ControlShowFile::ControlShowFile(Dialog & parent)
18         : Dialog::Controller(parent)
19 {}
20
21
22 bool ControlShowFile::initialiseParams(string const & data)
23 {
24         filename_ = data;
25         return true;
26 }
27
28
29 void ControlShowFile::clearParams()
30 {
31         filename_.erase();
32 }
33
34
35 string ControlShowFile::getFileContents()
36 {
37         return GetFileContents(filename_);
38 }
39
40
41 string ControlShowFile::getFileName()
42 {
43         return OnlyFilename(filename_);
44 }