Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 52 lines (40 sloc) 1.707 kb
4c5e6d4 first commit
megaannum authored
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
Something went wrong with that request. Please try again.