Ardour  9.0-pre0-582-g084a23a80d
gtklabel.h
Go to the documentation of this file.
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free
16  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17  */
18 
19 /*
20  * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
21  * file for a list of people on the GTK+ Team. See the ChangeLog
22  * files for a list of changes. These files are distributed with
23  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
24  */
25 
26 #ifndef __GTK_LABEL_H__
27 #define __GTK_LABEL_H__
28 
29 
30 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
31 #error "Only <gtk/gtk.h> can be included directly."
32 #endif
33 
34 #include <gtk/gtkmisc.h>
35 #include <gtk/gtkwindow.h>
36 #include <gtk/gtkmenu.h>
37 
38 
39 G_BEGIN_DECLS
40 
41 #define GTK_TYPE_LABEL (gtk_label_get_type ())
42 #define GTK_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_LABEL, GtkLabel))
43 #define GTK_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_LABEL, GtkLabelClass))
44 #define GTK_IS_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_LABEL))
45 #define GTK_IS_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LABEL))
46 #define GTK_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_LABEL, GtkLabelClass))
47 
48 
49 typedef struct _GtkLabel GtkLabel;
50 typedef struct _GtkLabelClass GtkLabelClass;
51 
52 typedef struct _GtkLabelSelectionInfo GtkLabelSelectionInfo;
53 
54 struct _GtkLabel
55 {
57 
58  /*< private >*/
59  gchar *GSEAL (label);
60  guint GSEAL (jtype) : 2;
61  guint GSEAL (wrap) : 1;
62  guint GSEAL (use_underline) : 1;
63  guint GSEAL (use_markup) : 1;
64  guint GSEAL (ellipsize) : 3;
65  guint GSEAL (single_line_mode) : 1;
66  guint GSEAL (have_transform) : 1;
67  guint GSEAL (in_click) : 1;
68  guint GSEAL (wrap_mode) : 3;
69  guint GSEAL (pattern_set) : 1;
70  guint GSEAL (track_links) : 1;
71 
72  guint GSEAL (mnemonic_keyval);
73 
74  gchar *GSEAL (text);
75  PangoAttrList *GSEAL (attrs);
76  PangoAttrList *GSEAL (effective_attrs);
77 
78  PangoLayout *GSEAL (layout);
79 
80  GtkWidget *GSEAL (mnemonic_widget);
81  GtkWindow *GSEAL (mnemonic_window);
82 
83  GtkLabelSelectionInfo *GSEAL (select_info);
84 };
85 
87 {
89 
90  void (* move_cursor) (GtkLabel *label,
91  GtkMovementStep step,
92  gint count,
93  gboolean extend_selection);
94  void (* copy_clipboard) (GtkLabel *label);
95 
96  /* Hook to customize right-click popup for selectable labels */
97  void (* populate_popup) (GtkLabel *label,
98  GtkMenu *menu);
99 
100  gboolean (*activate_link) (GtkLabel *label,
101  const gchar *uri);
102 
103  /* Padding for future expansion */
104  void (*_gtk_reserved1) (void);
105  void (*_gtk_reserved2) (void);
106  void (*_gtk_reserved3) (void);
107 };
108 
109 GType gtk_label_get_type (void) G_GNUC_CONST;
110 GtkWidget* gtk_label_new (const gchar *str);
113  const gchar *str);
114 const gchar * gtk_label_get_text (GtkLabel *label);
116  PangoAttrList *attrs);
117 PangoAttrList *gtk_label_get_attributes (GtkLabel *label);
119  const gchar *str);
120 const gchar * gtk_label_get_label (GtkLabel *label);
122  const gchar *str);
124  gboolean setting);
127  gboolean setting);
129 
131  const gchar *str);
134  GtkWidget *widget);
137  const gchar *str);
139  GtkJustification jtype);
142  PangoEllipsizeMode mode);
143 PangoEllipsizeMode gtk_label_get_ellipsize (GtkLabel *label);
145  gint n_chars);
148  gint n_chars);
151  const gchar *pattern);
153  gboolean wrap);
156  PangoWrapMode wrap_mode);
157 PangoWrapMode gtk_label_get_line_wrap_mode (GtkLabel *label);
159  gboolean setting);
162  gdouble angle);
163 gdouble gtk_label_get_angle (GtkLabel *label);
165  gint start_offset,
166  gint end_offset);
168  gint *start,
169  gint *end);
170 
171 PangoLayout *gtk_label_get_layout (GtkLabel *label);
173  gint *x,
174  gint *y);
175 
177  gboolean single_line_mode);
179 
180 const gchar *gtk_label_get_current_uri (GtkLabel *label);
182  gboolean track_links);
184 
185 #ifndef GTK_DISABLE_DEPRECATED
186 
187 #define gtk_label_set gtk_label_set_text
188 void gtk_label_get (GtkLabel *label,
189  gchar **str);
190 
191 /* Convenience function to set the name and pattern by parsing
192  * a string with embedded underscores, and return the appropriate
193  * key symbol for the accelerator.
194  */
196  const gchar *string);
197 
198 #endif /* GTK_DISABLE_DEPRECATED */
199 
200 /* private */
201 
203  gboolean mnemonics_visible);
204 
205 G_END_DECLS
206 
207 #endif /* __GTK_LABEL_H__ */
Gdk::Color wrap(GdkColor *object, bool take_copy=false)
GtkJustification
Definition: gtkenums.h:182
GtkMovementStep
Definition: gtkenums.h:238
void _gtk_label_mnemonics_visible_apply_recursively(GtkWidget *widget, gboolean mnemonics_visible)
struct _GtkLabelSelectionInfo GtkLabelSelectionInfo
Definition: gtklabel.h:52
void gtk_label_set_use_underline(GtkLabel *label, gboolean setting)
void gtk_label_set_markup(GtkLabel *label, const gchar *str)
void gtk_label_set_mnemonic_widget(GtkLabel *label, GtkWidget *widget)
void gtk_label_set_angle(GtkLabel *label, gdouble angle)
void gtk_label_get_layout_offsets(GtkLabel *label, gint *x, gint *y)
gboolean gtk_label_get_use_markup(GtkLabel *label)
gboolean gtk_label_get_track_visited_links(GtkLabel *label)
const gchar * gtk_label_get_current_uri(GtkLabel *label)
void gtk_label_set_pattern(GtkLabel *label, const gchar *pattern)
GType gtk_label_get_type(void) G_GNUC_CONST
void gtk_label_set_line_wrap(GtkLabel *label, gboolean wrap)
PangoEllipsizeMode gtk_label_get_ellipsize(GtkLabel *label)
PangoWrapMode gtk_label_get_line_wrap_mode(GtkLabel *label)
gboolean gtk_label_get_selection_bounds(GtkLabel *label, gint *start, gint *end)
void gtk_label_set_max_width_chars(GtkLabel *label, gint n_chars)
const gchar * gtk_label_get_label(GtkLabel *label)
void gtk_label_get(GtkLabel *label, gchar **str)
void gtk_label_set_markup_with_mnemonic(GtkLabel *label, const gchar *str)
GtkWidget * gtk_label_get_mnemonic_widget(GtkLabel *label)
PangoLayout * gtk_label_get_layout(GtkLabel *label)
gint gtk_label_get_max_width_chars(GtkLabel *label)
void gtk_label_set_track_visited_links(GtkLabel *label, gboolean track_links)
void gtk_label_set_single_line_mode(GtkLabel *label, gboolean single_line_mode)
void gtk_label_set_text(GtkLabel *label, const gchar *str)
void gtk_label_set_attributes(GtkLabel *label, PangoAttrList *attrs)
void gtk_label_set_justify(GtkLabel *label, GtkJustification jtype)
gint gtk_label_get_width_chars(GtkLabel *label)
void gtk_label_set_use_markup(GtkLabel *label, gboolean setting)
guint gtk_label_parse_uline(GtkLabel *label, const gchar *string)
GtkWidget * gtk_label_new(const gchar *str)
void gtk_label_select_region(GtkLabel *label, gint start_offset, gint end_offset)
gboolean gtk_label_get_selectable(GtkLabel *label)
gdouble gtk_label_get_angle(GtkLabel *label)
void gtk_label_set_text_with_mnemonic(GtkLabel *label, const gchar *str)
gboolean gtk_label_get_use_underline(GtkLabel *label)
gboolean gtk_label_get_single_line_mode(GtkLabel *label)
const gchar * gtk_label_get_text(GtkLabel *label)
guint gtk_label_get_mnemonic_keyval(GtkLabel *label)
GtkWidget * gtk_label_new_with_mnemonic(const gchar *str)
gboolean gtk_label_get_line_wrap(GtkLabel *label)
GtkJustification gtk_label_get_justify(GtkLabel *label)
PangoAttrList * gtk_label_get_attributes(GtkLabel *label)
void gtk_label_set_ellipsize(GtkLabel *label, PangoEllipsizeMode mode)
void gtk_label_set_label(GtkLabel *label, const gchar *str)
void gtk_label_set_line_wrap_mode(GtkLabel *label, PangoWrapMode wrap_mode)
void gtk_label_set_width_chars(GtkLabel *label, gint n_chars)
void gtk_label_set_selectable(GtkLabel *label, gboolean setting)
PBD::PropertyDescriptor< timepos_t > start
void(* move_cursor)(GtkLabel *label, GtkMovementStep step, gint count, gboolean extend_selection)
Definition: gtklabel.h:90
void(* copy_clipboard)(GtkLabel *label)
Definition: gtklabel.h:94
gboolean(* activate_link)(GtkLabel *label, const gchar *uri)
Definition: gtklabel.h:100
void(* populate_popup)(GtkLabel *label, GtkMenu *menu)
Definition: gtklabel.h:97
GtkMiscClass parent_class
Definition: gtklabel.h:88
void(* _gtk_reserved2)(void)
Definition: gtklabel.h:105
void(* _gtk_reserved3)(void)
Definition: gtklabel.h:106
void(* _gtk_reserved1)(void)
Definition: gtklabel.h:104
GtkLabelSelectionInfo * GSEAL(select_info)
gchar * GSEAL(text)
PangoAttrList * GSEAL(attrs)
gchar * GSEAL(label)
PangoLayout * GSEAL(layout)
GtkMisc misc
Definition: gtklabel.h:56
GtkWindow * GSEAL(mnemonic_window)
PangoAttrList * GSEAL(effective_attrs)
GtkWidget * GSEAL(mnemonic_widget)
guint GSEAL(jtype) guint GSEAL(wrap) guint GSEAL(use_underline) guint GSEAL(use_markup) guint GSEAL(ellipsize) guint GSEAL(single_line_mode) guint GSEAL(have_transform) guint GSEAL(in_click) guint GSEAL(wrap_mode) guint GSEAL(pattern_set) guint GSEAL(track_links) guint GSEAL(mnemonic_keyval)