2001-10-09 15:20:10 +00:00
|
|
|
/**
|
|
|
|
* \file ControlShowFile.C
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2001-10-09 15:20:10 +00:00
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* \author Herbert Voss
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
2001-10-09 15:20:10 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
2002-05-29 16:21:03 +00:00
|
|
|
#include "ControlShowFile.h"
|
|
|
|
|
2001-10-09 15:20:10 +00:00
|
|
|
#include "support/filetools.h" // FileSearch
|
|
|
|
|
2002-05-29 16:21:03 +00:00
|
|
|
|
2001-10-09 15:20:10 +00:00
|
|
|
ControlShowFile::ControlShowFile(LyXView & lv, Dialogs & d)
|
2002-01-16 14:47:58 +00:00
|
|
|
: ControlDialogBI(lv, d)
|
2002-06-18 15:44:30 +00:00
|
|
|
{}
|
2001-10-09 15:20:10 +00:00
|
|
|
|
2002-05-29 16:21:03 +00:00
|
|
|
|
2001-10-09 15:20:10 +00:00
|
|
|
void ControlShowFile::showFile(string const & file)
|
|
|
|
{
|
|
|
|
filename_ = file;
|
|
|
|
show();
|
|
|
|
}
|
|
|
|
|
2002-05-29 16:21:03 +00:00
|
|
|
|
2001-10-09 15:20:10 +00:00
|
|
|
string ControlShowFile::getFileContents()
|
|
|
|
{
|
|
|
|
return GetFileContents(filename_);
|
|
|
|
}
|
|
|
|
|
2002-05-29 16:21:03 +00:00
|
|
|
|
2001-10-09 15:20:10 +00:00
|
|
|
string ControlShowFile::getFileName()
|
|
|
|
{
|
|
|
|
return OnlyFilename(filename_);
|
|
|
|
}
|