(index int, effect WidgetGraphicsEffect)
| 248 | } |
| 249 | |
| 250 | func (l *WidgetGraphicsEffectList) Insert(index int, effect WidgetGraphicsEffect) error { |
| 251 | observer := l.observer |
| 252 | |
| 253 | l.insertIntoSlice(index, effect) |
| 254 | |
| 255 | if observer != nil { |
| 256 | if err := observer.onInsertedGraphicsEffect(index, effect); err != nil { |
| 257 | l.items = append(l.items[:index], l.items[index+1:]...) |
| 258 | return err |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | return nil |
| 263 | } |
| 264 | |
| 265 | func (l *WidgetGraphicsEffectList) Len() int { |
| 266 | return len(l.items) |
no test coverage detected