Skip to content

Class UI::ParaInput

ClassList > UI > ParaInput

  • #include <ParaInput.h>

Inherits the following classes: ImguiItem

Public Attributes

Type Name
bool is_value_changed
Parameters uitm_para

Public Attributes inherited from ImguiItem

See ImguiItem

Type Name
std::function< void(void)> ButtonFunc = [] {}
Callback function executed when button is pressed.
bool fixed_size = false
Whether item size is fixed.
bool is_activated = false
Whether item is currently active/focused.
bool is_button_pressed
Whether button is currently pressed.
std::string notagname = ""
Display name without tag prefix.
bool show_tag_name = false
Whether to display tag name.
int uitm_id = -1
Unique item ID within layer.
std::string uitm_name = ""
Item name for display and lookup.
ImVec2 uitm_size
Item size in pixels.
ImItemType uitm_type = NONE\_INP
Item type identifier.
bool using_size = false
Whether to apply custom size.

Public Functions

Type Name
virtual Parameters * GetPara () override
Returns pointer to parameter value.
ParaInput ()
ParaInput (ImItemType type, const std::string & name)
ParaInput (ImItemType type, const std::string & name, const glm::vec3 & _def)
ParaInput (ImItemType type, const std::string & name, const glm::vec4 & _def)
ParaInput (const Parameters & para)
ParaInput (ImItemType type, const std::string & name, float min, float max, float def=0.0f)
virtual void RenderItem () override const
Renders the item's UI .
void SetDefulValue (const T & _def)
void SetRange (float min, float max)
void SetType (ImItemType _type)
void SetType (ParaType _type)

Public Functions inherited from ImguiItem

See ImguiItem

Type Name
virtual void CallButtonFunc () const
Executes the button callback.
void DisableTagName () const
Disables tag name display.
void EnableTagName () const
Enables tag name display.
const char * GetCharName () const
Returns item name as C-string.
virtual Parameters * GetPara ()
Returns pointer to parameter value.
std::string GetTagName () const
Returns the tag name for display.
ImguiItem ()
Default constructor.
ImguiItem (ImItemType type, const std::string & name)
Constructs item with type and name.
void Rename (const std::string & name) const
Renames the item.
virtual void RenderItem () const
Renders the item's UI .
virtual void ResetBufferID (int id)
Updates texture/framebuffer ID for viewport items.
virtual void ResetSize (const ImVec2 & size)
Updates size for viewport items.
virtual void ResetUV (const ImVec2 & min, const ImVec2 & max)
Updates UV coordinates for viewport items.
virtual void SetArgsList (int length, ...) const
Sets variable argument list for text output items.
virtual void SetArgsList (int length, float * f1) const
Sets argument list from float array for text output.
virtual ~ImguiItem ()
Virtual destructor for proper cleanup of derived classes.

Public Static Functions

Type Name
ImItemType ParseParamType (ParaType _type)
bool RenderParam (Parameters * para_param, const char * _ID, ImItemType _type=FLOAT_INP, float _size=1.0f)
bool RenderParam (Parameters * para_param, const char * _ID, float _size, float _length)
bool RenderParam (Parameters * para_param, const char * _name, const char * _ID, ImItemType _type=FLOAT_INP, bool _is_movable=false, float _size=1.0f, float _length=10.0f)

Public Attributes Documentation

variable is_value_changed

bool UI::ParaInput::is_value_changed;

variable uitm_para

Parameters UI::ParaInput::uitm_para;

Public Functions Documentation

function GetPara

Returns pointer to parameter value.

virtual Parameters * UI::ParaInput::GetPara () override

Only applicable to parameter input items (sliders, text inputs, etc.).

Returns:

Pointer to Parameters, or nullptr if item is not a parameter input

Note:

Override in parameter input classes

Implements ImguiItem::GetPara


function ParaInput [1/6]

UI::ParaInput::ParaInput () 

function ParaInput [2/6]

UI::ParaInput::ParaInput (
    ImItemType type,
    const std::string & name
) 

function ParaInput [3/6]

UI::ParaInput::ParaInput (
    ImItemType type,
    const std::string & name,
    const glm::vec3 & _def
) 

function ParaInput [4/6]

UI::ParaInput::ParaInput (
    ImItemType type,
    const std::string & name,
    const glm::vec4 & _def
) 

function ParaInput [5/6]

UI::ParaInput::ParaInput (
    const Parameters & para
) 

function ParaInput [6/6]

UI::ParaInput::ParaInput (
    ImItemType type,
    const std::string & name,
    float min,
    float max,
    float def=0.0f
) 

function RenderItem

Renders the item's UI .

virtual void UI::ParaInput::RenderItem () override const

Override this to implement item-specific rendering logic using ImGui calls. Called every frame when parent layer is visible.

Note:

Default implementation logs error. All derived classes must override.

Implements ImguiItem::RenderItem


function SetDefulValue

template<typename T>
void UI::ParaInput::SetDefulValue (
    const T & _def
) 

function SetRange

inline void UI::ParaInput::SetRange (
    float min,
    float max
) 

function SetType [1/2]

void UI::ParaInput::SetType (
    ImItemType _type
) 

function SetType [2/2]

void UI::ParaInput::SetType (
    ParaType _type
) 

Public Static Functions Documentation

function ParseParamType

static ImItemType UI::ParaInput::ParseParamType (
    ParaType _type
) 

function RenderParam [1/3]

static bool UI::ParaInput::RenderParam (
    Parameters * para_param,
    const char * _ID,
    ImItemType _type=FLOAT_INP,
    float _size=1.0f
) 

function RenderParam [2/3]

static bool UI::ParaInput::RenderParam (
    Parameters * para_param,
    const char * _ID,
    float _size,
    float _length
) 

function RenderParam [3/3]

static bool UI::ParaInput::RenderParam (
    Parameters * para_param,
    const char * _name,
    const char * _ID,
    ImItemType _type=FLOAT_INP,
    bool _is_movable=false,
    float _size=1.0f,
    float _length=10.0f
) 


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