all messages for Emacs-related lists mirrored at yhetil.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: Tue, 26 Nov 2024 21:31:22 -0500	[thread overview]
Message-ID: <69747847-1C64-476A-8D41-6EE176A304D6@gmail.com> (raw)


--

> On Nov 26, 2024, at 6:19 PM, Cecilio Pardo <cpardo@imayhem.com> wrote:
> 
> On 25/11/2024 0:37, JD Smith wrote:
>> 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.
> 
> Stipples also disable the scrolling of buffer pixels, affecting performance of redisplay.

On all ports?  I didn’t know this, though haven’t had any related issues. 

>> 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.
> 
> I haven't found a way to draw behind the text that is not too complicated or affects redisplay too much. So now the idea is drawing over the text. For the applications I have in mind this works equally well.

For mine as well that would work, but features like this are added so rarely it makes sense to make it robust for various uses, if possible.  

> The starting drawing elements are going to be vertical and horizontal segments, with color (maybe with alpha), width and different patterns.

Nice.  Is there a patch to try?  Bit patterns or similar are the most flexible.  

> They can be placed on pixel positions or character positions when using fixed size fonts, using floating point numbers so you can put, for example, indent lines in the middle of characters.

Would they be associated with buffer text and move with it (aka :box), or fixed to the buffer window?  What API did you have in mind?


             reply	other threads:[~2024-11-27  2:31 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-27  2:31 JD Smith [this message]
2024-11-27 18:33 ` Drawing UI elements behind text Cecilio Pardo
  -- strict thread matches above, loose matches on Subject: below --
2024-11-10 16:39 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
2024-11-26 23:19   ` Cecilio Pardo
2024-11-27 14:36     ` Eli Zaretskii
2024-11-27 18:28       ` Cecilio Pardo
2024-11-27 18:58         ` Eli Zaretskii
2024-11-27 20:01           ` Cecilio Pardo
2024-11-27 20:12             ` Eli Zaretskii
2024-11-27 20:30               ` Cecilio Pardo
2024-11-28  6:53                 ` Eli Zaretskii
2024-11-28  8:43                   ` Cecilio Pardo
2024-11-28  9:57                     ` Eli Zaretskii
2024-11-28 10:41                       ` Cecilio Pardo
2024-11-28 11:56                         ` Eli Zaretskii
2024-11-28 12:09                           ` Cecilio Pardo
2024-11-27 21:15           ` JD Smith
2024-11-27 21:47             ` Cecilio Pardo

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

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

  git send-email \
    --in-reply-to=69747847-1C64-476A-8D41-6EE176A304D6@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 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.