all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* header-line, scroll bars and fringes
@ 2007-07-06  8:49 Carsten Dominik
  2007-07-06 11:47 ` Stephen Berman
       [not found] ` <mailman.3127.1183722509.32220.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 3+ messages in thread
From: Carsten Dominik @ 2007-07-06  8:49 UTC (permalink / raw)
  To: help-gnu-emacs


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: header-line, scroll bars and fringes
  2007-07-06  8:49 header-line, scroll bars and fringes Carsten Dominik
@ 2007-07-06 11:47 ` Stephen Berman
       [not found] ` <mailman.3127.1183722509.32220.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Berman @ 2007-07-06 11:47 UTC (permalink / raw)
  To: help-gnu-emacs

On Fri, 06 Jul 2007 10:49:32 +0200 Carsten Dominik <dominik@science.uva.nl> wrote:

> 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
[...]
> Any ideas?

This sound like the display made by list-buffers (C-x C-b).  You might
get some ideas from list-buffers-noselect in buff-menu.el.

Steve Berman

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: header-line, scroll bars and fringes
       [not found] ` <mailman.3127.1183722509.32220.help-gnu-emacs@gnu.org>
@ 2007-07-06 17:52   ` carsten.dominik
  0 siblings, 0 replies; 3+ messages in thread
From: carsten.dominik @ 2007-07-06 17:52 UTC (permalink / raw)
  To: help-gnu-emacs

On Jul 6, 1:47 pm, Stephen Berman <Stephen.Ber...@gmx.net> wrote:
> On Fri, 06 Jul 2007 10:49:32 +0200 Carsten Dominik <domi...@science.uva.nl> wrote:
>
>
>
> > 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
> [...]
> > Any ideas?
>
> This sound like the display made by list-buffers (C-x C-b).  You might
> get some ideas from list-buffers-noselect in buff-menu.el.
>
> Steve Berman

Exactly.  Thank you *very* much.

- Carsten

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-07-06 17:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-06  8:49 header-line, scroll bars and fringes Carsten Dominik
2007-07-06 11:47 ` Stephen Berman
     [not found] ` <mailman.3127.1183722509.32220.help-gnu-emacs@gnu.org>
2007-07-06 17:52   ` carsten.dominik

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.