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-10-21 17:38:09 +00:00
|
|
|
* \author Herbert Voss
|
2002-09-05 14:10:50 +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
|
|
|
|
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_);
|
|
|
|
}
|