2000-09-22 15:09:51 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
|
|
|
* Copyright 2000 The LyX Team.
|
|
|
|
*
|
|
|
|
* ======================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FORMERROR_H
|
|
|
|
#define FORMERROR_H
|
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
#include <boost/smart_ptr.hpp>
|
|
|
|
#include "FormInset.h"
|
|
|
|
#include "xformsBC.h"
|
|
|
|
|
2000-09-22 15:09:51 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2000-09-27 05:40:29 +00:00
|
|
|
class InsetError;
|
2000-09-22 15:09:51 +00:00
|
|
|
struct FD_form_error;
|
|
|
|
|
|
|
|
/** This class provides an XForms implementation of the FormError Dialog.
|
|
|
|
*/
|
2000-10-13 05:57:05 +00:00
|
|
|
class FormError : public FormInset {
|
2000-09-22 15:09:51 +00:00
|
|
|
public:
|
|
|
|
/// Constructor
|
|
|
|
FormError(LyXView *, Dialogs *);
|
|
|
|
private:
|
2001-03-15 13:37:04 +00:00
|
|
|
/// Pointer to the actual instantiation of the ButtonController.
|
|
|
|
virtual xformsBC & bc();
|
2000-10-13 05:57:05 +00:00
|
|
|
/// Disconnect signals. Also perform any necessary housekeeping.
|
|
|
|
virtual void disconnect();
|
|
|
|
|
2000-09-22 15:09:51 +00:00
|
|
|
/// Slot launching dialog to an existing inset
|
2000-11-08 09:39:46 +00:00
|
|
|
void showInset(InsetError *);
|
2000-09-22 15:09:51 +00:00
|
|
|
/// Update dialog before showing it
|
2000-10-24 13:13:59 +00:00
|
|
|
virtual void update();
|
2000-09-22 15:09:51 +00:00
|
|
|
/// Build the dialog
|
2000-10-02 00:10:25 +00:00
|
|
|
virtual void build();
|
2001-03-05 19:02:40 +00:00
|
|
|
/// Pointer to the actual instantiation of the xforms form
|
2000-10-03 05:53:25 +00:00
|
|
|
virtual FL_FORM * form() const;
|
2000-09-22 15:09:51 +00:00
|
|
|
/// Fdesign generated method
|
|
|
|
FD_form_error * build_error();
|
|
|
|
|
|
|
|
/// Real GUI implementation.
|
2001-03-15 13:37:04 +00:00
|
|
|
boost::scoped_ptr<FD_form_error> dialog_;
|
2000-10-13 05:57:05 +00:00
|
|
|
/// pointer to the inset passed through showInset
|
|
|
|
InsetError * inset_;
|
2000-09-22 15:09:51 +00:00
|
|
|
/// the error message
|
|
|
|
string message_;
|
2001-03-15 13:37:04 +00:00
|
|
|
/// The ButtonController
|
|
|
|
ButtonController<OkCancelPolicy, xformsBC> bc_;
|
2000-09-22 15:09:51 +00:00
|
|
|
};
|
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
|
|
|
|
inline
|
|
|
|
xformsBC & FormError::bc()
|
|
|
|
{
|
|
|
|
return bc_;
|
|
|
|
}
|
2000-09-22 15:09:51 +00:00
|
|
|
#endif
|