]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/XLyXKeySym.h
whitespace
[lyx.git] / src / frontends / xforms / XLyXKeySym.h
1 // -*- C++ -*-
2 /**
3  * \file XLyXKeySym.h
4  * Copyright 2002 the LyX Team
5  * Read the file COPYING
6  *
7  * \author Asger and Juergen
8  */
9
10 #ifndef XLYXKEYSYM_H
11 #define XLYXKEYSYM_H
12
13 #ifdef __GNUG__
14 #pragma interface
15 #endif
16
17 #include "LString.h"
18 #include <X11/Xlib.h>
19 #include "frontends/LyXKeySym.h"
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(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 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() const;
49
50         virtual bool operator==(LyXKeySym const & k) const;
51
52 private:
53         unsigned int keysym;
54 };
55
56 #endif // XLYXKEYSYM_H