IsVisible returns true if a widget is visible for rendering according to the [states.Invisible] flag on it or any of its parents. This flag is also set by [styles.DisplayNone] during [WidgetBase.Style]. This does *not* check for an empty TotalBBox, indicating that the widget is out of render range;
()
| 383 | // window events. |
| 384 | // This call recursively calls the parent, which is typically a short path. |
| 385 | func (wb *WidgetBase) IsVisible() bool { |
| 386 | if wb == nil || wb.This == nil || wb.StateIs(states.Invisible) || wb.Scene == nil { |
| 387 | return false |
| 388 | } |
| 389 | if wb.Parent == nil { |
| 390 | return true |
| 391 | } |
| 392 | return wb.parentWidget().IsVisible() |
| 393 | } |
| 394 | |
| 395 | // DirectRenderImage uploads image directly into given system.Drawer at given index |
| 396 | // Typically this is a drw.SetGoImage call with an [image.RGBA], or |
no test coverage detected