Skip to content

DIWNE::DGui

Classes

Name
structDIWNE::DGui::RectData <br>Helper data structure for BeginRect()/EndRect().

Functions

Name
voidAlignTextToPadding(ImVec2 padding)<br>Variant of ImGui::AlignTextToFramePadding for custom frame padding.
voidBeginGroup()
RectDataBeginRect()<br>Begin measurement of an ImGui item rect.
voidBeginVerticalAlign(float yOffset)<br>Dummy that begins at the max cursor position.
voidDummyMax(const ImVec2 & size)<br>Dummy that begins at the max cursor position. Expands current content by the size and starts a new line.
voidDummyMaxSameLine(const ImVec2 & size)<br>Dummy that begins at the max cursor position. Expands current content by the size and continues the line.
voidDummyXY(const ImVec2 & size)<br>Dummy that effectively moves the cursor by exactly the passed size in the X and Y direction.
voidDummyXYSameLine(const ImVec2 & size)
ImRectEndRect(RectData & data)<br>End measurement of a previous BeginRect() call. Finalized the passed rect data.
voidEndVerticalAlign(float yOffset =0.0f)
floatGetFrameHeight(ImVec2 padding)<br>Variant of ImGui::GetFrameHeight() for custom frame padding.
boolInvisibleButton(const std::string & id, const ImVec2 & size, bool disabled, bool & hovered, bool & active)<br>Invisible button that can optionally be disabled to allow drag operations with no active id.
boolInvisibleButton(const std::string id, const ImVec2 & size, bool disabled)<br>Invisible button that can optionally be disabled to allow drag operations with no active id.
voidLimitLine(float newMaxX)<br>Limits the width of an ImGui line to not exceed a particular X coordinate.
voidNewLine(float vSpacingFactor =0.f)<br>Ensures a new ImGui line and moves the cursor so that no vertical item spacing is applied, or just a fraction of it.
voidSameLineDummy(const ImVec2 & size)
voidTooltip(const char * header, const char * description, const ImColor & color, float wrapWidth =35.0f)
ImVec2truncScreenCursorPos()

Functions Documentation

function AlignTextToPadding

cpp
inline void AlignTextToPadding(
    ImVec2 padding
)
inline void AlignTextToPadding(
    ImVec2 padding
)

Variant of ImGui::AlignTextToFramePadding for custom frame padding.

function BeginGroup

cpp
inline void BeginGroup()
inline void BeginGroup()

function BeginRect

cpp
inline RectData BeginRect()
inline RectData BeginRect()

Begin measurement of an ImGui item rect.

Much like BeginGroup(), but just the item rect size measuring part. Returns temporary RectData that need to be passed to the corresponding EndRect() call. Explicit passing of data is necessary as we don't have a global stack for it like Dear ImGui does.

function BeginVerticalAlign

cpp
inline void BeginVerticalAlign(
    float yOffset
)
inline void BeginVerticalAlign(
    float yOffset
)

Dummy that begins at the max cursor position.

Expands current content by the size and starts a new line with no vertical spacing, can be used to add trailing padding.

function DummyMax

cpp
inline void DummyMax(
    const ImVec2 & size
)
inline void DummyMax(
    const ImVec2 & size
)

Dummy that begins at the max cursor position. Expands current content by the size and starts a new line.

function DummyMaxSameLine

cpp
inline void DummyMaxSameLine(
    const ImVec2 & size
)
inline void DummyMaxSameLine(
    const ImVec2 & size
)

Dummy that begins at the max cursor position. Expands current content by the size and continues the line.

function DummyXY

cpp
inline void DummyXY(
    const ImVec2 & size
)
inline void DummyXY(
    const ImVec2 & size
)

Dummy that effectively moves the cursor by exactly the passed size in the X and Y direction.

function DummyXYSameLine

cpp
inline void DummyXYSameLine(
    const ImVec2 & size
)
inline void DummyXYSameLine(
    const ImVec2 & size
)

function EndRect

cpp
inline ImRect EndRect(
    RectData & data
)
inline ImRect EndRect(
    RectData & data
)

End measurement of a previous BeginRect() call. Finalized the passed rect data.

function EndVerticalAlign

cpp
inline void EndVerticalAlign(
    float yOffset =0.0f
)
inline void EndVerticalAlign(
    float yOffset =0.0f
)

function GetFrameHeight

cpp
inline float GetFrameHeight(
    ImVec2 padding
)
inline float GetFrameHeight(
    ImVec2 padding
)

Variant of ImGui::GetFrameHeight() for custom frame padding.

function InvisibleButton

cpp
inline bool InvisibleButton(
    const std::string & id,
    const ImVec2 & size,
    bool disabled,
    bool & hovered,
    bool & active
)
inline bool InvisibleButton(
    const std::string & id,
    const ImVec2 & size,
    bool disabled,
    bool & hovered,
    bool & active
)

Invisible button that can optionally be disabled to allow drag operations with no active id.

function InvisibleButton

cpp
inline bool InvisibleButton(
    const std::string id,
    const ImVec2 & size,
    bool disabled
)
inline bool InvisibleButton(
    const std::string id,
    const ImVec2 & size,
    bool disabled
)

Invisible button that can optionally be disabled to allow drag operations with no active id.

function LimitLine

cpp
inline void LimitLine(
    float newMaxX
)
inline void LimitLine(
    float newMaxX
)

Limits the width of an ImGui line to not exceed a particular X coordinate.

function NewLine

cpp
inline void NewLine(
    float vSpacingFactor =0.f
)
inline void NewLine(
    float vSpacingFactor =0.f
)

Ensures a new ImGui line and moves the cursor so that no vertical item spacing is applied, or just a fraction of it.

Parameters:

  • vSpacingFactor The factor of spacing applied, 0 by default (no spacing).

function SameLineDummy

cpp
inline void SameLineDummy(
    const ImVec2 & size
)
inline void SameLineDummy(
    const ImVec2 & size
)

function Tooltip

cpp
inline void Tooltip(
    const char * header,
    const char * description,
    const ImColor & color,
    float wrapWidth =35.0f
)
inline void Tooltip(
    const char * header,
    const char * description,
    const ImColor & color,
    float wrapWidth =35.0f
)

function truncScreenCursorPos

cpp
inline ImVec2 truncScreenCursorPos()
inline ImVec2 truncScreenCursorPos()

Updated on 2025-05-31 at 12:55:31 +0000