Class UI::Button
#include <Button.h>
Inherits the following classes: ImguiItem
Public Attributes inherited from ImguiItem
See ImguiItem
| Type | Name |
|---|---|
| std::function< void(void)> | ButtonFunc = [] {}Callback function executed when button is pressed. |
| bool | fixed_size = falseWhether item size is fixed. |
| bool | is_activated = falseWhether 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 = falseWhether to display tag name. |
| int | uitm_id = -1Unique 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\_INPItem type identifier. |
| bool | using_size = falseWhether to apply custom size. |
Public Functions
| Type | Name |
|---|---|
| Button (const std::string & name) |
|
| virtual void | CallButtonFunc () override const Executes the button callback. |
| virtual void | RenderItem () override const Renders the item's UI . |
| ~Button () |
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 Functions Documentation
function Button
UI::Button::Button (
const std::string & name
)
function CallButtonFunc
Executes the button callback.
inline virtual void UI::Button::CallButtonFunc () override const
Only applicable to button items. Call this when button is pressed.
Note:
Override in button classes
Implements ImguiItem::CallButtonFunc
function RenderItem
Renders the item's UI .
virtual void UI::Button::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 ~Button
UI::Button::~Button ()
The documentation for this class was generated from the following file src/UI/item/Button.h