]> git.lyx.org Git - lyx.git/blob - src/insets/insetquotes.h
make text private in LyXParagraph some changes to import ascii file
[lyx.git] / src / insets / insetquotes.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 INSET_QUOTES_H
13 #define INSET_QUOTES_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "lyxinset.h"
20
21 class BufferParams;
22
23 struct LaTeXFeatures;
24
25
26 /** Quotes.
27
28   Used for the various quotes. German, English, French, all either
29   double or single **/ 
30 class InsetQuotes: public Inset {
31 public:
32         ///
33         enum quote_language {
34                 ///
35                 EnglishQ,
36                 ///
37                 SwedishQ,
38                 ///
39                 GermanQ,
40                 ///
41                 PolishQ,
42                 ///
43                 FrenchQ,
44                 ///
45                 DanishQ
46         };
47         ///
48         enum quote_side {
49                 ///
50                 LeftQ,
51                 ///
52                 RightQ 
53         };
54         ///
55         enum quote_times {
56                 ///
57                 SingleQ,
58                 ///
59                 DoubleQ 
60         };
61         
62         /** The constructor works like this:
63           \begin{itemize}
64             \item fls <- french single quote left 
65             \item grd <- german double quote right 
66             \item etc.
67           \end{itemize}
68           */ 
69         InsetQuotes(string const & str = "eld");
70         /// Create the right quote inset after character c
71         InsetQuotes(char c, BufferParams const & params);
72
73         ///
74         int ascent(Painter &, LyXFont const &) const;
75         ///
76         int descent(Painter &, LyXFont const &) const;
77         ///
78         int width(Painter &, LyXFont const &) const;
79         ///
80         void draw(Painter &, LyXFont const &, int baseline, float & x) const;
81         ///
82         LyXFont ConvertFont(LyXFont font);
83         ///
84         void Write(ostream &) const;
85         ///
86         void Read(LyXLex & lex);
87         ///
88         int Latex(ostream &, signed char fragile, bool free_spc) const;
89         ///
90         int Linuxdoc(ostream &) const;
91         ///
92         int DocBook(ostream &) const;
93         ///
94         void Validate(LaTeXFeatures &) const;
95         ///
96         Inset * Clone() const;
97         ///
98         Inset::Code LyxCode() const;
99 private:
100         ///
101         quote_language language;
102         ///
103         quote_side side;
104         ///
105         quote_times times;
106
107         /** The parameters of the constructor are the language, the
108             side and the multiplicity of the quote.
109          */
110         InsetQuotes(quote_language l, quote_side s, quote_times t);
111         ///
112         void ParseString(string const &);
113         ///
114         string DispString() const;
115 };
116 #endif