#include "InsetCollapsable.h"
#include "Length.h"
-#include "MailInset.h"
namespace lyx {
-class InsetBoxParams {
+class InsetBoxParams
+{
public:
///
InsetBoxParams(std::string const &);
void write(std::ostream & os) const;
///
void read(Lexer & lex);
+
///
std::string type;
/// Use a parbox (true) or minipage (false)
bool inner_box;
///
Length width;
- /// "special" widths, see usrguide.dvi §3.5
+ /// "special" widths, see usrguide.dvi §3.5
std::string special;
///
char pos;
};
-/** The fbox/fancybox inset
-*/
-class InsetBox : public InsetCollapsable {
+///////////////////////////////////////////////////////////////////////
+//
+// The fbox/fancybox inset
+//
+///////////////////////////////////////////////////////////////////////
+
+
+class InsetBox : public InsetCollapsable
+{
public:
///
enum BoxType {
InsetBox(Buffer const &, std::string const &);
///
~InsetBox();
+ ///
+ static std::string params2string(InsetBoxParams const &);
+ ///
+ static void string2params(std::string const &, InsetBoxParams &);
private:
///
friend class InsetBoxParams;
- friend class InsetBoxMailer;
///
docstring editMessage() const;
///
bool showInsetDialog(BufferView * bv) const;
///
DisplayType display() const { return Inline; }
- //FIXME Is this the one we want? or is it:
- //allowParagraphCustomization(idx_type)?
///
- bool forceEmptyLayout() const;
+ bool allowParagraphCustomization(idx_type = 0) const { return !forcePlainLayout(); }
+ ///
+ bool forcePlainLayout(idx_type = 0) const;
///
bool neverIndent() const { return true; }
///
///
int docbook(odocstream &, OutputParams const &) const;
///
+ int xhtml(odocstream &, OutputParams const &) const;
+ ///
void validate(LaTeXFeatures &) const;
///
InsetBoxParams const & params() const { return params_; }
Inset * clone() const { return new InsetBox(*this); }
/// used by the constructors
void init();
-
///
- InsetBoxParams params_;
-};
-
+ docstring contextMenu(BufferView const & bv, int x, int y) const;
-class InsetBoxMailer : public MailInset {
-public:
///
- InsetBoxMailer(InsetBox & inset);
- ///
- virtual Inset & inset() const { return inset_; }
- ///
- virtual std::string const & name() const { return name_; }
- ///
- virtual std::string const inset2string(Buffer const &) const;
- ///
- static std::string const params2string(InsetBoxParams const &);
- ///
- static void string2params(std::string const &, InsetBoxParams &);
-
-private:
- ///
- static std::string const name_;
- ///
- InsetBox & inset_;
+ InsetBoxParams params_;
};
-
} // namespace lyx
-#endif // INSET_BOX_H
+#endif // INSETBOX_H