summaryrefslogtreecommitdiff
path: root/src/glibext/gcodebuffer.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-06-14 22:55:24 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-06-14 22:55:24 (GMT)
commitc987ca944052019957d3f31d69c679ed5ad994f2 (patch)
tree44f9c7a7f94925814ebebce50388935c83b34e88 /src/glibext/gcodebuffer.c
parentc1b22ec0aa497a212ef897f3f8fffedf07cd45a6 (diff)
Been able to move the caret when scrolling to a given address.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@541 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/glibext/gcodebuffer.c')
-rw-r--r--src/glibext/gcodebuffer.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/glibext/gcodebuffer.c b/src/glibext/gcodebuffer.c
index 9b13875..a27b202 100644
--- a/src/glibext/gcodebuffer.c
+++ b/src/glibext/gcodebuffer.c
@@ -1313,6 +1313,41 @@ gint g_buffer_view_get_width(GBufferView *view, const bool *display)
}
+/******************************************************************************
+* *
+* Paramètres : view = visualisation à consulter. *
+* display = règles d'affichage des colonnes modulables. *
+* *
+* Description : Fournit la largeur requise pour dépasser les marges gauches. *
+* *
+* Retour : Dimension calculée. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+gint g_buffer_view_get_margin(GBufferView *view, const bool *display)
+{
+ gint result; /* Taille à retourner */
+ BufferLineColumn i; /* Boucle de parcours */
+
+ if (!WIDTHS_CACHED(view))
+ g_buffer_view_compute_required_widths(view, display);
+
+ result = view->left_text;
+
+ for (i = 0; i < BLC_DISPLAY; i++)
+ {
+ if (!display[i]) continue;
+
+ result += view->max_widths[i] + COL_MARGIN;
+
+ }
+
+ return result;
+
+}
+
/******************************************************************************
* *