]> git.lyx.org Git - lyx.git/blob - src/Spacing.h
fix the smallcaps drawing, move xfont metrics functions out from LyXFont, move non...
[lyx.git] / src / Spacing.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  * 
5  *           LyX, The Document Processor
6  *        
7  *           Copyright 1995 Matthias Ettrich
8  *           Copyright 1995-2000 The LyX Team.
9  *
10  * ====================================================== */
11
12 #ifndef SPACING_H
13 #define SPACING_H
14
15 #include <iosfwd>
16
17 ///
18 class Spacing {
19 public:
20         ///
21         enum Space {
22                 ///
23                 Single,
24                 ///
25                 Onehalf,
26                 ///
27                 Double,
28                 ///
29                 Other
30         };
31         ///
32         Spacing() {
33                 space = Single;
34                 value = getValue();
35         }
36         ///
37         float getValue() const;
38         ///
39         Spacing::Space getSpace() const { return space; }
40         ///
41         void set(Spacing::Space sp, float val = 1.0);
42         ///
43         void set(Spacing::Space sp, char const * val) ;
44         ///
45         void writeFile(std::ostream &) const;
46         ///
47         friend bool operator!=(Spacing const & a, Spacing const & b) {
48                 if (a.space == b.space && a.getValue() == b.getValue())
49                         return false;
50                 return true;
51         }
52 private:
53         ///
54         Space space;
55         ///
56         float value;
57 };
58 #endif