]> git.lyx.org Git - features.git/blobdiff - src/insets/insetinclude.h
read the Changelog
[features.git] / src / insets / insetinclude.h
index ec01892a4c0fd599695d068c0a008acc9bf3d4b2..0adf74ca740fa4713bd87e772abb5d70fe51afa1 100644 (file)
@@ -19,8 +19,6 @@
 #include "buffer.h"
 #include "support/filetools.h"
 
-using std::ostream;
-
 struct LaTeXFeatures;
 
 // Created by AAS 970521
@@ -29,11 +27,13 @@ struct LaTeXFeatures;
  */
 class InsetInclude: public InsetCommand {
 public:
+#if 0
        ///
        InsetInclude(): InsetCommand("include")
        {
                flag = InsetInclude::INCLUDE;
        }
+#endif
        ///
        InsetInclude(string const &,  Buffer *);
        ///
@@ -42,12 +42,10 @@ public:
         Inset * Clone() const;
        ///
        Inset::Code LyxCode() const { return Inset::INCLUDE_CODE; }
-       /// This is 1 if the childs have labels, 0 otherwise
-       int GetNumberOfLabels() const;
        /// This returns the list of labels on the child buffer
-       string getLabel(int) const;
+       std::vector<string> getLabelList() const;
        /// This returns the list of bibkeys on the child buffer
-       string getKeys(char delim) const;
+       std::vector< std::pair<string,string> > getKeys() const;
        ///
        void Edit(BufferView *, int x, int y, unsigned int button);
        ///
@@ -56,24 +54,26 @@ public:
                return IS_EDITABLE;
        }
         /// With lyx3 we won't overload these 3 methods
-        void Write(ostream &) const;
+        void Write(Buffer const *, std::ostream &) const;
         ///
-       void Read(LyXLex &);
+       void Read(Buffer const *, LyXLex &);
        /// 
-       int Latex(ostream &, signed char fragile, bool free_spc) const;
+       int Latex(Buffer const *, std::ostream &, bool fragile, bool free_spc) const;
+       ///
+       int Linuxdoc(Buffer const *, std::ostream &) const;
+       ///
+       int DocBook(Buffer const *, std::ostream &) const;
        ///
        void Validate(LaTeXFeatures &) const;
        
-        /// Input inserts anything inside a paragraph, Display can give some visual feedback 
-       bool display() const { return !(isInput()); }
+        /** Input inserts anything inside a paragraph.
+           Display can give some visual feedback
+       */
+       bool display() const;
        ///
        string getScreenLabel() const;
        ///
-       void setContents(string const & c) {
-               InsetCommand::setContents(c);
-               filename = MakeAbsPath(contents, 
-                                      OnlyPath(getMasterFilename())); 
-       }
+       void setContents(string const & c);
         ///
         void setFilename(string const & n) { setContents(n); }
         ///
@@ -92,7 +92,9 @@ public:
         */ 
        bool isVerb() const;
        ///
-       bool isVerbVisibleSpace() const { return flag == InsetInclude::VERBAST;}
+       bool isVerbVisibleSpace() const {
+               return flag == InsetInclude::VERBAST;
+       }
         ///  
        bool isInclude() const { return flag == InsetInclude::INCLUDE;}
         ///  
@@ -128,6 +130,8 @@ private:
        Buffer * master;
        ///
        string filename;
+       ///
+       mutable string include_label;
 };