209
|
1 ;;; x-scrollbar.el --- scrollbar resourcing and such.
|
|
2
|
|
3 ;; Copyright (C) 1997 Free Software Foundation, Inc.
|
|
4 ;; Copyright (C) 1995 Sun Microsystems.
|
|
5 ;; Copyright (C) 1995, 1996 Ben Wing.
|
|
6
|
|
7 ;; Author: Ben Wing <wing@666.com>
|
|
8 ;; Maintainer: XEmacs Development Team
|
|
9 ;; Keywords: extensions, dumped
|
|
10
|
|
11 ;; This file is part of XEmacs.
|
|
12
|
|
13 ;; XEmacs is free software; you can redistribute it and/or modify it
|
|
14 ;; under the terms of the GNU General Public License as published by
|
|
15 ;; the Free Software Foundation; either version 2, or (at your option)
|
|
16 ;; any later version.
|
|
17
|
|
18 ;; XEmacs is distributed in the hope that it will be useful, but
|
|
19 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
21 ;; General Public License for more details.
|
|
22
|
|
23 ;; You should have received a copy of the GNU General Public License
|
|
24 ;; along with XEmacs; see the file COPYING. If not, write to the
|
|
25 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
26 ;; Boston, MA 02111-1307, USA.
|
|
27
|
|
28 ;;; Synched up with: Not synched.
|
|
29
|
|
30 ;;; Commentary:
|
|
31
|
|
32 ;; This file is dumped with XEmacs (when X and menubar support is compiled in).
|
|
33
|
|
34 ;;; Code:
|
|
35
|
|
36 (defun x-init-scrollbar-from-resources (locale)
|
|
37 (x-init-specifier-from-resources
|
|
38 scrollbar-width 'natnum locale
|
|
39 '("scrollBarWidth" . "ScrollBarWidth")
|
|
40 ;; The name strings are wrong, but the scrollbar name is
|
|
41 ;; non-deterministic so it is a poor way to set a resource
|
|
42 ;; for the scrollbar anyhow.
|
|
43 (cond ((featurep 'athena-scrollbars)
|
|
44 '("scrollbar.thickness" . "ScrollBar.Thickness"))
|
|
45 ((featurep 'lucid-scrollbars)
|
|
46 '("scrollbar.width" . "XlwScrollBar.Width"))
|
|
47 ((featurep 'motif-scrollbars)
|
|
48 '("scrollbar.width" . "XmScrollBar.Width"))))
|
|
49 ;; Athena scrollbars accept either 'thickness' or 'width'.
|
|
50 ;; If any of the previous resources succeeded, the following
|
|
51 ;; call does nothing; so there's no harm in doing it all the
|
|
52 ;; time.
|
|
53 (if (featurep 'athena-scrollbars)
|
|
54 (x-init-specifier-from-resources
|
|
55 scrollbar-width 'natnum locale
|
|
56 '("scrollbar.width" . "ScrollBar.Width")))
|
|
57
|
|
58 ;; lather, rinse, repeat.
|
|
59 (x-init-specifier-from-resources
|
|
60 scrollbar-height 'natnum locale
|
|
61 '("scrollBarHeight" . "ScrollBarHeight")
|
|
62 ;; The name strings are wrong, but the scrollbar name is
|
|
63 ;; non-deterministic so it is a poor way to set a resource
|
|
64 ;; for the scrollbar anyhow.
|
|
65 (cond ((featurep 'athena-scrollbars)
|
|
66 '("scrollbar.thickness" . "ScrollBar.Thickness"))
|
|
67 ((featurep 'lucid-scrollbars)
|
|
68 '("scrollbar.height" . "XlwScrollBar.Height"))
|
|
69 ((featurep 'motif-scrollbars)
|
|
70 '("scrollbar.height" . "XmScrollBar.Height"))))
|
|
71 ;; Athena scrollbars accept either 'thickness' or 'height'.
|
|
72 ;; If any of the previous resources succeeded, the following
|
|
73 ;; call does nothing; so there's no harm in doing it all the
|
|
74 ;; time.
|
|
75 (if (featurep 'athena-scrollbars)
|
|
76 (x-init-specifier-from-resources
|
|
77 scrollbar-height 'natnum locale
|
|
78 '("scrollbar.height" . "ScrollBar.Height"))))
|
|
79
|
|
80 ;;; x-scrollbar.el ends here
|