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
|
|
|
|
*
|
1999-11-04 01:40:20 +00:00
|
|
|
* Copyright 1995 Matthias Ettrich
|
|
|
|
* Copyright 1995-1999 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_INFO_H
|
|
|
|
#define INSET_INFO_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "lyxinset.h"
|
|
|
|
#include FORMS_H_LOCATION
|
|
|
|
#include "LString.h"
|
|
|
|
|
|
|
|
/** Info. Handles the note insets.
|
|
|
|
|
|
|
|
This class handles the note insets. The edit operation bringes up
|
|
|
|
a dialog, where the user can type a note about life or something
|
|
|
|
else of interest. When collapsed, the inset is displayed as "Note"
|
|
|
|
in a yellow box. Currently, the Read-function is a terrible hack.
|
|
|
|
Some day in the distant future, this will hopefully be obsoleted by
|
|
|
|
a true comment-environment. */
|
|
|
|
class InsetInfo: public Inset {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
InsetInfo();
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
InsetInfo(string const & string);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
~InsetInfo();
|
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
int Ascent(LyXFont const & font) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
int Descent(LyXFont const & font) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
int Width(LyXFont const & font) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
void Write(FILE * file);
|
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
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
int Latex(FILE * file, signed char fragile);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
int Latex(string & file, signed char fragile);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
int Linuxdoc(string & file);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
int DocBook(string & file);
|
1999-09-27 18:44:28 +00:00
|
|
|
/// what appears in the minibuffer when opening
|
1999-11-04 01:40:20 +00:00
|
|
|
char const * EditMessage() {return "Opened note";}
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
void Edit(int, int);
|
|
|
|
///
|
|
|
|
unsigned char Editable() const;
|
|
|
|
///
|
|
|
|
Inset::Code LyxCode() const;
|
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
Inset * Clone();
|
1999-10-19 15:06:30 +00:00
|
|
|
///
|
|
|
|
static void CloseInfoCB(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
|