summaryrefslogtreecommitdiff
path: root/gtk/gtklabel.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2001-02-17 00:11:03 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-02-17 00:11:03 +0000
commit08add3cd503b3b891a0028b9b5400e271439c89f (patch)
tree1de50fc1006a3cc8c2c1de1b8742c200e7888840 /gtk/gtklabel.h
parentf139b1c9036128e5fef9bb0fea3a77d1afb8b8fe (diff)
downloadgtk+-08add3cd503b3b891a0028b9b5400e271439c89f.tar.gz
convert the X coordinates so they're with respect to the line, rather than
2001-02-15 Havoc Pennington <hp@redhat.com> * gdk/gdkpango.c (gdk_pango_layout_line_get_clip_region): convert the X coordinates so they're with respect to the line, rather than with respect to the layout. * gtk/gtkalignment.c: Convert to new property API, patch from Lee Mallabone * gtk/testgtk.c (create_range_controls): add vscale tests, and inverted test * gtk/gtkrange.c (gtk_range_set_inverted): new function to fix #50806 * gtk/gtkentry.c (gtk_entry_get_text): add G_CONST_RETURN * gtk/gtktextiter.h (gtk_text_iter_is_last): rename gtk_text_iter_is_end * gtk/gtktextbuffer.h (gtk_text_buffer_get_last_iter): rename gtk_text_buffer_get_end_iter * gtk/testgtk.c (create_labels): Add test for selectable * gtk/gtkentry.c (gtk_entry_draw_text): Use new GDK API to draw the selection stuff. This code is kind of broken since it doesn't use the theme engine. * gdk/gdkpango.c (gdk_pango_layout_line_get_clip_region): fix infinite loop and y offset problem (gdk_draw_layout_line_with_colors): fix foreground color handling * gtk/gtklabel.h, gtk/gtklabel.c: Implement a "selectable" flag that makes the label selectable. * gtk/gtklabel.c (gtk_label_style_set): recreate the label's layout when the style is set, since fonts etc. could have changed.
Diffstat (limited to 'gtk/gtklabel.h')
-rw-r--r--gtk/gtklabel.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/gtk/gtklabel.h b/gtk/gtklabel.h
index 787ffed50f..6285670113 100644
--- a/gtk/gtklabel.h
+++ b/gtk/gtklabel.h
@@ -47,19 +47,24 @@ extern "C" {
typedef struct _GtkLabel GtkLabel;
typedef struct _GtkLabelClass GtkLabelClass;
+typedef struct _GtkLabelSelectionInfo GtkLabelSelectionInfo;
+
struct _GtkLabel
{
GtkMisc misc;
+ /*< private >*/
+
gchar *label;
gchar *pattern;
guint jtype : 2;
guint wrap : 1;
- /*< private >*/
PangoLayout *layout;
PangoAttrList *attrs;
+
+ GtkLabelSelectionInfo *select_info;
};
struct _GtkLabelClass
@@ -95,6 +100,14 @@ void gtk_label_set_line_wrap (GtkLabel *label,
guint gtk_label_parse_uline (GtkLabel *label,
const gchar *string);
+void gtk_label_set_selectable (GtkLabel *label,
+ gboolean setting);
+gboolean gtk_label_get_selectable (GtkLabel *label);
+
+void gtk_label_select_region (GtkLabel *label,
+ gint start_offset,
+ gint end_offset);
+
#ifndef GTK_DISABLE_COMPAT_H
# define gtk_label_set gtk_label_set_text
#endif /* GTK_DISABLE_COMPAT_H */