X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2FLyXKeySym.h;h=b027b07f387b2f4ce9676b50db776b05d15601b4;hb=2f1d525ee1d41bc20adbfe766a9c5d90469aa4b2;hp=c003e5ab7a14a0469401f1c2bd04ddf9d5e67c17;hpb=f1c24d100985c6df2eb5ec390017b69c78fe49c7;p=lyx.git diff --git a/src/frontends/LyXKeySym.h b/src/frontends/LyXKeySym.h index c003e5ab7a..b027b07f38 100644 --- a/src/frontends/LyXKeySym.h +++ b/src/frontends/LyXKeySym.h @@ -1,21 +1,18 @@ // -*- C++ -*- /** * \file LyXKeySym.h - * Copyright 2002 the LyX Team - * Read the file COPYING + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. * - * \author Asger and Juergen + * \author Asger and Jürgen + * + * Full author contact details are available in file CREDITS. */ #ifndef LYXKEYSYM_H #define LYXKEYSYM_H -#ifdef __GNUG__ -#pragma interface -#endif - -#include "LString.h" -#include +#include /** * This is a base class for representing a keypress. @@ -30,7 +27,7 @@ public: virtual ~LyXKeySym() {} /// Initialize with the name of a key. F. ex. "space" or "a" - virtual void init(string const & symbolname) = 0; + virtual void init(std::string const & symbolname) = 0; /// Is this a valid key? virtual bool isOK() const = 0; @@ -38,23 +35,25 @@ public: /// Is this a modifier key only? virtual bool isModifier() const = 0; + /// Is this normal insertable text ? (last ditch attempt only) + virtual bool isText() const { return false; } + /// What is the symbolic name of this key? F.ex. "Return" or "c" - virtual string getSymbolName() const = 0; + virtual std::string getSymbolName() const = 0; /** * Return the value of the keysym into the local ISO encoding. * This converts the LyXKeySym to a 8-bit encoded character. * This relies on user to use the right encoding. */ - virtual char getISOEncoded() const = 0; - - /** - * We need to be able to equality compare these for the - * sake of the keymap business. - */ - virtual bool operator==(LyXKeySym const & k) const = 0; + virtual char getISOEncoded(std::string const & encoding) const = 0; }; -typedef boost::shared_ptr LyXKeySymPtr; + +/** + * We need to be able to equality compare these for the + * sake of the keymap business. + */ +bool operator==(LyXKeySym const & k1, LyXKeySym const & k2); #endif