2000-07-17 18:27:53 +00:00
|
|
|
|
// -*- C++ -*-
|
2002-09-25 14:26:13 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file insetcaption.h
|
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-03-21 17:09:55 +00:00
|
|
|
|
*
|
2002-09-25 14:26:13 +00:00
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes
|
2000-07-17 18:27:53 +00:00
|
|
|
|
*
|
2002-09-25 14:26:13 +00:00
|
|
|
|
* Full author contact details are available in file CREDITS
|
2000-07-17 18:27:53 +00:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef INSETCAPTION_H
|
|
|
|
|
#define INSETCAPTION_H
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "insettext.h"
|
|
|
|
|
|
|
|
|
|
/** A caption inset
|
|
|
|
|
*/
|
|
|
|
|
class InsetCaption : public InsetText {
|
|
|
|
|
public:
|
2001-03-11 03:20:44 +00:00
|
|
|
|
///
|
2002-03-03 20:25:07 +00:00
|
|
|
|
InsetCaption(BufferParams const &);
|
2000-07-18 17:45:27 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void write(Buffer const * buf, std::ostream & os) const;
|
2000-07-18 17:45:27 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void read(Buffer const * buf, LyXLex & lex);
|
2000-07-18 17:45:27 +00:00
|
|
|
|
///
|
2003-05-19 17:03:12 +00:00
|
|
|
|
virtual bool display() const;
|
2001-03-11 03:20:44 +00:00
|
|
|
|
///
|
2003-05-19 17:03:12 +00:00
|
|
|
|
virtual bool needFullRow() const;
|
2001-03-11 03:20:44 +00:00
|
|
|
|
///
|
2003-05-19 17:03:12 +00:00
|
|
|
|
virtual Inset::Code lyxCode() const;
|
2001-03-11 03:20:44 +00:00
|
|
|
|
///
|
2003-05-19 17:03:12 +00:00
|
|
|
|
virtual string const editMessage() const;
|
2001-03-11 03:20:44 +00:00
|
|
|
|
///
|
2003-05-19 17:03:12 +00:00
|
|
|
|
virtual void draw(BufferView * bv, LyXFont const & f,
|
2003-03-17 01:34:36 +00:00
|
|
|
|
int baseline, float & x) const;
|
2001-03-11 03:20:44 +00:00
|
|
|
|
///
|
2003-05-22 22:44:30 +00:00
|
|
|
|
virtual int latex(Buffer const * buf, std::ostream & os,
|
|
|
|
|
LatexRunParams const &,
|
|
|
|
|
bool free_spc) const;
|
2001-03-11 03:20:44 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
int ascii(Buffer const * buf, std::ostream & os, int linelen) const;
|
2001-03-11 03:20:44 +00:00
|
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
|
int docbook(Buffer const * buf, std::ostream & os, bool mixcont) const;
|
2000-07-17 18:27:53 +00:00
|
|
|
|
};
|
|
|
|
|
|
2001-03-11 03:20:44 +00:00
|
|
|
|
|
|
|
|
|
inline
|
|
|
|
|
bool InsetCaption::display() const
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inline
|
2002-03-21 17:09:55 +00:00
|
|
|
|
bool InsetCaption::needFullRow() const
|
2001-03-11 03:20:44 +00:00
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inline
|
2002-03-21 17:09:55 +00:00
|
|
|
|
Inset::Code InsetCaption::lyxCode() const
|
2001-03-11 03:20:44 +00:00
|
|
|
|
{
|
|
|
|
|
return CAPTION_CODE;
|
|
|
|
|
}
|
2003-05-19 17:03:12 +00:00
|
|
|
|
|
2000-07-17 18:27:53 +00:00
|
|
|
|
#endif
|