2000-07-04 19:16:35 +00:00
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
2001-05-30 13:53:44 +00:00
|
|
|
* Copyright 2000-2001 The LyX Team.
|
2000-07-04 19:16:35 +00:00
|
|
|
*
|
|
|
|
* ======================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "insetfootlike.h"
|
|
|
|
#include "lyxfont.h"
|
2000-07-15 23:51:46 +00:00
|
|
|
#include "buffer.h"
|
2000-07-04 19:16:35 +00:00
|
|
|
#include "lyxtext.h"
|
|
|
|
#include "support/LOstream.h"
|
|
|
|
|
|
|
|
|
2002-02-16 15:59:55 +00:00
|
|
|
using std::ostream;
|
|
|
|
|
|
|
|
|
2002-03-03 20:25:07 +00:00
|
|
|
InsetFootlike::InsetFootlike(BufferParams const & bp)
|
|
|
|
: InsetCollapsable(bp)
|
2000-07-04 19:16:35 +00:00
|
|
|
{
|
|
|
|
LyXFont font(LyXFont::ALL_SANE);
|
|
|
|
font.decSize();
|
|
|
|
font.decSize();
|
2001-06-05 17:05:51 +00:00
|
|
|
font.setColor(LColor::collapsable);
|
2000-07-04 19:16:35 +00:00
|
|
|
setLabelFont(font);
|
2001-07-27 12:03:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
InsetFootlike::InsetFootlike(InsetFootlike const & in, bool same_id)
|
|
|
|
: InsetCollapsable(in, same_id)
|
|
|
|
{
|
|
|
|
LyXFont font(LyXFont::ALL_SANE);
|
|
|
|
font.decSize();
|
|
|
|
font.decSize();
|
|
|
|
font.setColor(LColor::collapsable);
|
|
|
|
setLabelFont(font);
|
2000-07-04 19:16:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-02-16 15:59:55 +00:00
|
|
|
void InsetFootlike::write(Buffer const * buf, ostream & os) const
|
2000-07-04 19:16:35 +00:00
|
|
|
{
|
|
|
|
os << getInsetName() << "\n";
|
2001-06-28 10:25:20 +00:00
|
|
|
InsetCollapsable::write(buf, os);
|
2000-07-04 19:16:35 +00:00
|
|
|
}
|
2001-07-12 14:35:38 +00:00
|
|
|
|
|
|
|
|
2001-07-19 08:52:59 +00:00
|
|
|
bool InsetFootlike::insetAllowed(Inset::Code code) const
|
2001-07-12 14:35:38 +00:00
|
|
|
{
|
2001-07-23 09:11:14 +00:00
|
|
|
if ((code == Inset::FOOT_CODE) || (code == Inset::MARGIN_CODE)
|
|
|
|
|| (code ==Inset::FLOAT_CODE))
|
2001-07-12 14:35:38 +00:00
|
|
|
return false;
|
2001-07-19 08:52:59 +00:00
|
|
|
return InsetCollapsable::insetAllowed(code);
|
2001-07-12 14:35:38 +00:00
|
|
|
}
|