Mercurial > hg > xemacs-beta
comparison lisp/scrollbar.el @ 282:c42ec1d1cded r21-0b39
Import from CVS: tag r21-0b39
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:33:18 +0200 |
parents | 90d73dddcdc4 |
children | 70ad99077275 |
comparison
equal
deleted
inserted
replaced
281:090b52736db2 | 282:c42ec1d1cded |
---|---|
29 ;; This file is dumped with XEmacs (when scrollbar support is compiled in). | 29 ;; This file is dumped with XEmacs (when scrollbar support is compiled in). |
30 | 30 |
31 ;;; Code: | 31 ;;; Code: |
32 | 32 |
33 (defcustom scrollbars-visible-p ;; added for the options menu - dverna | 33 (defcustom scrollbars-visible-p ;; added for the options menu - dverna |
34 (> (specifier-instance scrollbar-width) 0) | 34 (specifier-instance vertical-scrollbar-visible-p (selected-device)) |
35 "Whether the scrollbars are globally visible. This variable can be | 35 "Whether the scrollbars are globally visible. This variable can be |
36 customized through the options menu." | 36 customized through the options menu." |
37 :group 'display | 37 :group 'display |
38 :type 'boolean | 38 :type 'boolean |
39 ;; This is really a hack: there should be a real specifier for this, in | |
40 ;; order to turn on/off the scrollbars without altering their size. | |
41 :set '(lambda (var val) | 39 :set '(lambda (var val) |
42 (if val | 40 (if val |
43 (progn | 41 (progn |
44 (set-specifier scrollbar-width 15) | 42 (remove-specifier vertical-scrollbar-visible-p 'global) |
45 (set-specifier scrollbar-height 15)) | 43 (remove-specifier horizontal-scrollbar-visible-p 'global)) |
46 (set-specifier scrollbar-width 0) | 44 (set-specifier vertical-scrollbar-visible-p nil 'global) |
47 (set-specifier scrollbar-height 0)) | 45 (set-specifier horizontal-scrollbar-visible-p nil 'global)) |
48 (setq scrollbars-visible-p val)) | 46 (setq scrollbars-visible-p val)) |
49 ) | 47 ) |
50 | 48 |
51 (defun init-scrollbar-from-resources (locale) | 49 (defun init-scrollbar-from-resources (locale) |
52 (when (and (featurep 'x) | 50 (when (and (featurep 'x) |