From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Anders Lindgren Newsgroups: gmane.emacs.devel Subject: Re: NS port and fancy OS X scrollbars Date: Wed, 24 Feb 2016 10:56:36 +0100 Message-ID: References: <20160223232744.GA73973@galloway.local> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11438ee8df50cd052c8114c7 X-Trace: ger.gmane.org 1456307852 9709 80.91.229.3 (24 Feb 2016 09:57:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Feb 2016 09:57:32 +0000 (UTC) Cc: emacs-devel To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 24 10:57:32 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aYWCJ-0003T3-P9 for ged-emacs-devel@m.gmane.org; Wed, 24 Feb 2016 10:57:32 +0100 Original-Received: from localhost ([::1]:34797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYWCJ-0000A5-54 for ged-emacs-devel@m.gmane.org; Wed, 24 Feb 2016 04:57:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYWBS-0007sq-7U for emacs-devel@gnu.org; Wed, 24 Feb 2016 04:56:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYWBR-0004zo-4H for emacs-devel@gnu.org; Wed, 24 Feb 2016 04:56:38 -0500 Original-Received: from mail-vk0-x22c.google.com ([2607:f8b0:400c:c05::22c]:34418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYWBQ-0004zY-Tn for emacs-devel@gnu.org; Wed, 24 Feb 2016 04:56:37 -0500 Original-Received: by mail-vk0-x22c.google.com with SMTP id e185so11908834vkb.1 for ; Wed, 24 Feb 2016 01:56:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=OjG1YClSy0jqCedJzeyfBs6x6f7wlq4hmaXIZwlJTfA=; b=jkwsE0If2hnPFx9L2bZMy7EBc+BNCP2FxVyVZ8CNrVUr0ACxalFQCFgKat4MNmVesV rudC8R0opD6cOz4dGZWFoj6LIp9DUkysJKTs95fecl3gGDgsnYZ1Aj9mlwSajgCw3XcB QOp63R3h9UWtHVCN56IkNxSpU+lmaq4KW3kgHjiHGxRuzdcaZg5IjjJDopUmTEpmwGOe PMD5zp2hUPfPlAxA95Om374zyaA4yMhjMakIl15dKO94HSlJCVk4txqrK86oDOjgeNYx CsfpLQCqXl9G0nFkbk/4p0eHeBRU9BmPlbA3ToewLrXbRsg/FzeAdJK5/9btH75lEpgR GNmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=OjG1YClSy0jqCedJzeyfBs6x6f7wlq4hmaXIZwlJTfA=; b=f4+RpS5wLfB01RMxOzj/HbQNwVo/149tNghU9mrFPxat3B4xmZMwVQRWXwgHK80VyP YnXLaIbA1Keg8KGTQ0kQNeg+MPbu/ZzGfOZwHyoGTMhvwsw5LI0wHhabhfrg3mh1/DLP 7l7uyRBcYYwUnTUGcaiSvd6zT9wHwnUEObaCkX/VgEZvSOLWAKOItZwFpRnO+OH5b5VC hl7kYzkIGe6erRRjRYG8DPR6EbJuKjIUTTp3x//psqNar0Ffygz72PkFvQQ3GuyZRi84 W9TXmD15AdZZbBBR5VkoFuRZE4aJn6P7p6XVhvqtPDb0tdQAA6JVDBKARKao65pzix2F NCdw== X-Gm-Message-State: AG10YOR8a8VqvuG39qouhrebgwm2+ooyePaw+7hcRa4glUL/ZtId276kwhr4kfmQ90tO/k1/fzeSyHV7PqBhcw== X-Received: by 10.31.54.134 with SMTP id d128mr28561137vka.26.1456307796133; Wed, 24 Feb 2016 01:56:36 -0800 (PST) Original-Received: by 10.31.214.131 with HTTP; Wed, 24 Feb 2016 01:56:36 -0800 (PST) In-Reply-To: <20160223232744.GA73973@galloway.local> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400c:c05::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:200605 Archived-At: --001a11438ee8df50cd052c8114c7 Content-Type: text/plain; charset=UTF-8 Hi! > As far as I can tell the 'right' way to do it is to create an > NSScrollView and put your buffer content into another NSView within > it. This seems to give you native scrollbars for a lot less work than > is being done at the moment. However I think we'd lose the ability to > put the vertical scrollbars on the left. I don't know how important > that feature is. > It's hard to know. One way to handle this is to keep both implementations around. Clearly, the combination of having scroll bars to the left and make them floating won't be supported. This might be needed anyway since I'm not sure if GNUStep supports floating scroll bars. I think there's a bigger problem, though. It looks to me like the mode > line is currently drawn into the same NSView as the rest of the > buffer, so just wrapping the current NSView with an NSScrollView would > result in the vertical scrollbar overlapping the mode line, and the > horizontal scrollbar below it. > Unfortunately, I never looked into the technical details, so I can't say whether this is the right way to handle it. However, then I wrote this I envisioned a layout that would be identical to when scroll bars were disabled, but that they should appear when the user scrolled the text using the mouse. Clearly, the scroll bar should not cover the mode line, the minibuffer/echo area, nor the header line (if present). Am I right about this? If so then it seems the only way to get the > floating scrollbars would be to recreate the effect ourselves, which I > suspect is rather a lot of work. > If you are correct, then I would suggest that we shouldn't pursue this. If it's not possible to implement this in a clean OS friendly manner, we risk ending up with complex, fragile, code that might not work on future OS X versions. -- Anders --001a11438ee8df50cd052c8114c7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!
=C2=A0
As far as I can tell the 'r= ight' way to do it is to create an
NSScrollView and put your buffer content into another NSView within
it. This seems to give you native scrollbars for a lot less work than
is being done at the moment. However I think we'd lose the ability to put the vertical scrollbars on the left. I don't know how important
that feature is.

It's hard to know.= One way to handle this is to keep both implementations around. Clearly, th= e combination of having scroll bars to the left and make them floating won&= #39;t be supported. This might be needed anyway since I'm not sure if G= NUStep supports floating scroll bars.


I think there's a bigger problem, though. It looks to me= like the mode
line is currently drawn into the same NSView as the rest of the
buffer, so just wrapping the current NSView with an NSScrollView would
result in the vertical scrollbar overlapping the mode line, and the
horizontal scrollbar below it.

Unfortun= ately, I never looked into the technical details, so I can't say whethe= r this is the right way to handle it.

However, the= n I wrote this I envisioned a layout that would be identical to when scroll= bars were disabled, but that they should appear when the user scrolled the= text using the mouse. Clearly, the scroll bar should not cover the mode li= ne, the minibuffer/echo area, nor the header line (if present).
<= br>

Am I right about this? If so then = it seems the only way to get the
floating scrollbars would be to recreate the effect ourselves, which I
suspect is rather a lot of work.

If you= are correct, then I would suggest that we shouldn't pursue this. If it= 's not possible to implement this in a clean OS friendly manner, we ris= k ending up with complex, fragile, code that might not work on future OS X = versions.

=C2=A0 =C2=A0 -- Anders

--001a11438ee8df50cd052c8114c7--