2000-07-17 18:27:53 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
2001-03-11 03:20:44 +00:00
|
|
|
* Copyright 2000-2001 The LyX Team.
|
2000-07-17 18:27:53 +00:00
|
|
|
*
|
|
|
|
*======================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef INSETCAPTION_H
|
|
|
|
#define INSETCAPTION_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "insettext.h"
|
|
|
|
|
|
|
|
/** A caption inset
|
|
|
|
*/
|
|
|
|
class InsetCaption : public InsetText {
|
|
|
|
public:
|
2001-03-11 03:20:44 +00:00
|
|
|
///
|
|
|
|
InsetCaption();
|
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
|
|
|
///
|
2001-03-11 03:20:44 +00:00
|
|
|
virtual
|
|
|
|
bool display() const;
|
|
|
|
///
|
|
|
|
virtual
|
|
|
|
bool needFullRow() const;
|
|
|
|
///
|
|
|
|
virtual
|
2001-06-28 10:25:20 +00:00
|
|
|
Inset::Code lyxCode() const;
|
2001-03-11 03:20:44 +00:00
|
|
|
///
|
|
|
|
virtual
|
2001-06-28 10:25:20 +00:00
|
|
|
string const editMessage() const;
|
2001-03-11 03:20:44 +00:00
|
|
|
///
|
|
|
|
virtual
|
|
|
|
void draw(BufferView * bv, LyXFont const & f,
|
|
|
|
int baseline, float & x, bool cleared) const;
|
|
|
|
///
|
|
|
|
virtual
|
2001-06-28 10:25:20 +00:00
|
|
|
int latex(Buffer const * buf, std::ostream & os,
|
2001-03-11 03:20:44 +00:00
|
|
|
bool fragile, bool free_spc) const;
|
|
|
|
///
|
|
|
|
virtual
|
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
|
|
|
///
|
|
|
|
virtual
|
2001-09-04 11:02:09 +00:00
|
|
|
int docbook(Buffer const * buf, std::ostream & os) const;
|
2000-07-17 18:27:53 +00:00
|
|
|
protected:
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
2001-03-11 03:20:44 +00:00
|
|
|
|
|
|
|
inline
|
|
|
|
bool InsetCaption::display() const
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline
|
|
|
|
bool InsetCaption::needFullRow() const
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline
|
2001-06-28 10:25:20 +00:00
|
|
|
Inset::Code InsetCaption::lyxCode() const
|
2001-03-11 03:20:44 +00:00
|
|
|
{
|
|
|
|
return CAPTION_CODE;
|
|
|
|
}
|
2000-07-17 18:27:53 +00:00
|
|
|
#endif
|