Lines Matching defs:label

341 void ImGui::LabelText(const char* label, const char* fmt, ...)
345 LabelTextV(label, fmt, args);
349 // Add a label+text combo aligned to other label+value widgets
350 void ImGui::LabelTextV(const char* label, const char* fmt, va_list args)
363 const ImVec2 label_size = CalcTextSize(label, NULL, true);
375 RenderText(ImVec2(value_bb.Max.x + style.ItemInnerSpacing.x, value_bb.Min.y + style.FramePadding.y), label);
670 bool ImGui::ButtonEx(const char* label, const ImVec2& size_arg, ImGuiButtonFlags flags)
678 const ImGuiID id = window->GetID(label);
679 const ImVec2 label_size = CalcTextSize(label, NULL, true);
704 RenderTextClipped(bb.Min + style.FramePadding, bb.Max - style.FramePadding, label, NULL, &label_size, style.ButtonTextAlign, &bb);
710 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, g.LastItemData.StatusFlags);
714 bool ImGui::Button(const char* label, const ImVec2& size_arg)
716 return ButtonEx(label, size_arg, ImGuiButtonFlags_None);
720 bool ImGui::SmallButton(const char* label)
725 bool pressed = ButtonEx(label, ImVec2(0, 0), ImGuiButtonFlags_AlignTextBaseLine);
738 // Cannot use zero-size for InvisibleButton(). Unlike Button() there is not way to fallback using the label size.
1070 bool ImGui::Checkbox(const char* label, bool* v)
1078 const ImGuiID id = window->GetID(label);
1079 const ImVec2 label_size = CalcTextSize(label, NULL, true);
1087 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, g.LastItemData.StatusFlags | ImGuiItemStatusFlags_Checkable | (*v ? ImGuiItemStatusFlags_Checked : 0));
1121 RenderText(label_pos, label);
1123 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, g.LastItemData.StatusFlags | ImGuiItemStatusFlags_Checkable | (*v ? ImGuiItemStatusFlags_Checked : 0));
1128 bool ImGui::CheckboxFlagsT(const char* label, T* flags, T flags_value)
1138 pressed = Checkbox(label, &all_on);
1143 pressed = Checkbox(label, &all_on);
1156 bool ImGui::CheckboxFlags(const char* label, int* flags, int flags_value)
1158 return CheckboxFlagsT(label, flags, flags_value);
1161 bool ImGui::CheckboxFlags(const char* label, unsigned int* flags, unsigned int flags_value)
1163 return CheckboxFlagsT(label, flags, flags_value);
1166 bool ImGui::CheckboxFlags(const char* label, ImS64* flags, ImS64 flags_value)
1168 return CheckboxFlagsT(label, flags, flags_value);
1171 bool ImGui::CheckboxFlags(const char* label, ImU64* flags, ImU64 flags_value)
1173 return CheckboxFlagsT(label, flags, flags_value);
1176 bool ImGui::RadioButton(const char* label, bool active)
1184 const ImGuiID id = window->GetID(label);
1185 const ImVec2 label_size = CalcTextSize(label, NULL, true);
1223 RenderText(label_pos, label);
1225 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, g.LastItemData.StatusFlags);
1229 // FIXME: This would work nicely if it was a public template, e.g. 'template<T> RadioButton(const char* label, T* v, T v_button)', but I'm not sure how we would expose it..
1230 bool ImGui::RadioButton(const char* label, int* v, int v_button)
1232 const bool pressed = RadioButton(label, *v == v_button);
1560 bool ImGui::BeginCombo(const char* label, const char* preview_value, ImGuiComboFlags flags)
1571 const ImGuiID id = window->GetID(label);
1575 const ImVec2 label_size = CalcTextSize(label, NULL, true);
1618 // Render preview and label
1626 RenderText(ImVec2(bb.Max.x + style.ItemInnerSpacing.x, bb.Min.y + style.FramePadding.y), label);
1781 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)
1794 if (!BeginCombo(label, preview_value, ImGuiComboFlags_None))
1826 bool ImGui::Combo(const char* label, int* current_item, const char* const items[], int items_count, int height_in_items)
1828 const bool value_changed = Combo(label, current_item, Items_ArrayGetter, (void*)items, items_count, height_in_items);
1833 bool ImGui::Combo(const char* label, int* current_item, const char* items_separated_by_zeros, int height_in_items)
1842 bool value_changed = Combo(label, current_item, Items_SingleStringGetter, (void*)items_separated_by_zeros, items_count, height_in_items);
2379 bool ImGui::DragScalar(const char* label, ImGuiDataType data_type, void* p_data, float v_speed, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags)
2387 const ImGuiID id = window->GetID(label);
2390 const ImVec2 label_size = CalcTextSize(label, NULL, true);
2438 return TempInputScalar(frame_bb, id, label, data_type, p_data, format, is_clamp_input ? p_min : NULL, is_clamp_input ? p_max : NULL);
2459 RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label);
2461 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, g.LastItemData.StatusFlags);
2465 bool ImGui::DragScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, float v_speed, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags)
2474 PushID(label);
2489 const char* label_end = FindRenderedTextEnd(label);
2490 if (label != label_end)
2493 TextEx(label, label_end);
2500 bool ImGui::DragFloat(const char* label, float* v, float v_speed, float v_min, float v_max, const char* format, ImGuiSliderFlags flags)
2502 return DragScalar(label, ImGuiDataType_Float, v, v_speed, &v_min, &v_max, format, flags);
2505 bool ImGui::DragFloat2(const char* label, float v[2], float v_speed, float v_min, float v_max, const char* format, ImGuiSliderFlags flags)
2507 return DragScalarN(label, ImGuiDataType_Float, v, 2, v_speed, &v_min, &v_max, format, flags);
2510 bool ImGui::DragFloat3(const char* label, float v[3], float v_speed, float v_min, float v_max, const char* format, ImGuiSliderFlags flags)
2512 return DragScalarN(label, ImGuiDataType_Float, v, 3, v_speed, &v_min, &v_max, format, flags);
2515 bool ImGui::DragFloat4(const char* label, float v[4], float v_speed, float v_min, float v_max, const char* format, ImGuiSliderFlags flags)
2517 return DragScalarN(label, ImGuiDataType_Float, v, 4, v_speed, &v_min, &v_max, format, flags);
2521 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, ImGuiSliderFlags flags)
2528 PushID(label);
2546 TextEx(label, FindRenderedTextEnd(label));
2554 bool ImGui::DragInt(const char* label, int* v, float v_speed, int v_min, int v_max, const char* format, ImGuiSliderFlags flags)
2556 return DragScalar(label, ImGuiDataType_S32, v, v_speed, &v_min, &v_max, format, flags);
2559 bool ImGui::DragInt2(const char* label, int v[2], float v_speed, int v_min, int v_max, const char* format, ImGuiSliderFlags flags)
2561 return DragScalarN(label, ImGuiDataType_S32, v, 2, v_speed, &v_min, &v_max, format, flags);
2564 bool ImGui::DragInt3(const char* label, int v[3], float v_speed, int v_min, int v_max, const char* format, ImGuiSliderFlags flags)
2566 return DragScalarN(label, ImGuiDataType_S32, v, 3, v_speed, &v_min, &v_max, format, flags);
2569 bool ImGui::DragInt4(const char* label, int v[4], float v_speed, int v_min, int v_max, const char* format, ImGuiSliderFlags flags)
2571 return DragScalarN(label, ImGuiDataType_S32, v, 4, v_speed, &v_min, &v_max, format, flags);
2575 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, ImGuiSliderFlags flags)
2582 PushID(label);
2600 TextEx(label, FindRenderedTextEnd(label));
2610 bool ImGui::DragScalar(const char* label, ImGuiDataType data_type, void* p_data, float v_speed, const void* p_min, const void* p_max, const char* format, float power)
2619 return DragScalar(label, data_type, p_data, v_speed, p_min, p_max, format, drag_flags);
2622 bool ImGui::DragScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, float v_speed, const void* p_min, const void* p_max, const char* format, float power)
2631 return DragScalarN(label, data_type, p_data, components, v_speed, p_min, p_max, format, drag_flags);
2997 bool ImGui::SliderScalar(const char* label, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags)
3005 const ImGuiID id = window->GetID(label);
3008 const ImVec2 label_size = CalcTextSize(label, NULL, true);
3045 return TempInputScalar(frame_bb, id, label, data_type, p_data, format, is_clamp_input ? p_min : NULL, is_clamp_input ? p_max : NULL);
3071 RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label);
3073 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, g.LastItemData.StatusFlags);
3078 bool ImGui::SliderScalarN(const char* label, ImGuiDataType data_type, void* v, int components, const void* v_min, const void* v_max, const char* format, ImGuiSliderFlags flags)
3087 PushID(label);
3102 const char* label_end = FindRenderedTextEnd(label);
3103 if (label != label_end)
3106 TextEx(label, label_end);
3113 bool ImGui::SliderFloat(const char* label, float* v, float v_min, float v_max, const char* format, ImGuiSliderFlags flags)
3115 return SliderScalar(label, ImGuiDataType_Float, v, &v_min, &v_max, format, flags);
3118 bool ImGui::SliderFloat2(const char* label, float v[2], float v_min, float v_max, const char* format, ImGuiSliderFlags flags)
3120 return SliderScalarN(label, ImGuiDataType_Float, v, 2, &v_min, &v_max, format, flags);
3123 bool ImGui::SliderFloat3(const char* label, float v[3], float v_min, float v_max, const char* format, ImGuiSliderFlags flags)
3125 return SliderScalarN(label, ImGuiDataType_Float, v, 3, &v_min, &v_max, format, flags);
3128 bool ImGui::SliderFloat4(const char* label, float v[4], float v_min, float v_max, const char* format, ImGuiSliderFlags flags)
3130 return SliderScalarN(label, ImGuiDataType_Float, v, 4, &v_min, &v_max, format, flags);
3133 bool ImGui::SliderAngle(const char* label, float* v_rad, float v_degrees_min, float v_degrees_max, const char* format, ImGuiSliderFlags flags)
3138 bool value_changed = SliderFloat(label, &v_deg, v_degrees_min, v_degrees_max, format, flags);
3143 bool ImGui::SliderInt(const char* label, int* v, int v_min, int v_max, const char* format, ImGuiSliderFlags flags)
3145 return SliderScalar(label, ImGuiDataType_S32, v, &v_min, &v_max, format, flags);
3148 bool ImGui::SliderInt2(const char* label, int v[2], int v_min, int v_max, const char* format, ImGuiSliderFlags flags)
3150 return SliderScalarN(label, ImGuiDataType_S32, v, 2, &v_min, &v_max, format, flags);
3153 bool ImGui::SliderInt3(const char* label, int v[3], int v_min, int v_max, const char* format, ImGuiSliderFlags flags)
3155 return SliderScalarN(label, ImGuiDataType_S32, v, 3, &v_min, &v_max, format, flags);
3158 bool ImGui::SliderInt4(const char* label, int v[4], int v_min, int v_max, const char* format, ImGuiSliderFlags flags)
3160 return SliderScalarN(label, ImGuiDataType_S32, v, 4, &v_min, &v_max, format, flags);
3163 bool ImGui::VSliderScalar(const char* label, const ImVec2& size, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags)
3171 const ImGuiID id = window->GetID(label);
3173 const ImVec2 label_size = CalcTextSize(label, NULL, true);
3217 RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label);
3222 bool ImGui::VSliderFloat(const char* label, const ImVec2& size, float* v, float v_min, float v_max, const char* format, ImGuiSliderFlags flags)
3224 return VSliderScalar(label, size, ImGuiDataType_Float, v, &v_min, &v_max, format, flags);
3227 bool ImGui::VSliderInt(const char* label, const ImVec2& size, int* v, int v_min, int v_max, const char* format, ImGuiSliderFlags flags)
3229 return VSliderScalar(label, size, ImGuiDataType_S32, v, &v_min, &v_max, format, flags);
3235 bool ImGui::SliderScalar(const char* label, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format, float power)
3243 return SliderScalar(label, data_type, p_data, p_min, p_max, format, slider_flags);
3246 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)
3254 return SliderScalarN(label, data_type, v, components, v_min, v_max, format, slider_flags);
3354 bool ImGui::TempInputText(const ImRect& bb, ImGuiID id, const char* label, char* buf, int buf_size, ImGuiInputTextFlags flags)
3364 bool value_changed = InputTextEx(label, NULL, buf, buf_size, bb.GetSize(), flags | ImGuiInputTextFlags_MergedItem);
3377 bool ImGui::TempInputScalar(const ImRect& bb, ImGuiID id, const char* label, ImGuiDataType data_type, void* p_data, const char* format, const void* p_clamp_min, const void* p_clamp_max)
3390 if (TempInputText(bb, id, label, data_buf, IM_ARRAYSIZE(data_buf), flags))
3416 bool ImGui::InputScalar(const char* label, ImGuiDataType data_type, void* p_data, const void* p_step, const void* p_step_fast, const char* format, ImGuiInputTextFlags flags)
3442 PushID(label);
3444 if (InputText("", buf, IM_ARRAYSIZE(buf), flags)) // PushId(label) + "" gives us the expected ID from outside point of view
3468 const char* label_end = FindRenderedTextEnd(label);
3469 if (label != label_end)
3472 TextEx(label, label_end);
3481 if (InputText(label, buf, IM_ARRAYSIZE(buf), flags))
3490 bool ImGui::InputScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, const void* p_step, const void* p_step_fast, const char* format, ImGuiInputTextFlags flags)
3499 PushID(label);
3514 const char* label_end = FindRenderedTextEnd(label);
3515 if (label != label_end)
3518 TextEx(label, label_end);
3525 bool ImGui::InputFloat(const char* label, float* v, float step, float step_fast, const char* format, ImGuiInputTextFlags flags)
3528 return InputScalar(label, ImGuiDataType_Float, (void*)v, (void*)(step > 0.0f ? &step : NULL), (void*)(step_fast > 0.0f ? &step_fast : NULL), format, flags);
3531 bool ImGui::InputFloat2(const char* label, float v[2], const char* format, ImGuiInputTextFlags flags)
3533 return InputScalarN(label, ImGuiDataType_Float, v, 2, NULL, NULL, format, flags);
3536 bool ImGui::InputFloat3(const char* label, float v[3], const char* format, ImGuiInputTextFlags flags)
3538 return InputScalarN(label, ImGuiDataType_Float, v, 3, NULL, NULL, format, flags);
3541 bool ImGui::InputFloat4(const char* label, float v[4], const char* format, ImGuiInputTextFlags flags)
3543 return InputScalarN(label, ImGuiDataType_Float, v, 4, NULL, NULL, format, flags);
3546 bool ImGui::InputInt(const char* label, int* v, int step, int step_fast, ImGuiInputTextFlags flags)
3550 return InputScalar(label, ImGuiDataType_S32, (void*)v, (void*)(step > 0 ? &step : NULL), (void*)(step_fast > 0 ? &step_fast : NULL), format, flags);
3553 bool ImGui::InputInt2(const char* label, int v[2], ImGuiInputTextFlags flags)
3555 return InputScalarN(label, ImGuiDataType_S32, v, 2, NULL, NULL, "%d", flags);
3558 bool ImGui::InputInt3(const char* label, int v[3], ImGuiInputTextFlags flags)
3560 return InputScalarN(label, ImGuiDataType_S32, v, 3, NULL, NULL, "%d", flags);
3563 bool ImGui::InputInt4(const char* label, int v[4], ImGuiInputTextFlags flags)
3565 return InputScalarN(label, ImGuiDataType_S32, v, 4, NULL, NULL, "%d", flags);
3568 bool ImGui::InputDouble(const char* label, double* v, double step, double step_fast, const char* format, ImGuiInputTextFlags flags)
3571 return InputScalar(label, ImGuiDataType_Double, (void*)v, (void*)(step > 0.0 ? &step : NULL), (void*)(step_fast > 0.0 ? &step_fast : NULL), format, flags);
3583 bool ImGui::InputText(const char* label, char* buf, size_t buf_size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data)
3586 return InputTextEx(label, NULL, buf, (int)buf_size, ImVec2(0, 0), flags, callback, user_data);
3589 bool ImGui::InputTextMultiline(const char* label, char* buf, size_t buf_size, const ImVec2& size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data)
3591 return InputTextEx(label, NULL, buf, (int)buf_size, size, flags | ImGuiInputTextFlags_Multiline, callback, user_data);
3594 bool ImGui::InputTextWithHint(const char* label, const char* hint, char* buf, size_t buf_size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data)
3597 return InputTextEx(label, hint, buf, (int)buf_size, ImVec2(0, 0), flags, callback, user_data);
3944 bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_size, const ImVec2& size_arg, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* callback_user_data)
3969 const ImGuiID id = window->GetID(label);
3970 const ImVec2 label_size = CalcTextSize(label, NULL, true);
3992 // We reproduce the contents of BeginChildFrame() in order to provide 'label' so our window internal data are easier to read/debug.
3997 bool child_visible = BeginChildEx(label, id, frame_bb.GetSize(), true, ImGuiWindowFlags_NoMove);
4520 //IMGUI_DEBUG_LOG("InputText(\"%s\"): apply_new_text length %d\n", label, apply_new_text_length);
4757 RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label);
4762 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, g.LastItemData.StatusFlags);
4784 bool ImGui::ColorEdit3(const char* label, float col[3], ImGuiColorEditFlags flags)
4786 return ColorEdit4(label, col, flags | ImGuiColorEditFlags_NoAlpha);
4816 bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags)
4828 const char* label_display_end = FindRenderedTextEnd(label);
4832 PushID(label);
4972 if (label != label_display_end)
4974 TextEx(label, label_display_end);
4985 if (label != label_display_end && !(flags & ImGuiColorEditFlags_NoLabel))
4989 TextEx(label, label_display_end);
5050 bool ImGui::ColorPicker3(const char* label, float col[3], ImGuiColorEditFlags flags)
5053 if (!ColorPicker4(label, col4, flags | ImGuiColorEditFlags_NoAlpha))
5073 bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags flags, const float* ref_col)
5087 PushID(label);
5231 const char* label_display_end = FindRenderedTextEnd(label);
5232 if (label != label_display_end)
5236 TextEx(label, label_display_end);
5442 // 'desc_id' is not called 'label' because we don't display it next to the button, but only in the tooltip.
5703 bool ImGui::TreeNode(const char* label)
5708 return TreeNodeBehavior(window->GetID(label), 0, label, NULL);
5721 bool ImGui::TreeNodeEx(const char* label, ImGuiTreeNodeFlags flags)
5727 return TreeNodeBehavior(window->GetID(label), flags, label, NULL);
5816 bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* label, const char* label_end)
5828 label_end = FindRenderedTextEnd(label);
5829 const ImVec2 label_size = CalcTextSize(label, label_end, false);
5873 IMGUI_TEST_ENGINE_ITEM_INFO(g.LastItemData.ID, label, g.LastItemData.StatusFlags | (is_leaf ? 0 : ImGuiItemStatusFlags_Openable) | (is_open ? ImGuiItemStatusFlags_Opened : 0));
5894 // - Single-click on label = Toggle on MouseUp (default, when _OpenOnArrow=0)
5897 // - Double-click on label = Toggle on MouseDoubleClick (when _OpenOnDoubleClick=1)
5977 RenderTextClipped(text_pos, frame_bb.Max, label, label_end, &label_size);
5994 RenderText(text_pos, label, label_end, false);
5999 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, g.LastItemData.StatusFlags | (is_leaf ? 0 : ImGuiItemStatusFlags_Openable) | (is_open ? ImGuiItemStatusFlags_Opened : 0));
6050 // Horizontal distance preceding label when using TreeNode() or Bullet()
6069 // 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().
6070 bool ImGui::CollapsingHeader(const char* label, ImGuiTreeNodeFlags flags)
6076 return TreeNodeBehavior(window->GetID(label), flags | ImGuiTreeNodeFlags_CollapsingHeader, label);
6083 bool ImGui::CollapsingHeader(const char* label, bool* p_visible, ImGuiTreeNodeFlags flags)
6092 ImGuiID id = window->GetID(label);
6096 bool is_open = TreeNodeBehavior(id, flags, label);
6122 // Tip: pass a non-visible label (e.g. "##hello") then you can use the space to draw other text or image.
6126 bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags flags, const ImVec2& size_arg)
6135 // Submit label or explicit size to ItemSize(), whereas ItemAdd() will submit a larger/spanning rectangle.
6136 ImGuiID id = window->GetID(label);
6137 ImVec2 label_size = CalcTextSize(label, NULL, true);
6258 RenderTextClipped(text_min, text_max, label, NULL, &label_size, style.SelectableTextAlign, &bb);
6267 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, g.LastItemData.StatusFlags);
6271 bool ImGui::Selectable(const char* label, bool* p_selected, ImGuiSelectableFlags flags, const ImVec2& size_arg)
6273 if (Selectable(label, *p_selected, flags, size_arg))
6289 // Tip: To have a list filling the entire window width, use size.x = -FLT_MIN and pass an non-visible label e.g. "##empty"
6291 bool ImGui::BeginListBox(const char* label, const ImVec2& size_arg)
6299 const ImGuiID id = GetID(label);
6300 const ImVec2 label_size = CalcTextSize(label, NULL, true);
6322 RenderText(label_pos, label);
6332 bool ImGui::ListBoxHeader(const char* label, int items_count, int height_in_items)
6340 return BeginListBox(label, size);
6352 EndGroup(); // This is only required to be able to do IsItemXXX query on the whole ListBox including label
6355 bool ImGui::ListBox(const char* label, int* current_item, const char* const items[], int items_count, int height_items)
6357 const bool value_changed = ListBox(label, current_item, Items_ArrayGetter, (void*)items, items_count, height_items);
6363 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)
6373 if (!BeginListBox(label, size))
6420 int 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)
6428 const ImGuiID id = window->GetID(label);
6430 const ImVec2 label_size = CalcTextSize(label, NULL, true);
6531 RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, inner_bb.Min.y), label);
6553 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)
6556 PlotEx(ImGuiPlotType_Lines, label, &Plot_ArrayGetter, (void*)&data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size);
6559 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)
6561 PlotEx(ImGuiPlotType_Lines, label, values_getter, data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size);
6564 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)
6567 PlotEx(ImGuiPlotType_Histogram, label, &Plot_ArrayGetter, (void*)&data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size);
6570 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)
6572 PlotEx(ImGuiPlotType_Histogram, label, values_getter, data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size);
6813 bool ImGui::BeginMenuEx(const char* label, const char* icon, bool enabled)
6821 const ImGuiID id = window->GetID(label);
6844 ImVec2 label_size = CalcTextSize(label, NULL, true);
6855 PushID(label);
6870 RenderText(text_pos, label);
6886 RenderText(text_pos, label);
6958 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, g.LastItemData.StatusFlags | ImGuiItemStatusFlags_Openable | (menu_is_open ? ImGuiItemStatusFlags_Opened : 0));
6964 OpenPopup(label);
6970 OpenPopup(label);
6985 bool ImGui::BeginMenu(const char* label, bool enabled)
6987 return BeginMenuEx(label, NULL, enabled);
7007 bool ImGui::MenuItemEx(const char* label, const char* icon, const char* shortcut, bool selected, bool enabled)
7016 ImVec2 label_size = CalcTextSize(label, NULL, true);
7021 PushID(label);
7036 RenderText(text_pos, label);
7050 RenderText(pos + ImVec2(offsets->OffsetLabel, 0.0f), label);
7062 IMGUI_TEST_ENGINE_ITEM_INFO(g.LastItemData.ID, label, g.LastItemData.StatusFlags | ImGuiItemStatusFlags_Checkable | (selected ? ImGuiItemStatusFlags_Checked : 0));
7070 bool ImGui::MenuItem(const char* label, const char* shortcut, bool selected, bool enabled)
7072 return MenuItemEx(label, NULL, shortcut, selected, enabled);
7075 bool ImGui::MenuItem(const char* label, const char* shortcut, bool* p_selected, bool enabled)
7077 if (MenuItemEx(label, NULL, shortcut, p_selected ? *p_selected : false, enabled))
7117 static ImU32 TabBarCalcTabID(ImGuiTabBar* tab_bar, const char* label);
7513 static ImU32 ImGui::TabBarCalcTabID(ImGuiTabBar* tab_bar, const char* label)
7517 ImGuiID id = ImHashStr(label);
7524 return window->GetID(label);
7804 bool ImGui::BeginTabItem(const char* label, bool* p_open, ImGuiTabItemFlags flags)
7819 bool ret = TabItemEx(tab_bar, label, p_open, flags);
7823 PushOverrideID(tab->ID); // We already hashed 'label' so push into the ID stack directly instead of doing another hash through PushID(label)
7847 bool ImGui::TabItemButton(const char* label, ImGuiTabItemFlags flags)
7860 return TabItemEx(tab_bar, label, NULL, flags | ImGuiTabItemFlags_Button | ImGuiTabItemFlags_NoReorder);
7863 bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open, ImGuiTabItemFlags flags)
7875 const ImGuiID id = TabBarCalcTabID(tab_bar, label);
7879 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, g.LastItemData.StatusFlags);
7896 ImVec2 size = TabItemCalcSize(label, p_open != NULL);
7923 tab_bar->TabsNames.append(label, label + strlen(label) + 1);
8043 // Render tab label, process close button
8047 TabItemLabelAndCloseButton(display_draw_list, bb, flags, tab_bar->FramePadding, label, id, close_button_id, tab_contents_visible, &just_closed, &text_clipped);
8066 SetTooltip("%.*s", (int)(FindRenderedTextEnd(label) - label), label);
8077 void ImGui::SetTabItemClosed(const char* label)
8084 ImGuiID tab_id = TabBarCalcTabID(tab_bar, label);
8090 ImVec2 ImGui::TabItemCalcSize(const char* label, bool has_close_button)
8093 ImVec2 label_size = CalcTextSize(label, NULL, true);
8127 // Render text label (with custom clipping) + Unsaved Document marker + Close Button logic
8129 void ImGui::TabItemLabelAndCloseButton(ImDrawList* draw_list, const ImRect& bb, ImGuiTabItemFlags flags, ImVec2 frame_padding, const char* label, ImGuiID tab_id, ImGuiID close_button_id, bool is_contents_visible, bool* out_just_closed, bool* out_text_clipped)
8132 ImVec2 label_size = CalcTextSize(label, NULL, true);
8150 // Render text label (with clipping + alpha gradient) + unsaved marker
8206 RenderTextEllipsis(draw_list, text_ellipsis_clip_bb.Min, text_ellipsis_clip_bb.Max, text_pixel_clip_bb.Max.x, ellipsis_max_x, label, NULL, &label_size);