// -*- C++ -*-
-/* This file is part of
- * ======================================================
- *
- * LyX, The Document Processor
- *
- * Copyright 2001 The LyX Team.
+/**
+ * \file ControlBibtex.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
- * ======================================================
+ * \author John Levon
+ * \author Angus Leeming
*
- * \file ControlBibtex.h
- * \author John Levon, moz@compsoc.man.ac.uk
- * \author Angus Leeming <a.leeming@ic.ac.uk>
+ * Full author contact details are available in file CREDITS.
*/
#ifndef CONTROLBIBTEX_H
#define CONTROLBIBTEX_H
-#ifdef __GNUG__
-#pragma interface
-#endif
-
#include "ControlCommand.h"
+#include <vector>
-/** A controller for Bibtex dialogs.
- */
-class ControlBibtex : public ControlCommand
-{
-public:
- ///
- ControlBibtex(LyXView &, Dialogs &);
+namespace lyx {
+namespace support {
-protected:
- /// Get changed parameters and Dispatch them to the kernel.
- virtual void apply();
-};
+class FileFilterList;
-/** This class instantiates and makes available the GUI-specific
- ButtonController and View.
+} // namespace support
+
+
+namespace frontend {
+
+/** A controller for Bibtex dialogs.
*/
-template <class GUIview, class GUIbc>
-class GUIBibtex : public ControlBibtex {
+class ControlBibtex : public ControlCommand {
public:
///
- GUIBibtex(LyXView &, Dialogs &);
- ///
- virtual ButtonControllerBase & bc() { return bc_; }
- ///
- virtual ViewBase & view() { return view_; }
-
-private:
- ///
- ButtonController<OkCancelReadOnlyPolicy, GUIbc> bc_;
- ///
- GUIview view_;
+ ControlBibtex(Dialog &);
+
+ /// Browse for a .bib file
+ std::string const browseBib(std::string const & in_name) const;
+
+ /// Browse for a .bst file
+ std::string const browseBst(std::string const & in_name) const;
+
+ /// get the list of bst files
+ void getBibStyles(std::vector<std::string> & data) const;
+ /// get the list of bib files
+ void getBibFiles(std::vector<std::string> & data) const;
+ /// build filelists of all availabe bib/bst/cls/sty-files. done through
+ /// kpsewhich and an external script, saved in *Files.lst
+ void rescanBibStyles() const;
+ /// do we use bibtopic (for sectioned bibliography)?
+ bool usingBibtopic() const;
};
-template <class GUIview, class GUIbc>
-GUIBibtex<GUIview, GUIbc>::GUIBibtex(LyXView & lv, Dialogs & d)
- : ControlBibtex(lv, d),
- view_(*this)
-{}
+} // namespace frontend
+} // namespace lyx
#endif // CONTROLBIBTEX_H