private void OnGUI()

in editor/app/src/eap/ConfigWindow.cs [192:284]


  private void OnGUI() {
    Action cleanup = null;

    var keyList = guiCallbacks.Keys.ToList();
    keyList.Sort();

    if (string.IsNullOrEmpty(selectedTab) ||
        keyList.Contains(selectedTab) == false) {
      selectedTab = keyList.First();
    }

    var index = keyList.FindIndex(a => a == selectedTab);

    var buttons =
        keyList.Select(a => new GUIContent(" " + a, icons[a]))
            .ToArray();

    var menuOption = selector.GetMenuOption(position.width);

    if (menuOption == GUIMenuSelector.MenuOption.LeftFull) {
      EditorGUILayout.BeginHorizontal();
      index = FirebaseGUILayout.IconMenu(buttons, index, iconTextListWidth, theme,
                                    ref menuScrollPos);

      cleanup = delegate() { EditorGUILayout.EndHorizontal(); };
    } else if (menuOption == GUIMenuSelector.MenuOption.LeftIcon) {
      Func<GUIContent, GUIContent> getImageButton =
          delegate(GUIContent content) {
        if (content.image != null) {
          return new GUIContent("", content.image, content.text);
        }

        return content;
      };

      var imageButtons = buttons.Select(a => getImageButton(a)).ToArray();

      EditorGUILayout.BeginHorizontal();
      index = FirebaseGUILayout.IconMenu(imageButtons, index, iconOnlyListWidth,
                                    theme, ref menuScrollPos);

      cleanup = delegate() { EditorGUILayout.EndHorizontal(); };
    } else {
      index = FirebaseGUILayout.ComboMenu(buttons, index);
    }

    if (selectedTab != keyList[index]) {
      selectedTab = keyList[index];
      tabScrollPos = new Vector2();
    }

    var style = new GUIStyle("scrollview");
    style.padding.bottom = 10;

    EditorGUILayout.BeginVertical();
    tabScrollPos = EditorGUILayout.BeginScrollView(tabScrollPos, style);

    if (selectedTab == "All") {
      foreach (var key in keyList) {
        if (key == "All") {
          continue;
        }

        foreach (var cb in guiCallbacks[key]) {
          cb.Value(theme);
        }
      }
    }
    else {
      foreach (var cb in guiCallbacks[selectedTab]) {
        cb.Value(theme);
      }
    }

    EditorGUILayout.EndScrollView();

    var horzStyle = new GUIStyle("scrollview");
    horzStyle.padding.bottom = 5;

    EditorGUILayout.BeginHorizontal(horzStyle);
    EditorGUILayout.Space();

    if (GUILayout.Button("Save") == true) {
        Save();
    }

    EditorGUILayout.EndHorizontal();
    EditorGUILayout.EndVertical();

    if (cleanup != null) {
      cleanup();
    }
  }