Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 38 lines (27 sloc) 1.183 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38

" four editors in borders in polys

function! forms#example#foureditors#Make()
  let attrs = {'size': 15 }

  let attrs['init_text'] = "oneone"
  let txtEditor11 = forms#newFixedLengthField(attrs)
  let b11 = forms#newBorder({ 'body': txtEditor11 })

  let attrs['init_text'] = "onetwo"
  let txtEditor12 = forms#newFixedLengthField(attrs)
  let b12 = forms#newBorder({ 'body': txtEditor12 })

  let vpoly1 = forms#newVPoly({ 'children': [b11, b12] })


  let attrs['init_text'] = "twoone"
  let txtEditor21 = forms#newFixedLengthField(attrs)
  let b21 = forms#newBorder({ 'body': txtEditor21 })

  let attrs['init_text'] = "twotwo"
  let txtEditor22 = forms#newFixedLengthField(attrs)
  let b22 = forms#newBorder({ 'body': txtEditor22 })
  let vpoly2 = forms#newVPoly({ 'children': [b21, b22] })

  let hpoly = forms#newHPoly({ 'children': [vpoly1, vpoly2] })
  let bg = forms#newBackground({ 'body': hpoly} )

  let form = forms#newForm({'body': bg })
  call form.run()
endfunction

function! forms#example#foureditors#MakeTest()
  call forms#AppendInput({'type': 'Sleep', 'time': 5})
  call forms#AppendInput({'type': 'Exit'})
  call forms#example#foureditors#Make()
endfunction
Something went wrong with that request. Please try again.