help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

header-line, scroll bars and fringes


From: Carsten Dominik
Subject: header-line, scroll bars and fringes
Date: Fri, 06 Jul 2007 10:49:32 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (darwin)

Hi,

I am having the following problem:

I am trying to use the header-line-format as a title line for a column,
So I need to insert a string into the header-line-format, and I need
to align this string with text in the buffer.  The problem is that the
header line starts all the way to the left in the frame,
while buffer text starts only after the scroll bar and after the
fringe.  So what I need to do it to compute how wide these two are,
and then to construct an empty string of the same width (approx is
ok).

So Far I have this:

width of the left fringe in pixels:

   (or (car (window-fringes)) 0)

width of the scroll bar:

  (* (or scroll-bar-width 11)
         (if (eq (car (window-current-scroll-bars)) 'left) 1 0))

Here is alredy the problem that scroll-bar-width is usually nil, and
some "default" value is used, but I don't know from where this value
comes.

Finally, I need the width of SPACE in the current font, in pixels,
and I have have no idea where I could get this from.
Any ideas?

Thanks.

- Carsten





reply via email to

[Prev in Thread] Current Thread [Next in Thread]