ResolveStateToCurrentContext() public method

public ResolveStateToCurrentContext ( int currentId, HorizontalPaneState, prototype ) : void
currentId int
prototype HorizontalPaneState,
return void
    public static void Begin(HorizontalPaneState prototype)
    {
        int id = GUIUtility.GetControlID(FocusType.Passive);

        hState = (HorizontalPaneState)GUIUtility.GetStateObject(typeof(HorizontalPaneState), id);
        hState.ResolveStateToCurrentContext(id, prototype);

        // *INDENT-OFF*
    Rect totalArea = EditorGUILayout.BeginHorizontal();
      hState.availableWidth = totalArea.width - HorizontalPaneState.SPLITTER_WIDTH;
      hState.isPaneWidthChanged = false;
      if(totalArea.width > 0) {
        if(hState.leftPaneWidth < 0) {
          if(hState.initialLeftPaneWidth < 0)
            hState.leftPaneWidth = hState.availableWidth * 0.5f;
          else
            hState.leftPaneWidth = hState.initialLeftPaneWidth;
          hState.isPaneWidthChanged = true;
        }
        if(hState.lastAvailableWidth < 0)
          hState.lastAvailableWidth = hState.availableWidth;
        if(hState.lastAvailableWidth != hState.availableWidth) {
          hState.leftPaneWidth = hState.availableWidth * (hState.leftPaneWidth / hState.lastAvailableWidth);
          hState.isPaneWidthChanged = true;
        }
        hState.lastAvailableWidth = hState.availableWidth;
      }

      GUILayout.BeginHorizontal(GUILayout.Width(hState.leftPaneWidth));
        // *INDENT-ON*
    }
    public static void Begin(HorizontalPaneState prototype)
    {
        int id = GUIUtility.GetControlID(FocusType.Passive);
        hState = (HorizontalPaneState)GUIUtility.GetStateObject(typeof(HorizontalPaneState), id);
        hState.ResolveStateToCurrentContext(id, prototype);

        Rect totalArea = EditorGUILayout.BeginHorizontal();
          hState.availableWidth = totalArea.width - hState.splitterWidth;
          hState.isPaneWidthChanged = false;
          if(totalArea.width > 0) {
        if(hState.leftPaneWidth < 0) {
          if(hState.initialLeftPaneWidth < 0)
            hState.leftPaneWidth = hState.availableWidth * 0.5f;
          else
            hState.leftPaneWidth = hState.initialLeftPaneWidth;
          hState.isPaneWidthChanged = true;
        }
        if(hState.lastAvailableWidth < 0)
          hState.lastAvailableWidth = hState.availableWidth;
        if(hState.lastAvailableWidth != hState.availableWidth) {
          hState.leftPaneWidth = hState.availableWidth * (hState.leftPaneWidth / hState.lastAvailableWidth);
          hState.isPaneWidthChanged = true;
        }
        hState.lastAvailableWidth = hState.availableWidth;
          }

          GUILayout.BeginHorizontal(GUILayout.Width(hState.leftPaneWidth));
    }