*
* 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)
*
* ====================================================== */
*/
class InsetInclude: public InsetCommand {
public:
+#if 0
///
InsetInclude(): InsetCommand("include")
{
flag = InsetInclude::INCLUDE;
}
+#endif
///
InsetInclude(string const &, Buffer *);
///
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() const;
+ std::vector< std::pair<string,string> > getKeys() const;
///
- void Edit(int, int);
+ void Edit(BufferView *, int x, int y, unsigned int button);
///
- unsigned char Editable() const
+ EDITABLE Editable() const
{
- return 1;
+ return IS_EDITABLE;
}
/// With lyx3 we won't overload these 3 methods
- void Write(ostream &);
+ void Write(Buffer const *, std::ostream &) const;
///
- void Read(LyXLex &);
+ void Read(Buffer const *, LyXLex &);
///
- int Latex(ostream &, signed char fragile);
+ int Latex(Buffer const *, std::ostream &, bool fragile, bool free_spc) const;
///
- int Latex(string & file, signed char fragile);
-
+ 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); }
///
*/
bool isVerb() const;
///
- bool isVerbVisibleSpace() const { return flag == InsetInclude::VERBAST;}
+ bool isVerbVisibleSpace() const {
+ return flag == InsetInclude::VERBAST;
+ }
///
bool isInclude() const { return flag == InsetInclude::INCLUDE;}
///
Buffer * master;
///
string filename;
+ ///
+ mutable string include_label;
};
inline
bool InsetInclude::isVerb() const
{
- return (bool)(flag == InsetInclude::VERB || flag == InsetInclude::VERBAST);
+ return flag == InsetInclude::VERB || flag == InsetInclude::VERBAST;
}