|
From: | Andy Piper |
Subject: | Re: The minibuffer vs. Dialog Boxes (Re: Making XEmacs be more up-to-date) |
Date: | Fri, 19 Apr 2002 10:00:32 -0700 |
At 09:27 AM 4/19/02 -0700, Brady Montz wrote:
1. actual widgets, with an abstraction layer that allows a single lisp spec of them to work on multiple backends - gtk, qt, cocoa, vt100. This might restrict them to be fairly simple, but that's not necessarily a bad thing. I think speedbar and customize are good examples of us straining against the limits of text.
So we actually have this in XEmacs. Its not complete, it has rough edges, but its a start. It would be great if we could come up with a standard lisp API (common to both XEmacs and Emacs) for doing this sort of stuff. For instance this is the XEmacs search dialog:
(defun make-search-dialog () "Popup a search dialog box." (interactive) (let ((parent (selected-frame))) (make-dialog-box 'general :parent parent :title "Search" :spec (setq search-dialog (make-glyph `[layout :orientation horizontal :justify left ;; neither the following height/width nor the identical one ;; below should be necessary! (see below) :height 11 :width 40 :border [string :data "Search"] :items ([layout :orientation vertical :justify left :items ([string :data "Search for:"] [button :descriptor "Match Case" :style toggle :selected (not case-fold-search) :callback (setq case-fold-search (not case-fold-search))] [button :descriptor "Regular Expression" :style toggle :selected search-dialog-regexp :callback (setq search-dialog-regexp (not search-dialog-regexp))] [button :descriptor "Forwards" :style radio :selected search-dialog-direction :callback (setq search-dialog-direction t)] [button :descriptor "Backwards" :style radio :selected (not search-dialog-direction) :callback (setq search-dialog-direction nil)] )] [layout :orientation vertical :justify left :items ([edit-field :width 15 :descriptor "" :active t :face default :initial-focus t] [button :width 10 :descriptor "Find Next" :callback-ex (lambda (image-instance event) (search-dialog-callback ,parent image-instance event))] [button :width 10 :descriptor "Cancel" :callback-ex (lambda (image-instance event) (isearch-dehighlight) (delete-frame (event-channel event)))])])])) ;; neither this height/width nor the identical one above should ;; be necessary! (in fact, if you omit the one above, the layout ;; sizes itself correctly; but the frame as a whole doesn't use ;; the layout's size, as it should.) :properties '(height 11 width 40)))) andy
[Prev in Thread] | Current Thread | [Next in Thread] |