]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/XLyXKeySym.h
Introduce LFUN_PRINT.
[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 /**
19  * This is the XForms (X11) version of LyXKeySym.
20  */
21 class XLyXKeySym : public LyXKeySym {
22 public:
23         XLyXKeySym();
24
25         /// X11 specific initialization with an X11 KeySym
26         void initFromKeySym(KeySym);
27
28         virtual void init(std::string const & symbolname);
29
30         virtual ~XLyXKeySym() {}
31
32         /// Is this a valid key?
33         virtual bool isOK() const;
34
35         /// Is this a modifier key only?
36         virtual bool isModifier() const;
37
38         virtual std::string getSymbolName() const;
39
40         /**
41          * Return the value of the keysym into the local ISO encoding.
42          * This converts the LyXKeySym to a 8-bit encoded character.
43          * This relies on user to use the right encoding.
44          */
45         virtual char getISOEncoded(std::string const & encoding) const;
46
47         ///
48         virtual std::string const print(key_modifier::state mod) const;
49
50         ///
51         unsigned int keysym() const {
52                 return keysym_;
53         }
54 private:
55         unsigned int keysym_;
56 };
57
58 #endif // XLYXKEYSYM_H