comparison lisp/utils/xpm-button.el @ 155:43dd3413c7c7 r20-3b4

Import from CVS: tag r20-3b4
author cvs
date Mon, 13 Aug 2007 09:39:39 +0200
parents 376386a54a3c
children
comparison
equal deleted inserted replaced
154:94141801dd7e 155:43dd3413c7c7
1 ;;; Create XPM text buttons under XEmacs (requires 19.12 or beyond) 1 ;;; xpm-button.el --- create XPM buttons
2 ;;; Copyright (C) 1995 Kyle E. Jones 2
3 ;;; 3 ;; Copyright (C) 1997 Free Software Foundation, Inc.
4 ;;; This program is free software; you can redistribute it and/or modify 4 ;; Copyright (C) 1995 Kyle E. Jones
5 ;;; it under the terms of the GNU General Public License as published by 5
6 ;;; the Free Software Foundation; either version 1, or (at your option) 6 ;; Author: Kyle Jones
7 ;;; any later version. 7 ;; Maintainer: XEmacs Development Team
8 ;;; 8 ;; Keywords: frames, internal
9 ;;; This program is distributed in the hope that it will be useful, 9
10 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 10 ;; This file is part of XEmacs.
11 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11
12 ;;; GNU General Public License for more details. 12 ;; XEmacs is free software; you can redistribute it and/or modify it
13 ;;; 13 ;; under the terms of the GNU General Public License as published by
14 ;;; A copy of the GNU General Public License can be obtained from this 14 ;; the Free Software Foundation; either version 1, or (at your option)
15 ;;; program's author (send electronic mail to kyle@uunet.uu.net) or from 15 ;; any later version.
16 ;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 16
17 ;;; 02139, USA. 17 ;; XEmacs is distributed in the hope that it will be useful, but
18 ;;; 18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 ;; General Public License for more details.
21
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 ;; Boston, MA 02111-1307, USA.
26
19 ;;; Synched up with: Not in FSF. 27 ;;; Synched up with: Not in FSF.
20 ;;; 28
21 ;;; Send bug reports to kyle@wonderworks.com 29 ;;; Commentary:
22 30
23 ;;; The sole interface function is xpm-button-create. 31 ;; Create XPM text buttons under XEmacs (requires 19.12 or beyond)
24 32
33 ;; Send bug reports to kyle@wonderworks.com
34
35 ;; Sample use of this package.
36 ;;(progn
37 ;; (setq b (xpm-button-create "Test button" 2 "yellow" "#a0a0d0"))
38 ;; (setq e (make-extent (point-max) (point-max)))
39 ;; (setq g (make-glyph (nth 0 b)))
40 ;; (set-extent-begin-glyph e g)
41 ;; (setq g2 (make-glyph (nth 1 b)))
42 ;; (setq k (make-sparse-keymap))
43 ;; (define-key k 'button1 '(lambda (ev)
44 ;; (interactive "e")
45 ;; (set-extent-begin-glyph e g2)))
46 ;; (define-key k 'button1up '(lambda (ev)
47 ;; (interactive "e")
48 ;; (set-extent-begin-glyph e g)))
49 ;; (set-extent-property e 'keymap k))
50
51 ;; The sole interface function is xpm-button-create.
52
53 ;;; Code:
25 54
26 (provide 'xpm-button) 55 (provide 'xpm-button)
27 56
28 (defvar xpm-button-version "1.02" 57 (defvar xpm-button-version "1.02"
29 "Version string for xpm-button.") 58 "Version string for xpm-button.")
380 (setq disabled-string (buffer-string)) 409 (setq disabled-string (buffer-string))
381 410
382 (list (vector 'xpm ':data up-string) 411 (list (vector 'xpm ':data up-string)
383 (vector 'xpm ':data down-string) 412 (vector 'xpm ':data down-string)
384 (vector 'xpm ':data disabled-string)) ))) 413 (vector 'xpm ':data disabled-string)) )))
414
415 ;;; xpm-button.el ends here