26[[nodiscard]] MRVIEWER_API
float scale();
41[[nodiscard]] MRVIEWER_API
bool readBool( std::string_view key,
bool defaultValue =
false );
42MRVIEWER_API
void writeBool( std::string_view key,
bool value );
71 ImGuiButtonFlags
flags = ImGuiButtonFlags_None;
144[[deprecated(
"Use UI::buttonEx( label, size, params ) instead" )]]
145MRVIEWER_API
bool buttonEx(
const char* label,
bool active,
const Vector2f&
size = Vector2f( 0, 0 ),
152MRVIEWER_API
bool button(
const char* label,
bool active,
const Vector2f&
size = Vector2f( 0, 0 ), ImGuiKey key = ImGuiKey_None );
155inline bool button(
const char* label,
const Vector2f&
size = Vector2f( 0, 0 ), ImGuiKey key = ImGuiKey_None )
161MRVIEWER_API
bool buttonCommonSize(
const char* label,
const Vector2f&
size = Vector2f( 0, 0 ), ImGuiKey key = ImGuiKey_None );
163MRVIEWER_API
bool buttonUnique(
const char* label,
int* value,
int ownValue,
const Vector2f&
size = Vector2f( 0, 0 ), ImGuiKey key = ImGuiKey_None );
172 const std::string& name,
173 const Vector2f& iconSize,
174 const std::string& text,
175 const ImVec2& buttonSize,
179inline bool buttonIcon(
const std::string& name,
const Vector2f& iconSize,
const std::string& text,
const ImVec2& buttonSize )
181 return buttonIconEx( name, iconSize, text, buttonSize );
185 const std::string& name,
186 const Vector2f& iconSize,
187 const std::string& text,
188 const ImVec2& buttonSize,
189 bool textUnderIcon =
true,
190 ImGuiKey key = ImGuiKey_None )
202 const std::string& iconName,
203 const Vector2f& iconSize,
204 const std::string& text,
205 const ImVec2& buttonSize,
208 bool textUnderIcon =
true,
209 ImGuiKey key = ImGuiKey_None );
213MRVIEWER_API
bool toggle(
const char* label,
bool* value );
215MRVIEWER_API
bool checkbox(
const char* label,
bool* value );
219MRVIEWER_API
bool checkboxValid(
const char* label,
bool* value,
bool valid );
223template <
typename Getter,
typename Setter>
227 bool ret =
checkbox( label, &value );
231template <
typename Getter,
typename Setter>
244 bool value = bool( target & flags );
245 bool mixed = value && ( target & flags ) != flags;
286MRVIEWER_API
bool radioButton(
const char* label,
int* value,
int valButton );
298 [[nodiscard]]
explicit operator int()
const
313MRVIEWER_API
bool colorEdit4(
const char* label, Vector4f& color, ImGuiColorEditFlags flags = ImGuiColorEditFlags_None );
314MRVIEWER_API
bool colorEdit4(
const char* label,
Color& color, ImGuiColorEditFlags flags = ImGuiColorEditFlags_None );
317MRVIEWER_API
bool combo(
const char* label,
int* v,
const std::vector<std::string>& options,
318 bool showPreview =
true,
const std::vector<std::string>& tooltips = {},
const std::string& defaultText =
"Not selected" );
324MRVIEWER_API
bool beginCombo(
const char* label,
const std::string& text,
bool enableTestEngine =
true );
329MRVIEWER_API
bool comboElem(
const char* label,
bool selected );
332MRVIEWER_API
bool inputText(
const char* label, std::string& str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback =
nullptr,
void* user_data =
nullptr );
334MRVIEWER_API
bool inputTextIntoArray(
const char* label,
char* array, std::size_t
size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback =
nullptr,
void* user_data =
nullptr );
337MRVIEWER_API
bool inputTextMultiline(
const char* label, std::string& str,
const ImVec2&
size = ImVec2(), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback =
nullptr,
void* user_data =
nullptr );
339MRVIEWER_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 );
341MRVIEWER_API
bool inputTextMultilineWithHint(
const char* label,
const char* hint, std::string& str,
const ImVec2&
size = ImVec2(), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback =
nullptr,
void* user_data =
nullptr );
343MRVIEWER_API
bool inputTextIntoArrayMultilineWithHint(
const char* label,
const char* hint,
char* buf,
size_t buf_size,
const ImVec2&
size = ImVec2(), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback =
nullptr,
void* user_data =
nullptr );
354MRVIEWER_API
bool inputTextCentered(
const char* label, std::string& str,
float width = 0.0f, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback =
nullptr,
void* user_data =
nullptr );
359MRVIEWER_API
void inputTextCenteredReadOnly(
const char* label,
const std::string& str,
float width = 0.0f,
const std::optional<ImVec4>& textColor = {},
const std::optional<ImVec4>& labelColor = {},
bool selectable = true );
365 MRVIEWER_API
bool genericSlider(
const char* label, ImGuiDataType data_type,
void* p_data,
const void* p_min,
const void* p_max,
const char* format, ImGuiSliderFlags flags );
368 template <
typename T>
369 concept Scalar = std::is_arithmetic_v<T> && !std::is_same_v<T, bool>;
372 template <
typename T>
377 template <
typename Bound,
typename Target>
379 std::same_as<Bound, Target> ||
384 template <
typename Speed,
typename Target>
386 std::same_as<Speed, typename VectorTraits<Target>::BaseType> || std::same_as<Speed, float> ||
387 std::same_as<Speed, Target> || std::same_as<Speed, typename VectorTraits<Target>::template ChangeBase<float>>;
399 template <UnitEnum E, VectorOrScalar T,
typename F>
408template <UnitEnum E, detail::VectorOrScalar T>
413template <UnitEnum E, detail::VectorOrScalar T, detail::VectorOrScalar TargetType>
420template <UnitEnum E, detail::VectorOrScalar T, detail::Val
idBoundForTargetType<T> U =
typename VectorTraits<T>::BaseType>
428template <UnitEnum E, detail::VectorOrScalar T, detail::Val
idDragSpeedForTargetType<T> SpeedType =
float, detail::Val
idBoundForTargetType<T> U =
typename VectorTraits<T>::BaseType>
429bool drag(
const char* label, T& v, SpeedType vSpeed =
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 =
getDefaultStep<E, U, T>(
false ),
const U& stepFast =
getDefaultStep<E, U, T>(
true ) );
432template <UnitEnum E, detail::VectorOrScalar T, detail::Val
idBoundForTargetType<T> U =
typename VectorTraits<T>::BaseType>
433bool input(
const char* label, T& v,
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 =
getDefaultStep<E, U, T>(
false ),
const U& stepFast =
getDefaultStep<E, U, T>(
true ) );
439template <UnitEnum E, detail::VectorOrScalar T>
447template <UnitEnum E, detail::Scalar T,
typename F>
454template <UnitEnum E, detail::Scalar T, detail::Val
idDragSpeedForTargetType<T> SpeedType =
float,
typename F = std::
nullptr_t>
460template <UnitEnum E, detail::Scalar T,
typename F = std::
nullptr_t>
513MRVIEWER_API
void separator(
const std::string& text =
"",
int issueCount = -1 );
515 const std::string& text,
517 const std::string& issueCount );
520MRVIEWER_API
void separator(
const ImGuiImage& icon,
const std::string& text,
const Vector2f& iconSize = { 24.f, 24.f } );
521MRVIEWER_API
void separator(
const std::string& iconName,
const std::string& text,
const Vector2f& iconSize = { 24.f, 24.f } );
527MRVIEWER_API
void progressBar(
float fraction,
const Vector2f&
size = Vector2f( -1, 0 ) );
530MRVIEWER_API
bool beginTabBar(
const char* str_id, ImGuiTabBarFlags flags = 0 );
532MRVIEWER_API
bool beginTabItem(
const char* label,
bool* p_open = NULL, ImGuiTabItemFlags flags = 0 );
559MRVIEWER_API
void highlightWindowArea(
const ImVec2& min = {-1.0f, -1.0f},
const ImVec2& max = { -1.0f, -1.0f } );
579 std::function<bool(
const std::string& name )>
onSave;
592 ImDrawFlags oldFlags{};
596 : list( list ), oldFlags( list.Flags )
606 list.Flags = oldFlags;
624 extern template MRVIEWER_API bool drag<E, float, float, float>( const char*, float&, float, const float&, const float&, UnitToStringParams<E>, ImGuiSliderFlags, const float&, const float& ); \
625 extern template MRVIEWER_API bool drag<E, int, int, int>( const char*, int&, int, const int&, const int&, UnitToStringParams<E>, ImGuiSliderFlags, const int&, const int& ); \
626 extern template MRVIEWER_API bool drag<E, int, float, int>( const char*, int&, float, const int&, const int&, UnitToStringParams<E>, ImGuiSliderFlags, const int&, const int& );
634#include "MRUIStyle.ipp"
Definition MRImGuiImage.h:18
Whether T is a scalar type that we can use with our widgets.
Definition MRUIStyle.h:369
Definition MRUIStyle.h:378
Definition MRUIStyle.h:385
Whether T is a scalar or vector that we can use with our widgets.
Definition MRUIStyle.h:373
auto width(const Box< V > &box)
returns size along x axis
Definition MRBox.h:386
constexpr const V & get(const Box< V > &box) noexcept
get<0> returns min, get<1> returns max
Definition MRBox.h:432
bool inputTextIntoArrayMultilineWithHint(const char *label, const char *hint, 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.
auto mixed(const Vector3< T > &a, const Vector3< U > &b, const Vector3< U > &c) -> decltype(dot(a, cross(b, c)))
mixed product
Definition MRVector3.h:207
bool buttonEx(const char *label, bool active, const Vector2f &size=Vector2f(0, 0), ImGuiButtonFlags flags=ImGuiButtonFlags_None, const ButtonCustomizationParams &customParams={})
draw gradient button, which can be disabled (active = false)
const char * getImGuiPrimaryCtrlName()
returns "Ctrl" by default or "Command" if ImGui has changed it internally for macos
void progressBar(float fraction, const Vector2f &size=Vector2f(-1, 0))
float size
size plot by axis
Definition MRUIStyle.h:114
TextureType
enumeration texture types
Definition MRUIStyle.h:48
#define MR_X(E)
ignore for bindings to prevent GCC14 error: undefined symbol: ZN2MR11getUnitInfoITkNS_8UnitEnumENS_8T...
Definition MRUnitInfo.h:153
Disabler(const Disabler &)=delete
void saveCustomConfigModal(const CustomConfigModalSettings &settings)
Draw modal window to save user configs (for example Palettes)
VarUnitToStringParams labelFormatParams
the format of the text for labels
Definition MRUIStyle.h:131
void separator(const SeparatorParams ¶ms)
separator line with customizations
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)
bool genericSlider(const char *label, ImGuiDataType data_type, void *p_data, const void *p_min, const void *p_max, const char *format, ImGuiSliderFlags flags)
A type-erased slider.
bool modifierHeld
Whether the setting is currently inverted because the modifier is held.
Definition MRUIStyle.h:262
float scale()
Returns the global UI scale. Use this instead of passing around the scale in parameters.
bool input(const char *label, T &v, 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=getDefaultStep< E, U, T >(false), const U &stepFast=getDefaultStep< E, U, T >(true))
Like drag(), but clicking it immediately activates text input, so it's not actually draggable.
bool beginCombo(const char *label, const std::string &text, bool enableTestEngine=true)
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 ...
bool forceImguiTextColor
force use if ImGuiCol_Text for text
Definition MRUIStyle.h:82
void notificationFrame(NotificationType type, const std::string &str)
similar to ImGui::TextWrapped but also have styled background and notification type indicator
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().
CheckboxOrModifierState()
Definition MRUIStyle.h:264
bool inputPlusMinus(const char *label, T &plus, T &minus, T plusMin=T{}, T plusMax=std::numeric_limits< T >::max(), UnitToStringParams< E > unitParams={}, ImGuiSliderFlags flags=defaultSliderFlags, F &&wrapFunc=nullptr)
ImVec2 size(const ViewportRectangle &rect)
Definition MRViewport.h:59
bool buttonIcon(const std::string &name, const Vector2f &iconSize, const std::string &text, const ImVec2 &buttonSize)
button with a gradient, always active
Definition MRUIStyle.h:179
T getDefaultStep(bool fast)
Default step speed for UI::input().
void drawPoltVerticalAxis(const PlotAxis &plotAxis)
draw dash with text along the vertical axis
std::optional< ImVec4 > iconColor
if set, the icon is drawn in this color, otherwise in the color of the text
Definition MRUIStyle.h:105
void mouseControlHint(ImGuiMouseButton btn, const std::string &hint)
draws hint with corresponding mouse btn icon
ImGuiImage * customTexture
Definition MRUIStyle.h:76
Disabler(ImDrawList &list, ImDrawFlags mask)
Definition MRUIStyle.h:595
NotificationType
Definition MRNotificationType.h:10
LineAntialiasingDisabler(ImDrawList &list)
Definition MRUIStyle.h:614
void setScale(float newScale)
Strictly for internal use. Updates the value that scale() returns.
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 v...
bool border
show border or not
Definition MRUIStyle.h:84
std::string suffix
framed text after label (might be used for some indications)
Definition MRUIStyle.h:493
std::string imGuiIdKey
Optional string added at the end of popup name to have unique names.
Definition MRUIStyle.h:567
std::optional< Color > suffixFrameColor
color of background frame behind suffix (if not present default ImGuiCol_FrameBg is used)
Definition MRUIStyle.h:496
bool buttonIconFlatBG(const std::string &name, const Vector2f &iconSize, const std::string &text, const ImVec2 &buttonSize, bool textUnderIcon=true, ImGuiKey key=ImGuiKey_None)
button without a gradient, always active, configurable by an external style
Definition MRUIStyle.h:184
ImGuiButtonFlags flags
imgui flags for this button
Definition MRUIStyle.h:71
float lenDash
length dash without text
Definition MRUIStyle.h:125
bool button(const char *label, bool active, const Vector2f &size=Vector2f(0, 0), ImGuiKey key=ImGuiKey_None)
#define DETAIL_MR_UNIT_ENUMS(X)
A list of all unit enums, for internal use.
Definition MRUnitInfo.h:113
bool enabled
If false, the button is grayed out and can't be clicked.
Definition MRUIStyle.h:68
const ImGuiImage * icon
optional icon in the left part of separator
Definition MRUIStyle.h:484
bool buttonUniqueIcon(const std::string &iconName, const Vector2f &iconSize, const std::string &text, const ImVec2 &buttonSize, int *value, int ownValue, bool textUnderIcon=true, ImGuiKey key=ImGuiKey_None)
bool dragPlusMinus(const char *label, T &plus, T &minus, SpeedType speed=getDefaultDragSpeed< E, SpeedType >(), T plusMin=T{}, T plusMax=std::numeric_limits< T >::max(), UnitToStringParams< E > unitParams={}, ImGuiSliderFlags flags=defaultSliderFlags, F &&wrapFunc=nullptr)
bool isItemActive(const char *name)
Checks if the item with this name in the current window is active.
bool checkbox(const char *label, bool *value)
draw gradient checkbox
std::unique_ptr< ImGuiImage > & getTexture(TextureType type)
get texture by type
void transparentTextWrapped(const char *fmt,...)
similar to ImGui::TextWrapped but use current text color with alpha channel = 0.5
size_t textDashIndicesStep
sign every nth dash
Definition MRUIStyle.h:122
void highlightWindowArea(const ImVec2 &min={-1.0f, -1.0f}, const ImVec2 &max={ -1.0f, -1.0f })
static constexpr int size
Definition MRVectorTraits.h:22
CheckboxOrModifierState(bool baseValue)
Definition MRUIStyle.h:266
void drawPoltHorizontalAxis(const PlotAxis &plotAxis)
draw dash with text along the horizontal axis
Disabler & operator=(const Disabler &)=delete
float minValue
the minimum value of the axis
Definition MRUIStyle.h:118
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
float lenDashWithText
length dash with text
Definition MRUIStyle.h:127
int value
The permanent value of this setting, as set by the user by clicking the radio button.
Definition MRUIStyle.h:293
std::filesystem::path configDirectory
Directory where to save config.
Definition MRUIStyle.h:569
bool drag(const char *label, T &v, SpeedType vSpeed=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=getDefaultStep< E, U, T >(false), const U &stepFast=getDefaultStep< E, U, T >(true))
void setTooltipIfHovered(const std::string &text)
draw tooltip only if current item is hovered
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 b...
float getDefaultDragSpeed()
Default drag speed for UI::drag().
bool radioButton(const char *label, int *value, int valButton)
draw gradient radio button
constexpr int defaultSliderFlags
Default flags for slider() and drag() below.
Definition MRUIStyle.h:405
void endCombo()
Only call this if beginCombo() returned true!
bool plusMinusGeneric(const char *label, T &plus, T &minus, UnitToStringParams< E > unitToStringParams, F &&func)
bool slider(const char *label, T &v, const U &vMin, const U &vMax, UnitToStringParams< E > unitParams={}, ImGuiSliderFlags flags=defaultSliderFlags)
std::string configName
Name of desired config type.
Definition MRUIStyle.h:565
bool checkboxOrModifier(const char *label, CheckboxOrModifierState &value, int modifiers, int respectedModifiers=-1, std::optional< bool > valueOverride={})
bool readBool(std::string_view key, bool defaultValue=false)
bool inputTextMultilineWithHint(const char *label, const char *hint, std::string &str, const ImVec2 &size=ImVec2(), ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=nullptr, void *user_data=nullptr)
Same as inputTextMultiline(), but shows the given hint in the field while the text is empty.
bool comboElem(const char *label, bool selected)
A replacement for ImGui::Selectable() that should be used with beginCombo() and endCombo() to be able...
Vector2f iconSize
size of icon
Definition MRUIStyle.h:487
std::string testEngineName
if not empty, force use this string as name in TestEngine
Definition MRUIStyle.h:93
bool triggerSave
if true - opens modal in this frame, or saves if (!inputNameDialog && inputName)
Definition MRUIStyle.h:575
bool forceImGuiSpacing
Definition MRUIStyle.h:500
bool colorEdit4(const char *label, Vector4f &color, ImGuiColorEditFlags flags=ImGuiColorEditFlags_None)
draw gradient color edit 4
int effectiveValue
The value that is displayed, and to be used - can differ from value if modifiers are pressed.
Definition MRUIStyle.h:295
bool underlineFirstLetter
draw line under first letter of label
Definition MRUIStyle.h:87
bool forceImGuiBackground
force use imgui background if !customTexture
Definition MRUIStyle.h:79
void readOnlyValue(const char *label, const T &v, std::optional< ImVec4 > textColor={}, UnitToStringParams< E > unitParams={}, std::optional< ImVec4 > labelColor={})
void alignTextToButton()
Specialization of alignTextToFramePadding for UI::button with default height.
bool beginTabItem(const char *label, bool *p_open=NULL, ImGuiTabItemFlags flags=0)
bool textUnderImage
if false - text is to the right
Definition MRUIStyle.h:102
void alignTextToRadioButton()
Specialization of alignTextToFramePadding for UI::radioButton.
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().
void writeBool(std::string_view key, bool value)
void inputTextCenteredReadOnly(const char *label, const std::string &str, float width=0.0f, const std::optional< ImVec4 > &textColor={}, const std::optional< ImVec4 > &labelColor={}, bool selectable=true)
bool buttonIconEx(const std::string &name, const Vector2f &iconSize, const std::string &text, const ImVec2 &buttonSize, const ButtonIconCustomizationParams ¶ms={})
draw a button with an icon and text under it
bool unitWidget(const char *label, T &v, UnitToStringParams< E > &unitParams, F &&func)
const std::pair< const char *, ImU32 > & notificationChar(NotificationType type)
returns icons font character for given notification type, and its color
float extraScale
The spacing is multiplied by this.
Definition MRUIStyle.h:503
std::string label
label at the left part of separator (drawn after icon if present)
Definition MRUIStyle.h:490
bool checkboxFlags(const char *label, T &target, T flags)
Draw a checkbox toggling one or more bits in the mask.
Definition MRUIStyle.h:242
ImVec2 startAxisPoint
the point from which the axes will be drawn
Definition MRUIStyle.h:111
bool checkKey(ImGuiKey passedKey)
returns true if button is pressed in this frame, preserve its further processing in viewer keyboard e...
bool inputNameDialog
If false, inputName is used (if inputName is nullptr this option is not used)
Definition MRUIStyle.h:573
bool warnExisting
If true - warns user before overriding existing file, otherwise override without warning.
Definition MRUIStyle.h:577
float optimalLenth
optimal length between dashes
Definition MRUIStyle.h:116
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.
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
std::function< bool(const std::string &name)> onSave
Callback that is called when save is requested->returns true if file saved successfully (to close mod...
Definition MRUIStyle.h:579
std::string * inputName
String used by input.
Definition MRUIStyle.h:571
ImGuiKey getImGuiModPrimaryCtrl()
returns imgui modifier Id based on current environment
void alignTextToFramePadding(float padding)
bool enableTestEngine
Allow interacting with this button from UI::TestEngine.
Definition MRUIStyle.h:90
bool toggle(const char *label, bool *value)
draws checkbox-like toggle (enabled/disabled states)(O=)/(=O)
void alignTextToControl(float controlHeight)
std::optional< ImVec2 > cachedSize
Definition MRUIStyle.h:347
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.
std::string popupName() const
returns accumulated name of the popup
bool beginTabBar(const char *str_id, ImGuiTabBarFlags flags=0)
create and append items into a TabBar: see corresponding ImGui:: functions
T BaseType
The base template handles scalars (or just non-vectors).
Definition MRVectorTraits.h:21
bool baseValue
The persistent value of this setting, as set by the user by clicking the checkbox.
Definition MRUIStyle.h:260
bool checkboxValid(const char *label, bool *value, bool valid)
If valid is false checkbox is disabled. Same as checkboxOrFixedValue( ..., valid ?...
float maxValue
the maximal value of the axis
Definition MRUIStyle.h:120
void init()
init internal parameters
bool radioButtonOrModifier(const char *label, RadioButtonOrModifierState &value, int valButton, int modifiers, int respectedModifiers=-1, std::optional< int > valueOverride={})
void alignTextToCheckBox()
Specialization of alignTextToFramePadding for UI::checkbox.
void transparentText(const char *fmt,...)
similar to ImGui::Text but use current text color with alpha channel = 0.5
ButtonCustomizationParams baseParams
basic customization parameters
Definition MRUIStyle.h:99
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
bool buttonCommonSize(const char *label, const Vector2f &size=Vector2f(0, 0), ImGuiKey key=ImGuiKey_None)
float textPadding
text offset from dash
Definition MRUIStyle.h:129
bool checkboxMixed(const char *label, bool *value, bool mixed)
draw gradient checkbox with mixed state
std::variant< > VarUnitToStringParams
The std::variant of UnitToStringParams<E> for all known Es (unit kinds).
Definition MRUnits.h:125
~Disabler()
Definition MRUIStyle.h:604
@ Mono
Definition MRUIStyle.h:49
@ Gradient
Definition MRUIStyle.h:50
@ RainbowRect
Definition MRUIStyle.h:54
@ GradientBtnSecond
Definition MRUIStyle.h:52
@ GradientBtnGray
Definition MRUIStyle.h:53
@ Count
Definition MRUIStyle.h:55
@ GradientBtn
Definition MRUIStyle.h:51
Use this to store state across frames. Like what CollapsingHeader() uses to store it's open/close sta...
Definition MRUIStyle.h:39
Definition MRUIStyle.h:29
Definition MRUINonOverlappingLabels.h:10
Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).
Definition MRCameraOrientationPlugin.h:8
Definition MRUIStyle.h:346
Definition MRUIStyle.h:258
Settings required for UI::saveCustomConfigModal
Definition MRUIStyle.h:563
Definition MRUIStyle.h:109
Parameters for drawing custom separator.
Definition MRUIStyle.h:482
Controls how a value with a unit is converted to a string.
Definition MRUnits.h:71