#include "MRMesh/MRFlagOperators.h"
#include "exports.h"
#include "MRMesh/MRVector2.h"
#include "MRMesh/MRColor.h"
#include "MRViewer/MRUnits.h"
#include "MRViewer/MRImGui.h"
#include <misc/cpp/imgui_stdlib.h>
#include <algorithm>
#include <functional>
#include <cstddef>
#include <limits>
#include <string>
#include <vector>
#include <optional>
Go to the source code of this file.
Classes | |
struct | ImGui::MultiDragRes |
struct | ImGui::HistogramGridLine |
helper structure for PlotCustomHistogram describing background grid line and label More... | |
struct | ImGui::CustomStatePluginWindowParameters |
Structure that contains parameters for State plugin window with custom style. More... | |
Namespaces | |
namespace | MR |
namespace | ImGui |
Enumerations | |
enum class | ImGui::PaletteChanges { ImGui::None = 0 , ImGui::Reset = 1 , ImGui::Texture = 2 , ImGui::Ranges = 4 , ImGui::All = Texture | Ranges | Reset } |
enum class | ImGui::PlaneWidgetFlags { ImGui::None = 0 , ImGui::DisableVisibility = 1 } |
Functions | |
bool | ImGui::Combo (const char *label, int *idx, const std::vector< std::string > &values) |
bool | ImGui::Combo (const char *label, int *idx, std::function< const char *(int)> getter, int items_count) |
bool | ImGui::ListBox (const char *label, int *idx, const std::vector< std::string > &values) |
bool | ImGui::InputText (const char *label, std::string &str, ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=NULL, void *user_data=NULL) |
MRVIEWER_API bool | ImGui::DragFloatValid (const char *label, float *value, float speed=1.0f, float min=std::numeric_limits< float >::lowest(), float max=std::numeric_limits< float >::max(), const char *format="%.3f", ImGuiSliderFlags flags=0) |
MRVIEWER_API bool | ImGui::DragFloatValidLineWidth (const char *label, float *value) |
similar to ImGui::DragFloatValid but use available line width range | |
MRVIEWER_API MultiDragRes | ImGui::DragFloatValid2 (const char *label, float v[2], float v_speed=1.0f, float min=std::numeric_limits< float >::lowest(), float max=std::numeric_limits< float >::max(), const char *format="%.3f", ImGuiSliderFlags flags=0, const char *(*tooltips)[2]=nullptr) |
MRVIEWER_API MultiDragRes | ImGui::DragFloatValid3 (const char *label, float v[3], float v_speed=1.0f, float min=std::numeric_limits< float >::lowest(), float max=std::numeric_limits< float >::max(), const char *format="%.3f", ImGuiSliderFlags flags=0, const char *(*tooltips)[3]=nullptr) |
MRVIEWER_API bool | ImGui::DragIntValid (const char *label, int *value, float speed=1, int min=std::numeric_limits< int >::lowest(), int max=std::numeric_limits< int >::max(), const char *format="%d") |
MRVIEWER_API MultiDragRes | ImGui::DragIntValid3 (const char *label, int v[3], float speed=1, int min=std::numeric_limits< int >::lowest(), int max=std::numeric_limits< int >::max(), const char *format="%d", const char *(*tooltips)[3]=nullptr) |
MRVIEWER_API bool | ImGui::InputIntValid (const char *label, int *value, int min, int max, int step=1, int step_fast=100, ImGuiInputTextFlags flags=0) |
template<typename Getter , typename Setter > | |
bool | ImGui::Checkbox (const char *label, Getter get, Setter set) |
MRVIEWER_API void | ImGui::PlotCustomHistogram (const char *str_id, std::function< float(int idx)> values_getter, std::function< void(int idx)> tooltip, std::function< void(int idx)> on_click, int values_count, int values_offset=0, float scale_min=FLT_MAX, float scale_max=FLT_MAX, ImVec2 frame_size=ImVec2(0, 0), int selectedBarId=-1, int hoveredBarId=-1, const std::vector< HistogramGridLine > &gridIndexes={}, const std::vector< HistogramGridLine > &gridValues={}) |
MRVIEWER_API bool | ImGui::BeginStatePlugin (const char *label, bool *open, float width) |
begin typical state plugin window | |
MRVIEWER_API ImVec2 | ImGui::GetDownPosition (const float width) |
MRVIEWER_API float | ImGui::GetTitleBarHeght (float menuScaling) |
MRVIEWER_API bool | ImGui::BeginCustomStatePlugin (const char *label, bool *open, const CustomStatePluginWindowParameters ¶ms={}) |
MRVIEWER_API void | ImGui::EndCustomStatePlugin () |
end state plugin window with custom style | |
MRVIEWER_API bool | ImGui::BeginModalNoAnimation (const char *label, bool *open=nullptr, ImGuiWindowFlags flags=0) |
starts modal window with no animation for background | |
MRVIEWER_API bool | ImGui::InputIntBitSet (const char *label, int *v, const MR::BitSet &bs, int step=1, int step_fast=100, ImGuiInputTextFlags flags=0) |
same as ImGui::InputInt | |
MRVIEWER_API bool | ImGui::DragInputInt (const char *label, int *value, float speed=1, int min=std::numeric_limits< int >::lowest(), int max=std::numeric_limits< int >::max(), const char *format="%d", ImGuiSliderFlags flags=ImGuiSliderFlags_None) |
Combine of ImGui::DragInt and ImGui::InputInt. | |
MRVIEWER_API bool | ImGui::Link (const char *label, uint32_t color=MR::Color(60, 120, 255).getUInt32()) |
Draw text as link, calls callback on click. | |
MRVIEWER_API PaletteChanges | ImGui::Palette (const char *label, MR::Palette &palette, std::string &presetName, float width, float menuScaling, bool *fixZero=nullptr, float speed=1.0f, float min=std::numeric_limits< float >::lowest(), float max=std::numeric_limits< float >::max()) |
MRVIEWER_API void | ImGui::Plane (MR::PlaneWidget &planeWidget, float menuScaling, PlaneWidgetFlags flags={}) |
MRVIEWER_API void | ImGui::Image (const MR::ImGuiImage &image, const ImVec2 &size, const MR::Color &multColor) |
draw image with Y-direction inversed up-down | |
MRVIEWER_API void | ImGui::Image (const MR::ImGuiImage &image, const ImVec2 &size, const ImVec4 &multColor={ 1, 1, 1, 1 }) |
MRVIEWER_API MR::Vector2i | ImGui::GetImagePointerCoord (const MR::ImGuiImage &image, const ImVec2 &size, const ImVec2 &imagePos) |
get image coordinates under cursor considering Y-direction flipping | |
MRVIEWER_API void | ImGui::Spinner (float radius, float scaling) |
draw spinner in given place, radius with respect to scaling | |
MRVIEWER_API bool | ImGui::ModalBigTitle (const char *title, float scaling) |
draw big title with close cross (i.e. for settings modal popup ) | |
MRVIEWER_API bool | ImGui::ModalExitButton (float scaling) |
draw exit button with close cross (i.e. for settings modal popup ) | |
float | ImGui::getExpSpeed (float val, float frac=0.01f, float min=1e-5f) |
get exponential speed for this value | |