comparison lisp/wid-edit.el @ 18369:ffdf3d404802

(group-visibility): New widget type. (widget-group-visibility-create): New function.
author Richard M. Stallman <rms@gnu.org>
date Sat, 21 Jun 1997 18:32:42 +0000
parents 2aaa07c43738
children 5b5261ce8db9
comparison
equal deleted inserted replaced
18368:14b3e7eb6a17 18369:ffdf3d404802
2619 (setq off "")) 2619 (setq off ""))
2620 (if (widget-value widget) 2620 (if (widget-value widget)
2621 (widget-glyph-insert widget on "down" "down-pushed") 2621 (widget-glyph-insert widget on "down" "down-pushed")
2622 (widget-glyph-insert widget off "right" "right-pushed")))) 2622 (widget-glyph-insert widget off "right" "right-pushed"))))
2623 2623
2624 (define-widget 'group-visibility 'item
2625 "An indicator and manipulator for hidden group contents."
2626 :format "%[%v%]"
2627 :create 'widget-group-visibility-create
2628 :button-prefix ""
2629 :button-suffix ""
2630 :on "Hide"
2631 :off "Show"
2632 :value-create 'widget-visibility-value-create
2633 :action 'widget-toggle-action
2634 :match (lambda (widget value) t))
2635
2636 (defun widget-group-visibility-create (widget)
2637 (let ((visible (widget-value widget)))
2638 (if visible
2639 (insert "--------")))
2640 (widget-default-create widget))
2641
2624 ;;; The `documentation-link' Widget. 2642 ;;; The `documentation-link' Widget.
2625 ;; 2643 ;;
2626 ;; This is a helper widget for `documentation-string'. 2644 ;; This is a helper widget for `documentation-string'.
2627 2645
2628 (define-widget 'documentation-link 'link 2646 (define-widget 'documentation-link 'link