]> git.lyx.org Git - lyx.git/blob - src/LaTeXPackages.h
Avoid full metrics computation with Update:FitCursor
[lyx.git] / src / LaTeXPackages.h
1 // -*- C++ -*-
2 /**
3  * \file LaTeXPackages.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  * \author Jean-Marc Lasgouttes
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef LATEXPACKAGES_H
14 #define LATEXPACKAGES_H
15
16 #include <string>
17 #include <set>
18
19
20 namespace lyx {
21
22
23 /** The list of avilable LaTeX packages
24  */
25 class LaTeXPackages {
26 public:
27         /// Which of the required packages are installed?
28         static void getAvailable(bool retry = false);
29         /// Is the (required) package available?
30         static bool isAvailable(std::string const & name);
31         /// Is the (required) package available at least as of
32         /// version y/m/d?
33         static bool isAvailableAtLeastFrom(std::string const & name,
34                                            int const y, int const m, int const d = 1);
35 private:
36         /// The available (required) packages
37         typedef std::set<std::pair<std::string,std::string>> Packages;
38         ///
39         static Packages packages_;
40 };
41
42
43 } // namespace lyx
44
45 #endif