~ubuntu-branches/ubuntu/utopic/rhythmbox/utopic-proposed

« back to all changes in this revision

Viewing changes to widgets/rb-ellipsizing-label.h

Tags: upstream-0.9.2
ImportĀ upstreamĀ versionĀ 0.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* 
2
 
   arch-tag: Header for subclass of GtkLabel that ellipsizes the text.
3
 
 
4
 
   Copyright (C) 2001 Eazel, Inc.
5
 
 
6
 
   The Gnome Library is free software; you can redistribute it and/or
7
 
   modify it under the terms of the GNU Library General Public License as
8
 
   published by the Free Software Foundation; either version 2 of the
9
 
   License, or (at your option) any later version.
10
 
 
11
 
   The Gnome Library is distributed in the hope that it will be useful,
12
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
 
   Library General Public License for more details.
15
 
 
16
 
   You should have received a copy of the GNU Library General Public
17
 
   License along with the Gnome Library; see the file COPYING.LIB.  If not,
18
 
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19
 
   Boston, MA 02111-1307, USA.
20
 
 
21
 
   Author: John Sullivan <sullivan@eazel.com>,
22
 
 */
23
 
 
24
 
#ifndef RB_ELLIPSIZING_LABEL_H
25
 
#define RB_ELLIPSIZING_LABEL_H
26
 
 
27
 
#include <gtk/gtklabel.h>
28
 
 
29
 
#define RB_TYPE_ELLIPSIZING_LABEL            (rb_ellipsizing_label_get_type ())
30
 
#define RB_ELLIPSIZING_LABEL(obj)            (GTK_CHECK_CAST ((obj), RB_TYPE_ELLIPSIZING_LABEL, RBEllipsizingLabel))
31
 
#define RB_ELLIPSIZING_LABEL_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), RB_TYPE_ELLIPSIZING_LABEL, RBEllipsizingLabelClass))
32
 
#define RB_IS_ELLIPSIZING_LABEL(obj)         (GTK_CHECK_TYPE ((obj), RB_TYPE_ELLIPSIZING_LABEL))
33
 
#define RB_IS_ELLIPSIZING_LABEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), RB_TYPE_ELLIPSIZING_LABEL))
34
 
 
35
 
typedef struct RBEllipsizingLabelPrivate RBEllipsizingLabelPrivate;
36
 
 
37
 
typedef enum {
38
 
        RB_ELLIPSIZE_START,
39
 
        RB_ELLIPSIZE_MIDDLE,
40
 
        RB_ELLIPSIZE_END
41
 
} RBEllipsizeMode;
42
 
 
43
 
typedef struct
44
 
{
45
 
        GtkLabel parent;
46
 
 
47
 
        RBEllipsizingLabelPrivate *priv;
48
 
 
49
 
        gboolean ellipsized;
50
 
} RBEllipsizingLabel;
51
 
 
52
 
typedef struct
53
 
{
54
 
        GtkLabelClass parent_class;
55
 
} RBEllipsizingLabelClass;
56
 
 
57
 
GtkType    rb_ellipsizing_label_get_type        (void);
58
 
 
59
 
GtkWidget *rb_ellipsizing_label_new             (const char *string);
60
 
 
61
 
void       rb_ellipsizing_label_set_mode        (RBEllipsizingLabel *label,
62
 
                                                 RBEllipsizeMode mode);
63
 
 
64
 
void       rb_ellipsizing_label_set_text        (RBEllipsizingLabel *label,
65
 
                                                 const char *string);
66
 
 
67
 
void       rb_ellipsizing_label_set_markup      (RBEllipsizingLabel *label,
68
 
                                                 const char *string);
69
 
 
70
 
gboolean   rb_ellipsizing_label_get_ellipsized  (RBEllipsizingLabel *label);
71
 
 
72
 
int             rb_ellipsizing_label_get_width  (RBEllipsizingLabel *label);
73
 
int     rb_ellipsizing_label_get_full_text_size (RBEllipsizingLabel *label);
74
 
 
75
 
G_END_DECLS
76
 
 
77
 
#endif /* RB_ELLIPSIZING_LABEL_H */