summaryrefslogtreecommitdiff
path: root/gtk/gtklabel.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2001-03-21 18:58:28 +0000
committerAlexander Larsson <alexl@src.gnome.org>2001-03-21 18:58:28 +0000
commitde5eafede29f9c39e51fd78bc183fed60fe04a52 (patch)
tree46d98fc60ec0f146b58312e6046fa44c8fbf79cb /gtk/gtklabel.h
parenta24e9b107402d29e8aa3e2fc3c73652e7d3b6575 (diff)
downloadgtk+-de5eafede29f9c39e51fd78bc183fed60fe04a52.tar.gz
Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and removed
2001-03-21 Alexander Larsson <alexl@redhat.com> * gtk/gtkbutton.[ch]: * gtk/gtkdialog.c: Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and removed accel_group argument. Renamed gtk_button_new_accel() to gtk_button_new_with_mnemonic() and removed accel_group argument. * gtk/gtkcheckbutton.[ch]: New function gtk_check_button_new_with_mnemonic(). * gtk/gtkentry.c: Override activate_mnemonic and just grab focus. * gtk/gtkitemfactory.c: Don't add menu uline accel group, instead use mnemonics support. * gtk/gtklabel.[ch]: New support for mnemonics. * gtk/gtkmarshal.list: Needed BOOLEAN:BOOLEAN for activate_mnemonic. * gtk/gtkmenu.[c]: * gtkmenushell.c: Use mnemonics instead of accel groups for uline support in menu items. Removed gtk_menu_get_uline_accel_group() and gtk_menu_ensure_uline_accel_group(). * gtk/gtkmenuitem.c: Override activate_mnemonic to handle switching between menu items if there are collisions. * gtk/gtknotebook.c: Connect to activate_mnemonic on the tab_label, so that activating it switches to that notebook page. * gtk/gtkwidget.[ch]: Add activate_mnemonic signal. New function gtk_widget_activate_mnemonic() to emit it. Default implementation does activate/grab_focus. * gtk/gtkwindow.[ch]: Add support for mnemonics in windows. New functions: gtk_window_add_mnemonic, gtk_window_remove_mnemonic, gtk_window_activate_mnemonic, gtk_window_set_mnemonic_modifier * gtk/testgtk.c: Update to function name changes.
Diffstat (limited to 'gtk/gtklabel.h')
-rw-r--r--gtk/gtklabel.h39
1 files changed, 24 insertions, 15 deletions
diff --git a/gtk/gtklabel.h b/gtk/gtklabel.h
index d9bca17405..49a1626e2a 100644
--- a/gtk/gtklabel.h
+++ b/gtk/gtklabel.h
@@ -29,6 +29,7 @@
#include <gdk/gdk.h>
#include <gtk/gtkmisc.h>
+#include <gtk/gtkwindow.h>
#ifdef __cplusplus
@@ -60,13 +61,16 @@ struct _GtkLabel
guint use_underline : 1;
guint use_markup : 1;
- guint accel_keyval;
+ guint mnemonic_keyval;
gchar *text;
PangoAttrList *attrs;
PangoLayout *layout;
+ GtkWidget *mnemonic_widget;
+ GtkWindow *mnemonic_window;
+
GtkLabelSelectionInfo *select_info;
};
@@ -75,8 +79,9 @@ struct _GtkLabelClass
GtkMiscClass parent_class;
};
-GtkType gtk_label_get_type (void) G_GNUC_CONST;
-GtkWidget *gtk_label_new (const char *str);
+GtkType gtk_label_get_type (void) G_GNUC_CONST;
+GtkWidget *gtk_label_new (const char *str);
+GtkWidget *gtk_label_new_with_mnemonic (const char *str);
void gtk_label_set_text (GtkLabel *label,
const char *str);
@@ -87,22 +92,26 @@ void gtk_label_set_attributes (GtkLabel *label,
void gtk_label_set_markup (GtkLabel *label,
const gchar *str);
-guint gtk_label_set_markup_with_accel (GtkLabel *label,
- const gchar *str);
-
-guint gtk_label_get_accel_keyval (GtkLabel *label);
-void gtk_label_set_justify (GtkLabel *label,
- GtkJustification jtype);
-void gtk_label_set_pattern (GtkLabel *label,
- const gchar *pattern);
-void gtk_label_set_line_wrap (GtkLabel *label,
- gboolean wrap);
+void gtk_label_set_markup_with_mnemonic (GtkLabel *label,
+ const gchar *str);
+
+guint gtk_label_get_mnemonic_keyval (GtkLabel *label);
+void gtk_label_set_justify (GtkLabel *label,
+ GtkJustification jtype);
+void gtk_label_set_pattern (GtkLabel *label,
+ const gchar *pattern);
+void gtk_label_set_line_wrap (GtkLabel *label,
+ gboolean wrap);
/* Convenience function to set the name and pattern by parsing
* a string with embedded underscores, and return the appropriate
* key symbol for the accelerator.
*/
-guint gtk_label_parse_uline (GtkLabel *label,
- const gchar *string);
+guint gtk_label_parse_uline (GtkLabel *label,
+ const gchar *string);
+void gtk_label_set_text_with_mnemonic (GtkLabel *label,
+ const gchar *string);
+void gtk_label_set_mnemonic_widget (GtkLabel *label,
+ GtkWidget *widget);
void gtk_label_set_selectable (GtkLabel *label,
gboolean setting);