]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetinclude.h
prepare for 1.1.6pre2
[lyx.git] / src / insets / insetinclude.h
index 94179bdbe382285f3c54fcf85e7fe9f78d92e7f4..a6d8c78b7c31b5dbf00b800c9874aaf7f3f2f44a 100644 (file)
@@ -4,7 +4,7 @@
  *
  *           LyX, The Document Processor
  *      
- *         Copyright (C) 1997 LyX Team (this file was created this year)
+ *         Copyright 1997 LyX Team (this file was created this year)
  * 
  * ====================================================== */
 
@@ -16,9 +16,8 @@
 #endif
 
 #include "insetcommand.h"
-#include "buffer.h"
-#include "support/filetools.h"
 
+class Buffer;
 struct LaTeXFeatures;
 
 // Created by AAS 970521
@@ -28,24 +27,17 @@ struct LaTeXFeatures;
 class InsetInclude: public InsetCommand {
 public:
        ///
-       InsetInclude(): InsetCommand("include")
-       {
-               flag = InsetInclude::INCLUDE;
-       }
-       ///
-       InsetInclude(string const &,  Buffer *);
+       InsetInclude(InsetCommandParams const &, Buffer const &);
        ///
        ~InsetInclude();
         ///
-        Inset * Clone() const;
+        Inset * Clone(Buffer const &) 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> const getLabelList() const;
        /// This returns the list of bibkeys on the child buffer
-       string getKeys(char delim) const;
+       std::vector< std::pair<string,string> > const getKeys() const;
        ///
        void Edit(BufferView *, int x, int y, unsigned int button);
        ///
@@ -54,36 +46,29 @@ 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) const;
-#ifndef USE_OSTREAM_ONLY
+       int Latex(Buffer const *, std::ostream &, bool fragile, bool free_spc) const;
        ///
-       int Latex(string & file, signed char fragile) const;
-#endif
+       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()); }
-       ///
-       string getScreenLabel() const;
+        /** Input inserts anything inside a paragraph.
+           Display can give some visual feedback
+       */
+       bool display() const;
        ///
-       void setContents(string const & c) {
-               InsetCommand::setContents(c);
-               filename = MakeAbsPath(contents, 
-                                      OnlyPath(getMasterFilename())); 
-       }
-        ///
-        void setFilename(string const & n) { setContents(n); }
+       string const getScreenLabel() const;
         ///
-        string getMasterFilename() const { return master->fileName(); }
+        string const getMasterFilename() const;
         ///
-        string getFileName() const { 
-               return filename;
-       }
+        string const getFileName() const;
+
         ///  In "input" mode uses \input instead of \include.
        bool isInput() const { return flag == InsetInclude::INPUT; }
         ///  If this is true, the child file shouldn't be loaded by lyx
@@ -94,7 +79,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;}
         ///  
@@ -127,9 +114,9 @@ private:
        ///
         int flag;
         ///
-       Buffer * master;
+       Buffer const * master;
        ///
-       string filename;
+       string include_label;
 };