]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlShowFile.C
Herbert's TeX Info extravaganza.
[lyx.git] / src / frontends / controllers / ControlShowFile.C
1 /**
2  * \file ControlShowFile.C
3  * Copyright 2001 The LyX Team.
4  * See the file COPYING.
5  *
6  * \author Herbert Voss <voss@perce.de>
7  */
8
9 #include <config.h>
10 #include <fstream>
11
12 #ifdef __GNUG__
13 #pragma implementation
14 #endif
15
16 #include "ViewBase.h"
17 #include "ButtonControllerBase.h"
18 #include "ControlShowFile.h"
19 #include "Dialogs.h"
20 #include "LyXView.h"
21 #include "BufferView.h"
22 #include "gettext.h"
23 #include "support/filetools.h" // FileSearch
24
25 ControlShowFile::ControlShowFile(LyXView & lv, Dialogs & d)
26         : ControlDialog<ControlConnectBI>(lv, d)
27 {
28         d_.showFile.connect(SigC::slot(this, &ControlShowFile::showFile));
29 }
30
31 void ControlShowFile::showFile(string const & file)
32 {
33         filename_ = file;
34         show();
35 }
36
37 string ControlShowFile::getFileContents()
38 {
39         return GetFileContents(filename_);
40 }
41
42 string ControlShowFile::getFileName()
43 {
44         return OnlyFilename(filename_);
45 }