buildHList builds a gui object of type: VList
(b *Builder, am map[string]interface{})
| 294 | |
| 295 | // buildHList builds a gui object of type: VList |
| 296 | func buildHList(b *Builder, am map[string]interface{}) (IPanel, error) { |
| 297 | |
| 298 | // Builds list and set commont attributes |
| 299 | list := NewHList(0, 0) |
| 300 | err := b.SetAttribs(am, list) |
| 301 | if err != nil { |
| 302 | return nil, err |
| 303 | } |
| 304 | |
| 305 | // Builds children |
| 306 | if am[AttribItems] != nil { |
| 307 | items := am[AttribItems].([]map[string]interface{}) |
| 308 | for i := 0; i < len(items); i++ { |
| 309 | item := items[i] |
| 310 | child, err := b.build(item, list) |
| 311 | if err != nil { |
| 312 | return nil, err |
| 313 | } |
| 314 | list.Add(child) |
| 315 | } |
| 316 | } |
| 317 | return list, nil |
| 318 | } |
| 319 | |
| 320 | // buildDropDown builds a gui object of type: DropDown |
| 321 | func buildDropDown(b *Builder, am map[string]interface{}) (IPanel, error) { |
nothing calls this directly
no test coverage detected