annotate lisp/x-scrollbar.el @ 243:f220cc83d72e r20-5b20

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