mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-24 00:26:36 +00:00
Added IMGUI_DISABLE compile-time definition to make all headers and sources empty.
This commit is contained in:
parent
f694244dec
commit
d37d25470a
@ -95,6 +95,7 @@ Other Changes:
|
||||
- Columns: ImDrawList::Channels* functions now work inside columns. Added extra comments to
|
||||
suggest using user-owned ImDrawListSplitter instead of ImDrawList functions. [@rokups]
|
||||
- Misc: Added ImGuiMouseCursor_NotAllowed enum so it can be used by more shared widgets. [@rokups]
|
||||
- Misc: Added IMGUI_DISABLE compile-time definition to make all headers and sources empty.
|
||||
- Misc: Disable format checks when using stb_printf, to allow using extra formats.
|
||||
Made IMGUI_USE_STB_SPRINTF a properly documented imconfig.h flag. (#2954) [@loicmolinari]
|
||||
- Misc: Added misc/single_file/imgui_single_file.h, We use this to validate compiling all *.cpp
|
||||
|
@ -80,6 +80,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
||||
- input text: clean up the mess caused by converting UTF-8 <> wchar. the code is rather inefficient right now and super fragile.
|
||||
- input text: reorganize event handling, allow CharFilter to modify buffers, allow multiple events? (#541)
|
||||
- input text: expose CursorPos in char filter event (#816)
|
||||
- input text: try usage idiom of using InputText with data only exposed through get/set accessors, without extraneous copy/alloc. (#3009)
|
||||
- input text: access public fields via a non-callback API e.g. InputTextGetState("xxx") that may return NULL if not active.
|
||||
- input text: flag to disable live update of the user buffer (also applies to float/int text input) (#701)
|
||||
- input text: hover tooltip could show unclamped text
|
||||
|
10
imconfig.h
10
imconfig.h
@ -14,6 +14,7 @@
|
||||
#pragma once
|
||||
|
||||
//---- Define assertion handler. Defaults to calling assert().
|
||||
// If your macro uses multiple statements, make sure is enclosed in a 'do { .. } while (0)' block so it can be used as a single statement.
|
||||
//#define IM_ASSERT(_EXPR) MyAssert(_EXPR)
|
||||
//#define IM_ASSERT(_EXPR) ((void)(_EXPR)) // Disable asserts
|
||||
|
||||
@ -25,10 +26,11 @@
|
||||
//---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names.
|
||||
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
|
||||
//---- Don't implement demo windows functionality (ShowDemoWindow()/ShowStyleEditor()/ShowUserGuide() methods will be empty)
|
||||
// It is very strongly recommended to NOT disable the demo windows during development. Please read the comments in imgui_demo.cpp.
|
||||
//#define IMGUI_DISABLE_DEMO_WINDOWS
|
||||
//#define IMGUI_DISABLE_METRICS_WINDOW
|
||||
//---- Disable all of Dear ImGui or don't implement standard windows.
|
||||
// It is very strongly recommended to NOT disable the demo windows during development. Please read comments in imgui_demo.cpp.
|
||||
//#define IMGUI_DISABLE // Disable everything: all headers and source files will be empty.
|
||||
//#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty. Not recommended.
|
||||
//#define IMGUI_DISABLE_METRICS_WINDOW // Disable debug/metrics window: ShowMetricsWindow() will be empty.
|
||||
|
||||
//---- Don't implement some functions to reduce linkage requirements.
|
||||
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc.
|
||||
|
@ -791,6 +791,8 @@ CODE
|
||||
#endif
|
||||
|
||||
#include "imgui.h"
|
||||
#ifndef IMGUI_DISABLE
|
||||
|
||||
#ifndef IMGUI_DEFINE_MATH_OPERATORS
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
#endif
|
||||
@ -10282,3 +10284,5 @@ void ImGui::ShowMetricsWindow(bool*) { }
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#endif // #ifndef IMGUI_DISABLE
|
||||
|
4
imgui.h
4
imgui.h
@ -45,6 +45,8 @@ Index of this file:
|
||||
#include "imconfig.h"
|
||||
#endif
|
||||
|
||||
#ifndef IMGUI_DISABLE
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Header mess
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -2275,3 +2277,5 @@ struct ImFont
|
||||
#ifdef IMGUI_INCLUDE_IMGUI_USER_H
|
||||
#include "imgui_user.h"
|
||||
#endif
|
||||
|
||||
#endif // #ifndef IMGUI_DISABLE
|
||||
|
@ -65,6 +65,8 @@ Index of this file:
|
||||
#endif
|
||||
|
||||
#include "imgui.h"
|
||||
#ifndef IMGUI_DISABLE
|
||||
|
||||
#include <ctype.h> // toupper
|
||||
#include <limits.h> // INT_MIN, INT_MAX
|
||||
#include <math.h> // sqrtf, powf, cosf, sinf, floorf, ceilf
|
||||
@ -4866,3 +4868,5 @@ void ImGui::ShowUserGuide() {}
|
||||
void ImGui::ShowStyleEditor(ImGuiStyle*) {}
|
||||
|
||||
#endif
|
||||
|
||||
#endif // #ifndef IMGUI_DISABLE
|
||||
|
@ -27,6 +27,8 @@ Index of this file:
|
||||
#endif
|
||||
|
||||
#include "imgui.h"
|
||||
#ifndef IMGUI_DISABLE
|
||||
|
||||
#ifndef IMGUI_DEFINE_MATH_OPERATORS
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
#endif
|
||||
@ -3458,3 +3460,5 @@ static const char* GetDefaultCompressedFontDataTTFBase85()
|
||||
{
|
||||
return proggy_clean_ttf_compressed_data_base85;
|
||||
}
|
||||
|
||||
#endif // #ifndef IMGUI_DISABLE
|
||||
|
@ -22,6 +22,7 @@ Index of this file:
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef IMGUI_DISABLE
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Header mess
|
||||
@ -1912,3 +1913,5 @@ extern void ImGuiTestEngineHook_Log(ImGuiContext* ctx, const cha
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning (pop)
|
||||
#endif
|
||||
|
||||
#endif // #ifndef IMGUI_DISABLE
|
||||
|
@ -33,6 +33,8 @@ Index of this file:
|
||||
#endif
|
||||
|
||||
#include "imgui.h"
|
||||
#ifndef IMGUI_DISABLE
|
||||
|
||||
#ifndef IMGUI_DEFINE_MATH_OPERATORS
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
#endif
|
||||
@ -7704,3 +7706,5 @@ void ImGui::Columns(int columns_count, const char* id, bool border)
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#endif // #ifndef IMGUI_DISABLE
|
||||
|
Loading…
Reference in New Issue
Block a user