mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 21:49:51 +00:00
ba61c3aa4c
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2859 a592a061-630c-0410-9148-cb99ea01b6c8
38 lines
864 B
C
38 lines
864 B
C
/* FormHelp.C
|
|
* (C) 2001 LyX Team
|
|
* \author Herbert Voss <voss@perce.de>
|
|
*/
|
|
|
|
#include <config.h>
|
|
|
|
#ifdef __GNUG__
|
|
#pragma implementation
|
|
#endif
|
|
|
|
#include "xformsBC.h"
|
|
#include "ControlShowFile.h"
|
|
#include "FormShowFile.h"
|
|
#include "form_browser.h"
|
|
#include "gettext.h"
|
|
|
|
FormShowFile::FormShowFile(ControlShowFile & c)
|
|
: FormCB<ControlShowFile, FormBrowser>(c, string())
|
|
{}
|
|
|
|
|
|
void FormShowFile::update()
|
|
{
|
|
fl_hide_object(dialog_->button_update);
|
|
fl_clear_browser(dialog_->browser);
|
|
// courier medium
|
|
fl_set_browser_fontstyle(dialog_->browser,FL_FIXED_STYLE);
|
|
fl_set_form_title(dialog_->form, controller().getFileName().c_str());
|
|
|
|
string const contents = controller().getFileContents();
|
|
if (contents.empty())
|
|
fl_add_browser_line(dialog_->browser,
|
|
"Error -> Cannot load file!");
|
|
else
|
|
fl_add_browser_line(dialog_->browser, contents.c_str());
|
|
}
|