Mercurial > emacs
comparison lisp/wid-edit.el @ 29567:db8d9c0d471f
(widget-specify-button): Really suppress the face if required.
author | Dave Love <fx@gnu.org> |
---|---|
date | Sun, 11 Jun 2000 23:00:42 +0000 |
parents | 3bb8d5adf524 |
children | 94c96c958d39 |
comparison
equal
deleted
inserted
replaced
29566:3334012b1cb4 | 29567:db8d9c0d471f |
---|---|
337 (unless (widget-get widget :suppress-face) | 337 (unless (widget-get widget :suppress-face) |
338 (overlay-put overlay 'face face) | 338 (overlay-put overlay 'face face) |
339 (overlay-put overlay 'mouse-face widget-mouse-face)) | 339 (overlay-put overlay 'mouse-face widget-mouse-face)) |
340 ;;(overlay-put overlay 'balloon-help help-echo) | 340 ;;(overlay-put overlay 'balloon-help help-echo) |
341 (if (stringp help-echo) | 341 (if (stringp help-echo) |
342 (overlay-put overlay 'help-echo help-echo)) | 342 (overlay-put overlay 'help-echo help-echo)))) |
343 (overlay-put overlay 'face face))) | |
344 | 343 |
345 (defun widget-specify-sample (widget from to) | 344 (defun widget-specify-sample (widget from to) |
346 "Specify sample for WIDGET between FROM and TO." | 345 "Specify sample for WIDGET between FROM and TO." |
347 (let ((face (widget-apply widget :sample-face-get)) | 346 (let ((face (widget-apply widget :sample-face-get)) |
348 (overlay (make-overlay from to nil t nil))) | 347 (overlay (make-overlay from to nil t nil))) |
1954 "A checkbox toggle." | 1953 "A checkbox toggle." |
1955 :button-suffix "" | 1954 :button-suffix "" |
1956 :button-prefix "" | 1955 :button-prefix "" |
1957 :format "%[%v%]" | 1956 :format "%[%v%]" |
1958 :on "[X]" | 1957 :on "[X]" |
1958 ;; We could probably do the same job as the images using single | |
1959 ;; space characters in a boxed face with a stretch specification to | |
1960 ;; make them square. | |
1959 :on-glyph (create-image (make-bool-vector 49 1) | 1961 :on-glyph (create-image (make-bool-vector 49 1) |
1960 'xbm t :width 7 :height 7 | 1962 'xbm t :width 7 :height 7 |
1961 :foreground "grey75" ; like default mode line | 1963 :foreground "grey75" ; like default mode line |
1962 :relief -3 :ascent 'center) | 1964 :relief -3 :ascent 'center) |
1963 :off "[ ]" | 1965 :off "[ ]" |