summaryrefslogtreecommitdiff
path: root/src/glibext/linecolumn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glibext/linecolumn.c')
-rw-r--r--src/glibext/linecolumn.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/glibext/linecolumn.c b/src/glibext/linecolumn.c
index 38088d2..35f7698 100644
--- a/src/glibext/linecolumn.c
+++ b/src/glibext/linecolumn.c
@@ -49,7 +49,9 @@ void init_line_column(line_column *column)
column->segments = NULL;
column->count = 0;
+#ifdef INCLUDE_GTK_SUPPORT
column->max_width = 0;
+#endif
}
@@ -81,11 +83,16 @@ void reset_line_column(line_column *column)
column->count = 0;
+#ifdef INCLUDE_GTK_SUPPORT
column->max_width = 0;
+#endif
}
+#ifdef INCLUDE_GTK_SUPPORT
+
+
/******************************************************************************
* *
* Paramètres : column = colonne de ligne à mettre à jour. *
@@ -129,6 +136,9 @@ gint get_column_width(const line_column *column)
}
+#endif
+
+
/******************************************************************************
* *
* Paramètres : column = colonne de ligne à venir compléter. *
@@ -157,7 +167,9 @@ size_t append_text_to_line_column(line_column *column, const char *text, size_t
column->segments[result] = segment;
+#ifdef INCLUDE_GTK_SUPPORT
column->max_width += get_line_segment_width(segment);
+#endif
return result;
@@ -200,11 +212,16 @@ void replace_text_in_line_column(line_column *column, size_t index, const char *
column->segments[index] = segment;
+#ifdef INCLUDE_GTK_SUPPORT
refresh_line_column_width(column);
+#endif
}
+#ifdef INCLUDE_GTK_SUPPORT
+
+
/******************************************************************************
* *
* Paramètres : column = colonne de ligne de texte à consulter. *
@@ -432,6 +449,9 @@ void draw_line_column_segments(const line_column *column, cairo_t *cairo, gint x
}
+#endif
+
+
/******************************************************************************
* *
* Paramètres : column = colonne de ligne de texte à venir consulter. *