1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of*
|
1999-11-15 10:58:38 +00:00
|
|
|
* ======================================================
|
1999-09-27 18:44:28 +00:00
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
2000-02-10 17:53:36 +00:00
|
|
|
* Copyright 1995 Matthias Ettrich
|
|
|
|
* Copyright 1995-2000 The LyX Team.
|
1999-09-27 18:44:28 +00:00
|
|
|
*
|
1999-11-15 10:58:38 +00:00
|
|
|
* ====================================================== */
|
1999-09-27 18:44:28 +00:00
|
|
|
|
1999-11-04 01:40:20 +00:00
|
|
|
#ifndef INSET_ERROR_H
|
|
|
|
#define INSET_ERROR_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include FORMS_H_LOCATION
|
|
|
|
#include "lyxinset.h"
|
|
|
|
#include "LString.h"
|
|
|
|
#include "gettext.h"
|
|
|
|
|
|
|
|
/** Used for error messages from LaTeX runs.
|
|
|
|
|
|
|
|
The edit-operation opens a
|
|
|
|
dialog with the text of the error-message. The inset is displayed as
|
|
|
|
"Error" in a box, and automatically deleted. */
|
|
|
|
class InsetError: public Inset {
|
|
|
|
public:
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
InsetError(string const & string);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
InsetError();
|
|
|
|
///
|
|
|
|
~InsetError();
|
2000-02-10 17:53:36 +00:00
|
|
|
///
|
|
|
|
int ascent(Painter &, LyXFont const & font) const;
|
|
|
|
///
|
|
|
|
int descent(Painter &, LyXFont const & font) const;
|
|
|
|
///
|
|
|
|
int width(Painter &, LyXFont const & font) const;
|
|
|
|
///
|
2000-02-25 12:06:15 +00:00
|
|
|
void draw(Painter &, LyXFont const & font, int baseline, float & x) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-04-04 00:19:15 +00:00
|
|
|
void Write(std::ostream &) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
void Read(LyXLex & lex);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-04-04 00:19:15 +00:00
|
|
|
int Latex(std::ostream &, signed char fragile, bool free_spc) const;
|
2000-03-06 02:42:40 +00:00
|
|
|
///
|
2000-04-04 00:19:15 +00:00
|
|
|
int Linuxdoc(std::ostream &) const;
|
2000-03-06 02:42:40 +00:00
|
|
|
///
|
2000-04-04 00:19:15 +00:00
|
|
|
int DocBook(std::ostream &) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
bool AutoDelete() const;
|
|
|
|
/// what appears in the minibuffer when opening
|
2000-04-04 00:19:15 +00:00
|
|
|
char const * EditMessage() const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-02-25 12:06:15 +00:00
|
|
|
void Edit(BufferView *, int x, int y, unsigned int button);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-03-08 13:52:57 +00:00
|
|
|
EDITABLE Editable() const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-24 22:14:46 +00:00
|
|
|
Inset * Clone() const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
Inset::Code LyxCode() const { return Inset::NO_CODE; }
|
|
|
|
/// We don't want "begin" and "end inset" in lyx-file
|
|
|
|
bool DirectWrite() const { return true; };
|
1999-10-19 15:06:30 +00:00
|
|
|
///
|
|
|
|
static void CloseErrorCB(FL_OBJECT *, long data);
|
1999-09-27 18:44:28 +00:00
|
|
|
private:
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string contents;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
FL_FORM * form;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
FL_OBJECT * strobj;
|
1999-09-27 18:44:28 +00:00
|
|
|
};
|
|
|
|
#endif
|