X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=tests%2Fgutter-test.el;fp=tests%2Fgutter-test.el;h=c73b09f606d1e950edddb5cb27f2984df6e23c85;hb=9a9fedfd2473568f4827f6295de7b03259b160e5;hp=0000000000000000000000000000000000000000;hpb=97badae7fa41c4bd3e92511ff7b16389e646e022;p=chise%2Fxemacs-chise.git- diff --git a/tests/gutter-test.el b/tests/gutter-test.el new file mode 100644 index 0000000..c73b09f --- /dev/null +++ b/tests/gutter-test.el @@ -0,0 +1,39 @@ +(setq str "Hello\nAgain") +(setq str-ext (make-extent 0 5 str)) +(set-extent-begin-glyph + str-ext + (make-glyph [xpm :file "../etc/xemacs-icon.xpm"])) +(set-extent-property str-ext 'mouse-face 'highlight) + +(setq str2 "Hello\n") +(setq str2-ext (make-extent 0 1 str2)) +(set-extent-begin-glyph + str2-ext + (make-glyph + [button :width 5 :height 1 + :face modeline-mousable + :callback (set-specifier bottom-gutter-visible-p '(str2)) + :descriptor "ok" :selected t])) + +(set-specifier bottom-gutter-height 'autodetect) +(set-specifier bottom-gutter-border-width 2) + +(set-gutter-element + bottom-gutter 'str + (make-glyph + [layout :orientation vertical + :justify left :margin-width 4 + :items ([string :data "Fontifying glyphs.c..."] + [layout :orientation horizontal + :items + ([progress-gauge :value 0 :pixel-height 24 + :pixel-width 250 :descriptor + "Progress"] + [button :pixel-height 24 + :descriptor " Stop " + :callback (quote quit)])])])) + +(set-gutter-element bottom-gutter 'str2 str2) +(set-gutter-element-visible-p bottom-gutter-visible-p 'str t) +(set-gutter-element-visible-p bottom-gutter-visible-p 'str2 t) +