mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 05:33:33 +00:00
93dda00aac
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1807 a592a061-630c-0410-9148-cb99ea01b6c8
107 lines
1.9 KiB
C++
107 lines
1.9 KiB
C++
// -*- C++ -*-
|
|
/* This file is part of
|
|
* ======================================================
|
|
*
|
|
* LyX, The Document Processor
|
|
*
|
|
* Copyright 2001 The LyX Team.
|
|
*
|
|
* ======================================================
|
|
*/
|
|
|
|
#ifndef InsetMinipage_H
|
|
#define InsetMinipage_H
|
|
|
|
#ifdef __GNUG__
|
|
#pragma interface
|
|
#endif
|
|
|
|
#include "insetcollapsable.h"
|
|
#include "vspace.h"
|
|
#include <sigc++/signal_system.h>
|
|
|
|
/** The minipage inset
|
|
|
|
*/
|
|
class InsetMinipage : public InsetCollapsable {
|
|
public:
|
|
///
|
|
enum Position {
|
|
top,
|
|
center,
|
|
bottom
|
|
};
|
|
///
|
|
enum InnerPosition {
|
|
inner_center,
|
|
inner_top,
|
|
inner_bottom,
|
|
inner_stretch
|
|
};
|
|
///
|
|
InsetMinipage();
|
|
///
|
|
~InsetMinipage();
|
|
///
|
|
void Write(Buffer const * buf, std::ostream & os) const;
|
|
///
|
|
void Read(Buffer const * buf, LyXLex & lex);
|
|
///
|
|
Inset * Clone(Buffer const &) const;
|
|
///
|
|
int ascent(BufferView *, LyXFont const &) const;
|
|
///
|
|
int descent(BufferView *, LyXFont const &) const;
|
|
///
|
|
Inset::Code LyxCode() const { return Inset::MINIPAGE_CODE; }
|
|
///
|
|
int Latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
|
|
///
|
|
string const EditMessage() const;
|
|
///
|
|
bool InsertInsetAllowed(Inset * inset) const;
|
|
///
|
|
Position pos() const;
|
|
///
|
|
void pos(Position);
|
|
///
|
|
InnerPosition innerPos() const;
|
|
///
|
|
void innerPos(InnerPosition);
|
|
///
|
|
string const & height() const;
|
|
///
|
|
void height(string const &);
|
|
///
|
|
string const & width() const;
|
|
///
|
|
void width(string const &);
|
|
///
|
|
int widthp() const;
|
|
///
|
|
void widthp(int);
|
|
///
|
|
void widthp(string const &);
|
|
///
|
|
SigC::Signal0<void> hideDialog;
|
|
///
|
|
void InsetButtonRelease(BufferView * bv, int x, int y, int button);
|
|
///
|
|
int getMaxWidth(Painter &, UpdatableInset const *) const;
|
|
///
|
|
bool needFullRow() const { return false; }
|
|
private:
|
|
///
|
|
Position pos_;
|
|
///
|
|
InnerPosition inner_pos_;
|
|
///
|
|
string height_;
|
|
///
|
|
string width_;
|
|
///
|
|
int widthp_;
|
|
};
|
|
|
|
#endif
|