~ubuntu-branches/ubuntu/vivid/ardour/vivid-proposed

« back to all changes in this revision

Viewing changes to libs/gtkmm2/gtk/gtkmm/accelkey.h

  • Committer: Package Import Robot
  • Author(s): Felipe Sateler, Jaromír Mikeš, Felipe Sateler
  • Date: 2014-05-22 14:39:25 UTC
  • mfrom: (29 sid)
  • mto: This revision was merged to the branch mainline in revision 30.
  • Revision ID: package-import@ubuntu.com-20140522143925-vwqfo9287pmkrroe
Tags: 1:2.8.16+git20131003-3
* Team upload

[ Jaromír Mikeš ]
* Add -dbg package

[ Felipe Sateler ]
* Upload to experimental

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id$ */
 
2
#ifndef _GTKMM_ACCELKEY_H
 
3
#define _GTKMM_ACCELKEY_H
 
4
 
 
5
/* menu_elems.h
 
6
 * 
 
7
 * Copyright (C) 1998-2002 The gtkmm Development Team
 
8
 *
 
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.
 
13
 *
 
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.
 
18
 *
 
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.
 
22
 */
 
23
 
 
24
#include <gdk/gdkkeysyms.h>
 
25
#include <gdkmm/types.h>
 
26
 
 
27
 
 
28
namespace Gtk
 
29
{
 
30
 
 
31
/** Defines accelerator key combinations.
 
32
 * For instance, pressing Control-Q to activate the File|Quit menu item.
 
33
 * Typedefed as Gtk::Menu::AccelKey
 
34
 *
 
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 
 
38
 * @see Gtk::AccelMap
 
39
 * @ingroup Menus
 
40
 */
 
41
class AccelKey
 
42
{
 
43
public:
 
44
  AccelKey();
 
45
 
 
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"
 
50
  */
 
51
  AccelKey(guint accel_key, Gdk::ModifierType accel_mods, 
 
52
           const Glib::ustring& accel_path = "");
 
53
  
 
54
  /** AccelKey constructor.
 
55
   * @param accelerator For instance, &quot;&lt;control&gt;q&quot; - Use 
 
56
   *     &lt;control&gt;, &lt;shift&gt;, &lt;alt&gt; and &lt;release&gt;. 
 
57
   *     Use F1, F2, etc, for function keys.
 
58
   * @param accel_path For instance, "<MainWindow>/File/Open"
 
59
   */
 
60
  AccelKey(const Glib::ustring& accelerator, 
 
61
           const Glib::ustring& accel_path = Glib::ustring());
 
62
 
 
63
  AccelKey(const AccelKey& src);
 
64
 
 
65
  AccelKey& operator=(const AccelKey& src);
 
66
 
 
67
  bool is_null() const;
 
68
 
 
69
  /**
 
70
   * Gets the accelerator key.
 
71
   */
 
72
  guint get_key() const;
 
73
  /**
 
74
   * Gets the accelerator modifier.
 
75
   */
 
76
  Gdk::ModifierType get_mod() const;
 
77
  /**
 
78
   * Gets the accelerator path.
 
79
   */
 
80
  Glib::ustring get_path() const;
 
81
  /**
 
82
   * Gets the accelerator representation for labels.
 
83
   */
 
84
  Glib::ustring get_abbrev() const;
 
85
 
 
86
protected:
 
87
  guint key_;
 
88
  Gdk::ModifierType mod_;
 
89
  Glib::ustring path_;
 
90
};
 
91
 
 
92
} /* namespace Gtk */
 
93
 
 
94
#endif //_GTKMM_ACCELKEY_H