1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 2001 The LyX Team.
8 * ======================================================
10 * \file ControlTexinfo.C
11 * \author Herbert Voss <voss@lyx.org>
17 #pragma implementation
20 #include "ControlTexinfo.h"
22 #include "BufferView.h"
24 #include "helper_funcs.h"
25 #include "tex_helpers.h"
27 #include "frontends/LyXView.h"
29 #include "support/filetools.h" // FileSearch
30 #include "support/path.h"
31 #include "support/lstrings.h"
33 extern string user_lyxdir; // home of *Files.lst
36 ControlTexinfo::ControlTexinfo(LyXView & lv, Dialogs & d)
37 : ControlDialogBI(lv, d)
41 // build filelists of all availabe bst/cls/sty-files. done through
42 // kpsewhich and an external script, saved in *Files.lst
43 void ControlTexinfo::rescanStyles() const
49 void ControlTexinfo::runTexhash() const
56 ControlTexinfo::getContents(texFileSuffix type, bool withFullPath) const
60 return getTexFileList("bstFiles.lst", withFullPath);
63 return getTexFileList("clsFiles.lst", withFullPath);
66 return getTexFileList("styFiles.lst", withFullPath);
73 void ControlTexinfo::viewFile(string const filename) const
75 lv_.getDialogs()->showFile(filename);
79 string const ControlTexinfo::getClassOptions(string const & filename) const
81 return getListOfOptions(filename, "cls");