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