lyx_mirror/src/frontends/xforms/FormError.C
Angus Leeming 467323b2b8 Removed // -*- C++ -*- from all .C files!
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2121 a592a061-630c-0410-9148-cb99ea01b6c8
2001-06-13 15:11:17 +00:00

49 lines
979 B
C

/*
* \file FormError.C
* This file is part of
* ======================================================
*
* LyX, The Document Processor
*
* Copyright 2000-2001 The LyX Team.
*
* ======================================================
*
* \author Angus Leeming, a.leeming@.ac.uk
*/
#ifdef __GNUG__
#pragma implementation
#endif
#include <config.h>
#include "xformsBC.h"
#include "ControlError.h"
#include "FormError.h"
#include "form_error.h"
#include "xforms_helpers.h" // formatted
typedef FormCB<ControlError, FormDB<FD_form_error> > base_class;
FormError::FormError(ControlError & c)
: base_class(c, _("LaTeX Error"))
{}
void FormError::build()
{
dialog_.reset(build_error());
// Manage the cancel/close button
bc().setCancel(dialog_->button_cancel);
}
void FormError::update()
{
string const txt = formatted(controller().params(),
dialog_->message->w - 10);
fl_set_object_label(dialog_->message, txt.c_str());
}