385 |
(overlay-put overlay 'evaporate t) |
(overlay-put overlay 'evaporate t) |
386 |
;; We want to avoid the face with image buttons. |
;; We want to avoid the face with image buttons. |
387 |
(unless (widget-get widget :suppress-face) |
(unless (widget-get widget :suppress-face) |
388 |
(overlay-put overlay 'face (widget-apply widget :button-face-get)) |
(overlay-put overlay 'face (widget-apply widget :button-face-get))) |
389 |
(overlay-put overlay 'mouse-face widget-mouse-face)) |
(overlay-put overlay 'pointer 'hand) |
390 |
(overlay-put overlay 'help-echo help-echo))) |
(overlay-put overlay 'help-echo help-echo))) |
391 |
|
|
392 |
(defun widget-mouse-help (window overlay point) |
(defun widget-mouse-help (window overlay point) |
1289 |
The value of the :type attribute should be an unconverted widget type." |
The value of the :type attribute should be an unconverted widget type." |
1290 |
(let ((value (widget-get widget :value)) |
(let ((value (widget-get widget :value)) |
1291 |
(type (widget-get widget :type))) |
(type (widget-get widget :type))) |
1292 |
(widget-put widget :children |
(widget-put widget :children |
1293 |
(list (widget-create-child-value widget |
(list (widget-create-child-value widget |
1294 |
(widget-convert type) |
(widget-convert type) |
1295 |
value))))) |
value))))) |
1296 |
|
|
3312 |
nil, or a cons-cell containing a sexp and my-lisp. This will not work |
nil, or a cons-cell containing a sexp and my-lisp. This will not work |
3313 |
because the `choice' widget does not allow recursion. |
because the `choice' widget does not allow recursion. |
3314 |
|
|
3315 |
Using the `lazy' widget you can overcome this problem, as in this |
Using the `lazy' widget you can overcome this problem, as in this |
3316 |
example: |
example: |
3317 |
|
|
3318 |
(define-widget 'sexp-list 'lazy |
(define-widget 'sexp-list 'lazy |
3319 |
\"A list of sexps.\" |
\"A list of sexps.\" |
3322 |
:format "%{%t%}: %v" |
:format "%{%t%}: %v" |
3323 |
;; We don't convert :type because we want to allow recursive |
;; We don't convert :type because we want to allow recursive |
3324 |
;; datastructures. This is slow, so we should not create speed |
;; datastructures. This is slow, so we should not create speed |
3325 |
;; critical widgets by deriving from this. |
;; critical widgets by deriving from this. |
3326 |
:convert-widget 'widget-value-convert-widget |
:convert-widget 'widget-value-convert-widget |
3327 |
:value-create 'widget-type-value-create |
:value-create 'widget-type-value-create |
3328 |
:value-get 'widget-child-value-get |
:value-get 'widget-child-value-get |