From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: RE: Gtk tabs in emacs, new branch. Date: Tue, 13 Apr 2010 13:11:14 +0900 Message-ID: <87633w3sbh.fsf@uwakimon.sk.tsukuba.ac.jp> References: <30298845.656931270806476838.JavaMail.www@wwinf4631> <4BBF0C6C.7000909@swipnet.se> <4BC011F5.9010505@swipnet.se> <87tyri429l.fsf@uwakimon.sk.tsukuba.ac.jp> <203268BCBA374E2CA3097FC84362424A@us.oracle.com> <87wrwcfadg.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1271131992 15965 80.91.229.12 (13 Apr 2010 04:13:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 13 Apr 2010 04:13:12 +0000 (UTC) Cc: 'Juri Linkov' , =?iso-8859-1?Q?Jan_Dj=E4rv?= , 'Stefan Monnier' , "'Emacs Dev \[emacs-devel\]'" To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 13 06:13:10 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O1XUo-0002qu-3r for ged-emacs-devel@m.gmane.org; Tue, 13 Apr 2010 06:13:07 +0200 Original-Received: from localhost ([127.0.0.1]:45094 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1XUf-00021L-3D for ged-emacs-devel@m.gmane.org; Tue, 13 Apr 2010 00:12:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O1XUa-000216-OK for emacs-devel@gnu.org; Tue, 13 Apr 2010 00:12:52 -0400 Original-Received: from [140.186.70.92] (port=53536 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1XUZ-00020y-1P for emacs-devel@gnu.org; Tue, 13 Apr 2010 00:12:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O1XUW-0004Ex-Tx for emacs-devel@gnu.org; Tue, 13 Apr 2010 00:12:50 -0400 Original-Received: from mtps02.sk.tsukuba.ac.jp ([130.158.97.224]:45642) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O1XUW-0004Eh-Jl for emacs-devel@gnu.org; Tue, 13 Apr 2010 00:12:48 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mtps02.sk.tsukuba.ac.jp (Postfix) with ESMTP id 58CDF820F; Tue, 13 Apr 2010 13:12:45 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 439FC1A292E; Tue, 13 Apr 2010 13:11:14 +0900 (JST) In-Reply-To: X-Mailer: VM 8.0.12-devo-585 under 21.5 (beta29) "garbanzo" a03421eb562b XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:123557 Archived-At: Drew Adams writes: > I want a tab to be able to invoke any function whatever. While perhaps sufficient generality may require that ability, remember that tabs as a metaphor are *not* just a contiguous row of buttons. They are ordered, and they "do the same thing" (but to different objects). (There is an analogy to the difference between "a set of check boxes" and "an array of radio buttons", where the radio buttons aren't constrained to do the same thing, but rather to be mutually exclusive.) So I would refine "any function whatever" so that each tab control should have a *single* callback function, which takes maybe three arguments: the individual tab object itself (perhaps represented as an integer but better a symbol, I think, because then you could put properties on it), a per-tab user-defined datum (any Lisp object the application wants to hang on the individual tab), and perhaps another user-defined datum for the whole tab control. (If you do need the generality of function-per-tab, you could always have the tab-control- wide function dispatch to per-tab functions stored in the per-tab user datum. This would *remind* you that all tabs in a group "should" do the same thing, but it wouldn't *enforce* it.) Either the per-tab datum or the whole-tab datum or both could be subsumed by properties on the tab object, I guess. WDYT?