buildCheckBox builds a gui object of type: CheckBox
(b *Builder, am map[string]interface{})
| 222 | |
| 223 | // buildCheckBox builds a gui object of type: CheckBox |
| 224 | func buildCheckBox(b *Builder, am map[string]interface{}) (IPanel, error) { |
| 225 | |
| 226 | // Builds check box and set commont attributes |
| 227 | var text string |
| 228 | if am[AttribText] != nil { |
| 229 | text = am[AttribText].(string) |
| 230 | } |
| 231 | cb := NewCheckBox(text) |
| 232 | err := b.SetAttribs(am, cb) |
| 233 | if err != nil { |
| 234 | return nil, err |
| 235 | } |
| 236 | |
| 237 | // Sets optional checked value |
| 238 | if checked := am[AttribChecked]; checked != nil { |
| 239 | cb.SetValue(checked.(bool)) |
| 240 | } |
| 241 | return cb, nil |
| 242 | } |
| 243 | |
| 244 | // buildRadioButton builds a gui object of type: RadioButton |
| 245 | func buildRadioButton(b *Builder, am map[string]interface{}) (IPanel, error) { |
nothing calls this directly
no test coverage detected