Paul Davis
449aab3c46
git-svn-id: svn://localhost/ardour2/branches/3.0@3435 d708f5d6-7413-0410-9779-e7cbd77b26cf
69 lines
2.4 KiB
Plaintext
69 lines
2.4 KiB
Plaintext
/* $Id: accellabel.hg,v 1.5 2006/04/12 11:11:25 murrayc Exp $ */
|
|
|
|
/* accellabel.h
|
|
*
|
|
* Copyright (C) 1998-2002 The gtkmm Development Team
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Library General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library; if not, write to the Free
|
|
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
*/
|
|
|
|
#include <gtkmm/label.h>
|
|
|
|
_DEFS(gtkmm,gtk)
|
|
_PINCLUDE(gtkmm/private/label_p.h)
|
|
|
|
|
|
namespace Gtk
|
|
{
|
|
|
|
/** A label which displays an accelerator key on the right of the text.
|
|
* Used for menu item labels, for instance.
|
|
*
|
|
* @ingroup Widgets
|
|
*/
|
|
class AccelLabel : public Label
|
|
{
|
|
_CLASS_GTKOBJECT(AccelLabel,GtkAccelLabel,GTK_ACCEL_LABEL,Gtk::Label,GtkLabel)
|
|
_IGNORE(gtk_accel_label_accelerator_width, gtk_accel_label_set_accel_closure)
|
|
public:
|
|
|
|
//The default ctor doesn't correspond to any _new function, but gtkmenuitem.cc does a simple g_object_new() with no properties.
|
|
/** Default constructor to create an AccelLabel object
|
|
*/
|
|
_CTOR_DEFAULT
|
|
|
|
/** Constructor to create an AccelLabel object with a default label
|
|
* @param label The label string.
|
|
* @param mnemonic If true, characters preceded by an underscore (_) will be underlined and used as a keyboard accelerator.
|
|
*/
|
|
explicit AccelLabel(const Glib::ustring& label, bool mnemonic = false);
|
|
|
|
_WRAP_METHOD(void set_accel_widget(const Widget& accel_widget), gtk_accel_label_set_accel_widget)
|
|
/// Forget the accel widget previously set by set_accel_widget().
|
|
void unset_accel_widget();
|
|
|
|
_WRAP_METHOD(Widget* get_accel_widget(), gtk_accel_label_get_accel_widget)
|
|
_WRAP_METHOD(const Widget* get_accel_widget() const, gtk_accel_label_get_accel_widget, constversion)
|
|
|
|
_WRAP_METHOD(guint get_accel_width() const, gtk_accel_label_get_accel_width)
|
|
_WRAP_METHOD(bool refetch(), gtk_accel_label_refetch)
|
|
|
|
//_WRAP_PROPERTY("accel-closure", Glib::Object) //GClosure
|
|
_WRAP_PROPERTY("accel-widget", Gtk::Widget*)
|
|
};
|
|
|
|
} /* namespace Gtk */
|
|
|