Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Gtk::AccelKey Class Reference

An accelerator key value, modifier and flag class. More...

`#include <inti/gtk/accelgroup.h>`

List of all members.

## Public Member Functions

Constructors

- AccelKey ()
    Construct an empty AccelKey.
- AccelKey (const char *accelerator, AccelFlagsField accel_flags=Gtk::ACCEL_VISIBLE)
    Construct an AccelKey from a string representing an accelerator.
- AccelKey (unsigned int accel_key, Gdk::ModifierTypeField accel_mods, AccelFlagsField accel_flags=Gtk::ACCEL_VISIBLE)
    Construct an AccelKey with the specified key, modifier and flag values.
- AccelKey (const AccelKey &src)
    Copy constructor.
- AccelKey & operator= (const AccelKey &src)
    Assignment operator.

Accessors

- GtkAccelKey * gtk_accel_key () const
    Get a pointer to the GtkAccelKey structure.
- operator GtkAccelKey * () const
    Conversion operator; safely converts an AccelKey to a GtkAccelKey pointer.
- unsigned int key () const
    Get the key value of the accelerator.
- Gdk::ModifierTypeField mods () const
    Get the modifier flags.
- AccelFlagsField flags () const
    Get the accelerator flags.

Methods

- void set (const char *accelerator, AccelFlagsField accel_flags=Gtk::ACCEL_VISIBLE)
    Set the accelerator values from a string representation of an accelerator.
- void set (unsigned int accel_key, Gdk::ModifierTypeField accel_mods, AccelFlagsField accel_flags=Gtk::ACCEL_VISIBLE)
    Set the accelerator key, modifier and flag values.

## Detailed Description

An accelerator key value, modifier and flag class.

AccelKey encapsulates an accelerator key, its accelerator flags (for configuring the accelerator) and its modifier flags (the modifier combination of the accelerator).

## Constructor & Destructor Documentation

Inti::Gtk::AccelKey::AccelKey | ( | const char * | accelerator,
|  | AccelFlagsField | accel_flags = Gtk::ACCEL_VISIBLE
| ) |

  | Construct an AccelKey from a string representing an accelerator. Parameters:
  accelerator | A string representing an accelerator.
  accel_flags | A flag mask to configure this accelerator.
Parses a string representing an accelerator. The format looks like "\<Control\>a" or "\<Shift\>\<Alt\>F1" or "\<Release\>z" (the last one is for key release). The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "\<Ctl\>" and "\<Ctrl\>". If the parse fails, accelerator and its modifiers will be set to 0 (zero).

Inti::Gtk::AccelKey::AccelKey | ( | unsigned int | accel_key,
|  | Gdk::ModifierTypeField | accel_mods,
|  | AccelFlagsField | accel_flags = Gtk::ACCEL_VISIBLE
| ) |

  | Construct an AccelKey with the specified key, modifier and flag values. Parameters:
  accel_key | Key value of the accelerator.
  accel_mods | Modifier combination of the accelerator.
  accel_flags | A flag mask to configure this accelerator.

## Member Function Documentation

void Inti::Gtk::AccelKey::set | ( | unsigned int | accel_key,
|  | Gdk::ModifierTypeField | accel_mods,
|  | AccelFlagsField | accel_flags = Gtk::ACCEL_VISIBLE
| ) |

  | Set the accelerator key, modifier and flag values. Parameters:
  accel_key | Key value of the accelerator.
  accel_mods | Modifier combination of the accelerator.
  accel_flags | A flag mask to configure this accelerator.

void Inti::Gtk::AccelKey::set | ( | const char * | accelerator,
|  | AccelFlagsField | accel_flags = Gtk::ACCEL_VISIBLE
| ) |

  | Set the accelerator values from a string representation of an accelerator. Parameters:
  accelerator | A string representing an accelerator.
  accel_flags | A flag mask to configure this accelerator.
Parses a string representing an accelerator. The format looks like "\<Control\>a" or "\<Shift\>\<Alt\>F1" or "\<Release\>z" (the last one is for key release). The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "\<Ctl\>" and "\<Ctrl\>". If the parse fails, accelerator and its modifiers will be set to 0 (zero).

The documentation for this class was generated from the following file:

- accelgroup.h

Main Page - Footer