Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 39 lines (31 sloc) 1.506 kb
4c5e6d4 first commit
megaannum authored
1
2 function! forms#example#labels3#Make()
3 let l1 = forms#newLabel({ 'text': 'one', 'status': g:IS_ENABLED})
4 let l2 = forms#newLabel({ 'text': 'two', 'status': g:IS_DISABLED})
5 let l3 = forms#newLabel({ 'text': 'three', 'status': g:IS_ENABLED})
6 let vpoly1 = forms#newVPoly({ 'children': [l1, l2, l3] })
7 let bvp = forms#newBorder({ 'body': vpoly1, 'char': '.' })
8
9 let la = forms#newLabel({ 'text': 'aaaaaa'})
10 let lb = forms#newLabel({ 'text': 'bbbbb'})
11 let blb = forms#newBorder({ 'body': lb, 'char': '*' })
12
13
14
15 let hpoly1 = forms#newHPoly({ 'children': [bvp,la,blb],
16 \ 'mode': 'light',
17 \ 'alignment': 'T' })
18 let hpoly2 = forms#newHPoly({ 'children': [bvp,la,blb],
19 \ 'mode': 'double',
20 \ 'alignment': 'C' })
21 let hpoly3 = forms#newHPoly({ 'children': [bvp,la,blb],
22 \ 'mode': 'heavy',
23 \ 'alignment': 'B' })
24 let vpoly2 = forms#newVPoly({ 'children': [hpoly1, hpoly2, hpoly3],
25 \ 'mode': 'light',
26 \ })
27 let bo = forms#newBorder({ 'body': vpoly2 })
28 let bg = forms#newBackground({ 'body': bo} )
29
30 let form = forms#newForm({'body': bg })
31 call form.run()
32 endfunction
33
ee21b40 Better support for both 'light' and 'dard' backgrounds.
megaannum authored
34 function! forms#example#labels3#MakeTest()
35 call forms#AppendInput({'type': 'Sleep', 'time': 5})
36 call forms#AppendInput({'type': 'Exit'})
37 call forms#example#labels3#Make()
38 endfunction
Something went wrong with that request. Please try again.