2000-06-28 13:35:52 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
|
|
|
* Copyright 1998 The LyX Team.
|
|
|
|
*
|
|
|
|
*======================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef InsetMinipage_H
|
|
|
|
#define InsetMinipage_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "insetcollapsable.h"
|
2001-03-14 14:53:55 +00:00
|
|
|
#include "vspace.h"
|
2000-06-28 13:35:52 +00:00
|
|
|
|
2000-07-15 23:51:46 +00:00
|
|
|
/** The minipage inset
|
2000-06-28 13:35:52 +00:00
|
|
|
|
|
|
|
*/
|
|
|
|
class InsetMinipage : public InsetCollapsable {
|
|
|
|
public:
|
2001-03-14 14:53:55 +00:00
|
|
|
///
|
|
|
|
enum Position {
|
|
|
|
center,
|
|
|
|
top,
|
|
|
|
bottom
|
|
|
|
};
|
|
|
|
///
|
|
|
|
enum InnerPosition {
|
|
|
|
inner_center,
|
|
|
|
inner_top,
|
|
|
|
inner_bottom,
|
|
|
|
inner_stretch
|
|
|
|
};
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
|
|
|
InsetMinipage();
|
|
|
|
///
|
2000-06-28 14:55:57 +00:00
|
|
|
void Write(Buffer const * buf, std::ostream & os) const;
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2000-10-10 11:50:43 +00:00
|
|
|
Inset * Clone(Buffer const &) const;
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
|
|
|
Inset::Code LyxCode() const { return Inset::MINIPAGE_CODE; }
|
|
|
|
///
|
|
|
|
int Latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
|
|
|
|
///
|
2000-09-14 17:53:12 +00:00
|
|
|
string const EditMessage() const;
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
|
|
|
bool InsertInsetAllowed(Inset * inset) const;
|
2001-03-14 14:53:55 +00:00
|
|
|
///
|
|
|
|
Position pos() const;
|
|
|
|
///
|
|
|
|
void pos(Position);
|
|
|
|
///
|
|
|
|
InnerPosition innerPos() const;
|
|
|
|
///
|
|
|
|
void innerPos(InnerPosition);
|
|
|
|
///
|
|
|
|
LyXLength const & height() const;
|
|
|
|
///
|
|
|
|
void height(LyXLength const &);
|
|
|
|
///
|
|
|
|
LyXLength const & width() const;
|
|
|
|
///
|
|
|
|
void width(LyXLength const &);
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
Position pos_;
|
|
|
|
///
|
|
|
|
InnerPosition inner_pos_;
|
|
|
|
///
|
|
|
|
LyXLength height_;
|
|
|
|
///
|
|
|
|
LyXLength width_;
|
2000-06-28 13:35:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|