pools.go raw
1 package gel
2
3 type Pool struct {
4 *Window
5 bools []*Bool
6 boolsInUse int
7 lists []*List
8 listsInUse int
9 checkables []*Checkable
10 checkablesInUse int
11 clickables []*Clickable
12 clickablesInUse int
13 editors []*Editor
14 editorsInUse int
15 incDecs []*IncDec
16 incDecsInUse int
17 }
18
19 func (w *Window) NewPool() *Pool {
20 return &Pool{Window: w}
21 }
22
23 func (p *Pool) Reset() {
24 p.boolsInUse = 0
25 p.listsInUse = 0
26 p.checkablesInUse = 0
27 p.clickablesInUse = 0
28 p.editorsInUse = 0
29 p.incDecsInUse = 0
30 }
31