Skip to content

File ImguiItem.h

FileList > src > UI > ImguiItem.h

Go to the source code of this file

Base class for reusable UI widgets within layers.More...

  • #include "ImGui/imgui.h"
  • #include "Parameters.h"
  • #include <iostream>
  • #include <optional>
  • #include <functional>
  • #include <type_traits>
  • #include <cstdarg>
  • #include "macros.h"
  • #include "operator.h"

Namespaces

Type Name
namespace Item
Utility functions for ImGui item operations.

Classes

Type Name
class ImguiItem
Base class for all UI widgets (buttons, sliders, inputs, etc.).

Public Types

Type Name
enum ImItemType
Widget type identifiers for runtime type checking.

Detailed Description

ImguiItem provides the foundation for all UI widgets (buttons, sliders, text inputs, viewports, etc.) that can be embedded in ImguiLayer panels. Items are self-contained UI elements with consistent interface for rendering and value access.

Widget Types: * Input: Text, Float, Int, RGB/RGBA, Vec2/Vec3/Vec4 * Button: Clickable buttons with callbacks * Output: Text display, Image/Texture display, Viewport * Selection: Dropdown/combo boxes

Architecture: * Items are owned by their parent ImguiLayer * Each item has a unique name and ID within its layer * Items render themselves via RenderItem() * Parameter items expose value via GetPara() * Button items execute callbacks via CallButtonFunc()

Note:

UI Layer: Items are presentation-only and must not directly mutate Scene

Public Types Documentation

enum ImItemType

Widget type identifiers for runtime type checking.

enum ImItemType {
    NONE_INP,
    TEXT_INP,
    FLOAT_INP,
    INT_INP,
    RGB_INP,
    RGBA_INP,
    VEC2_INP,
    VEC3_INP,
    VEC4_INP,
    BUTTON_INP,
    BOOL_INP,
    SELECT_INP,
    IMAGE_OUTP,
    TEXT_OUTP,
    VIEWPORT_OUTP
};

Each item type has a corresponding enum value. Used for quick type identification without RTTI.



The documentation for this class was generated from the following file src/UI/ImguiItem.h