summaryrefslogtreecommitdiff
path: root/src/gtksnippet.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2009-02-18 00:47:48 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2009-02-18 00:47:48 (GMT)
commitc2d9948e1e67b48d1a6c8a711024d8dd3f6ac507 (patch)
tree0b651a1f7d640ce75414aade589a141d22698bc4 /src/gtksnippet.c
parentd7765c0e6d2685b57625f607325f4a80eb28dbe5 (diff)
Begun to rewrite the way rendering lines are managed.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@49 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
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. *