protected void DrawLockButton(Rect rect, WindowState state)
 {
     using (new EditorGUI.DisabledScope(TimelineUtility.IsLockedFromGroup(track)))
     {
         EditorGUI.BeginChangeCheck();
         var isLocked = track.lockedInHierarchy;
         var tooltip  = isLocked ? Styles.trackLockBtnOnTooltip : Styles.trackLockBtnOffTooltip;
         var locked   = GUI.Toggle(rect, track.lockedInHierarchy, tooltip, TimelineWindow.styles.trackLockButton);
         if (EditorGUI.EndChangeCheck())
         {
             LockTrack.SetLockState(new[] { track }, locked);
         }
     }
 }
        protected float DrawLockButton(Rect rect, WindowState state)
        {
            if (track.lockedInHierarchy)
            {
                // if the parent is locked, show it the lock disabled
                using (new EditorGUI.DisabledScope(TimelineUtility.IsLockedFromGroup(track)))
                {
                    if (GUI.Button(rect, GUIContent.none, TimelineWindow.styles.locked))
                    {
                        LockTrack.SetLockState(new[] { track }, !track.locked, state);
                    }
                }

                return(WindowConstants.trackHeaderButtonSize);
            }

            return(0.0f);
        }