MeshLib Documentation
Loading...
Searching...
No Matches
MR::UI Namespace Reference

Namespaces

namespace  detail
 
namespace  TestEngine
 

Classes

struct  ButtonCustomizationParams
 parameters to customize buttonEx More...
 
struct  ButtonIconCustomizationParams
 
struct  CachedTextSize
 
struct  CheckboxOrModifierState
 
class  LabelRectAllocator
 
class  NonOverlappingLabelTask
 
struct  PlotAxis
 
struct  RadioButtonOrModifierState
 
class  RectAllocator
 
struct  SaveChangesPopupSettings
 
class  WindowRectAllocator
 

Enumerations

enum class  TextureType {
  Mono , Gradient , GradientBtn , GradientBtnSecond ,
  RainbowRect , Count
}
 

Functions

MRVIEWER_API void nonOverlappingLabel ()
 
MRVIEWER_API WindowRectAllocatorgetDefaultWindowRectAllocator ()
 
MRVIEWER_API LabelRectAllocatorgetDefaultLabelRectAllocator ()
 
MRVIEWER_API void saveChangesPopup (const char *str_id, const SaveChangesPopupSettings &settings={})
 
MRVIEWER_API std::unique_ptr< ImGuiImage > & getTexture (TextureType type)
 
MRVIEWER_API void init ()
 init internal parameters
 
MRVIEWER_API bool buttonEx (const char *label, bool active, const Vector2f &size=Vector2f(0, 0), ImGuiButtonFlags flags=ImGuiButtonFlags_None, const ButtonCustomizationParams &custmParams={})
 draw gradient button, which can be disabled (active = false)
 
MRVIEWER_API bool button (const char *label, bool active, const Vector2f &size=Vector2f(0, 0), ImGuiKey key=ImGuiKey_None)
 
bool button (const char *label, const Vector2f &size=Vector2f(0, 0), ImGuiKey key=ImGuiKey_None)
 
MRVIEWER_API bool buttonCommonSize (const char *label, const Vector2f &size=Vector2f(0, 0), ImGuiKey key=ImGuiKey_None)
 
MRVIEWER_API bool buttonUnique (const char *label, int *value, int ownValue, const Vector2f &size=Vector2f(0, 0), ImGuiKey key=ImGuiKey_None)
 draw button with same logic as radioButton
 
MRVIEWER_API void drawPoltHorizontalAxis (float menuScaling, const PlotAxis &plotAxis)
 
MRVIEWER_API void drawPoltVerticalAxis (float menuScaling, const PlotAxis &plotAxis)
 
MRVIEWER_API bool buttonIconEx (const std::string &name, const Vector2f &iconSize, const std::string &text, const ImVec2 &buttonSize, const ButtonIconCustomizationParams &params={})
 
bool buttonIcon (const std::string &name, const Vector2f &iconSize, const std::string &text, bool active, const ImVec2 &buttonSize)
 
bool buttonIcon (const std::string &name, const Vector2f &iconSize, const std::string &text, const ImVec2 &buttonSize)
 
bool buttonIconFlatBG (const std::string &name, const Vector2f &iconSize, const std::string &text, const ImVec2 &buttonSize)
 
MRVIEWER_API bool buttonUniqueIcon (const std::string &iconName, const Vector2f &iconSize, const std::string &text, const ImVec2 &buttonSize, int *value, int ownValue)
 
MRVIEWER_API bool checkbox (const char *label, bool *value)
 draw gradient checkbox
 
MRVIEWER_API bool checkboxOrFixedValue (const char *label, bool *value, std::optional< bool > valueOverride)
 If valueOverride is specified, then the checkbox is disabled and that value is displayed instead of value.
 
MRVIEWER_API bool checkboxValid (const char *label, bool *value, bool valid)
 If valid is false checkbox is disabled. Same as checkboxOrFixedValue( ..., valid ? nullopt : false ).
 
MRVIEWER_API bool checkboxMixed (const char *label, bool *value, bool mixed)
 draw gradient checkbox with mixed state
 
template<typename Getter , typename Setter >
bool checkbox (const char *label, Getter get, Setter set)
 draw gradient checkbox
 
template<typename T >
bool checkboxFlags (const char *label, T &target, T flags)
 Draw a checkbox toggling one or more bits in the mask.
 
MRVIEWER_API bool checkboxOrModifier (const char *label, CheckboxOrModifierState &value, int modifiers, int respectedModifiers=-1, std::optional< bool > valueOverride={})
 
MRVIEWER_API bool radioButton (const char *label, int *value, int valButton)
 draw gradient radio button
 
MRVIEWER_API bool radioButtonOrFixedValue (const char *label, int *value, int valButton, std::optional< int > valueOverride)
 If valueOverride is specified, then the radio button is disabled and that value is displayed instead of value.
 
MRVIEWER_API bool radioButtonOrModifier (const char *label, RadioButtonOrModifierState &value, int valButton, int modifiers, int respectedModifiers=-1, std::optional< int > valueOverride={})
 
MRVIEWER_API bool colorEdit4 (const char *label, Vector4f &color, ImGuiColorEditFlags flags=ImGuiColorEditFlags_None)
 draw gradient color edit 4
 
MRVIEWER_API bool colorEdit4 (const char *label, Color &color, ImGuiColorEditFlags flags=ImGuiColorEditFlags_None)
 
MRVIEWER_API bool combo (const char *label, int *v, const std::vector< std::string > &options, bool showPreview=true, const std::vector< std::string > &tooltips={}, const std::string &defaultText="Not selected")
 draw combo box
 
MRVIEWER_API bool beginCombo (const char *label, const std::string &text="Not selected", bool showPreview=true)
 draw custom content combo box
 
MRVIEWER_API void endCombo (bool showPreview=true)
 
MRVIEWER_API bool inputText (const char *label, std::string &str, ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=nullptr, void *user_data=nullptr)
 Draws text input, should be used instead of ImGui::InputText().
 
MRVIEWER_API bool inputTextIntoArray (const char *label, char *array, std::size_t size, ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=nullptr, void *user_data=nullptr)
 This overload is for arrays, as opposed to std::strings.
 
MRVIEWER_API bool inputTextMultiline (const char *label, std::string &str, const ImVec2 &size=ImVec2(), ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=nullptr, void *user_data=nullptr)
 Draws multiline text input, should be used instead of ImGui::InputTextMultiline().
 
MRVIEWER_API bool inputTextIntoArrayMultiline (const char *label, char *buf, size_t buf_size, const ImVec2 &size=ImVec2(), ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=nullptr, void *user_data=nullptr)
 This overload is for arrays, as opposed to std::strings.
 
MRVIEWER_API bool inputTextMultilineFullyScrollable (CachedTextSize &cache, const char *label, std::string &str, const ImVec2 &size=ImVec2(), ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=nullptr, void *user_data=nullptr)
 This version adds a horizontal scrollbar. Also it never draws the label, and uses full window width by default (so you can pass 0 as width).
 
MRVIEWER_API bool inputTextIntoArrayMultilineFullyScrollable (CachedTextSize &cache, const char *label, char *buf, size_t buf_size, const ImVec2 &size=ImVec2(), ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=nullptr, void *user_data=nullptr)
 
MRVIEWER_API bool inputTextCentered (const char *label, std::string &str, float width=0.0f, ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=nullptr, void *user_data=nullptr)
 draw input text box with text aligned by center
 
MRVIEWER_API void inputTextCenteredReadOnly (const char *label, const std::string &str, float width=0.0f, const std::optional< ImVec4 > &textColor={}, const std::optional< ImVec4 > &labelColor={})
 draw read-only text box with text aligned by center
 
template<UnitEnum E, detail::VectorOrScalar T, detail::ValidBoundForTargetType< T > U = typename VectorTraits<T>::BaseType>
bool slider (const char *label, T &v, const U &vMin, const U &vMax, UnitToStringParams< E > unitParams={}, ImGuiSliderFlags flags=defaultSliderFlags)
 
template<UnitEnum E, detail::VectorOrScalar T, detail::ValidDragSpeedForTargetType< T > SpeedType = float, detail::ValidBoundForTargetType< T > U = typename VectorTraits<T>::BaseType>
bool drag (const char *label, T &v, SpeedType vSpeed=detail::getDefaultDragSpeed< E, SpeedType >(), const U &vMin=std::numeric_limits< U >::lowest(), const U &vMax=std::numeric_limits< U >::max(), UnitToStringParams< E > unitParams={}, ImGuiSliderFlags flags=defaultSliderFlags, const U &step=detail::getDefaultStep< E, U, T >(false), const U &stepFast=detail::getDefaultStep< E, U, T >(true))
 
template<UnitEnum E, detail::VectorOrScalar T>
void readOnlyValue (const char *label, const T &v, std::optional< ImVec4 > textColor={}, UnitToStringParams< E > unitParams={}, std::optional< ImVec4 > labelColor={})
 
MRVIEWER_API void transparentText (const char *fmt,...)
 similar to ImGui::Text but use current text color with alpha channel = 0.5
 
MRVIEWER_API void transparentTextWrapped (const char *fmt,...)
 similar to ImGui::TextWrapped but use current text color with alpha channel = 0.5
 
MRVIEWER_API void setTooltipIfHovered (const std::string &text, float scaling)
 draw tooltip only if current item is hovered
 
MRVIEWER_API void separator (float scaling, const std::string &text="", int issueCount=-1)
 
MRVIEWER_API void separator (float scaling, const std::string &text, const ImVec4 &color, const std::string &issueCount)
 
MRVIEWER_API void separator (float scaling, const ImGuiImage &icon, const std::string &text, const Vector2f &iconSize={ 24.f, 24.f })
 
MRVIEWER_API void separator (float scaling, const std::string &iconName, const std::string &text, const Vector2f &iconSize={ 24.f, 24.f })
 
MRVIEWER_API void progressBar (float scaling, float fraction, const Vector2f &size=Vector2f(-1, 0))
 
MRVIEWER_API bool beginTabBar (const char *str_id, ImGuiTabBarFlags flags=0)
 
MRVIEWER_API void endTabBar ()
 
MRVIEWER_API bool beginTabItem (const char *label, bool *p_open=NULL, ImGuiTabItemFlags flags=0)
 
MRVIEWER_API void endTabItem ()
 
MRVIEWER_API void alignTextToFramePadding (float padding)
 
MRVIEWER_API void alignTextToControl (float controlHeight)
 
MRVIEWER_API void alignTextToRadioButton (float scaling)
 Specialization of alignTextToFramePadding for UI::radioButton.
 
MRVIEWER_API void alignTextToCheckBox (float scaling)
 Specialization of alignTextToFramePadding for UI::checkbox.
 
MRVIEWER_API void alignTextToButton (float scaling)
 Specialization of alignTextToFramePadding for UI::button with default height.
 
MRVIEWER_API void highlightWindowArea (float scaling, const ImVec2 &min={-1.0f, -1.0f}, const ImVec2 &max={ -1.0f, -1.0f })
 

Variables

constexpr int defaultSliderFlags = ImGuiSliderFlags_AlwaysClamp
 

Enumeration Type Documentation

◆ TextureType

enum class MR::UI::TextureType
strong
Enumerator
Mono 
Gradient 
GradientBtn 
GradientBtnSecond 
RainbowRect 
Count 

Function Documentation

◆ alignTextToButton()

MRVIEWER_API void MR::UI::alignTextToButton ( float scaling)

Specialization of alignTextToFramePadding for UI::button with default height.

◆ alignTextToCheckBox()

MRVIEWER_API void MR::UI::alignTextToCheckBox ( float scaling)

Specialization of alignTextToFramePadding for UI::checkbox.

◆ alignTextToControl()

MRVIEWER_API void MR::UI::alignTextToControl ( float controlHeight)

Sets the vertical text position to match the text of a specific control on the same line Same as alignTextToFramePadding, but takes the full control height Can be used, for example, for UI::button with nondefault height

◆ alignTextToFramePadding()

MRVIEWER_API void MR::UI::alignTextToFramePadding ( float padding)

Sets the vertical text position to match the text of a specific control on the same line The control is assumed to contain standard one-line text with equal padding from top and bottom edges The padding is control-specific Sample usage: UI::alignTextToFramePadding( ImGui::GetStyle().FramePadding.y ); // (with this value, it is equivalent to ImGui::AlignTextToFramePadding() ) ImGui::Text( "Button:" ); ImGui::SameLine(); UI::buttonCommonSize( "Button" ); // the control we align to

◆ alignTextToRadioButton()

MRVIEWER_API void MR::UI::alignTextToRadioButton ( float scaling)

Specialization of alignTextToFramePadding for UI::radioButton.

◆ beginCombo()

MRVIEWER_API bool MR::UI::beginCombo ( const char * label,
const std::string & text = "Not selected",
bool showPreview = true )

draw custom content combo box

◆ beginTabBar()

MRVIEWER_API bool MR::UI::beginTabBar ( const char * str_id,
ImGuiTabBarFlags flags = 0 )

◆ beginTabItem()

MRVIEWER_API bool MR::UI::beginTabItem ( const char * label,
bool * p_open = NULL,
ImGuiTabItemFlags flags = 0 )

◆ button() [1/2]

MRVIEWER_API bool MR::UI::button ( const char * label,
bool active,
const Vector2f & size = Vector2f(0, 0),
ImGuiKey key = ImGuiKey_None )

draw gradient button, which can be disabled (active = false) returns true if button is clicked in this frame, or key is pressed (optional)

◆ button() [2/2]

bool MR::UI::button ( const char * label,
const Vector2f & size = Vector2f( 0, 0 ),
ImGuiKey key = ImGuiKey_None )
inline

draw gradient button returns true if button is clicked in this frame, or key is pressed (optional)

◆ buttonCommonSize()

MRVIEWER_API bool MR::UI::buttonCommonSize ( const char * label,
const Vector2f & size = Vector2f(0, 0),
ImGuiKey key = ImGuiKey_None )

draw gradient button with the ordinary button size returns true if button is clicked in this frame, or key is pressed (optional)

◆ buttonEx()

MRVIEWER_API bool MR::UI::buttonEx ( const char * label,
bool active,
const Vector2f & size = Vector2f(0, 0),
ImGuiButtonFlags flags = ImGuiButtonFlags_None,
const ButtonCustomizationParams & custmParams = {} )

draw gradient button, which can be disabled (active = false)

◆ buttonIcon() [1/2]

bool MR::UI::buttonIcon ( const std::string & name,
const Vector2f & iconSize,
const std::string & text,
bool active,
const ImVec2 & buttonSize )
inline

◆ buttonIcon() [2/2]

bool MR::UI::buttonIcon ( const std::string & name,
const Vector2f & iconSize,
const std::string & text,
const ImVec2 & buttonSize )
inline

◆ buttonIconEx()

MRVIEWER_API bool MR::UI::buttonIconEx ( const std::string & name,
const Vector2f & iconSize,
const std::string & text,
const ImVec2 & buttonSize,
const ButtonIconCustomizationParams & params = {} )

◆ buttonIconFlatBG()

bool MR::UI::buttonIconFlatBG ( const std::string & name,
const Vector2f & iconSize,
const std::string & text,
const ImVec2 & buttonSize )
inline

◆ buttonUnique()

MRVIEWER_API bool MR::UI::buttonUnique ( const char * label,
int * value,
int ownValue,
const Vector2f & size = Vector2f(0, 0),
ImGuiKey key = ImGuiKey_None )

draw button with same logic as radioButton

◆ buttonUniqueIcon()

MRVIEWER_API bool MR::UI::buttonUniqueIcon ( const std::string & iconName,
const Vector2f & iconSize,
const std::string & text,
const ImVec2 & buttonSize,
int * value,
int ownValue )

draw button with icon same logic as radioButton the colors of the internal style are used

◆ checkbox() [1/2]

MRVIEWER_API bool MR::UI::checkbox ( const char * label,
bool * value )

draw gradient checkbox

◆ checkbox() [2/2]

template<typename Getter , typename Setter >
bool MR::UI::checkbox ( const char * label,
Getter get,
Setter set )

draw gradient checkbox

◆ checkboxFlags()

template<typename T >
bool MR::UI::checkboxFlags ( const char * label,
T & target,
T flags )

Draw a checkbox toggling one or more bits in the mask.

◆ checkboxMixed()

MRVIEWER_API bool MR::UI::checkboxMixed ( const char * label,
bool * value,
bool mixed )

draw gradient checkbox with mixed state

◆ checkboxOrFixedValue()

MRVIEWER_API bool MR::UI::checkboxOrFixedValue ( const char * label,
bool * value,
std::optional< bool > valueOverride )

If valueOverride is specified, then the checkbox is disabled and that value is displayed instead of value.

◆ checkboxOrModifier()

MRVIEWER_API bool MR::UI::checkboxOrModifier ( const char * label,
CheckboxOrModifierState & value,
int modifiers,
int respectedModifiers = -1,
std::optional< bool > valueOverride = {} )

Draws a checkbox, that gets inverted while a modifier key is held. Use value's operator bool to read the final value. (E.g. if (value), and so on.) modifiers must be one or more of ImGuiMod_{Shift,Alt,Ctrl}. By default ignores all modifiers not in modifiers. But if respectedModifiers is specified, then only ignores modifiers not included in it. respectedModifiers must be a superset of modifiers. -1 has special meaning, making it same as modifiers (which makes it have no effect). In other words, modifiers are checked like this: mask = respectedModifiers != -1 ? respectedModifiers : modifiers; modifiersHeld = (ImGui::GetIO().KeyMods & mask) == modifiers; If valueOverride is specified, then acts as checkboxOrFixedValue: disables the checkbox and displays that value instead of the real one, and also pretends that the modifier isn't held.

◆ checkboxValid()

MRVIEWER_API bool MR::UI::checkboxValid ( const char * label,
bool * value,
bool valid )

If valid is false checkbox is disabled. Same as checkboxOrFixedValue( ..., valid ? nullopt : false ).

◆ colorEdit4() [1/2]

MRVIEWER_API bool MR::UI::colorEdit4 ( const char * label,
Color & color,
ImGuiColorEditFlags flags = ImGuiColorEditFlags_None )

◆ colorEdit4() [2/2]

MRVIEWER_API bool MR::UI::colorEdit4 ( const char * label,
Vector4f & color,
ImGuiColorEditFlags flags = ImGuiColorEditFlags_None )

draw gradient color edit 4

◆ combo()

MRVIEWER_API bool MR::UI::combo ( const char * label,
int * v,
const std::vector< std::string > & options,
bool showPreview = true,
const std::vector< std::string > & tooltips = {},
const std::string & defaultText = "Not selected" )

draw combo box

◆ drag()

template<UnitEnum E, detail::VectorOrScalar T, detail::ValidDragSpeedForTargetType< T > SpeedType = float, detail::ValidBoundForTargetType< T > U = typename VectorTraits<T>::BaseType>
bool MR::UI::drag ( const char * label,
T & v,
SpeedType vSpeed = detail::getDefaultDragSpeed< E, SpeedType >(),
const U & vMin = std::numeric_limits< U >::lowest(),
const U & vMax = std::numeric_limits< U >::max(),
UnitToStringParams< E > unitParams = {},
ImGuiSliderFlags flags = defaultSliderFlags,
const U & step = detail::getDefaultStep< E, U, T >(false),
const U & stepFast = detail::getDefaultStep< E, U, T >(true) )

◆ drawPoltHorizontalAxis()

MRVIEWER_API void MR::UI::drawPoltHorizontalAxis ( float menuScaling,
const PlotAxis & plotAxis )

◆ drawPoltVerticalAxis()

MRVIEWER_API void MR::UI::drawPoltVerticalAxis ( float menuScaling,
const PlotAxis & plotAxis )

◆ endCombo()

MRVIEWER_API void MR::UI::endCombo ( bool showPreview = true)

◆ endTabBar()

MRVIEWER_API void MR::UI::endTabBar ( )

◆ endTabItem()

MRVIEWER_API void MR::UI::endTabItem ( )

◆ getDefaultLabelRectAllocator()

MRVIEWER_API LabelRectAllocator & MR::UI::getDefaultLabelRectAllocator ( )
nodiscard

◆ getDefaultWindowRectAllocator()

MRVIEWER_API WindowRectAllocator & MR::UI::getDefaultWindowRectAllocator ( )
nodiscard

◆ getTexture()

MRVIEWER_API std::unique_ptr< ImGuiImage > & MR::UI::getTexture ( TextureType type)

◆ highlightWindowArea()

MRVIEWER_API void MR::UI::highlightWindowArea ( float scaling,
const ImVec2 & min = {-1.0f, -1.0f},
const ImVec2 & max = { -1.0f, -1.0f } )

Select the background of the part of the current window from min to max. If the min is not set, then the current position is taken.If max is not set, then the end of the window is taken. Added some indentation if min or max is not set.

◆ init()

MRVIEWER_API void MR::UI::init ( )

init internal parameters

◆ inputText()

MRVIEWER_API bool MR::UI::inputText ( const char * label,
std::string & str,
ImGuiInputTextFlags flags = 0,
ImGuiInputTextCallback callback = nullptr,
void * user_data = nullptr )

Draws text input, should be used instead of ImGui::InputText().

◆ inputTextCentered()

MRVIEWER_API bool MR::UI::inputTextCentered ( const char * label,
std::string & str,
float width = 0.0f,
ImGuiInputTextFlags flags = 0,
ImGuiInputTextCallback callback = nullptr,
void * user_data = nullptr )

draw input text box with text aligned by center

◆ inputTextCenteredReadOnly()

MRVIEWER_API void MR::UI::inputTextCenteredReadOnly ( const char * label,
const std::string & str,
float width = 0.0f,
const std::optional< ImVec4 > & textColor = {},
const std::optional< ImVec4 > & labelColor = {} )

draw read-only text box with text aligned by center

◆ inputTextIntoArray()

MRVIEWER_API bool MR::UI::inputTextIntoArray ( const char * label,
char * array,
std::size_t size,
ImGuiInputTextFlags flags = 0,
ImGuiInputTextCallback callback = nullptr,
void * user_data = nullptr )

This overload is for arrays, as opposed to std::strings.

◆ inputTextIntoArrayMultiline()

MRVIEWER_API bool MR::UI::inputTextIntoArrayMultiline ( const char * label,
char * buf,
size_t buf_size,
const ImVec2 & size = ImVec2(),
ImGuiInputTextFlags flags = 0,
ImGuiInputTextCallback callback = nullptr,
void * user_data = nullptr )

This overload is for arrays, as opposed to std::strings.

◆ inputTextIntoArrayMultilineFullyScrollable()

MRVIEWER_API bool MR::UI::inputTextIntoArrayMultilineFullyScrollable ( CachedTextSize & cache,
const char * label,
char * buf,
size_t buf_size,
const ImVec2 & size = ImVec2(),
ImGuiInputTextFlags flags = 0,
ImGuiInputTextCallback callback = nullptr,
void * user_data = nullptr )

◆ inputTextMultiline()

MRVIEWER_API bool MR::UI::inputTextMultiline ( const char * label,
std::string & str,
const ImVec2 & size = ImVec2(),
ImGuiInputTextFlags flags = 0,
ImGuiInputTextCallback callback = nullptr,
void * user_data = nullptr )

Draws multiline text input, should be used instead of ImGui::InputTextMultiline().

◆ inputTextMultilineFullyScrollable()

MRVIEWER_API bool MR::UI::inputTextMultilineFullyScrollable ( CachedTextSize & cache,
const char * label,
std::string & str,
const ImVec2 & size = ImVec2(),
ImGuiInputTextFlags flags = 0,
ImGuiInputTextCallback callback = nullptr,
void * user_data = nullptr )

This version adds a horizontal scrollbar. Also it never draws the label, and uses full window width by default (so you can pass 0 as width).

◆ nonOverlappingLabel()

MRVIEWER_API void MR::UI::nonOverlappingLabel ( )

◆ progressBar()

MRVIEWER_API void MR::UI::progressBar ( float scaling,
float fraction,
const Vector2f & size = Vector2f(-1, 0) )

draws progress bar note that even while scaling is given by argument size should still respect it size: x(y) < 0 - take all available width(height) x(y) == 0 - use default width(height)

◆ radioButton()

MRVIEWER_API bool MR::UI::radioButton ( const char * label,
int * value,
int valButton )

draw gradient radio button

◆ radioButtonOrFixedValue()

MRVIEWER_API bool MR::UI::radioButtonOrFixedValue ( const char * label,
int * value,
int valButton,
std::optional< int > valueOverride )

If valueOverride is specified, then the radio button is disabled and that value is displayed instead of value.

◆ radioButtonOrModifier()

MRVIEWER_API bool MR::UI::radioButtonOrModifier ( const char * label,
RadioButtonOrModifierState & value,
int valButton,
int modifiers,
int respectedModifiers = -1,
std::optional< int > valueOverride = {} )

Draws a radio button, that can be affected by modifier keys. modifiers must be one or more of ImGuiMod_{Shift,Alt,Ctrl}. By default ignores all modifiers not in modifiers. But if respectedModifiers is specified, then only ignores modifiers not included in it. respectedModifiers must be a superset of modifiers. -1 has special meaning, making it same as modifiers (which makes it have no effect). If valueOverride is specified, then acts as radioButtonOrFixedValue: disables the radio button and displays that value instead of the real one, and also pretends that the modifier isn't held.

◆ readOnlyValue()

template<UnitEnum E, detail::VectorOrScalar T>
void MR::UI::readOnlyValue ( const char * label,
const T & v,
std::optional< ImVec4 > textColor = {},
UnitToStringParams< E > unitParams = {},
std::optional< ImVec4 > labelColor = {} )

◆ saveChangesPopup()

MRVIEWER_API void MR::UI::saveChangesPopup ( const char * str_id,
const SaveChangesPopupSettings & settings = {} )

◆ separator() [1/4]

MRVIEWER_API void MR::UI::separator ( float scaling,
const ImGuiImage & icon,
const std::string & text,
const Vector2f & iconSize = { 24.f, 24.f } )

◆ separator() [2/4]

MRVIEWER_API void MR::UI::separator ( float scaling,
const std::string & iconName,
const std::string & text,
const Vector2f & iconSize = { 24.f, 24.f } )

◆ separator() [3/4]

MRVIEWER_API void MR::UI::separator ( float scaling,
const std::string & text,
const ImVec4 & color,
const std::string & issueCount )

◆ separator() [4/4]

MRVIEWER_API void MR::UI::separator ( float scaling,
const std::string & text = "",
int issueCount = -1 )

add text with separator line if issueCount is greater than zero, this number will be displayed in red color after the text. If it equals zero - in green color Otherwise it will not be displayed

◆ setTooltipIfHovered()

MRVIEWER_API void MR::UI::setTooltipIfHovered ( const std::string & text,
float scaling )

draw tooltip only if current item is hovered

◆ slider()

template<UnitEnum E, detail::VectorOrScalar T, detail::ValidBoundForTargetType< T > U = typename VectorTraits<T>::BaseType>
bool MR::UI::slider ( const char * label,
T & v,
const U & vMin,
const U & vMax,
UnitToStringParams< E > unitParams = {},
ImGuiSliderFlags flags = defaultSliderFlags )

◆ transparentText()

MRVIEWER_API void MR::UI::transparentText ( const char * fmt,
... )

similar to ImGui::Text but use current text color with alpha channel = 0.5

◆ transparentTextWrapped()

MRVIEWER_API void MR::UI::transparentTextWrapped ( const char * fmt,
... )

similar to ImGui::TextWrapped but use current text color with alpha channel = 0.5

Variable Documentation

◆ defaultSliderFlags

int MR::UI::defaultSliderFlags = ImGuiSliderFlags_AlwaysClamp
inlineconstexpr