Skip to content

Class UI::TextureViewer

ClassList > UI > TextureViewer

  • #include <TextureViewer.h>

Inherits the following classes: ImguiItem

Public Attributes

Type Name
bool show_size = { false }
ImVec2 uv_max
ImVec2 uv_min
ImVec2 vp_size

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 void RenderItem () override const
Renders the item's UI .
virtual void ResetBufferID (int id) override
Updates texture/framebuffer ID for viewport items.
virtual void ResetSize (const ImVec2 & size) override
Updates size for viewport items.
virtual void ResetUV (const ImVec2 & min, const ImVec2 & max) override
Updates UV coordinates for viewport items.
TextureViewer ()
TextureViewer (const std::string & name, int texID)
TextureViewer (const std::string & name, int texID, const ImVec2 & vp_size)
~TextureViewer ()

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 Attributes Documentation

variable show_size

bool UI::TextureViewer::show_size;

variable uv_max

ImVec2 UI::TextureViewer::uv_max;

variable uv_min

ImVec2 UI::TextureViewer::uv_min;

variable vp_size

ImVec2 UI::TextureViewer::vp_size;

Public Functions Documentation

function RenderItem

Renders the item's UI .

virtual void UI::TextureViewer::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 ResetBufferID

Updates texture/framebuffer ID for viewport items.

virtual void UI::TextureViewer::ResetBufferID (
    int id
) override

Parameters:

  • id OpenGL texture/framebuffer ID to display

Note:

Override in viewport classes

Implements ImguiItem::ResetBufferID


function ResetSize

Updates size for viewport items.

virtual void UI::TextureViewer::ResetSize (
    const ImVec2 & size
) override

Parameters:

  • size New viewport size in pixels

Note:

Override in viewport classes

Implements ImguiItem::ResetSize


function ResetUV

Updates UV coordinates for viewport items.

virtual void UI::TextureViewer::ResetUV (
    const ImVec2 & min,
    const ImVec2 & max
) override

Used by viewport items to specify texture sampling region.

Parameters:

  • min Minimum UV coordinate (bottom-left)
  • max Maximum UV coordinate (top-right)

Note:

Override in viewport classes

Implements ImguiItem::ResetUV


function TextureViewer [1/3]

UI::TextureViewer::TextureViewer () 

function TextureViewer [2/3]

UI::TextureViewer::TextureViewer (
    const std::string & name,
    int texID
) 

function TextureViewer [3/3]

UI::TextureViewer::TextureViewer (
    const std::string & name,
    int texID,
    const ImVec2 & vp_size
) 

function ~TextureViewer

UI::TextureViewer::~TextureViewer () 


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