]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCaption.h
Make logic clearer, with help from Lars.
[lyx.git] / src / insets / InsetCaption.h
index 5659019e40d05d6592bce14e5481c74915733de8..9d1973fba67a65de18707ff25922fb1aba4af724 100644 (file)
@@ -23,6 +23,7 @@ namespace lyx {
 class InsetCaption : public InsetText {
 public:
        ///
+       InsetCaption(InsetCaption const &);
        InsetCaption(BufferParams const &);
        ///
        virtual ~InsetCaption() {}
@@ -31,7 +32,7 @@ public:
        ///
        void read(Buffer const & buf, Lexer & lex);
        ///
-       virtual bool display() const;
+       virtual DisplayType display() const;
        ///
        virtual bool neverIndent(Buffer const &) const { return true; }
        ///
@@ -68,6 +69,12 @@ public:
        ///
        int docbook(Buffer const & buf, odocstream & os,
                    OutputParams const & runparams) const;
+       /// return the mandatory argument (LaTeX format) only
+       int getArgument(Buffer const & buf, odocstream & os,
+                 OutputParams const &) const;
+       /// return the optional argument(s) only
+       int getOptArg(Buffer const & buf, odocstream & os,
+                 OutputParams const &) const;
        ///
        void setCount(int c) { counter_ = c; }
        ///
@@ -83,7 +90,7 @@ public:
 
 private:
        ///
-       void computeFullLabel() const;
+       void computeFullLabel(Buffer const & buf) const;
        ///
        virtual std::auto_ptr<Inset> doClone() const;
        ///
@@ -102,9 +109,9 @@ private:
 
 
 inline
-bool InsetCaption::display() const
+Inset::DisplayType InsetCaption::display() const
 {
-       return true;
+       return AlignCenter;
 }