/[emacs]/emacs/lisp/wid-edit.el
ViewVC logotype

Diff of /emacs/lisp/wid-edit.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.101 by abraham, Sat Nov 10 11:01:54 2001 UTC revision 1.102 by rms, Tue Nov 27 05:04:13 2001 UTC
# Line 1996  when he invoked the menu." Line 1996  when he invoked the menu."
1996  (defun widget-toggle-value-create (widget)  (defun widget-toggle-value-create (widget)
1997    "Insert text representing the `on' and `off' states."    "Insert text representing the `on' and `off' states."
1998    (if (widget-value widget)    (if (widget-value widget)
1999        (widget-image-insert widget        (progn
2000                             (widget-get widget :on)          (and (display-graphic-p)
2001                             (widget-get widget :on-glyph))               (listp (widget-get widget :on-glyph))
2002                 (widget-put widget :on-glyph
2003                             (eval (widget-get widget :on-glyph))))
2004            (widget-image-insert widget
2005                                 (widget-get widget :on)
2006                                 (widget-get widget :on-glyph)))
2007        (and (display-graphic-p)
2008             (listp (widget-get widget :off-glyph))
2009             (widget-put widget :off-glyph
2010                         (eval (widget-get widget :off-glyph))))
2011      (widget-image-insert widget      (widget-image-insert widget
2012                           (widget-get widget :off)                           (widget-get widget :off)
2013                           (widget-get widget :off-glyph))))                           (widget-get widget :off-glyph))))
# Line 2020  when he invoked the menu." Line 2029  when he invoked the menu."
2029    ;; We could probably do the same job as the images using single    ;; We could probably do the same job as the images using single
2030    ;; space characters in a boxed face with a stretch specification to    ;; space characters in a boxed face with a stretch specification to
2031    ;; make them square.    ;; make them square.
2032    :on-glyph (create-image "\000\066\076\034\076\066\000"    :on-glyph '(create-image "\000\066\076\034\076\066\000"
                           'xbm t :width 7 :height 7  
                           :background "grey75" ; like default mode line  
                           :foreground "black"  
                           :relief -3  
                           :ascent 'center)  
   :off "[ ]"  
   :off-glyph (create-image (make-string 7 0)  
2033                             'xbm t :width 7 :height 7                             'xbm t :width 7 :height 7
2034                             :background "grey75"                             :background "grey75" ; like default mode line
2035                             :foreground "black"                             :foreground "black"
2036                             :relief 3                             :relief -3
2037                             :ascent 'center)                             :ascent 'center)
2038      :off "[ ]"
2039      :off-glyph '(create-image (make-string 7 0)
2040                                'xbm t :width 7 :height 7
2041                                :background "grey75"
2042                                :foreground "black"
2043                                :relief 3
2044                                :ascent 'center)
2045    :help-echo "Toggle this item."    :help-echo "Toggle this item."
2046    :action 'widget-checkbox-action)    :action 'widget-checkbox-action)
2047    

Legend:
Removed from v.1.101  
changed lines
  Added in v.1.102

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26