2000-03-08 13:52:57 +00:00
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
2002-03-21 17:09:55 +00:00
|
|
|
*
|
2000-03-08 13:52:57 +00:00
|
|
|
* LyX, The Document Processor
|
2002-03-21 17:09:55 +00:00
|
|
|
*
|
2000-03-09 23:58:55 +00:00
|
|
|
* Copyright 1998 The LyX Team.
|
2000-03-08 13:52:57 +00:00
|
|
|
*
|
2000-06-28 16:03:01 +00:00
|
|
|
* ======================================================
|
|
|
|
*/
|
2000-03-08 13:52:57 +00:00
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "insetfoot.h"
|
|
|
|
#include "gettext.h"
|
|
|
|
#include "lyxfont.h"
|
|
|
|
#include "BufferView.h"
|
2000-06-19 15:33:58 +00:00
|
|
|
#include "lyxtext.h"
|
2000-07-04 11:30:07 +00:00
|
|
|
#include "insets/insettext.h"
|
2000-04-08 17:02:02 +00:00
|
|
|
#include "support/LOstream.h"
|
2000-07-04 19:16:35 +00:00
|
|
|
#include "debug.h"
|
2000-03-08 13:52:57 +00:00
|
|
|
|
2000-07-04 19:16:35 +00:00
|
|
|
|
2002-02-16 15:59:55 +00:00
|
|
|
using std::ostream;
|
|
|
|
|
|
|
|
|
2002-03-03 20:25:07 +00:00
|
|
|
InsetFoot::InsetFoot(BufferParams const & bp)
|
|
|
|
: InsetFootlike(bp)
|
2000-03-08 13:52:57 +00:00
|
|
|
{
|
2001-04-02 14:02:58 +00:00
|
|
|
setLabel(_("foot"));
|
|
|
|
setInsetName("Foot");
|
2000-03-08 13:52:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-07-27 12:03:36 +00:00
|
|
|
InsetFoot::InsetFoot(InsetFoot const & in, bool same_id)
|
|
|
|
: InsetFootlike(in, same_id)
|
|
|
|
{
|
|
|
|
setLabel(_("foot"));
|
|
|
|
setInsetName("Foot");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Inset * InsetFoot::clone(Buffer const &, bool same_id) const
|
|
|
|
{
|
|
|
|
return new InsetFoot(*const_cast<InsetFoot *>(this), same_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
string const InsetFoot::editMessage() const
|
2000-03-08 13:52:57 +00:00
|
|
|
{
|
2001-04-02 14:02:58 +00:00
|
|
|
return _("Opened Footnote Inset");
|
2000-03-08 13:52:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
int InsetFoot::latex(Buffer const * buf,
|
2002-02-16 15:59:55 +00:00
|
|
|
ostream & os, bool fragile, bool fp) const
|
2000-03-08 13:52:57 +00:00
|
|
|
{
|
2001-06-29 14:01:29 +00:00
|
|
|
os << "%\n\\footnote{";
|
2002-03-21 17:09:55 +00:00
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
int const i = inset.latex(buf, os, fragile, fp);
|
2001-06-29 14:01:29 +00:00
|
|
|
os << "%\n}";
|
2002-03-21 17:09:55 +00:00
|
|
|
|
2001-04-02 14:02:58 +00:00
|
|
|
return i + 2;
|
2000-03-08 13:52:57 +00:00
|
|
|
}
|