Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Public Member Functions
Xfc::Gdk::Keyval Class Reference

A GDK key value C++ wrapper class. More...

#include <xfc/gdk/keyval.hh>

Inheritance diagram for Xfc::Gdk::Keyval:
Xfc::IntegerObject< unsigned int >

List of all members.

Public Member Functions

Constructors

Detailed Description

A GDK key value C++ wrapper class.

The Keyval object represents a GDK key value. Examples of key values are GDK_a, GDK_Enter, GDK_F1, etc. The complete list of key values can be found in the <gdk/gdkkeysyms.h> header file. This header file is not included by XFC, it must be included independently, because the file is quite large.

A keyval can be converted into a string representation with name(). The reverse, a Keyval can be constructed from string. The case of key values can be determined using is_upper() and is_lower(). Key values can be converted to upper or lower case using to_upper() and to_lower(). When it makes sense, key values can be converted to and from Unicode characters with to_unicode() and from_unicode().


Constructor & Destructor Documentation

Xfc::Gdk::Keyval::Keyval ( unsigned int  keyval)

Construct a Keyval with the value keyval.

Parameters:
keyvalThe keyval symbol; examples of keyvals are GDK_a, GDK_Enter, GDK_F1, etc.
Xfc::Gdk::Keyval::Keyval ( const char *  keyval_name)

Construct a Keyval from a key name.

Parameters:
keyval_nameA key name.

If the key name is not a valid key the Keyval's value will be GDK_VoidSymbol.

Xfc::Gdk::Keyval::Keyval ( const String keyval_name)

Construct a Keyval from a key name.

Parameters:
keyval_nameA key name.

If the key name is not a valid key the Keyval's value will be GDK_VoidSymbol.

Xfc::Gdk::Keyval::Keyval ( const Keyval src)

Copy Constructor.

Parameters:
srcThe source Keyval.

Member Function Documentation

void Xfc::Gdk::Keyval::convert_case ( Keyval lower,
Keyval upper 
)

Obtains the upper-case and lower-case versions of the keyval symbol.

Parameters:
lowerThe return location for lowercase version of the keyval.
upperThe return location for uppercase version of the keyval symbol.

Examples of keyvals are GDK_a, GDK_Enter, GDK_F1, etc.

Convert from a ISO10646 (Unicode) character to a GDK key symbol.

Parameters:
wcA ISO10646 encoded character.

If successful the keyval will be the corresponding GDK key symbol, if one exists, or GDK_VoidSymbol if there is no corresponding symbol.

Returns true if the given key value is in lower case, or if the keyval is not subject to case conversion.

Returns true if the given key value is in upper case, or if the keyval is not subject to case conversion.

Retrieves a the symbolic name for the key value.

Returns:
A String containing the name of the key, or a null String if this keyval is not a valid key.

The names are the same as those in the <gdk/gdkkeysyms.h> header file but without the leading "GDK_".

Keyval& Xfc::Gdk::Keyval::operator= ( const Keyval src)

Assignment operator.

Parameters:
srcThe source Keyval.

Converts a key value to lower case, if applicable.

Returns:
The lower case form of keyval, or keyval itself if it is already in lower case or it is not subject to case conversion.

Converts the keyval (GDK key symbol) to the corresponding ISO10646 (Unicode) character.

Returns:
The corresponding unicode character, or 0 if there is no corresponding character.

Converts this key value to upper case, if applicable.

Returns:
The upper case form of keyval, or keyval itself if it is already in upper case or it is not subject to case conversion.

The documentation for this class was generated from the following file:
Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC