This commit was manufactured by cvs2svn to create tag
[lyx.git] / src / insets / insetspecialchar.h
blobe01b32e6d44cd06fa7243f94f0cd64fa6a8b24f8
1 // -*- C++ -*-
2 /* This file is part of*
3 * ======================================================
5 * LyX, The Document Processor
6 *
7 * Copyright (C) 1997 Asger Alstrup
9 * ======================================================*/
11 #ifndef INSET_SPECIALCHAR_H
12 #define INSET_SPECIALCHAR_H
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
18 #include "lyxinset.h"
19 #include "LString.h"
21 struct LaTeXFeatures;
23 /// Used to insert special chars
24 class InsetSpecialChar: public Inset {
25 public:
27 /// The different kinds of special chars we support
28 enum Kind {
29 /// Optional hyphenation point (\-)
30 HYPHENATION,
31 /// ... (\ldots)
32 LDOTS,
33 /// End of sentence punctuation (\@)
34 END_OF_SENTENCE,
35 /// Menu separator
36 MENU_SEPARATOR
39 ///
40 InsetSpecialChar();
41 ///
42 InsetSpecialChar(Kind k);
43 ///
44 ~InsetSpecialChar();
45 ///
46 int Ascent(LyXFont const & font) const;
47 ///
48 int Descent(LyXFont const & font) const;
49 ///
50 int Width(LyXFont const & font) const;
51 ///
52 void Draw(LyXFont, LyXScreen & scr, int baseline, float & x);
53 ///
54 void Write(FILE * file);
55 /// Will not be used when lyxf3
56 void Read(LyXLex & lex);
57 ///
58 int Latex(FILE * file, signed char fragile);
59 ///
60 int Latex(string & file, signed char fragile);
61 ///
62 int Linuxdoc(string & file);
63 ///
64 int DocBook(string & file);
65 ///
66 Inset * Clone();
67 ///
68 Inset::Code LyxCode() const
70 return Inset::NO_CODE;
72 /// We don't need \begin_inset and \end_inset
73 bool DirectWrite() const
75 return true;
77 ///
78 void Validate(LaTeXFeatures &) const;
79 private:
80 /// And which kind is this?
81 Kind kind;
84 #endif