NAP
imguiutils.h
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 
5 #pragma once
6 
7 // Local Includes
8 #include "imgui/imgui.h"
9 #include "imguiicon.h"
10 
11 // External Includes
12 #include <texture.h>
13 #include <utility/dllexport.h>
14 #include <rtti/typeinfo.h>
15 
21 namespace ImGui
22 {
32  void IMGUI_API Image(const nap::Texture2D& texture, const ImVec2& size, const ImVec2& uv0 = ImVec2(0, 1), const ImVec2& uv1 = ImVec2(1, 0), const ImVec4& tint_col = ImVec4(1, 1, 1, 1), const ImVec4& border_col = ImVec4(0, 0, 0, 0));
33 
45  bool IMGUI_API ImageButton(const nap::Texture2D& texture, const ImVec2& size, const ImVec2& uv0 = ImVec2(0, 1), const ImVec2& uv1 = ImVec2(1, 0), int frame_padding = -1, const ImVec4& bg_col = ImVec4(0, 0, 0, 0), const ImVec4& tint_col = ImVec4(1, 1, 1, 1));
46 
64  bool IMGUI_API ImageButton(const nap::Icon& icon, const char* text=nullptr, const ImVec2& tooltip_offset = ImVec2(10, 10), const ImVec4& bg_col = ImVec4(0, 0, 0, 0), const ImVec4& tint_col = ImVec4(1, 1, 1, 1));
65 
84  bool IMGUI_API ImageButton(const nap::Icon& icon, const ImVec2& size, const char* text=nullptr, const ImVec2& tooltip_offset = ImVec2(10, 10), int frame_padding = -1, const ImVec4& bg_col = ImVec4(0, 0, 0, 0), const ImVec4& tint_col = ImVec4(1, 1, 1, 1));
85 
91  ImTextureID IMGUI_API GetTextureHandle(nap::Texture2D& texture);
92 
109  bool IMGUI_API Combo(const char* label, int* current_item, nap::rtti::TypeInfo enum_type);
110 }
ImGui::ImageButton
bool IMGUI_API ImageButton(const nap::Texture2D &texture, const ImVec2 &size, const ImVec2 &uv0=ImVec2(0, 1), const ImVec2 &uv1=ImVec2(1, 0), int frame_padding=-1, const ImVec4 &bg_col=ImVec4(0, 0, 0, 0), const ImVec4 &tint_col=ImVec4(1, 1, 1, 1))
nap::Icon
Definition: imguiicon.h:24
nap::Texture2D
Definition: texture.h:128
ImGui::Combo
bool IMGUI_API Combo(const char *label, int *current_item, nap::rtti::TypeInfo enum_type)
ImGui
Definition: imguiutils.h:21
ImGui::GetTextureHandle
ImTextureID IMGUI_API GetTextureHandle(nap::Texture2D &texture)
nap::rtti::TypeInfo
rttr::type TypeInfo
Definition: typeinfo.h:140
ImGui::Image
void IMGUI_API Image(const nap::Texture2D &texture, const ImVec2 &size, const ImVec2 &uv0=ImVec2(0, 1), const ImVec2 &uv1=ImVec2(1, 0), const ImVec4 &tint_col=ImVec4(1, 1, 1, 1), const ImVec4 &border_col=ImVec4(0, 0, 0, 0))