summaryrefslogtreecommitdiff
path: root/src/gtksnippet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtksnippet.c')
-rw-r--r--src/gtksnippet.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/gtksnippet.c b/src/gtksnippet.c
index 3fc8ccc..791338e 100644
--- a/src/gtksnippet.c
+++ b/src/gtksnippet.c
@@ -28,6 +28,10 @@
#include <string.h>
+#include "common/dllist.h"
+
+
+
#define CONTENT_BUFFER_LEN 64
#define MARGIN_SPACE 4
@@ -357,6 +361,9 @@ gtk_snippet_paint(GtkSnippet *snippet)
int y0; /* Ordonnée du haut d'une ligne*/
int y1; /* Ordonnée du bas d'une ligne */
+ rendering_line *liter;
+
+
widget = GTK_WIDGET(snippet);
gdk_gc_get_values(snippet->gc, &values);
@@ -399,6 +406,20 @@ gtk_snippet_paint(GtkSnippet *snippet)
2 * MARGIN_SPACE + snippet->line_height, 0,
snippet->layout);
+
+ y0 = 0;
+
+ dl_list_for_each(/**/liter, snippet->lines, rendering_line *)
+ {
+ draw_rendering_line(liter, GDK_DRAWABLE(widget->window), snippet->gc,
+ 2 * MARGIN_SPACE + snippet->line_height, y0);
+
+ y0 += snippet->line_height;
+
+ }
+
+
+
}
@@ -536,6 +557,26 @@ void gtk_snippet_set_processor(GtkSnippet *snippet, const asm_processor *proc)
/******************************************************************************
* *
* Paramètres : snippet = composant GTK à mettre à jour. *
+* lines = informations à intégrer. *
+* *
+* Description : Définit les lignes du bloc de représentation. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void gtk_snippet_set_rendering_lines(GtkSnippet *snippet, rendering_line *lines)
+{
+ snippet->lines = lines;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : snippet = composant GTK à mettre à jour. *
* line = informations à intégrer. *
* *
* Description : Ajoute une ligne dans le bloc de représentation. *