#define INSETCAPTION_H
#include "InsetText.h"
-#include "LyXTextClass.h"
+#include "TextClass.h"
namespace lyx {
class InsetCaption : public InsetText {
public:
///
+ InsetCaption(InsetCaption const &);
InsetCaption(BufferParams const &);
///
virtual ~InsetCaption() {}
///
void read(Buffer const & buf, Lexer & lex);
///
- virtual bool display() const;
+ virtual DisplayType display() const;
///
virtual bool neverIndent(Buffer const &) const { return true; }
///
- virtual InsetBase::Code lyxCode() const;
+ virtual Inset::Code lyxCode() const;
///
virtual docstring const editMessage() const;
///
///
void drawSelection(PainterInfo & pi, int x, int y) const;
///
- virtual void edit(LCursor & cur, bool left);
+ virtual void edit(Cursor & cur, bool left);
///
- virtual InsetBase * editXY(LCursor & cur, int x, int y);
+ virtual Inset * editXY(Cursor & cur, int x, int y);
///
- bool insetAllowed(InsetBase::Code code) const;
+ bool insetAllowed(Inset::Code code) const;
///
- virtual bool getStatus(LCursor & cur, FuncRequest const & cmd, FuncStatus &) const;
+ virtual bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
///
virtual bool wide() const { return false; }
///
///
int docbook(Buffer const & buf, odocstream & os,
OutputParams const & runparams) const;
+ /// return the mandatory argument (LaTeX format) only
+ int getArgument(Buffer const & buf, odocstream & os,
+ OutputParams const &) const;
+ /// return the optional argument(s) only
+ int getOptArg(Buffer const & buf, odocstream & os,
+ OutputParams const &) const;
///
void setCount(int c) { counter_ = c; }
///
private:
///
- void computeFullLabel() const;
+ void computeFullLabel(Buffer const & buf) const;
///
- virtual std::auto_ptr<InsetBase> doClone() const;
+ virtual std::auto_ptr<Inset> doClone() const;
///
mutable docstring full_label_;
///
///
int counter_;
///
- LyXTextClass const & textclass_;
+ TextClass const & textclass_;
};
inline
-bool InsetCaption::display() const
+Inset::DisplayType InsetCaption::display() const
{
- return true;
+ return AlignCenter;
}
inline
-InsetBase::Code InsetCaption::lyxCode() const
+Inset::Code InsetCaption::lyxCode() const
{
return CAPTION_CODE;
}