Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.68]) by mail.sr.ht (Postfix) with ESMTPS id 603BC40316 for <~eliasnaur/gio-patches@lists.sr.ht>; Thu, 6 Feb 2020 07:20:13 +0000 (UTC) Authentication-Results: mail.sr.ht; dkim=pass (2048-bit key) header.d=eliasnaur.com header.i=@eliasnaur.com header.b=Ida+03DR Received: by mail-ed1-f68.google.com with SMTP id f8so4859515edv.2 for <~eliasnaur/gio-patches@lists.sr.ht>; Wed, 05 Feb 2020 23:20:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eliasnaur.com; s=google; h=content-transfer-encoding:in-reply-to:date:cc:subject:from:to :message-id; bh=yxwAGQ93pvW0nuNYYER81pl6/Qq808KV2VwKPGs+c6E=; b=Ida+03DR4VVDJLLO6EQhwWd8090oD+chF5zwpChn+wmvmqJlwOCPTPW5pNXTEH3Q/w tt+0tjl7Dst0NbqUv7P6G38C24nDaKgRm0wRn72HiN3fyOa8fhjk1s0h+7/W1hzd3iU2 D3SfbWQ4HLCX5cm+H2ekNs8zjaK4Mg6FSdo7z0mR73wVn7yg/oU2/GEIVTAI3bnqUdlE m/+sOU++ckBcB2llaI3Kcz2IFmWYLGl9k4GoCu8kdKhyiB0AWV+vwa3sQrder8XAeYex ogEZsOFyCyo2nZoVvQUW4kGL8l1vNrAwPcs0A/7s6988GUMlG3V9CnFG+375C42+S5PS xAbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:in-reply-to:date:cc :subject:from:to:message-id; bh=yxwAGQ93pvW0nuNYYER81pl6/Qq808KV2VwKPGs+c6E=; b=AkZDPRLBZ9EXiZgkPHFiT9t3fLQ19j5/yT+TPMln0ajF9kvTEsh+e5lNix7OXfdEOL uhVL58KLC2bOLUq5criTe+6E+U3E76pUGgvDAPajJzD5EYleBuxMICgq+7fXKnPvYbP4 21X9flW8MBg6ZSk4XioJfOdee6wIMHyw8rHoufDiCXHI4+IrxFzMOvptUWfHAGWm31XP spoQaEummXjrdHfLytGpsNLxqtw7J9Q83BrKUeqor72ppqG1x0IkzQfvRKDwL73Nmscq 8Hs5fiqfhUJjAyjK5SJC1EZHmmFLfqbc8xG4srxKPvh6LYJ30zOScHgAxB0NoHXEFZXZ 7wIQ== X-Gm-Message-State: APjAAAWEMnquUnQGjbMQTz41EOcYWNNgMYRMyccDJZQ912P1noa1EDUI kQk+7Toc1Vp3YmNNEkdnYFzBGg== X-Google-Smtp-Source: APXvYqwYovLrCsHTtSt7+vWyu96XDO4JokfRA8d3OcJ+HMZtkvAH09Gjp7iKqNGsxlkZJPRUhIWZnA== X-Received: by 2002:a17:906:16d1:: with SMTP id t17mr1979691ejd.41.1580973612288; Wed, 05 Feb 2020 23:20:12 -0800 (PST) Received: from localhost ([145.255.60.245]) by smtp.gmail.com with ESMTPSA id cw10sm279081ejb.56.2020.02.05.23.20.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Feb 2020 23:20:11 -0800 (PST) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 In-Reply-To: <20200205145223.66869-1-larry@theclapp.org> Date: Thu, 06 Feb 2020 08:17:28 +0100 Cc: "Larry Clapp" Subject: Re: [PATCH] widget: add some utility methods on Editor From: "Elias Naur" To: "Larry Clapp" , <~eliasnaur/gio-patches@lists.sr.ht> Message-Id: On Wed Feb 5, 2020 at 9:52 AM, Larry Clapp wrote: > - Focused: returns whether editor is focused > - CaretPos: returns the text line & column number, and the x & y pixel > coordinates of the caret. > >=20 > Note: Returns them in that order. Which seems odd: line & column is > basically "y, x", but then the pixel coordinates are x & y. So > wondering if swapping line & column in CaretPos (and possibly in > Editor.layoutCaret which it calls) would be appropriate? Other than having many return values, how often is both the text position (line, column) and absolute position (x, y) needed? It seems to me CaretPos should be split into CaretPos (line, column) and CaretCoords (x, y). Better names welcome. > - NumLines: returns the number of text lines in the editor >