]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/XLyXKeySym.h
Yet more dialog tweaking from Rob.
[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 Juergen
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef XLYXKEYSYM_H
13 #define XLYXKEYSYM_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "LString.h"
20 #include <X11/Xlib.h>
21 #include "frontends/LyXKeySym.h"
22
23 /**
24  * This is the XForms (X11) version of LyXKeySym.
25  */
26 class XLyXKeySym : public LyXKeySym {
27 public:
28         XLyXKeySym();
29
30         /// X11 specific initialization with an X11 KeySym
31         void initFromKeySym(KeySym);
32
33         virtual void init(string const & symbolname);
34
35         virtual ~XLyXKeySym() {}
36
37         /// Is this a valid key?
38         virtual bool isOK() const;
39
40         /// Is this a modifier key only?
41         virtual bool isModifier() const;
42         
43         virtual string getSymbolName() const;
44
45         /**
46          * Return the value of the keysym into the local ISO encoding.
47          * This converts the LyXKeySym to a 8-bit encoded character.
48          * This relies on user to use the right encoding.
49          */
50         virtual char getISOEncoded() const;
51
52         virtual bool operator==(LyXKeySym const & k) const;
53
54 private:
55         unsigned int keysym;
56 };
57
58 #endif // XLYXKEYSYM_H