Skip to content
Newer
Older
100644 56 lines (45 sloc) 1.92 KB
4c5e6d4 first commit
megaannum authored Jul 27, 2012
1
2 function! forms#example#dropshadow#Make()
3 " ul
4 let t = forms#newText({'textlines': [
5 \ "Upper Left",
6 \ "Drop Shadow"
7 \ ]})
8 let box = forms#newBox({ 'body': t} )
9 let ds = forms#newDropShadow({ 'body': box, 'corner': 'ul'} )
10 let bul = forms#newBorder({ 'body': ds, 'size': 2} )
11
12 " ur
13 let t = forms#newText({'textlines': [
14 \ "Upper Right",
15 \ "Drop Shadow"
16 \ ]})
17 let box = forms#newBox({ 'body': t} )
18 let ds = forms#newDropShadow({ 'body': box, 'corner': 'ur'} )
19 let bur = forms#newBorder({ 'body': ds, 'size': 2} )
20
21 let hpolyu = forms#newHPoly({ 'children': [bul, bur] })
22
23 " ll
24 let t = forms#newText({'textlines': [
25 \ "Lower Left",
26 \ "Drop Shadow"
27 \ ]})
28 let box = forms#newBox({ 'body': t} )
29 let ds = forms#newDropShadow({ 'body': box, 'corner': 'll'} )
30 let bll = forms#newBorder({ 'body': ds, 'size': 2} )
31
32 " lr
33 let t = forms#newText({'textlines': [
34 \ "Lower Right",
35 \ "Drop Shadow"
36 \ ]})
37 let box = forms#newBox({ 'body': t} )
38 let ds = forms#newDropShadow({ 'body': box, 'corner': 'lr'} )
39 let blr = forms#newBorder({ 'body': ds, 'size': 2} )
40
41 let hpolyl = forms#newHPoly({ 'children': [bll, blr] })
42
43 let vpoly = forms#newVPoly({ 'children': [hpolyu, hpolyl] })
44
45 let bg = forms#newBackground({ 'body': vpoly} )
46
47 let form = forms#newForm({'body': bg})
48 call form.run()
49 endfunction
ee21b40 Better support for both 'light' and 'dard' backgrounds.
megaannum authored Aug 13, 2012
50
51 function! forms#example#dropshadow#MakeTest()
52 call forms#AppendInput({'type': 'Sleep', 'time': 5})
53 call forms#AppendInput({'type': 'Exit'})
54 call forms#example#dropshadow#Make()
55 endfunction
Something went wrong with that request. Please try again.