2
#ifndef _GTKMM_ACCELKEY_H
3
#define _GTKMM_ACCELKEY_H
7
* Copyright (C) 1998-2002 The gtkmm Development Team
9
* This library is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU Library General Public
11
* License as published by the Free Software Foundation; either
12
* version 2 of the License, or (at your option) any later version.
14
* This library is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* Library General Public License for more details.
19
* You should have received a copy of the GNU Library General Public
20
* License along with this library; if not, write to the Free
21
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24
#include <gdk/gdkkeysyms.h>
25
#include <gdkmm/types.h>
31
/** Defines accelerator key combinations.
32
* For instance, pressing Control-Q to activate the File|Quit menu item.
33
* Typedefed as Gtk::Menu::AccelKey
35
* By defining accelerator paths you can allow the user of your application
36
* to change accelerators himself. An example of an accelerator might be
37
* "<MainWindow>/File/Open". Modified accelerators may be saved
46
/** AccelKey constructor.
47
* @param accel_key For instance, 'q'
48
* @param accel_mods For instance, Gdk::CONTROL_MASK
49
* @param accel_path For instance, "<MainWindow>/File/Open"
51
AccelKey(guint accel_key, Gdk::ModifierType accel_mods,
52
const Glib::ustring& accel_path = "");
54
/** AccelKey constructor.
55
* @param accelerator For instance, "<control>q" - Use
56
* <control>, <shift>, <alt> and <release>.
57
* Use F1, F2, etc, for function keys.
58
* @param accel_path For instance, "<MainWindow>/File/Open"
60
AccelKey(const Glib::ustring& accelerator,
61
const Glib::ustring& accel_path = Glib::ustring());
63
AccelKey(const AccelKey& src);
65
AccelKey& operator=(const AccelKey& src);
70
* Gets the accelerator key.
72
guint get_key() const;
74
* Gets the accelerator modifier.
76
Gdk::ModifierType get_mod() const;
78
* Gets the accelerator path.
80
Glib::ustring get_path() const;
82
* Gets the accelerator representation for labels.
84
Glib::ustring get_abbrev() const;
88
Gdk::ModifierType mod_;
94
#endif //_GTKMM_ACCELKEY_H