]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/XLyXKeySym.h
ditch FileInfo -> use boost.filesystem
[lyx.git] / src / frontends / xforms / XLyXKeySym.h
1 // -*- C++ -*-
2 /**
3  * \file XLyXKeySym.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Asger and Jürgen
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef XLYXKEYSYM_H
13 #define XLYXKEYSYM_H
14
15 #include <X11/Xlib.h>
16 #include "frontends/LyXKeySym.h"
17
18 namespace lyx {
19 namespace frontend {
20
21 /**
22  * This is the XForms (X11) version of LyXKeySym.
23  */
24 class XLyXKeySym : public LyXKeySym {
25 public:
26         XLyXKeySym();
27
28         /// X11 specific initialization with an X11 KeySym
29         void initFromKeySym(KeySym);
30
31         virtual void init(std::string const & symbolname);
32
33         virtual ~XLyXKeySym() {}
34
35         /// Is this a valid key?
36         virtual bool isOK() const;
37
38         /// Is this a modifier key only?
39         virtual bool isModifier() const;
40
41         virtual std::string getSymbolName() const;
42
43         /**
44          * Return the value of the keysym into the local ISO encoding.
45          * This converts the LyXKeySym to a 8-bit encoded character.
46          * This relies on user to use the right encoding.
47          */
48         virtual char getISOEncoded(std::string const & encoding) const;
49
50         ///
51         virtual std::string const print(key_modifier::state mod) const;
52
53         ///
54         unsigned int keysym() const {
55                 return keysym_;
56         }
57 private:
58         unsigned int keysym_;
59 };
60
61 } // namespace frontend
62 } // namespace lyx
63
64 #endif // XLYXKEYSYM_H