Lines Matching defs:label

301 void ImGui::LabelText(const char* label, const char* fmt, ...)
305 LabelTextV(label, fmt, args);
309 // Add a label+text combo aligned to other label+value widgets
310 void ImGui::LabelTextV(const char* label, const char* fmt, va_list args)
320 const ImVec2 label_size = CalcTextSize(label, NULL, true);
332 RenderText(ImVec2(value_bb.Max.x + style.ItemInnerSpacing.x, value_bb.Min.y + style.FramePadding.y), label);
544 bool ImGui::ButtonEx(const char* label, const ImVec2& size_arg, ImGuiButtonFlags flags)
552 const ImGuiID id = window->GetID(label);
553 const ImVec2 label_size = CalcTextSize(label, NULL, true);
576 RenderTextClipped(bb.Min + style.FramePadding, bb.Max - style.FramePadding, label, NULL, &label_size, style.ButtonTextAlign, &bb);
582 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags);
586 bool ImGui::Button(const char* label, const ImVec2& size_arg)
588 return ButtonEx(label, size_arg, 0);
592 bool ImGui::SmallButton(const char* label)
597 bool pressed = ButtonEx(label, ImVec2(0, 0), ImGuiButtonFlags_AlignTextBaseLine);
610 // Cannot use zero-size for InvisibleButton(). Unlike Button() there is not way to fallback using the label size.
906 bool ImGui::Checkbox(const char* label, bool* v)
914 const ImGuiID id = window->GetID(label);
915 const ImVec2 label_size = CalcTextSize(label, NULL, true);
944 RenderText(ImVec2(check_bb.Max.x + style.ItemInnerSpacing.x, check_bb.Min.y + style.FramePadding.y), label);
946 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.ItemFlags | ImGuiItemStatusFlags_Checkable | (*v ? ImGuiItemStatusFlags_Checked : 0));
950 bool ImGui::CheckboxFlags(const char* label, unsigned int* flags, unsigned int flags_value)
953 bool pressed = Checkbox(label, &v);
965 bool ImGui::RadioButton(const char* label, bool active)
973 const ImGuiID id = window->GetID(label);
974 const ImVec2 label_size = CalcTextSize(label, NULL, true);
1011 RenderText(ImVec2(check_bb.Max.x + style.ItemInnerSpacing.x, check_bb.Min.y + style.FramePadding.y), label);
1016 bool ImGui::RadioButton(const char* label, int* v, int v_button)
1018 const bool pressed = RadioButton(label, *v == v_button);
1280 bool ImGui::BeginCombo(const char* label, const char* preview_value, ImGuiComboFlags flags)
1294 const ImGuiID id = window->GetID(label);
1297 const ImVec2 label_size = CalcTextSize(label, NULL, true);
1323 RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label);
1418 bool ImGui::Combo(const char* label, int* current_item, bool (*items_getter)(void*, int, const char**), void* data, int items_count, int popup_max_height_in_items)
1431 if (!BeginCombo(label, preview_value, ImGuiComboFlags_None))
1459 bool ImGui::Combo(const char* label, int* current_item, const char* const items[], int items_count, int height_in_items)
1461 const bool value_changed = Combo(label, current_item, Items_ArrayGetter, (void*)items, items_count, height_in_items);
1466 bool ImGui::Combo(const char* label, int* current_item, const char* items_separated_by_zeros, int height_in_items)
1475 bool value_changed = Combo(label, current_item, Items_SingleStringGetter, (void*)items_separated_by_zeros, items_count, height_in_items);
1861 bool ImGui::DragScalar(const char* label, ImGuiDataType data_type, void* v, float v_speed, const void* v_min, const void* v_max, const char* format, float power)
1872 const ImGuiID id = window->GetID(label);
1875 const ImVec2 label_size = CalcTextSize(label, NULL, true);
1912 return InputScalarAsWidgetReplacement(frame_bb, id, label, data_type, v, format);
1931 RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label);
1933 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.ItemFlags);
1937 bool ImGui::DragScalarN(const char* label, ImGuiDataType data_type, void* v, int components, float v_speed, const void* v_min, const void* v_max, const char* format, float power)
1946 PushID(label);
1960 TextUnformatted(label, FindRenderedTextEnd(label));
1965 bool ImGui::DragFloat(const char* label, float* v, float v_speed, float v_min, float v_max, const char* format, float power)
1967 return DragScalar(label, ImGuiDataType_Float, v, v_speed, &v_min, &v_max, format, power);
1970 bool ImGui::DragFloat2(const char* label, float v[2], float v_speed, float v_min, float v_max, const char* format, float power)
1972 return DragScalarN(label, ImGuiDataType_Float, v, 2, v_speed, &v_min, &v_max, format, power);
1975 bool ImGui::DragFloat3(const char* label, float v[3], float v_speed, float v_min, float v_max, const char* format, float power)
1977 return DragScalarN(label, ImGuiDataType_Float, v, 3, v_speed, &v_min, &v_max, format, power);
1980 bool ImGui::DragFloat4(const char* label, float v[4], float v_speed, float v_min, float v_max, const char* format, float power)
1982 return DragScalarN(label, ImGuiDataType_Float, v, 4, v_speed, &v_min, &v_max, format, power);
1985 bool ImGui::DragFloatRange2(const char* label, float* v_current_min, float* v_current_max, float v_speed, float v_min, float v_max, const char* format, const char* format_max, float power)
1992 PushID(label);
2003 TextUnformatted(label, FindRenderedTextEnd(label));
2010 bool ImGui::DragInt(const char* label, int* v, float v_speed, int v_min, int v_max, const char* format)
2012 return DragScalar(label, ImGuiDataType_S32, v, v_speed, &v_min, &v_max, format);
2015 bool ImGui::DragInt2(const char* label, int v[2], float v_speed, int v_min, int v_max, const char* format)
2017 return DragScalarN(label, ImGuiDataType_S32, v, 2, v_speed, &v_min, &v_max, format);
2020 bool ImGui::DragInt3(const char* label, int v[3], float v_speed, int v_min, int v_max, const char* format)
2022 return DragScalarN(label, ImGuiDataType_S32, v, 3, v_speed, &v_min, &v_max, format);
2025 bool ImGui::DragInt4(const char* label, int v[4], float v_speed, int v_min, int v_max, const char* format)
2027 return DragScalarN(label, ImGuiDataType_S32, v, 4, v_speed, &v_min, &v_max, format);
2030 bool ImGui::DragIntRange2(const char* label, int* v_current_min, int* v_current_max, float v_speed, int v_min, int v_max, const char* format, const char* format_max)
2037 PushID(label);
2048 TextUnformatted(label, FindRenderedTextEnd(label));
2297 bool ImGui::SliderScalar(const char* label, ImGuiDataType data_type, void* v, const void* v_min, const void* v_max, const char* format, float power)
2305 const ImGuiID id = window->GetID(label);
2308 const ImVec2 label_size = CalcTextSize(label, NULL, true);
2344 return InputScalarAsWidgetReplacement(frame_bb, id, label, data_type, v, format);
2367 RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label);
2369 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.ItemFlags);
2374 bool ImGui::SliderScalarN(const char* label, ImGuiDataType data_type, void* v, int components, const void* v_min, const void* v_max, const char* format, float power)
2383 PushID(label);
2397 TextUnformatted(label, FindRenderedTextEnd(label));
2402 bool ImGui::SliderFloat(const char* label, float* v, float v_min, float v_max, const char* format, float power)
2404 return SliderScalar(label, ImGuiDataType_Float, v, &v_min, &v_max, format, power);
2407 bool ImGui::SliderFloat2(const char* label, float v[2], float v_min, float v_max, const char* format, float power)
2409 return SliderScalarN(label, ImGuiDataType_Float, v, 2, &v_min, &v_max, format, power);
2412 bool ImGui::SliderFloat3(const char* label, float v[3], float v_min, float v_max, const char* format, float power)
2414 return SliderScalarN(label, ImGuiDataType_Float, v, 3, &v_min, &v_max, format, power);
2417 bool ImGui::SliderFloat4(const char* label, float v[4], float v_min, float v_max, const char* format, float power)
2419 return SliderScalarN(label, ImGuiDataType_Float, v, 4, &v_min, &v_max, format, power);
2422 bool ImGui::SliderAngle(const char* label, float* v_rad, float v_degrees_min, float v_degrees_max, const char* format)
2427 bool value_changed = SliderFloat(label, &v_deg, v_degrees_min, v_degrees_max, format, 1.0f);
2432 bool ImGui::SliderInt(const char* label, int* v, int v_min, int v_max, const char* format)
2434 return SliderScalar(label, ImGuiDataType_S32, v, &v_min, &v_max, format);
2437 bool ImGui::SliderInt2(const char* label, int v[2], int v_min, int v_max, const char* format)
2439 return SliderScalarN(label, ImGuiDataType_S32, v, 2, &v_min, &v_max, format);
2442 bool ImGui::SliderInt3(const char* label, int v[3], int v_min, int v_max, const char* format)
2444 return SliderScalarN(label, ImGuiDataType_S32, v, 3, &v_min, &v_max, format);
2447 bool ImGui::SliderInt4(const char* label, int v[4], int v_min, int v_max, const char* format)
2449 return SliderScalarN(label, ImGuiDataType_S32, v, 4, &v_min, &v_max, format);
2452 bool ImGui::VSliderScalar(const char* label, const ImVec2& size, ImGuiDataType data_type, void* v, const void* v_min, const void* v_max, const char* format, float power)
2460 const ImGuiID id = window->GetID(label);
2462 const ImVec2 label_size = CalcTextSize(label, NULL, true);
2507 RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label);
2512 bool ImGui::VSliderFloat(const char* label, const ImVec2& size, float* v, float v_min, float v_max, const char* format, float power)
2514 return VSliderScalar(label, size, ImGuiDataType_Float, v, &v_min, &v_max, format, power);
2517 bool ImGui::VSliderInt(const char* label, const ImVec2& size, int* v, int v_min, int v_max, const char* format)
2519 return VSliderScalar(label, size, ImGuiDataType_S32, v, &v_min, &v_max, format);
2617 bool ImGui::InputScalarAsWidgetReplacement(const ImRect& bb, ImGuiID id, const char* label, ImGuiDataType data_type, void* data_ptr, const char* format)
2632 bool value_changed = InputTextEx(label, data_buf, IM_ARRAYSIZE(data_buf), bb.GetSize(), flags);
2644 bool ImGui::InputScalar(const char* label, ImGuiDataType data_type, void* data_ptr, const void* step, const void* step_fast, const char* format, ImGuiInputTextFlags flags)
2670 PushID(label);
2672 if (InputText("", buf, IM_ARRAYSIZE(buf), flags)) // PushId(label) + "" gives us the expected ID from outside point of view
2693 TextUnformatted(label, FindRenderedTextEnd(label));
2700 if (InputText(label, buf, IM_ARRAYSIZE(buf), flags))
2707 bool ImGui::InputScalarN(const char* label, ImGuiDataType data_type, void* v, int components, const void* step, const void* step_fast, const char* format, ImGuiInputTextFlags flags)
2716 PushID(label);
2730 TextUnformatted(label, FindRenderedTextEnd(label));
2735 bool ImGui::InputFloat(const char* label, float* v, float step, float step_fast, const char* format, ImGuiInputTextFlags flags)
2738 return InputScalar(label, ImGuiDataType_Float, (void*)v, (void*)(step>0.0f ? &step : NULL), (void*)(step_fast>0.0f ? &step_fast : NULL), format, flags);
2741 bool ImGui::InputFloat2(const char* label, float v[2], const char* format, ImGuiInputTextFlags flags)
2743 return InputScalarN(label, ImGuiDataType_Float, v, 2, NULL, NULL, format, flags);
2746 bool ImGui::InputFloat3(const char* label, float v[3], const char* format, ImGuiInputTextFlags flags)
2748 return InputScalarN(label, ImGuiDataType_Float, v, 3, NULL, NULL, format, flags);
2751 bool ImGui::InputFloat4(const char* label, float v[4], const char* format, ImGuiInputTextFlags flags)
2753 return InputScalarN(label, ImGuiDataType_Float, v, 4, NULL, NULL, format, flags);
2758 bool ImGui::InputFloat(const char* label, float* v, float step, float step_fast, int decimal_precision, ImGuiInputTextFlags flags)
2763 return InputFloat(label, v, step, step_fast, format, flags);
2766 bool ImGui::InputFloat2(const char* label, float v[2], int decimal_precision, ImGuiInputTextFlags flags)
2771 return InputScalarN(label, ImGuiDataType_Float, v, 2, NULL, NULL, format, flags);
2774 bool ImGui::InputFloat3(const char* label, float v[3], int decimal_precision, ImGuiInputTextFlags flags)
2779 return InputScalarN(label, ImGuiDataType_Float, v, 3, NULL, NULL, format, flags);
2782 bool ImGui::InputFloat4(const char* label, float v[4], int decimal_precision, ImGuiInputTextFlags flags)
2787 return InputScalarN(label, ImGuiDataType_Float, v, 4, NULL, NULL, format, flags);
2791 bool ImGui::InputInt(const char* label, int* v, int step, int step_fast, ImGuiInputTextFlags flags)
2795 return InputScalar(label, ImGuiDataType_S32, (void*)v, (void*)(step>0 ? &step : NULL), (void*)(step_fast>0 ? &step_fast : NULL), format, flags);
2798 bool ImGui::InputInt2(const char* label, int v[2], ImGuiInputTextFlags flags)
2800 return InputScalarN(label, ImGuiDataType_S32, v, 2, NULL, NULL, "%d", flags);
2803 bool ImGui::InputInt3(const char* label, int v[3], ImGuiInputTextFlags flags)
2805 return InputScalarN(label, ImGuiDataType_S32, v, 3, NULL, NULL, "%d", flags);
2808 bool ImGui::InputInt4(const char* label, int v[4], ImGuiInputTextFlags flags)
2810 return InputScalarN(label, ImGuiDataType_S32, v, 4, NULL, NULL, "%d", flags);
2813 bool ImGui::InputDouble(const char* label, double* v, double step, double step_fast, const char* format, ImGuiInputTextFlags flags)
2816 return InputScalar(label, ImGuiDataType_Double, (void*)v, (void*)(step>0.0 ? &step : NULL), (void*)(step_fast>0.0 ? &step_fast : NULL), format, flags);
2827 bool ImGui::InputText(const char* label, char* buf, size_t buf_size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data)
2830 return InputTextEx(label, buf, (int)buf_size, ImVec2(0,0), flags, callback, user_data);
2833 bool ImGui::InputTextMultiline(const char* label, char* buf, size_t buf_size, const ImVec2& size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data)
2835 return InputTextEx(label, buf, (int)buf_size, size, flags | ImGuiInputTextFlags_Multiline, callback, user_data);
3129 bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2& size_arg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* callback_user_data)
3152 const ImGuiID id = window->GetID(label);
3153 const ImVec2 label_size = CalcTextSize(label, NULL, true);
3793 RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label);
3798 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.ItemFlags);
3820 bool ImGui::ColorEdit3(const char* label, float col[3], ImGuiColorEditFlags flags)
3822 return ColorEdit4(label, col, flags | ImGuiColorEditFlags_NoAlpha);
3828 bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags)
3839 const char* label_display_end = FindRenderedTextEnd(label);
3842 PushID(label);
3968 if (label != label_display_end)
3970 TextUnformatted(label, label_display_end);
3982 if (label != label_display_end && !(flags & ImGuiColorEditFlags_NoLabel))
3985 TextUnformatted(label, label_display_end);
4036 bool ImGui::ColorPicker3(const char* label, float col[3], ImGuiColorEditFlags flags)
4039 if (!ColorPicker4(label, col4, flags | ImGuiColorEditFlags_NoAlpha))
4102 bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags flags, const float* ref_col)
4111 PushID(label);
4238 const char* label_display_end = FindRenderedTextEnd(label);
4239 if (label != label_display_end)
4243 TextUnformatted(label, label_display_end);
4409 // 'desc_id' is not called 'label' because we don't display it next to the button, but only in the tooltip.
4645 bool ImGui::TreeNode(const char* label)
4650 return TreeNodeBehavior(window->GetID(label), 0, label, NULL);
4663 bool ImGui::TreeNodeEx(const char* label, ImGuiTreeNodeFlags flags)
4669 return TreeNodeBehavior(window->GetID(label), flags, label, NULL);
4759 bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* label, const char* label_end)
4771 label_end = FindRenderedTextEnd(label);
4772 const ImVec2 label_size = CalcTextSize(label, label_end, false);
4809 IMGUI_TEST_ENGINE_ITEM_INFO(window->DC.LastItemId, label, window->DC.ItemFlags | (is_leaf ? 0 : ImGuiItemStatusFlags_Openable) | (is_open ? ImGuiItemStatusFlags_Opened : 0));
4879 RenderTextClipped(text_pos, frame_bb.Max, label, label_end, &label_size);
4884 RenderTextClipped(text_pos, frame_bb.Max, label, label_end, &label_size);
4902 RenderText(text_pos, label, label_end, false);
4907 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.ItemFlags | (is_leaf ? 0 : ImGuiItemStatusFlags_Openable) | (is_open ? ImGuiItemStatusFlags_Opened : 0));
4960 // Horizontal distance preceding label when using TreeNode() or Bullet()
4977 // This is basically the same as calling TreeNodeEx(label, ImGuiTreeNodeFlags_CollapsingHeader). You can remove the _NoTreePushOnOpen flag if you want behavior closer to normal TreeNode().
4978 bool ImGui::CollapsingHeader(const char* label, ImGuiTreeNodeFlags flags)
4984 return TreeNodeBehavior(window->GetID(label), flags | ImGuiTreeNodeFlags_CollapsingHeader, label);
4987 bool ImGui::CollapsingHeader(const char* label, bool* p_open, ImGuiTreeNodeFlags flags)
4996 ImGuiID id = window->GetID(label);
4997 bool is_open = TreeNodeBehavior(id, flags | ImGuiTreeNodeFlags_CollapsingHeader | (p_open ? ImGuiTreeNodeFlags_AllowItemOverlap : 0), label);
5019 // Tip: pass a non-visible label (e.g. "##dummy") then you can use the space to draw other text or image.
5021 bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags flags, const ImVec2& size_arg)
5033 ImGuiID id = window->GetID(label);
5034 ImVec2 label_size = CalcTextSize(label, NULL, true);
5103 RenderTextClipped(bb_inner.Min, bb_inner.Max, label, NULL, &label_size, style.SelectableTextAlign, &bb);
5112 bool ImGui::Selectable(const char* label, bool* p_selected, ImGuiSelectableFlags flags, const ImVec2& size_arg)
5114 if (Selectable(label, *p_selected, flags, size_arg))
5131 // Helper to calculate the size of a listbox and display a label on the right.
5132 // Tip: To have a list filling the entire window width, PushItemWidth(-1) and pass an non-visible label e.g. "##empty"
5133 bool ImGui::ListBoxHeader(const char* label, const ImVec2& size_arg)
5140 const ImGuiID id = GetID(label);
5141 const ImVec2 label_size = CalcTextSize(label, NULL, true);
5159 RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label);
5166 bool ImGui::ListBoxHeader(const char* label, int items_count, int height_in_items)
5181 return ListBoxHeader(label, size);
5193 // Redeclare item size so that it includes the label (we have stored the full size in LastItemRect)
5201 bool ImGui::ListBox(const char* label, int* current_item, const char* const items[], int items_count, int height_items)
5203 const bool value_changed = ListBox(label, current_item, Items_ArrayGetter, (void*)items, items_count, height_items);
5207 bool ImGui::ListBox(const char* label, int* current_item, bool (*items_getter)(void*, int, const char**), void* data, int items_count, int height_in_items)
5209 if (!ListBoxHeader(label, items_count, height_in_items))
5249 void ImGui::PlotEx(ImGuiPlotType plot_type, const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, const char* overlay_text, float scale_min, float scale_max, ImVec2 frame_size)
5257 const ImGuiID id = window->GetID(label);
5259 const ImVec2 label_size = CalcTextSize(label, NULL, true);
5357 RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, inner_bb.Min.y), label);
5375 void ImGui::PlotLines(const char* label, const float* values, int values_count, int values_offset, const char* overlay_text, float scale_min, float scale_max, ImVec2 graph_size, int stride)
5378 PlotEx(ImGuiPlotType_Lines, label, &Plot_ArrayGetter, (void*)&data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size);
5381 void ImGui::PlotLines(const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, const char* overlay_text, float scale_min, float scale_max, ImVec2 graph_size)
5383 PlotEx(ImGuiPlotType_Lines, label, values_getter, data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size);
5386 void ImGui::PlotHistogram(const char* label, const float* values, int values_count, int values_offset, const char* overlay_text, float scale_min, float scale_max, ImVec2 graph_size, int stride)
5389 PlotEx(ImGuiPlotType_Histogram, label, &Plot_ArrayGetter, (void*)&data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size);
5392 void ImGui::PlotHistogram(const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, const char* overlay_text, float scale_min, float scale_max, ImVec2 graph_size)
5394 PlotEx(ImGuiPlotType_Histogram, label, values_getter, data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size);
5589 bool ImGui::BeginMenu(const char* label, bool enabled)
5597 const ImGuiID id = window->GetID(label);
5599 ImVec2 label_size = CalcTextSize(label, NULL, true);
5621 pressed = Selectable(label, menu_is_open, ImGuiSelectableFlags_NoHoldingActiveID | ImGuiSelectableFlags_PressedOnClick | ImGuiSelectableFlags_DontClosePopups | (!enabled ? ImGuiSelectableFlags_Disabled : 0), ImVec2(w, 0.0f));
5631 pressed = Selectable(label, menu_is_open, ImGuiSelectableFlags_NoHoldingActiveID | ImGuiSelectableFlags_PressedOnClick | ImGuiSelectableFlags_DontClosePopups | ImGuiSelectableFlags_DrawFillAvailWidth | (!enabled ? ImGuiSelectableFlags_Disabled : 0), ImVec2(w, 0.0f));
5702 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.ItemFlags | ImGuiItemStatusFlags_Openable | (menu_is_open ? ImGuiItemStatusFlags_Opened : 0));
5707 OpenPopup(label);
5713 OpenPopup(label);
5744 bool ImGui::MenuItem(const char* label, const char* shortcut, bool selected, bool enabled)
5753 ImVec2 label_size = CalcTextSize(label, NULL, true);
5764 pressed = Selectable(label, false, flags, ImVec2(w, 0.0f));
5773 pressed = Selectable(label, false, flags | ImGuiSelectableFlags_DrawFillAvailWidth, ImVec2(w, 0.0f));
5784 IMGUI_TEST_ENGINE_ITEM_INFO(window->DC.LastItemId, label, window->DC.ItemFlags | ImGuiItemStatusFlags_Checkable | (selected ? ImGuiItemStatusFlags_Checked : 0));
5788 bool ImGui::MenuItem(const char* label, const char* shortcut, bool* p_selected, bool enabled)
5790 if (MenuItem(label, shortcut, p_selected ? *p_selected : false, enabled))
5824 static ImU32 TabBarCalcTabID(ImGuiTabBar* tab_bar, const char* label);
6120 static ImU32 ImGui::TabBarCalcTabID(ImGuiTabBar* tab_bar, const char* label)
6124 ImGuiID id = ImHashStr(label, 0);
6131 return window->GetID(label);
6308 bool ImGui::BeginTabItem(const char* label, bool* p_open, ImGuiTabItemFlags flags)
6316 bool ret = TabItemEx(tab_bar, label, p_open, flags);
6320 g.CurrentWindow->IDStack.push_back(tab->ID); // We already hashed 'label' so push into the ID stack directly instead of doing another hash through PushID(label)
6339 bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open, ImGuiTabItemFlags flags)
6351 const ImGuiID id = TabBarCalcTabID(tab_bar, label);
6363 ImVec2 size = TabItemCalcSize(label, p_open != NULL);
6390 tab_bar->TabsNames.append(label, label + strlen(label) + 1);
6506 // Render tab label, process close button
6508 bool just_closed = TabItemLabelAndCloseButton(display_draw_list, bb, flags, tab_bar->FramePadding, label, id, close_button_id);
6523 SetTooltip("%.*s", (int)(FindRenderedTextEnd(label) - label), label);
6530 void ImGui::SetTabItemClosed(const char* label)
6538 ImGuiID tab_id = TabBarCalcTabID(tab_bar, label);
6543 ImVec2 ImGui::TabItemCalcSize(const char* label, bool has_close_button)
6546 ImVec2 label_size = CalcTextSize(label, NULL, true);
6580 // Render text label (with custom clipping) + Unsaved Document marker + Close Button logic
6582 bool ImGui::TabItemLabelAndCloseButton(ImDrawList* draw_list, const ImRect& bb, ImGuiTabItemFlags flags, ImVec2 frame_padding, const char* label, ImGuiID tab_id, ImGuiID close_button_id)
6585 ImVec2 label_size = CalcTextSize(label, NULL, true);
6589 // Render text label (with clipping + alpha gradient) + unsaved marker
6627 const char* label_display_end = FindRenderedTextEnd(label);
6633 float label_size_clipped_x = g.Font->CalcTextSizeA(g.FontSize, text_ellipsis_clip_bb.GetWidth() - ellipsis_width + 1.0f, 0.0f, label, label_display_end, &label_end).x;
6634 if (label_end == label && label_end < label_display_end) // Always display at least 1 character if there's no room for character + ellipsis
6636 label_end = label + ImTextCountUtf8BytesFromChar(label, label_display_end);
6637 label_size_clipped_x = g.Font->CalcTextSizeA(g.FontSize, FLT_MAX, 0.0f, label, label_end).x;
6639 while (label_end > label && ImCharIsBlankA(label_end[-1])) // Trim trailing space
6644 RenderTextClippedEx(draw_list, text_pixel_clip_bb.Min, text_pixel_clip_bb.Max, label, label_end, &label_size, ImVec2(0.0f, 0.0f));
6652 RenderTextClippedEx(draw_list, text_pixel_clip_bb.Min, text_pixel_clip_bb.Max, label, label_display_end, &label_size, ImVec2(0.0f, 0.0f));