<commit_before>/** Manager for nuklear ui ***************************************************
 *                                                                           *
 * Copyright (c) 2016 <NAME>                                          *
 *  This file is distributed under the MIT License                           *
 *  See LICENSE file for details.                                            *
\*****************************************************************************/

#pragma once

#include <mirrage/utils/maybe.hpp>
#include <mirrage/utils/str_id.hpp>
#include <mirrage/utils/units.hpp>

#include <glm/vec2.hpp>
#include <glm/vec4.hpp>

#include <imgui.h>

#include <cstdint>
#include <memory>


namespace ImGui {
	enum class WindowPosition_X { center = 0, left = 1, right = 2 };
	enum class WindowPosition_Y { center = 0, top = 1, bottom = 2 };

	extern void PositionNextWindow(glm::vec2        size,
	                               WindowPosition_X x,
	                               WindowPosition_Y y,
	                               glm::vec2        offset = {});

	struct Column {
		const char* header = "";
		float       size   = -1.f;

		Column() = default;
		/*implicit*/ Column(const char* header, float size = -1) : header(header), size(size) {}
	};

	extern void BeginTable(const char* id,
	                       std::initializer_list<Column>,
	                       bool first_call,
	                       bool border    = true,
	                       bool separator = true);

	extern float ValueSliderFloat(const char* label,<commit_msg>added label `ImGui::SIZE_AUTO` for better readability of `ImVec2` with value set to zero because of auto sizing<commit_after>/** Manager for nuklear ui ***************************************************
 *                                                                           *
 * Copyright (c) 2016 <NAME>                                          *
 *  This file is distributed under the MIT License                           *
 *  See LICENSE file for details.                                            *
\*****************************************************************************/

#pragma once

#include <mirrage/utils/maybe.hpp>
#include <mirrage/utils/str_id.hpp>
#include <mirrage/utils/units.hpp>

#include <glm/vec2.hpp>
#include <glm/vec4.hpp>

#include <imgui.h>

#include <cstdint>
#include <memory>


namespace ImGui {
	inline constexpr float SIZE_AUTO = 0.0f;

	enum class WindowPosition_X { center = 0, left = 1, right = 2 };
	enum class WindowPosition_Y { center = 0, top = 1, bottom = 2 };

	extern void PositionNextWindow(glm::vec2        size,
	                               WindowPosition_X x,
	                               WindowPosition_Y y,
	                               glm::vec2        offset = {});

	struct Column {
		const char* header = "";
		float       size   = -1.f;

		Column() = default;
		/*implicit*/ Column(const char* header, float size = -1) : header(header), size(size) {}
	};

	extern void BeginTable(const char* id,
	                       std::initializer_list<Column>,
	                       bool first_call,
	                       bool border    = true,
	                       bool separator = true);

	extern float ValueSliderFloat(const char* label,
{'fraction_non_alphanumeric': 0.1665144596651446, 'fraction_numerical': 0.0106544901065449, 'mean_word_length': 1.6890343698854338, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6636324', 'n_tokens_mistral': 876, 'n_tokens_neox': 799, 'n_words': 236}