unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* FRAMED_BOX_CURSOR:  Any interest in a new cursor type?
@ 2018-11-30  8:58 Keith David Bershatsky
  2018-11-30  9:17 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Keith David Bershatsky @ 2018-11-30  8:58 UTC (permalink / raw)
  To: Emacs Devel

During my ongoing work on developing feature requests #22873 (multiple fake cursors) and #17684 (crosshairs / fill-column), I came up with a new cursor type for all three GUI platforms (X11, NS, and NT).  It is a hollow cursor, with a filled inner color, and a different (or same color) for the glyph character as the outer frame of the cursor.  Think of it as a picture frame with a different color background/inner shade and the text stands out; e.g., yellow outer frame, blue inner filled shade, and yellow text.  I have simple tests to determine whether the cursor appears in the active/inactive windows (so colors can be different in those windows), which is needed on the NS port because it uses a separate function to colorize the text (which does not have access to the active/inactive argume
 nts of the other cursor drawing functions).  I included a test for whether the region is active and whether PT is at the beginning or ending of the active region, and the colors are different depend
 ing upon those situations.  The colors can be customized by the user, with the outer frame of the cursor being the cursor-color we are all familiar with and the cursor-type is 'framed or "framed".  It suffers from the same disadvantage as the FILLED_BOX_CURSOR in so far as a the face of an overlay underneath gets covered up (trumped) by the cursor.  I can extract the proof-concept code from the features that I am working on, but thought that I should check first to see if the Emacs development team has any interest?



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

* Re: FRAMED_BOX_CURSOR:  Any interest in a new cursor type?
  2018-11-30  8:58 Keith David Bershatsky
@ 2018-11-30  9:17 ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2018-11-30  9:17 UTC (permalink / raw)
  To: Keith David Bershatsky; +Cc: emacs-devel

> Date: Fri, 30 Nov 2018 00:58:30 -0800
> From: Keith David Bershatsky <esq@lawlist.com>
> 
> During my ongoing work on developing feature requests #22873 (multiple fake cursors) and #17684 (crosshairs / fill-column), I came up with a new cursor type for all three GUI platforms (X11, NS, and NT).  It is a hollow cursor, with a filled inner color, and a different (or same color) for the glyph character as the outer frame of the cursor.

I don't think I understand what you mean.  Can you show a screenshot?

Thanks.



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

* Re: FRAMED_BOX_CURSOR:  Any interest in a new cursor type?
@ 2018-11-30  9:41 Keith David Bershatsky
  2018-11-30 10:14 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Keith David Bershatsky @ 2018-11-30  9:41 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Thank you, Eli, for taking a look at this particular thread.


SCREENSHOT -- NO ACTIVE REGION:

https://www.lawlist.com/images/framed_box_cursor_no_region.png


SCREENSHOT -- BEGINNING OF ACTIVE REGION:

https://www.lawlist.com/images/framed_box_cursor_region_beginning.png


SCREENSHOT -- ENDING OF ACTIVE REGION:

https://www.lawlist.com/images/framed_box_cursor_region_end.png


In the feature requests that I am working on, the outer frame of the cursor is a different color in the active/inactive windows.  However, I wanted to include the built-in cursor-color that everyone is familiar with setting (e.g., M-x set-cursor-color), so I chose to make that the outer frame color in this example for both the active/inactive windows.  These are, of course, flexible proof-concept examples.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

> Date: [11-30-2018 01:17:14] <30 Nov 2018 11:17:14 +0200>
> From: Eli Zaretskii <eliz@gnu.org>
> To: Keith David Bershatsky <esq@lawlist.com>
> CC: emacs-devel@gnu.org
> Subject: Re: FRAMED_BOX_CURSOR:  Any interest in a new cursor type?
> 
> * * *
> 
> I don't think I understand what you mean.  Can you show a screenshot?
> 
> Thanks.



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

* Re: FRAMED_BOX_CURSOR:  Any interest in a new cursor type?
  2018-11-30  9:41 FRAMED_BOX_CURSOR: Any interest in a new cursor type? Keith David Bershatsky
@ 2018-11-30 10:14 ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2018-11-30 10:14 UTC (permalink / raw)
  To: Keith David Bershatsky; +Cc: emacs-devel

> Date:  Fri, 30 Nov 2018 01:41:16 -0800
> From:  Keith David Bershatsky <esq@lawlist.com>
> Cc:  emacs-devel@gnu.org
> 
> Thank you, Eli, for taking a look at this particular thread.
> 
> 
> SCREENSHOT -- NO ACTIVE REGION:
> 
> https://www.lawlist.com/images/framed_box_cursor_no_region.png
> 
> 
> SCREENSHOT -- BEGINNING OF ACTIVE REGION:
> 
> https://www.lawlist.com/images/framed_box_cursor_region_beginning.png
> 
> 
> SCREENSHOT -- ENDING OF ACTIVE REGION:
> 
> https://www.lawlist.com/images/framed_box_cursor_region_end.png

Thanks, I understand now what you propose.  But it's incorrect to call
this "hollow cursor".  It's actually a variant of the box cursor, just
with a thin frame around the box.



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

end of thread, other threads:[~2018-11-30 10:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-30  9:41 FRAMED_BOX_CURSOR: Any interest in a new cursor type? Keith David Bershatsky
2018-11-30 10:14 ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2018-11-30  8:58 Keith David Bershatsky
2018-11-30  9:17 ` Eli Zaretskii

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).