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
|
|
|
|
*
|
2003-09-07 01:45:40 +00:00
|
|
|
|
* \author Herbert Vo<EFBFBD>
|
2002-09-05 14:10:50 +00:00
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* Full author contact details are available in file CREDITS.
|
2001-10-09 15:20:10 +00:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
2002-05-29 16:21:03 +00:00
|
|
|
|
#include "ControlShowFile.h"
|
2003-03-25 18:13:46 +00:00
|
|
|
|
#include "support/filetools.h"
|
2001-10-09 15:20:10 +00:00
|
|
|
|
|
2003-10-06 15:43:21 +00:00
|
|
|
|
|
2003-09-09 22:13:45 +00:00
|
|
|
|
using lyx::support::GetFileContents;
|
|
|
|
|
using lyx::support::OnlyFilename;
|
2003-06-30 23:56:22 +00:00
|
|
|
|
|
2003-10-06 15:43:21 +00:00
|
|
|
|
using std::string;
|
|
|
|
|
|
2002-05-29 16:21:03 +00:00
|
|
|
|
|
2003-03-25 18:13:46 +00:00
|
|
|
|
ControlShowFile::ControlShowFile(Dialog & parent)
|
|
|
|
|
: Dialog::Controller(parent)
|
2002-06-18 15:44:30 +00:00
|
|
|
|
{}
|
2001-10-09 15:20:10 +00:00
|
|
|
|
|
2002-05-29 16:21:03 +00:00
|
|
|
|
|
2003-03-25 18:13:46 +00:00
|
|
|
|
bool ControlShowFile::initialiseParams(string const & data)
|
|
|
|
|
{
|
|
|
|
|
filename_ = data;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ControlShowFile::clearParams()
|
2001-10-09 15:20:10 +00:00
|
|
|
|
{
|
2003-03-25 18:13:46 +00:00
|
|
|
|
filename_.erase();
|
2001-10-09 15:20:10 +00:00
|
|
|
|
}
|
|
|
|
|
|
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_);
|
|
|
|
|
}
|