buildRadioButton builds a gui object of type: RadioButton
(b *Builder, am map[string]interface{})
| 243 | |
| 244 | // buildRadioButton builds a gui object of type: RadioButton |
| 245 | func buildRadioButton(b *Builder, am map[string]interface{}) (IPanel, error) { |
| 246 | |
| 247 | // Builds check box and set commont attributes |
| 248 | var text string |
| 249 | if am[AttribText] != nil { |
| 250 | text = am[AttribText].(string) |
| 251 | } |
| 252 | rb := NewRadioButton(text) |
| 253 | err := b.SetAttribs(am, rb) |
| 254 | if err != nil { |
| 255 | return nil, err |
| 256 | } |
| 257 | |
| 258 | // Sets optional radio button group |
| 259 | if gr := am[AttribGroup]; gr != nil { |
| 260 | rb.SetGroup(gr.(string)) |
| 261 | } |
| 262 | |
| 263 | // Sets optional checked value |
| 264 | if checked := am[AttribChecked]; checked != nil { |
| 265 | rb.SetValue(checked.(bool)) |
| 266 | } |
| 267 | return rb, nil |
| 268 | } |
| 269 | |
| 270 | // buildVList builds a gui object of type: VList |
| 271 | func buildVList(b *Builder, am map[string]interface{}) (IPanel, error) { |
nothing calls this directly
no test coverage detected