Mercurial > hg > xemacs-beta
comparison lisp/x11/x-scrollbar.el @ 0:376386a54a3c r19-14
Import from CVS: tag r19-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:45:50 +0200 |
parents | |
children | 131b0175ea99 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:376386a54a3c |
---|---|
1 ;;; x-scrollbar.el --- scrollbar resourcing and such. | |
2 | |
3 ;;; Copyright (C) 1995 Sun Microsystems. | |
4 ;;; Copyright (C) 1995, 1996 Ben Wing. | |
5 | |
6 ;; Author: Ben Wing <wing@666.com> | |
7 | |
8 ;; This file is part of XEmacs. | |
9 | |
10 ;; XEmacs is free software; you can redistribute it and/or modify it | |
11 ;; under the terms of the GNU General Public License as published by | |
12 ;; the Free Software Foundation; either version 2, or (at your option) | |
13 ;; any later version. | |
14 | |
15 ;; XEmacs is distributed in the hope that it will be useful, but | |
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 ;; General Public License for more details. | |
19 | |
20 ;; You should have received a copy of the GNU General Public License | |
21 ;; along with XEmacs; see the file COPYING. If not, write to the Free | |
22 ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
23 | |
24 (defun x-init-scrollbar-from-resources (locale) | |
25 (x-init-specifier-from-resources | |
26 scrollbar-width 'natnum locale | |
27 '("scrollBarWidth" . "ScrollBarWidth") | |
28 ;; The name strings are wrong, but the scrollbar name is | |
29 ;; non-deterministic so it is a poor way to set a resource | |
30 ;; for the scrollbar anyhow. | |
31 (cond ((featurep 'athena-scrollbars) | |
32 '("scrollbar.thickness" . "ScrollBar.Thickness")) | |
33 ((featurep 'lucid-scrollbars) | |
34 '("scrollbar.width" . "XlwScrollBar.Width")) | |
35 ((featurep 'motif-scrollbars) | |
36 '("scrollbar.width" . "XmScrollBar.Width")))) | |
37 ;; Athena scrollbars accept either 'thickness' or 'width'. | |
38 ;; If any of the previous resources succeeded, the following | |
39 ;; call does nothing; so there's no harm in doing it all the | |
40 ;; time. | |
41 (if (featurep 'athena-scrollbars) | |
42 (x-init-specifier-from-resources | |
43 scrollbar-width 'natnum locale | |
44 '("scrollbar.width" . "ScrollBar.Width"))) | |
45 | |
46 ;; lather, rinse, repeat. | |
47 (x-init-specifier-from-resources | |
48 scrollbar-height 'natnum locale | |
49 '("scrollBarHeight" . "ScrollBarHeight") | |
50 ;; The name strings are wrong, but the scrollbar name is | |
51 ;; non-deterministic so it is a poor way to set a resource | |
52 ;; for the scrollbar anyhow. | |
53 (cond ((featurep 'athena-scrollbars) | |
54 '("scrollbar.thickness" . "ScrollBar.Thickness")) | |
55 ((featurep 'lucid-scrollbars) | |
56 '("scrollbar.height" . "XlwScrollBar.Height")) | |
57 ((featurep 'motif-scrollbars) | |
58 '("scrollbar.height" . "XmScrollBar.Height")))) | |
59 ;; Athena scrollbars accept either 'thickness' or 'height'. | |
60 ;; If any of the previous resources succeeded, the following | |
61 ;; call does nothing; so there's no harm in doing it all the | |
62 ;; time. | |
63 (if (featurep 'athena-scrollbars) | |
64 (x-init-specifier-from-resources | |
65 scrollbar-height 'natnum locale | |
66 '("scrollbar.height" . "ScrollBar.Height")))) | |
67 |