Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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