2000-06-28 13:35:52 +00:00
|
|
|
// -*- C++ -*-
|
2003-08-23 00:17:00 +00:00
|
|
|
/**
|
|
|
|
* \file Floating.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-03-21 17:27:08 +00:00
|
|
|
*
|
2008-11-14 15:58:50 +00:00
|
|
|
* \author Lars Gullik Bjønnes
|
2000-06-28 13:35:52 +00:00
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2000-06-28 13:35:52 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FLOATING_H
|
|
|
|
#define FLOATING_H
|
|
|
|
|
2003-10-06 15:43:21 +00:00
|
|
|
#include <string>
|
2000-12-31 05:32:33 +00:00
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
2000-07-15 23:51:46 +00:00
|
|
|
/** This is a "float layout" object. It contains the parameters for how to
|
2004-10-05 10:11:42 +00:00
|
|
|
* handle the different kinds of floats, default ones and user created ones.
|
|
|
|
* Objects of this class is stored in a container in FloatList. The different
|
|
|
|
* InsetFloat(s) have a pointer/reference through the name of the Floating
|
|
|
|
* so that it knows how the different floats should be handled.
|
|
|
|
*/
|
2000-06-28 13:35:52 +00:00
|
|
|
class Floating {
|
|
|
|
public:
|
|
|
|
///
|
2000-12-29 12:48:02 +00:00
|
|
|
Floating();
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
Floating(std::string const & type, std::string const & placement,
|
|
|
|
std::string const & ext, std::string const & within,
|
|
|
|
std::string const & style, std::string const & name,
|
2009-06-19 12:49:08 +00:00
|
|
|
std::string const & listName, std::string const & htmlType,
|
|
|
|
std::string const & htmlClass, std::string const & htmlStyle,
|
|
|
|
bool builtin = false);
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2010-03-04 13:42:05 +00:00
|
|
|
std::string const & floattype() const { return floattype_; }
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2010-03-04 13:42:05 +00:00
|
|
|
std::string const & placement() const { return placement_; }
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2010-03-04 13:42:05 +00:00
|
|
|
std::string const & ext() const {return ext_; }
|
2001-03-11 03:20:44 +00:00
|
|
|
///
|
2010-03-04 13:42:05 +00:00
|
|
|
std::string const & within() const { return within_; }
|
2001-03-11 03:20:44 +00:00
|
|
|
///
|
2010-03-04 13:42:05 +00:00
|
|
|
std::string const & style() const { return style_; }
|
2001-03-11 03:20:44 +00:00
|
|
|
///
|
2010-03-04 13:42:05 +00:00
|
|
|
std::string const & name() const { return name_; }
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2010-03-04 13:42:05 +00:00
|
|
|
std::string const & listName() const { return listname_; }
|
|
|
|
///
|
2010-03-05 17:24:38 +00:00
|
|
|
bool needsFloatPkg() const { return needsfloatpkg_; }
|
2009-11-30 16:55:12 +00:00
|
|
|
/// style information, for preamble
|
2010-03-04 13:42:05 +00:00
|
|
|
std::string const & htmlStyle() const { return html_style_; }
|
2009-11-30 17:08:56 +00:00
|
|
|
/// class, for css, defaults to "float-" + type()
|
2010-01-07 17:32:04 +00:00
|
|
|
std::string const & htmlAttrib() const;
|
2009-11-30 17:08:56 +00:00
|
|
|
/// tag type, defaults to "div"
|
|
|
|
std::string const & htmlTag() const;
|
2000-12-29 12:48:02 +00:00
|
|
|
private:
|
2010-01-07 17:32:04 +00:00
|
|
|
///
|
|
|
|
std::string defaultCSSClass() const;
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2010-03-04 13:42:05 +00:00
|
|
|
std::string floattype_;
|
2000-12-29 12:48:02 +00:00
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
std::string placement_;
|
2000-12-29 12:48:02 +00:00
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
std::string ext_;
|
2000-12-29 12:48:02 +00:00
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
std::string within_;
|
2000-12-29 12:48:02 +00:00
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
std::string style_;
|
2000-12-29 12:48:02 +00:00
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
std::string name_;
|
2000-12-29 12:48:02 +00:00
|
|
|
///
|
2010-03-04 13:42:05 +00:00
|
|
|
std::string listname_;
|
|
|
|
///
|
2010-03-05 17:24:38 +00:00
|
|
|
bool needsfloatpkg_;
|
2009-11-30 17:08:56 +00:00
|
|
|
///
|
2009-11-30 20:17:55 +00:00
|
|
|
mutable std::string html_tag_;
|
2009-11-30 17:08:56 +00:00
|
|
|
///
|
2010-01-07 17:32:04 +00:00
|
|
|
mutable std::string html_attrib_;
|
|
|
|
///
|
|
|
|
mutable std::string defaultcssclass_;
|
2009-11-30 17:08:56 +00:00
|
|
|
///
|
2009-11-30 20:17:55 +00:00
|
|
|
std::string html_style_;
|
2000-06-28 13:35:52 +00:00
|
|
|
};
|
2000-12-29 12:48:02 +00:00
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
2000-06-28 13:35:52 +00:00
|
|
|
#endif
|