comparison finch/libgnt/gnttextview.h @ 18315:e659842fe66d

Add flags to a textview to decide whether to show scrollbars, and whether to use word-wrapping or character-wrapping.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 27 Jun 2007 20:35:11 +0000
parents 5c6f019e48f8
children 841670dd24e1
comparison
equal deleted inserted replaced
18314:7a8283c1eb75 18315:e659842fe66d
45 45
46 typedef struct _GntTextView GntTextView; 46 typedef struct _GntTextView GntTextView;
47 typedef struct _GntTextViewPriv GntTextViewPriv; 47 typedef struct _GntTextViewPriv GntTextViewPriv;
48 typedef struct _GntTextViewClass GntTextViewClass; 48 typedef struct _GntTextViewClass GntTextViewClass;
49 49
50 typedef enum {
51 GNT_TEXT_VIEW_NO_SCROLL = 1 << 0,
52 GNT_TEXT_VIEW_WRAP_CHAR = 1 << 1,
53 } GntTextViewFlag;
54
50 struct _GntTextView 55 struct _GntTextView
51 { 56 {
52 GntWidget parent; 57 GntWidget parent;
53 58
54 GString *string; 59 GString *string;
55 GList *list; /* List of GntTextLine */ 60 GList *list; /* List of GntTextLine */
56 61
57 GList *tags; /* A list of tags */ 62 GList *tags; /* A list of tags */
63 GntTextViewFlag flags;
58 }; 64 };
59 65
60 typedef enum 66 typedef enum
61 { 67 {
62 GNT_TEXT_FLAG_NORMAL = 0, 68 GNT_TEXT_FLAG_NORMAL = 0,
175 * @param view 181 * @param view
176 * @param widget 182 * @param widget
177 */ 183 */
178 void gnt_text_view_attach_scroll_widget(GntTextView *view, GntWidget *widget); 184 void gnt_text_view_attach_scroll_widget(GntTextView *view, GntWidget *widget);
179 185
186 /**
187 * Set a GntTextViewFlag for the textview widget.
188 *
189 * @param view The textview widget
190 * @param flag The flag to set
191 */
192 void gnt_text_view_set_flag(GntTextView *view, GntTextViewFlag flag);
193
180 G_END_DECLS 194 G_END_DECLS
181 195
182 #endif /* GNT_TEXT_VIEW_H */ 196 #endif /* GNT_TEXT_VIEW_H */