annotate lisp/x11/x-scrollbar.el @ 203:850242ba4a81 r20-3b28

Import from CVS: tag r20-3b28
author cvs
date Mon, 13 Aug 2007 10:02:21 +0200
parents 131b0175ea99
children
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
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 0
diff changeset
21 ;; along with XEmacs; see the file COPYING. If not, write to the
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 0
diff changeset
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 0
diff changeset
23 ;; Boston, MA 02111-1307, USA.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 (defun x-init-scrollbar-from-resources (locale)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 (x-init-specifier-from-resources
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 scrollbar-width 'natnum locale
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 '("scrollBarWidth" . "ScrollBarWidth")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 ;; The name strings are wrong, but the scrollbar name is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 ;; non-deterministic so it is a poor way to set a resource
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 ;; for the scrollbar anyhow.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 (cond ((featurep 'athena-scrollbars)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 '("scrollbar.thickness" . "ScrollBar.Thickness"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 ((featurep 'lucid-scrollbars)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 '("scrollbar.width" . "XlwScrollBar.Width"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 ((featurep 'motif-scrollbars)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 '("scrollbar.width" . "XmScrollBar.Width"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 ;; Athena scrollbars accept either 'thickness' or 'width'.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 ;; If any of the previous resources succeeded, the following
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 ;; call does nothing; so there's no harm in doing it all the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 ;; time.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 (if (featurep 'athena-scrollbars)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 (x-init-specifier-from-resources
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 scrollbar-width 'natnum locale
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 '("scrollbar.width" . "ScrollBar.Width")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 ;; lather, rinse, repeat.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 (x-init-specifier-from-resources
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 scrollbar-height 'natnum locale
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 '("scrollBarHeight" . "ScrollBarHeight")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 ;; The name strings are wrong, but the scrollbar name is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 ;; non-deterministic so it is a poor way to set a resource
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 ;; for the scrollbar anyhow.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 (cond ((featurep 'athena-scrollbars)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 '("scrollbar.thickness" . "ScrollBar.Thickness"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 ((featurep 'lucid-scrollbars)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 '("scrollbar.height" . "XlwScrollBar.Height"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 ((featurep 'motif-scrollbars)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 '("scrollbar.height" . "XmScrollBar.Height"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 ;; Athena scrollbars accept either 'thickness' or 'height'.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 ;; If any of the previous resources succeeded, the following
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 ;; call does nothing; so there's no harm in doing it all the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 ;; time.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 (if (featurep 'athena-scrollbars)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 (x-init-specifier-from-resources
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 scrollbar-height 'natnum locale
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 '("scrollbar.height" . "ScrollBar.Height"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68