gschem
|
00001 /* gEDA - GPL Electronic Design Automation 00002 * gschem - gEDA Schematic Capture 00003 * Copyright (C) 1998-2010 gEDA Contributors (see ChangeLog for details) 00004 * 00005 * Code based on GTK 2.14.5 gtk/gtkaccellabel.h (LGPL) 00006 * 00007 * GTK - The GIMP Toolkit 00008 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald 00009 * 00010 * GschemAccelLabel: GtkLabel with accelerator monitoring facilities. 00011 * Copyright (C) 1998 Tim Janik 00012 * 00013 * Modified by the GTK+ Team and others 1997-2001. See the AUTHORS 00014 * file for a list of people on the GTK+ Team. See the ChangeLog 00015 * files for a list of changes. These files are distributed with 00016 * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 00017 * 00018 * Adapted for gEDA by Peter Clifton <pcjc2@cam.ac.uk> 00019 * 00020 * THIS FILE IS LGPL LICENSED, gEDA AS A WHOLE IS GPL LICENSED 00021 * 00022 * This library is free software; you can redistribute it and/or 00023 * modify it under the terms of the GNU Lesser General Public 00024 * License as published by the Free Software Foundation; either 00025 * version 2 of the License, or (at your option) any later version. 00026 * 00027 * This library is distributed in the hope that it will be useful, 00028 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00029 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00030 * Lesser General Public License for more details. 00031 * 00032 * You should have received a copy of the GNU Library General Public 00033 * License along with this library; if not, write to the 00034 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00035 * Boston, MA 02110-1301 USA 00036 */ 00037 00038 #ifndef __GSCHEM_ACCEL_LABEL_H__ 00039 #define __GSCHEM_ACCEL_LABEL_H__ 00040 00041 G_BEGIN_DECLS 00042 00043 #define GSCHEM_TYPE_ACCEL_LABEL (gschem_accel_label_get_type ()) 00044 #define GSCHEM_ACCEL_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSCHEM_TYPE_ACCEL_LABEL, GschemAccelLabel)) 00045 #define GSCHEM_ACCEL_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSCHEM_TYPE_ACCEL_LABEL, GschemAccelLabelClass)) 00046 #define GSCHEM_IS_ACCEL_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSCHEM_TYPE_ACCEL_LABEL)) 00047 #define GSCHEM_IS_ACCEL_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSCHEM_TYPE_ACCEL_LABEL)) 00048 #define GSCHEM_ACCEL_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSCHEM_TYPE_ACCEL_LABEL, GschemAccelLabelClass)) 00049 00050 00051 typedef struct _GschemAccelLabel GschemAccelLabel; 00052 typedef struct _GschemAccelLabelClass GschemAccelLabelClass; 00053 00054 struct _GschemAccelLabel 00055 { 00056 GtkAccelLabel label; 00057 00058 guint accel_padding; 00059 gchar *accel_string; 00060 guint16 accel_string_width; 00061 }; 00062 00063 struct _GschemAccelLabelClass 00064 { 00065 GtkAccelLabelClass parent_class; 00066 }; 00067 00068 00069 GType gschem_accel_label_get_type (void) G_GNUC_CONST; 00070 GtkWidget* gschem_accel_label_new (const gchar *string); 00071 guint gschem_accel_label_get_accel_width (GschemAccelLabel *accel_label); 00072 void gschem_accel_label_set_accel_string (GschemAccelLabel *accel_label, 00073 const gchar *accel_string); 00074 gboolean gschem_accel_label_refetch (GschemAccelLabel *accel_label); 00075 00076 /* private */ 00077 gchar * _gschem_accel_label_class_get_accelerator_label (GschemAccelLabelClass *klass, 00078 guint accelerator_key, 00079 GdkModifierType accelerator_mods); 00080 00081 G_END_DECLS 00082 00083 #endif /* __GSCHEM_ACCEL_LABEL_H__ */