2000-06-28 13:35:52 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
2002-03-21 17:09:55 +00:00
|
|
|
*
|
2000-06-28 13:35:52 +00:00
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
|
|
|
* Copyright 1998 The LyX Team.
|
|
|
|
*
|
|
|
|
* ======================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef InsetFloat_H
|
|
|
|
#define InsetFloat_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "insetcollapsable.h"
|
2002-05-29 16:21:03 +00:00
|
|
|
|
|
|
|
#include <boost/signals/signal0.hpp>
|
2000-06-28 13:35:52 +00:00
|
|
|
|
|
|
|
class Painter;
|
|
|
|
|
|
|
|
/** The float inset
|
2002-03-21 17:09:55 +00:00
|
|
|
|
2000-06-28 13:35:52 +00:00
|
|
|
*/
|
|
|
|
class InsetFloat : public InsetCollapsable {
|
|
|
|
public:
|
|
|
|
///
|
2002-03-03 20:25:07 +00:00
|
|
|
InsetFloat(BufferParams const &, string const &);
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2001-07-24 15:07:09 +00:00
|
|
|
InsetFloat(InsetFloat const &, bool same_id = false);
|
|
|
|
///
|
2001-07-30 11:56:00 +00:00
|
|
|
~InsetFloat();
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
void write(Buffer const * buf, std::ostream & os) const;
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
void read(Buffer const * buf, LyXLex & lex);
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
void validate(LaTeXFeatures & features) const;
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2001-07-06 15:57:54 +00:00
|
|
|
Inset * clone(Buffer const &, bool same_id = false) const;
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
Inset::Code lyxCode() const { return Inset::FLOAT_CODE; }
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
int docbook(Buffer const *, std::ostream &, bool mixcont) const;
|
2001-03-23 08:37:44 +00:00
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
string const editMessage() const;
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2001-07-19 08:52:59 +00:00
|
|
|
bool insetAllowed(Inset::Code) const;
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2000-07-18 17:45:27 +00:00
|
|
|
string const & type() const;
|
|
|
|
///
|
2001-03-11 03:20:44 +00:00
|
|
|
void placement(string const & p);
|
|
|
|
///
|
|
|
|
string const & placement() const;
|
|
|
|
///
|
2000-07-15 23:51:46 +00:00
|
|
|
void wide(bool w);
|
|
|
|
///
|
|
|
|
bool wide() const;
|
2001-07-30 11:56:00 +00:00
|
|
|
///
|
|
|
|
bool showInsetDialog(BufferView *) const;
|
|
|
|
///
|
2002-05-29 16:21:03 +00:00
|
|
|
boost::signal0<void> hideDialog;
|
2000-06-28 13:35:52 +00:00
|
|
|
private:
|
|
|
|
///
|
2000-12-29 12:48:02 +00:00
|
|
|
string floatType_;
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2000-12-29 12:48:02 +00:00
|
|
|
string floatPlacement_;
|
2000-07-15 23:51:46 +00:00
|
|
|
///
|
|
|
|
bool wide_;
|
2000-06-28 13:35:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|