How to draw gizmos of selected objects differently? (GizmoType.SelectedOrChild)

I came upon GizmoType.SelectedOrChild but the unity documentation says nothing about how to use it.
I have an OnDrawGizmos() and I simply want it to use different colors for selected and non-selected objects.

I was searching in the wrong place, it’s done with this function:
OnDrawGizmosSelected()