Debian Codegraph @

gtk/src/shortcutlabel.hg

raw
1 /* Copyright (C) 2016 The gtkmm Development Team
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17 #include <gtkmm/box.h>
18
19 _DEFS(gtkmm,gtk)
20 _PINCLUDE(gtkmm/private/box_p.h)
21
22 namespace Gtk
23 {
24
25 /** Displays a keyboard shortcut.
26 *
27 * %Gtk::ShortcutLabel is a widget that represents a single keyboard shortcut
28 * or gesture in the user interface.
29 *
30 * @see CellRendererAccel
31 * @newin{3,22}
32 *
33 * @ingroup Widgets
34 */
35 class GTKMM_API ShortcutLabel : public Box
36 {
37 _CLASS_GTKOBJECT(ShortcutLabel, GtkShortcutLabel, GTK_SHORTCUT_LABEL, Box, GtkBox, , , GTKMM_API)
38
39 public:
40 _CTOR_DEFAULT
41
42 /** Creates a %ShortcutLabel with accelerator set.
43 *
44 * @param accelerator The initial accelerator.
45 * See ShortcutsShortcut::property_accelerator() for the accepted syntax.
46 *
47 * @newin{3,22}
48 */
49 _WRAP_CTOR(ShortcutLabel(const Glib::ustring& accelerator), gtk_shortcut_label_new)
50
51 _WRAP_METHOD(Glib::ustring get_accelerator() const, gtk_shortcut_label_get_accelerator)
52 _WRAP_METHOD(void set_accelerator(const Glib::ustring& accelerator), gtk_shortcut_label_set_accelerator)
53 _WRAP_METHOD(Glib::ustring get_disabled_text() const, gtk_shortcut_label_get_disabled_text)
54 _WRAP_METHOD(void set_disabled_text(const Glib::ustring& disabled_text), gtk_shortcut_label_set_disabled_text)
55
56 _WRAP_PROPERTY("accelerator", Glib::ustring)
57 _WRAP_PROPERTY("disabled-text", Glib::ustring)
58
59 // There are no signals or vfuncs.
60 };
61
62 } // namespace Gtk