This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ref: http://www.codercorner.com/RadixSortRevisited.htm | |
// http://stereopsis.com/radix.html | |
// int/float: https://github.com/lshamis/FloatRadixSort | |
// string: https://github.com/rantala/string-sorting/blob/master/src/msd_ce.cpp | |
struct str { | |
const char *str; | |
const char *end; | |
int len; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This code is an extension of the 'keyboard section' present in 'imgui_demo.cpp'. | |
License is the same (MIT License AFAIK) | |
*/ | |
#include <imgui_virtual_keyboard.h> | |
namespace ImGui { | |
// VirtualKeyboard Implementation | |
const char** GetKeyboardLogicalLayoutNames() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// only handles coplexity on top level, if you have a node with 1M children, you are out of luck | |
// changes in clipped parts are not detected, so if somebody deleted nodes in clipped, scrollbar is not updated until user actually scrolls | |
// scrolling and changes refresh the clipper == that part is as slow as no clipping at all | |
// only single list in BeginChild/EndChild is tested | |
struct TreeViewClipper { | |
// persist | |
float cursor_end = 0; | |
float cursor_visible_start = 0; | |
uint first_visible_index = 0; | |
float last_scroll = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CC0 | |
#define IMGUI_DEFINE_MATH_OPERATORS | |
#include <imgui_internal.h> | |
#define isdigit(c) (c >= '0' && c <= '9') | |
namespace ImGui | |
{ | |
float strToFloat (const char *s) // atof from minilibc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# CMake build system for Dear ImGui | |
# ================================= | |
# | |
# Build instructions: | |
# 1. Install latest CMake | |
# * Windows: https://cmake.org/download/ (Tick checkbox to place cmake in system PATH) | |
# * Linux: from your favorite package manager | |
# * MacOS: brew install cmake | |
# 2. Open command prompt in directory containing "imgui" and "imgui_dev" folders |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
// String tokenizing iterator | |
// by Nathan Reed, 2020-08-06. Licensed CC0 https://creativecommons.org/publicdomain/zero/1.0/ | |
// | |
// Use it like: | |
// | |
// for (auto token : IterTokens(" Bird \t\tFish Dog Cat ")) | |
// { | |
// // token is a std::string_view pointing into the original string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <assert.h> | |
#include <vector> | |
template<class T> | |
struct Func{}; | |
// std::func replacement without dynamic memory allocation (captures are limited to 48 bytes) | |
// this could be extended to support captures >48 bytes... of course, with a bit more of logic | |
// and some state. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace ImGui | |
{ | |
ImVec2 const AlignedCenter(0.5f, 0.5f); | |
ImVec2 const AlignedLeft(0.0f, 0.5f); | |
ImVec2 const AlignedTop(0.5f, 0.0f); | |
ImVec2 const AlignedRight(1.0f, 0.5f); | |
ImVec2 const AlignedBottom(0.5f, 1.0f); | |
ImVec2 const AlignedTopLeft(0.0f, 0.0f); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The MIT License (MIT) | |
# | |
# Copyright (c) 2014-2020 Omar Cornut | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WARNING: Revision 5+ Requires unreleased code from imgui, stick to 3 or 2 for now (don't look at revision 4) | |
#define IMGUI_DEFINE_MATH_OPERATORS | |
#include <imgui.h> | |
#include <imgui_internal.h> | |
#include "iminputvalue.h" | |
namespace ImGui | |
{ | |
//------------------------------------------------------------------------------------------------- |
NewerOlder