]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFloat.h
Make script inset much tighter in texted.
[lyx.git] / src / insets / InsetFloat.h
index c58be580b1249b9efd81fd7f03ab71e66fc1a1d0..53c584c40abe974ad74e0c4bc3cb5046dd272053 100644 (file)
 
 namespace lyx {
 
+struct TexString;
+
+
 class InsetFloatParams
 {
 public:
        ///
-       InsetFloatParams() : type("senseless"), wide(false), sideways(false), subfloat(false) {}
+       InsetFloatParams() : type("senseless"), placement("document"), alignment("document"),
+               wide(false), sideways(false), subfloat(false) {}
        ///
        void write(std::ostream & os) const;
        ///
@@ -31,6 +35,8 @@ public:
        std::string type;
        ///
        std::string placement;
+       ///
+       std::string alignment;
        /// span columns
        bool wide;
        ///
@@ -51,7 +57,7 @@ public:
 class InsetFloat : public InsetCaptionable
 {
 public:
-       InsetFloat(Buffer * buffer, std::string params_str);
+       InsetFloat(Buffer * buffer, std::string const & params_str);
        ///
        static void string2params(std::string const &, InsetFloatParams &);
        ///
@@ -68,6 +74,10 @@ public:
        InsetFloatParams const & params() const { return params_; }
        ///
        bool allowsCaptionVariation(std::string const &) const;
+       ///
+       LyXAlignment contentAlignment() const;
+       ///
+       bool forceParDirectionSwitch() const { return true; }
 private:
        ///
        void setCaptionType(std::string const & type);
@@ -106,9 +116,15 @@ private:
        void doDispatch(Cursor & cur, FuncRequest & cmd);
        ///
        Inset * clone() const { return new InsetFloat(*this); }
+       /// Is the content of this inset part of the immediate (visible) text sequence?
+       bool isPartOfTextSequence() const { return false; }
+       ///
+       TexString getCaption(OutputParams const &) const;
        ///
-       docstring getCaption(OutputParams const &) const;
+       std::string getAlignment() const;
        ///
+       OutputParams::CtObject CtObject(OutputParams const &) const { return OutputParams::CT_OMITOBJECT; }
+
        InsetFloatParams params_;
 };