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


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
Accessors
Methods

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:
keyval The 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_name A 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_name A 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:
src The 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:
lower The return location for lowercase version of the keyval.
upper The return location for uppercase version of the keyval symbol.
Examples of keyvals are GDK_a, GDK_Enter, GDK_F1, etc.

void Xfc::Gdk::Keyval::from_unicode const G::Unichar wc  ) 
 

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

Parameters:
wc A 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.

String Xfc::Gdk::Keyval::name  )  const
 

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:
src The source Keyval.

Keyval Xfc::Gdk::Keyval::to_lower  )  const
 

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.

G::Unichar Xfc::Gdk::Keyval::to_unicode  )  const
 

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.

Keyval Xfc::Gdk::Keyval::to_upper  )  const
 

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 4.3