2 * \file ControlTexinfo.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS
14 #include "ControlTexinfo.h"
16 #include "helper_funcs.h"
17 #include "tex_helpers.h"
19 #include "frontends/Dialogs.h"
20 #include "frontends/LyXView.h"
22 #include "support/filetools.h" // FileSearch
23 #include "support/path.h"
24 #include "support/lstrings.h"
26 extern string user_lyxdir; // home of *Files.lst
30 string getFileList(ControlTexinfo::texFileSuffix type, bool withFullPath)
33 case ControlTexinfo::bst:
34 return getTexFileList("bstFiles.lst", withFullPath);
36 case ControlTexinfo::cls:
37 return getTexFileList("clsFiles.lst", withFullPath);
39 case ControlTexinfo::sty:
40 return getTexFileList("styFiles.lst", withFullPath);
49 ControlTexinfo::ControlTexinfo(LyXView & lv, Dialogs & d)
50 : ControlDialogBI(lv, d)
54 // build filelists of all availabe bst/cls/sty-files. done through
55 // kpsewhich and an external script, saved in *Files.lst
56 void ControlTexinfo::rescanStyles() const
62 void ControlTexinfo::runTexhash() const
69 ControlTexinfo::getContents(texFileSuffix type, bool withFullPath) const
71 string list(getFileList(type, withFullPath));
76 list = getFileList(type, withFullPath);
82 void ControlTexinfo::viewFile(string const filename) const
84 lv_.getDialogs().show("file", filename);
88 string const ControlTexinfo::getClassOptions(string const & filename) const
90 return getListOfOptions(filename, "cls");