// -*- c++ -*- // Generated by gtkmmproc from ./../accellabel.gen_h -- DO NOT MODIFY! #ifndef _GTKMM_ACCELLABEL_H #define _GTKMM_ACCELLABEL_H /* $Id: accellabel.gen_h,v 1.33 2001/07/15 13:33:38 murrayc Exp $ */ /* accellabel.h * * Copyright (C) 1998-1999 The Gtk-- 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 #include namespace Gtk { class AccelLabel; class AccelLabel_Class; } namespace Gtk { Gtk::AccelLabel *wrap (GtkAccelLabel *o); } namespace Gtk { //: A label which displays an accelerator key to the right of the text. //- The {Gtk::AccelLabel} widget is a subclass of {Gtk::Label} that also displays an accelerator key to //- the right of the label text, e.g. 'Ctl+S'. It is commonly used in menus to show the keyboard //- short-cuts for commands. //- //- The accelerator key to display is not set explicitly. Instead, the {Gtk::AccelLabel} displays the //- accelerators which have been added to a particular widget. This widget is set by calling //- {set_accel_widget()}. //- For example, a {Gtk::MenuItem} widget may have an accelerator added to emit the "activate" signal //- when the 'Ctl+S' key combination is pressed. A {Gtk::AccelLabel} is created and added to the //- {Gtk::MenuItem}, and {set_accel_widget()} is called with the {Gtk::MenuItem} as the argument. The //- {Gtk::AccelLabel} will now display 'Ctl+S' after its label. class AccelLabel : public Label { public: typedef AccelLabel CppObjectType; typedef AccelLabel_Class CppClassType; typedef GtkAccelLabel BaseObjectType; typedef GtkAccelLabelClass BaseClassType; private: friend class AccelLabel_Class; static CppClassType accel_label_class; AccelLabel(const AccelLabel&); AccelLabel& operator=(const AccelLabel&); // not implemented protected: void initialize_class(); explicit AccelLabel(GtkAccelLabel *castitem); public: static GtkType get_type(); GtkAccelLabel* gtkobj() { return (GtkAccelLabel*)(gtkobject); } const GtkAccelLabel* gtkobj() const { return (GtkAccelLabel*)(gtkobject); } static bool isA(Object *checkcast); // Hook for proxies static const char* const signal_names[]; virtual ~AccelLabel(); private: public: //: Creates a new {Gtk::AccelLabel}. //- string: The label string. explicit AccelLabel(const string &label); guint get_accel_width() const; //: Sets the widget whose accelerators are to be shown. void set_accel_widget(Gtk::Widget& accel_widget); //: Recreates the string representing the accelerator keys. //- This should not be needed since the string is automatically updated whenever accelerators //- are added or removed from the associated widget. bool refetch(); public: protected: // impl functions }; } //+ PROPERTIES(Gtk_AccelLabel) //. name: queue_id //. type: guint //. get: //. set: //. desc: //. name: accel_padding //. type: guint //. get: //. set: //. desc: //. name: accel_widget //. type: Gtk_Widget* //. get: //. set: //. desc: //. name: accel_string //. type: string //. get: //. set: //. desc: //. name: accel_string_width //. type: guint16 //. get: //. set: //. desc: #endif .