unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: JD Smith <jdtsmith@gmail.com>
To: Cecilio Pardo <cpardo@imayhem.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Drawing UI elements behind text
Date: Sun, 24 Nov 2024 18:37:35 -0500	[thread overview]
Message-ID: <8C55E590-E586-440A-89C5-0E5153518790@gmail.com> (raw)
In-Reply-To: <641230ac-2dbc-42ac-a57e-acda77fe9296@imayhem.com>



> On Nov 10, 2024, at 11:39 AM, Cecilio Pardo <cpardo@imayhem.com> wrote:
> 
> Hello,
> 
> I am working on a mechanism to draw things on the background, behind
> the text of a buffer.
> 
> This would allow to draw UI elements (such as indent lines or a fill
> column indicator) and eye candy like background images or colored
> windows.

I support this idea.  For indent-bars, I use display :stipple as a "separate band" of graphical information that can lie atop text in a buffer, but remain independent of it.  Stipples are flexible and very performant, but have a few issues:

- There is inconsistent stipple support across emacs versions.
- Stipple patterns begin at the frame origin, so up-to-date window-specific remapping is required to prevent unwanted pattern aliasing.  
- Aligning stipples vertically requires fixed space content.

More commonly, modes also make use of :box styling, e.g. for producing boxed "labels", as in org-modern.

An API for drawing simple styled lines, rounded corners, boxes etc. — either in absolute window coordinates, or associated with, but "behind" text in the buffer — would represent a real step forward. 


  parent reply	other threads:[~2024-11-24 23:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-10 16:39 Drawing UI elements behind text Cecilio Pardo
2024-11-10 18:09 ` Jim Porter
2024-11-10 18:44   ` Eli Zaretskii
2024-11-10 19:06     ` Jim Porter
2024-11-10 19:22       ` Eli Zaretskii
2024-11-10 19:29         ` Jim Porter
2024-11-10 19:42           ` Eli Zaretskii
2024-11-24 23:37 ` JD Smith [this message]
2024-11-26 23:19   ` Cecilio Pardo
  -- strict thread matches above, loose matches on Subject: below --
2024-11-27  2:31 JD Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8C55E590-E586-440A-89C5-0E5153518790@gmail.com \
    --to=jdtsmith@gmail.com \
    --cc=cpardo@imayhem.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).