From f9e666244fb25940b113cd35dbed18d0f75c4f44 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 27 Aug 2001 01:05:07 +0000 Subject: Add properties for labels, mnemonics and stock items. Added C accessor 2001-08-26 Alexander Larsson * gtk/gtkbutton.[ch]: Add properties for labels, mnemonics and stock items. Added C accessor functions for the properties. Removed deprecated button->child. * gtk/gtkradiobutton.c: * gtk/gtktogglebutton.c: Update to use the functions in GtkButton. * gtk/gtkcheckbutton.c: Update to use the functions in GtkButton. Changed size allocation of child. Now only gets as much space as it requests. * gtk/gtkclist.c: Don't use GtkButton->child * gtk/gtklabel.c: Fixed typo in docs --- gtk/gtkbutton.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'gtk/gtkbutton.h') diff --git a/gtk/gtkbutton.h b/gtk/gtkbutton.h index 1a5cbaf3d9..b27df541a8 100644 --- a/gtk/gtkbutton.h +++ b/gtk/gtkbutton.h @@ -52,15 +52,16 @@ struct _GtkButton { GtkBin bin; - GtkWidget *child /* deprecapted field, - * use GTK_BIN (button)->child instead - */; + gchar *label_text; guint activate_timeout; + guint constructed : 1; guint in_button : 1; guint button_down : 1; guint relief : 2; + guint use_underline : 1; + guint use_stock : 1; guint depressed : 1; }; @@ -90,8 +91,18 @@ void gtk_button_leave (GtkButton *button); void gtk_button_set_relief (GtkButton *button, GtkReliefStyle newstyle); GtkReliefStyle gtk_button_get_relief (GtkButton *button); -void _gtk_button_set_depressed (GtkButton *button, - gboolean depressed); + +void gtk_button_set_label (GtkButton *button, + const gchar *label); +G_CONST_RETURN gchar *gtk_button_get_label (GtkButton *button); +void gtk_button_set_use_underline (GtkButton *button, + gboolean value); +gboolean gtk_button_get_use_underline (GtkButton *button); +void gtk_button_set_use_stock (GtkButton *button, + gboolean value); +gboolean gtk_button_get_use_stock (GtkButton *button); +void _gtk_button_set_depressed (GtkButton *button, + gboolean depressed); #ifdef __cplusplus } -- cgit v1.2.1