Mercurial > hg > xemacs-beta
annotate tests/gutter-test.el @ 5473:ac37a5f7e5be
Merge with trunk.
| author | Mats Lidell <matsl@xemacs.org> |
|---|---|
| date | Thu, 17 Mar 2011 23:42:59 +0100 |
| parents | 308d34e9f07d |
| children |
| rev | line source |
|---|---|
|
4781
8a653fbe5c27
Add copyright and GPL v2 or later notices to Andy Piper's contributions, with
Jerry James <james@xemacs.org>
parents:
863
diff
changeset
|
1 ;;; Copyright (C) 1998 Andy Piper |
|
8a653fbe5c27
Add copyright and GPL v2 or later notices to Andy Piper's contributions, with
Jerry James <james@xemacs.org>
parents:
863
diff
changeset
|
2 |
|
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
3 ;; This file is part of XEmacs. |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
4 ;; |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
5 ;; XEmacs is free software: you can redistribute it and/or modify it |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
6 ;; under the terms of the GNU General Public License as published by the |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
7 ;; Free Software Foundation, either version 3 of the License, or (at your |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
8 ;; option) any later version. |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
9 ;; |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
10 ;; XEmacs is distributed in the hope that it will be useful, but WITHOUT |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
11 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
12 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
13 ;; for more details. |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
14 ;; |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
15 ;; You should have received a copy of the GNU General Public License |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4781
diff
changeset
|
16 ;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>. |
|
4781
8a653fbe5c27
Add copyright and GPL v2 or later notices to Andy Piper's contributions, with
Jerry James <james@xemacs.org>
parents:
863
diff
changeset
|
17 |
| 442 | 18 (setq str "Hello\nAgain") |
| 19 (setq str-ext (make-extent 0 5 str)) | |
| 398 | 20 (set-extent-begin-glyph |
| 442 | 21 str-ext |
| 398 | 22 (make-glyph [xpm :file "../etc/xemacs-icon.xpm"])) |
| 442 | 23 (set-extent-property str-ext 'mouse-face 'highlight) |
| 398 | 24 |
| 442 | 25 (setq str2 "Hello\n") |
| 26 (setq str2-ext (make-extent 0 1 str2)) | |
| 398 | 27 (set-extent-begin-glyph |
| 442 | 28 str2-ext |
| 398 | 29 (make-glyph |
| 30 [button :width 5 :height 1 | |
| 31 :face modeline-mousable | |
| 442 | 32 :callback (set-specifier bottom-gutter-visible-p '(str2)) |
| 398 | 33 :descriptor "ok" :selected t])) |
| 34 | |
| 442 | 35 (set-specifier bottom-gutter-height 'autodetect) |
| 36 (set-specifier bottom-gutter-border-width 2) | |
| 37 | |
| 38 (set-gutter-element | |
| 39 bottom-gutter 'str | |
| 40 (make-glyph | |
| 863 | 41 [layout :orientation vertical :margin-width 4 |
| 42 :vertically-justify center :horizontally-justify left | |
| 442 | 43 :items ([string :data "Fontifying glyphs.c..."] |
| 863 | 44 [layout :orientation horizontal |
| 442 | 45 :items |
| 46 ([progress-gauge :value 0 :pixel-height 24 | |
| 47 :pixel-width 250 :descriptor | |
| 48 "Progress"] | |
| 49 [button :pixel-height 24 | |
| 50 :descriptor " Stop " | |
| 51 :callback (quote quit)])])])) | |
| 52 | |
| 53 (set-gutter-element-visible-p bottom-gutter-visible-p 'str t) | |
| 863 | 54 (set-gutter-element left-gutter 'str2 str2) |
| 55 (set-gutter-element-visible-p left-gutter-visible-p 'str2 t) | |
| 442 | 56 |
