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 #pragma implementation
17 #include "ControlTexinfo.h"
19 #include "helper_funcs.h"
20 #include "tex_helpers.h"
22 #include "frontends/Dialogs.h"
23 #include "frontends/LyXView.h"
25 #include "support/filetools.h" // FileSearch
26 #include "support/path.h"
27 #include "support/lstrings.h"
29 extern string user_lyxdir; // home of *Files.lst
33 string getFileList(ControlTexinfo::texFileSuffix type, bool withFullPath)
36 case ControlTexinfo::bst:
37 return getTexFileList("bstFiles.lst", withFullPath);
39 case ControlTexinfo::cls:
40 return getTexFileList("clsFiles.lst", withFullPath);
42 case ControlTexinfo::sty:
43 return getTexFileList("styFiles.lst", withFullPath);
52 ControlTexinfo::ControlTexinfo(LyXView & lv, Dialogs & d)
53 : ControlDialogBI(lv, d)
57 // build filelists of all availabe bst/cls/sty-files. done through
58 // kpsewhich and an external script, saved in *Files.lst
59 void ControlTexinfo::rescanStyles() const
65 void ControlTexinfo::runTexhash() const
72 ControlTexinfo::getContents(texFileSuffix type, bool withFullPath) const
74 string list(getFileList(type, withFullPath));
79 list = getFileList(type, withFullPath);
85 void ControlTexinfo::viewFile(string const filename) const
87 lv_.getDialogs().showFile(filename);
91 string const ControlTexinfo::getClassOptions(string const & filename) const
93 return getListOfOptions(filename, "cls");