OpenRaider  0.1.4-dev
Open Source Tomb Raider Game Engine implementation
imconfig.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // USER IMPLEMENTATION
3 // This file contains compile-time options for ImGui.
4 // Other options (memory allocation overrides, callbacks, etc.) can be set at runtime via the ImGuiIO structure - ImGui::GetIO().
5 //-----------------------------------------------------------------------------
6 
7 #pragma once
8 
9 //---- Define your own ImVector<> type if you don't want to use the provided implementation defined in imgui.h
10 //#include <vector>
11 //#define ImVector std::vector
12 //#define ImVector MyVector
13 
14 //---- Define assertion handler. Defaults to calling assert().
15 #include "global.h"
16 #define IM_ASSERT(_EXPR) assert(_EXPR)
17 
18 //---- Define attributes of all API symbols declarations, e.g. for DLL under Windows.
19 //#define IMGUI_API __declspec( dllexport )
20 //#define IMGUI_API __declspec( dllimport )
21 
22 //---- Don't implement default handlers for Windows (so as not to link with OpenClipboard() and others Win32 functions)
23 //#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS
24 //#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS
25 
26 //---- Include imgui_user.inl at the end of imgui.cpp so you can include code that extends ImGui using its private data/functions.
27 #define IMGUI_INCLUDE_IMGUI_USER_INL
28 
29 //---- Include imgui_user.h at the end of imgui.h
30 #define IMGUI_INCLUDE_IMGUI_USER_H
31 
32 //---- Define implicit cast operators to convert back<>forth from your math types and ImVec2/ImVec4.
33 #include <glm/vec2.hpp>
34 #define IM_VEC2_CLASS_EXTRA \
35  ImVec2(const glm::vec2& f) { x = f.x; y = f.y; } \
36  operator glm::vec2() const { return glm::vec2(x, y); }
37 
38 #include <glm/vec4.hpp>
39 #define IM_VEC4_CLASS_EXTRA \
40  ImVec4(const glm::vec4& f) { x = f.x; y = f.y; z = f.z; w = f.w; } \
41  operator glm::vec4() const { return glm::vec4(x,y,z,w); }
42 
43 //---- Freely implement extra functions within the ImGui:: namespace.
44 //---- Declare helpers or widgets implemented in imgui_user.inl or elsewhere, so end-user doesn't need to include multiple files.
45 //---- e.g. you can create variants of the ImGui::Value() helper for your low-level math types, or your own widgets/helpers.
46 /*
47 namespace ImGui
48 {
49  void Value(const char* prefix, const MyVec2& v, const char* float_format = NULL);
50  void Value(const char* prefix, const MyVec4& v, const char* float_format = NULL);
51 }
52 */
53 
Included everywhere.