Deki 1.3.0
Modular C++ 2D engine for embedded displays and desktop
Loading...
Searching...
No Matches

Singleton providing the editor UI controls + inspector drawing. More...

#include <EditorUI.h>

Classes

struct  FloatCallbacks
struct  IntCallbacks
struct  VecCallbacks
struct  EnumCallbacks
struct  TextCallbacks
struct  EditCallbacksBytes
struct  WidgetBackend

Public Types

enum class  Col {
  Text , Button , ButtonHovered , ButtonActive ,
  FrameBg , FrameBgHovered , FrameBgActive , CheckMark
}
 Editor style color slots (mapped internally to the theme). More...
enum  TreeFlags {
  TreeNone = 0 , TreeDefaultOpen = 1 << 0 , TreeLeaf = 1 << 1 , TreeOpenOnArrow = 1 << 2 ,
  TreeSelected = 1 << 3
}
 Tree node flags (bitwise-or). More...
enum  WinFlags {
  WinNone = 0 , WinNoScrollbar = 1 << 0 , WinAlwaysAutoResize = 1 << 1 , WinNoSavedSettings = 1 << 2 ,
  WinNoCollapse = 1 << 3
}
 Window flags (bitwise-or). More...
enum  TableFlags {
  TableNone = 0 , TableResizable = 1 << 0 , TableRowBg = 1 << 1 , TableScrollY = 1 << 2 ,
  TableBordersInnerV = 1 << 3 , TableBordersOuter = 1 << 4
}
 Table flags (bitwise-or). More...
enum  TableColumnFlags { TableColumnNone = 0 , TableColumnWidthStretch = 1 << 0 , TableColumnWidthFixed = 1 << 1 }
 Table column flags (bitwise-or). More...
enum class  StyleVar {
  ItemSpacing , ItemInnerSpacing , FramePadding , CellPadding ,
  WindowPadding
}
 Vec2-valued style vars adjustable via PushStyleVar (balance with PopStyleVar). More...
enum class  Key { Z , Y , S , Delete }
enum class  MouseCursor {
  Arrow , TextInput , ResizeNS , ResizeEW ,
  ResizeAll , Hand , NotAllowed
}
 Mouse cursor shapes for SetMouseCursor (e.g. More...
enum class  Unit {
  None = 0 , Distance , Velocity , Acceleration ,
  Angle
}
using DrawPropertyByNameFunc = std::function<void(const char*)>
 Callback types for property drawing.
using DrawPropertyByOffsetFunc = std::function<void(size_t)>
using DrawDefaultPropertiesFunc = std::function<void()>
using ResolveAssetNameFunc = std::function<std::string(const std::string&)>
using GetFontAtlasFunc = std::function<uint32_t(const std::string&, int, uint32_t*, uint32_t*)>
using ModifyAssetFunc = std::function<void(const std::string&, const std::string&, const std::string&, const std::string&)>

Public Member Functions

void DrawDefaultInspector ()
 Draw all default properties for current component.
void PropertyField (size_t offset)
 Draw a specific property by member offset.
void PropertyField (const char *propertyName)
 Draw a specific property by name.
std::string ResolveAssetName (const std::string &guid)
 Resolve asset GUID to display name.
uint32_t GetFontAtlasTexture (const std::string &fontGuid, int fontSize, uint32_t *outWidth, uint32_t *outHeight)
 Get font atlas texture for preview.
void ModifyAsset (const std::string &assetPath, const std::string &assetGuid, const std::string &oldJson, const std::string &newJson)
 Modify an asset file with undo/redo support.
bool SectionHeader (const char *label)
void PropertyRow (const char *label)
bool DragInt (const char *id, int *v, float speed=1.0f, int vmin=0, int vmax=0)
bool DragFloat (const char *id, float *v, float speed=1.0f, float vmin=0.0f, float vmax=0.0f, const char *format="%.3f")
bool Checkbox (const char *label, bool *v)
bool ColorEdit4 (const char *id, float col[4])
bool ColorEdit3 (const char *id, float col[3])
bool Combo (const char *id, int *currentIndex, const char *const items[], int count)
bool Combo (const char *id, int *currentIndex, const char *itemsSeparatedByZeros)
bool SliderFloat (const char *id, float *v, float vmin, float vmax, const char *format="%.3f")
bool InputInt (const char *id, int *v, int step=1, int stepFast=100)
bool InputText (const char *id, char *buf, size_t bufSize)
bool Button (const char *label, float width=0.0f, float height=0.0f)
bool SmallButton (const char *label)
void Text (const char *text)
void TextColored (float r, float g, float b, float a, const char *text)
void TextDisabled (const char *text)
void SameLine (float offsetFromStartX=0.0f, float spacing=-1.0f)
void Spacing ()
void Separator ()
void PushID (int id)
void PushID (const void *ptr)
void PopID ()
void Indent ()
void Unindent ()
void Indent (float amount)
void Unindent (float amount)
void BulletText (const char *text)
bool CollapsingHeader (const char *label, bool *pVisible=nullptr, bool defaultOpen=false)
void GetCursorScreenPos (float *outX, float *outY)
 Top-left screen position where the next widget/drawing goes.
void SetCursorScreenPos (float x, float y)
 Place the layout cursor at an absolute screen position (for custom chrome that positions widgets/draws by hand, e.g.
void Dummy (float width, float height)
 Advance the layout cursor by w x h (reserve space for drawing).
void DrawLine (float x0, float y0, float x1, float y1, uint32_t rgba, float thickness=1.0f)
void DrawRect (float x0, float y0, float x1, float y1, uint32_t rgba, float thickness=1.0f, float rounding=0.0f)
void DrawRectFilled (float x0, float y0, float x1, float y1, uint32_t rgba, float rounding=0.0f)
void DrawCircle (float cx, float cy, float radius, uint32_t rgba, float thickness=1.0f)
void DrawCircleFilled (float cx, float cy, float radius, uint32_t rgba)
void DrawImage (uint32_t texture, float x0, float y0, float x1, float y1, float u0=0.0f, float v0=0.0f, float u1=1.0f, float v1=1.0f, uint32_t tint=0xFFFFFFFFu)
void DrawTextAt (float pixelSize, float x, float y, uint32_t rgba, const char *text)
void DrawTextCss (float cssPx, float x, float y, uint32_t rgba, const char *text)
void MeasureTextCss (float cssPx, const char *text, float *outW, float *outH)
void PushClipRect (float x0, float y0, float x1, float y1, bool intersectWithCurrent=true)
void PopClipRect ()
void Image (uint32_t texture, float w, float h, float u0=0.0f, float v0=0.0f, float u1=1.0f, float v1=1.0f)
 Inline image widget (advances layout), e.g.
bool IsItemHovered (bool allowWhenDisabled=false)
bool IsItemClicked ()
void GetContentRegionAvail (float *outW, float *outH)
void GetContentRegionMax (float *outX, float *outY)
void GetFramePadding (float *outX, float *outY)
void GetItemSpacing (float *outX, float *outY)
void GetItemInnerSpacing (float *outX, float *outY)
void GetItemRect (float *outMinX, float *outMinY, float *outMaxX, float *outMaxY)
float GetFrameHeight ()
float CalcItemWidth ()
float GetFontSize ()
void MeasureText (const char *text, float *outW, float *outH)
void AlignTextToFramePadding ()
void SetTooltip (const char *text)
float GetTextLineHeight ()
float GetFrameHeightWithSpacing ()
void PushItemWidth (float w)
void PopItemWidth ()
void GetMainViewportRect (float *outX, float *outY, float *outW, float *outH)
void TextWrapped (const char *text)
bool SliderInt (const char *id, int *v, int vmin, int vmax)
bool RadioButton (const char *label, bool active)
bool Selectable (const char *label, bool selected)
bool Selectable (const char *label, bool selected, bool spanAllColumns)
bool ImageButton (const char *id, uint32_t texture, float w, float h, float u0=0.0f, float v0=0.0f, float u1=1.0f, float v1=1.0f)
bool InvisibleButton (const char *id, float w, float h)
void SetNextItemWidth (float w)
void BeginListClipper (int itemCount, float itemHeight=-1.0f)
bool ListClipperStep (int *outStart, int *outEnd)
void EndListClipper ()
bool InputTextWithHint (const char *id, const char *hint, char *buf, int bufSize)
bool BeginCombo (const char *label, const char *preview)
void EndCombo ()
bool BeginChild (const char *id, float w, float h, bool border=false)
void EndChild ()
bool BeginTabBar (const char *id)
void EndTabBar ()
bool BeginTabItem (const char *label)
void EndTabItem ()
bool TreeNodeEx (const char *label, int treeFlags=0)
void TreePop ()
void BeginGroup ()
void EndGroup ()
bool BeginTable (const char *id, int columns, int tableFlags=0, float outerW=0.0f, float outerH=0.0f)
void TableSetupColumn (const char *label, int columnFlags=0, float widthOrWeight=0.0f)
void TableSetupScrollFreeze (int cols, int rows)
void TableHeadersRow ()
void TableNextRow ()
bool TableNextColumn ()
void EndTable ()
void BeginToolbar ()
bool ToolbarButton (const char *label, bool enabled=true, bool active=false)
bool ToolbarIconButton (const char *id, const char *icon, const char *tooltip=nullptr, bool enabled=true, bool active=false, bool destructive=false)
void EndToolbar ()
void BeginTabLinks ()
bool TabLink (const char *label, bool active)
void EndTabLinks ()
bool SelectableCard (const char *id, const char *title, const char *subtitle, bool selected, uint32_t subtitleColor=0)
void OpenPopup (const char *id)
bool BeginPopup (const char *id)
bool BeginPopupModal (const char *name, bool *open=nullptr, int winFlags=0)
bool BeginPopupContextItem (const char *id=nullptr)
void OpenPopupOnItemClick (const char *id, int mouseButton=1)
void EndPopup ()
void CloseCurrentPopup ()
bool MenuItem (const char *label, bool enabled=true)
bool BeginMenu (const char *label)
void EndMenu ()
bool Begin (const char *name, bool *open=nullptr, int winFlags=0)
void End ()
void SetNextWindowSize (float w, float h, bool firstUseEver=false)
void SetNextWindowSizeConstraints (float minW, float minH, float maxW, float maxH)
void SetNextWindowPos (float x, float y, float pivotX=0.0f, float pivotY=0.0f)
void PushStyleColor (Col col, uint32_t rgba)
void PopStyleColor (int count=1)
uint32_t GetStyleColor (Col col)
void PushButtonTextAlign (float x, float y)
void PushStyleVar (StyleVar var, float x, float y)
void PopStyleVar (int count=1)
void TextColored (uint32_t rgba, const char *text)
void PushBoldFont ()
void PopFont ()
void GetMousePos (float *outX, float *outY)
void GetMouseDelta (float *outX, float *outY)
bool IsMouseDown (int button)
bool IsMouseClicked (int button)
bool IsMouseDoubleClicked (int button)
bool IsMouseDragging (int button, float lockThreshold=-1.0f)
void SetMouseCursor (MouseCursor cursor)
float GetMouseWheel ()
bool IsKeyShift ()
bool IsKeyCtrl ()
float GetDpiScale ()
bool IsKeyAlt ()
bool IsKeyPressed (Key key, bool repeat=true)
float GetDeltaTime ()
bool IsWindowFocused (bool rootAndChildWindows=false)
bool IsItemActive ()
bool IsItemDeactivatedAfterEdit ()
bool IsItemDeactivated ()
void SetKeyboardFocusHere ()
bool InvisibleButton (const char *id, float w, float h, bool allowLeft, bool allowMiddle, bool allowRight=false)
void SetNextItemAllowOverlap ()
bool DragFloat2 (const char *id, float v[2], float speed=1.0f, float vmin=0.0f, float vmax=0.0f, const char *format="%.3f")
bool DragFloat3 (const char *id, float v[3], float speed=1.0f, float vmin=0.0f, float vmax=0.0f, const char *format="%.3f")
void FullBleedSeparator ()
void BeginDisabled (bool disabled=true)
void EndDisabled ()
void Label (const char *text)
void Space ()
bool IntField (const char *label, int32_t *v, float speed=1.0f, int64_t vmin=0, int64_t vmax=0, const IntCallbacks &cb={})
bool IntField (const char *label, uint32_t *v, float speed=1.0f, int64_t vmin=0, int64_t vmax=0, const IntCallbacks &cb={})
bool IntField (const char *label, int16_t *v, float speed=1.0f, int64_t vmin=0, int64_t vmax=0, const IntCallbacks &cb={})
bool IntField (const char *label, uint16_t *v, float speed=1.0f, int64_t vmin=0, int64_t vmax=0, const IntCallbacks &cb={})
bool IntField (const char *label, int8_t *v, float speed=1.0f, int64_t vmin=0, int64_t vmax=0, const IntCallbacks &cb={})
bool IntField (const char *label, uint8_t *v, float speed=1.0f, int64_t vmin=0, int64_t vmax=0, const IntCallbacks &cb={})
bool FloatField (const char *label, float *v, float speed=1.0f, float vmin=0.0f, float vmax=0.0f, const char *format="%.3f", const FloatCallbacks &cb={})
bool Vector2Field (const char *label, float v[2], float speed=1.0f, float vmin=0.0f, float vmax=0.0f, const char *format="%.3f", const VecCallbacks &cb={})
bool Vector3Field (const char *label, float v[3], float speed=1.0f, float vmin=0.0f, float vmax=0.0f, const char *format="%.3f", const VecCallbacks &cb={})
bool FloatField (const char *label, float *v, Unit unit, const FloatCallbacks &cb={})
bool Vector2Field (const char *label, float v[2], Unit unit, const VecCallbacks &cb={})
bool Vector3Field (const char *label, float v[3], Unit unit, const VecCallbacks &cb={})
bool ColorField (const char *label, float v[4], const VecCallbacks &cb={})
bool ColorRGBField (const char *label, float v[3], const VecCallbacks &cb={})
bool EnumField (const char *label, int *index, const char *const items[], int count, const EnumCallbacks &cb={})
bool EnumField (const char *label, int *index, const char *itemsZeroSep, const EnumCallbacks &cb={})
bool InputField (const char *label, char *buf, size_t bufSize, const TextCallbacks &cb={})
bool SliderField (const char *label, float *v, float vmin, float vmax, const char *format="%.3f", const FloatCallbacks &cb={})
bool SliderField (const char *label, int *v, int vmin, int vmax, const EnumCallbacks &cb={})
bool FloatField (const char *label, float value, Unit unit, const FloatCallbacks &cb)
bool Vector2Field (const char *label, float x, float y, Unit unit, const VecCallbacks &cb)
bool Vector3Field (const char *label, float x, float y, float z, Unit unit, const VecCallbacks &cb)
bool FloatField (const char *label, float value, float speed, float vmin, float vmax, const char *format, const FloatCallbacks &cb)
bool Vector2Field (const char *label, float x, float y, float speed, float vmin, float vmax, const char *format, const VecCallbacks &cb)
bool Vector3Field (const char *label, float x, float y, float z, float speed, float vmin, float vmax, const char *format, const VecCallbacks &cb)
DekiComponentGetCurrentComponent () const
const DekiComponentMetaGetCurrentMeta () const
void BeginComponent (DekiComponent *comp, const DekiComponentMeta *meta, DrawPropertyByNameFunc drawByName, DrawPropertyByOffsetFunc drawByOffset, DrawDefaultPropertiesFunc drawDefault, ResolveAssetNameFunc resolveAsset, GetFontAtlasFunc getFontAtlas, ModifyAssetFunc modifyAsset=nullptr)
 Begin editing a component (called by InspectorPanel).
void EndComponent ()
 End editing a component.

Static Public Member Functions

static EditorUI & Get ()
 Get singleton instance.
static uint32_t Rgba (uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
 Pack an RGBA color (components 0-255) for the Draw* methods.
static void SetWidgetBackend (const WidgetBackend &backend)
static void SetExtraWindowFlagsProvider (std::function< int(const char *)> fn)

Detailed Description

Singleton providing the editor UI controls + inspector drawing.

Unity-like static access for CustomEditor implementations: auto& ui = EditorUI::Get(); ui.DrawDefaultInspector(); ui.PropertyField("speed");

Packages depend on this class instead of ImGui directly: the implementations live in the editor executable and are installed via the callback bridge (BeginComponent for property drawing; widget methods added in later phases), so package editors render with the editor's styled widgets.

The InspectorPanel calls BeginComponent/EndComponent to set up context before invoking CustomEditor::OnInspectorGUI().

Member Typedef Documentation

◆ DrawPropertyByNameFunc

using DekiEditor::EditorUI::DrawPropertyByNameFunc = std::function<void(const char*)>

Callback types for property drawing.

◆ DrawPropertyByOffsetFunc

using DekiEditor::EditorUI::DrawPropertyByOffsetFunc = std::function<void(size_t)>

◆ DrawDefaultPropertiesFunc

using DekiEditor::EditorUI::DrawDefaultPropertiesFunc = std::function<void()>

◆ ResolveAssetNameFunc

using DekiEditor::EditorUI::ResolveAssetNameFunc = std::function<std::string(const std::string&)>

◆ GetFontAtlasFunc

using DekiEditor::EditorUI::GetFontAtlasFunc = std::function<uint32_t(const std::string&, int, uint32_t*, uint32_t*)>

◆ ModifyAssetFunc

using DekiEditor::EditorUI::ModifyAssetFunc = std::function<void(const std::string&, const std::string&, const std::string&, const std::string&)>

Member Enumeration Documentation

◆ Col

enum class DekiEditor::EditorUI::Col
strong

Editor style color slots (mapped internally to the theme).

Enumerator
Text 
Button 
ButtonHovered 
ButtonActive 
FrameBg 
FrameBgHovered 
FrameBgActive 
CheckMark 

◆ TreeFlags

Tree node flags (bitwise-or).

Enumerator
TreeNone 
TreeDefaultOpen 
TreeLeaf 
TreeOpenOnArrow 
TreeSelected 

◆ WinFlags

Window flags (bitwise-or).

Enumerator
WinNone 
WinNoScrollbar 
WinAlwaysAutoResize 
WinNoSavedSettings 
WinNoCollapse 

◆ TableFlags

Table flags (bitwise-or).

Enumerator
TableNone 
TableResizable 
TableRowBg 
TableScrollY 
TableBordersInnerV 
TableBordersOuter 

◆ TableColumnFlags

Table column flags (bitwise-or).

Enumerator
TableColumnNone 
TableColumnWidthStretch 
TableColumnWidthFixed 

◆ StyleVar

enum class DekiEditor::EditorUI::StyleVar
strong

Vec2-valued style vars adjustable via PushStyleVar (balance with PopStyleVar).

Enumerator
ItemSpacing 
ItemInnerSpacing 
FramePadding 
CellPadding 
WindowPadding 

◆ Key

enum class DekiEditor::EditorUI::Key
strong
Enumerator
Delete 

◆ MouseCursor

Mouse cursor shapes for SetMouseCursor (e.g.

splitter resize handles).

Enumerator
Arrow 
TextInput 
ResizeNS 
ResizeEW 
ResizeAll 
Hand 
NotAllowed 

◆ Unit

enum class DekiEditor::EditorUI::Unit
strong
Enumerator
None 
Distance 
Velocity 
Acceleration 
Angle 

Member Function Documentation

◆ Get()

EditorUI & DekiEditor::EditorUI::Get ( )
static

Get singleton instance.

◆ DrawDefaultInspector()

void DekiEditor::EditorUI::DrawDefaultInspector ( )

Draw all default properties for current component.

Equivalent to Unity's DrawDefaultInspector().

◆ PropertyField() [1/2]

void DekiEditor::EditorUI::PropertyField ( size_t offset)

Draw a specific property by member offset.

Parameters
offsetoffsetof(ComponentType, member)

◆ PropertyField() [2/2]

void DekiEditor::EditorUI::PropertyField ( const char * propertyName)

Draw a specific property by name.

Parameters
propertyNameName of the property to draw

◆ ResolveAssetName()

std::string DekiEditor::EditorUI::ResolveAssetName ( const std::string & guid)

Resolve asset GUID to display name.

Parameters
guidAsset GUID
Returns
Human-readable asset path/name

◆ GetFontAtlasTexture()

uint32_t DekiEditor::EditorUI::GetFontAtlasTexture ( const std::string & fontGuid,
int fontSize,
uint32_t * outWidth,
uint32_t * outHeight )

Get font atlas texture for preview.

Parameters
fontGuidFont asset GUID
fontSizeFont size
outWidthOutput atlas width
outHeightOutput atlas height
Returns
OpenGL texture ID, or 0 on failure

◆ ModifyAsset()

void DekiEditor::EditorUI::ModifyAsset ( const std::string & assetPath,
const std::string & assetGuid,
const std::string & oldJson,
const std::string & newJson )

Modify an asset file with undo/redo support.

Parameters
assetPathAbsolute path to the asset file
assetGuidAsset GUID
oldJsonOld JSON state (for undo)
newJsonNew JSON state (to apply)

◆ SectionHeader()

bool DekiEditor::EditorUI::SectionHeader ( const char * label)

◆ PropertyRow()

void DekiEditor::EditorUI::PropertyRow ( const char * label)

◆ DragInt()

bool DekiEditor::EditorUI::DragInt ( const char * id,
int * v,
float speed = 1.0f,
int vmin = 0,
int vmax = 0 )

◆ DragFloat()

bool DekiEditor::EditorUI::DragFloat ( const char * id,
float * v,
float speed = 1.0f,
float vmin = 0.0f,
float vmax = 0.0f,
const char * format = "%.3f" )

◆ Checkbox()

bool DekiEditor::EditorUI::Checkbox ( const char * label,
bool * v )

◆ ColorEdit4()

bool DekiEditor::EditorUI::ColorEdit4 ( const char * id,
float col[4] )

◆ ColorEdit3()

bool DekiEditor::EditorUI::ColorEdit3 ( const char * id,
float col[3] )

◆ Combo() [1/2]

bool DekiEditor::EditorUI::Combo ( const char * id,
int * currentIndex,
const char *const items[],
int count )

◆ Combo() [2/2]

bool DekiEditor::EditorUI::Combo ( const char * id,
int * currentIndex,
const char * itemsSeparatedByZeros )

◆ SliderFloat()

bool DekiEditor::EditorUI::SliderFloat ( const char * id,
float * v,
float vmin,
float vmax,
const char * format = "%.3f" )

◆ InputInt()

bool DekiEditor::EditorUI::InputInt ( const char * id,
int * v,
int step = 1,
int stepFast = 100 )

◆ InputText()

bool DekiEditor::EditorUI::InputText ( const char * id,
char * buf,
size_t bufSize )

◆ Button()

bool DekiEditor::EditorUI::Button ( const char * label,
float width = 0.0f,
float height = 0.0f )

◆ SmallButton()

bool DekiEditor::EditorUI::SmallButton ( const char * label)

◆ Text()

void DekiEditor::EditorUI::Text ( const char * text)

◆ TextColored() [1/2]

void DekiEditor::EditorUI::TextColored ( float r,
float g,
float b,
float a,
const char * text )

◆ TextDisabled()

void DekiEditor::EditorUI::TextDisabled ( const char * text)

◆ SameLine()

void DekiEditor::EditorUI::SameLine ( float offsetFromStartX = 0.0f,
float spacing = -1.0f )

◆ Spacing()

void DekiEditor::EditorUI::Spacing ( )

◆ Separator()

void DekiEditor::EditorUI::Separator ( )

◆ PushID() [1/2]

void DekiEditor::EditorUI::PushID ( int id)

◆ PushID() [2/2]

void DekiEditor::EditorUI::PushID ( const void * ptr)

◆ PopID()

void DekiEditor::EditorUI::PopID ( )

◆ Indent() [1/2]

void DekiEditor::EditorUI::Indent ( )

◆ Unindent() [1/2]

void DekiEditor::EditorUI::Unindent ( )

◆ Indent() [2/2]

void DekiEditor::EditorUI::Indent ( float amount)

◆ Unindent() [2/2]

void DekiEditor::EditorUI::Unindent ( float amount)

◆ BulletText()

void DekiEditor::EditorUI::BulletText ( const char * text)

◆ CollapsingHeader()

bool DekiEditor::EditorUI::CollapsingHeader ( const char * label,
bool * pVisible = nullptr,
bool defaultOpen = false )

◆ Rgba()

uint32_t DekiEditor::EditorUI::Rgba ( uint8_t r,
uint8_t g,
uint8_t b,
uint8_t a = 255 )
inlinestatic

Pack an RGBA color (components 0-255) for the Draw* methods.

◆ GetCursorScreenPos()

void DekiEditor::EditorUI::GetCursorScreenPos ( float * outX,
float * outY )

Top-left screen position where the next widget/drawing goes.

◆ SetCursorScreenPos()

void DekiEditor::EditorUI::SetCursorScreenPos ( float x,
float y )

Place the layout cursor at an absolute screen position (for custom chrome that positions widgets/draws by hand, e.g.

toolbars).

◆ Dummy()

void DekiEditor::EditorUI::Dummy ( float width,
float height )

Advance the layout cursor by w x h (reserve space for drawing).

◆ DrawLine()

void DekiEditor::EditorUI::DrawLine ( float x0,
float y0,
float x1,
float y1,
uint32_t rgba,
float thickness = 1.0f )

◆ DrawRect()

void DekiEditor::EditorUI::DrawRect ( float x0,
float y0,
float x1,
float y1,
uint32_t rgba,
float thickness = 1.0f,
float rounding = 0.0f )

◆ DrawRectFilled()

void DekiEditor::EditorUI::DrawRectFilled ( float x0,
float y0,
float x1,
float y1,
uint32_t rgba,
float rounding = 0.0f )

◆ DrawCircle()

void DekiEditor::EditorUI::DrawCircle ( float cx,
float cy,
float radius,
uint32_t rgba,
float thickness = 1.0f )

◆ DrawCircleFilled()

void DekiEditor::EditorUI::DrawCircleFilled ( float cx,
float cy,
float radius,
uint32_t rgba )

◆ DrawImage()

void DekiEditor::EditorUI::DrawImage ( uint32_t texture,
float x0,
float y0,
float x1,
float y1,
float u0 = 0.0f,
float v0 = 0.0f,
float u1 = 1.0f,
float v1 = 1.0f,
uint32_t tint = 0xFFFFFFFFu )

◆ DrawTextAt()

void DekiEditor::EditorUI::DrawTextAt ( float pixelSize,
float x,
float y,
uint32_t rgba,
const char * text )

◆ DrawTextCss()

void DekiEditor::EditorUI::DrawTextCss ( float cssPx,
float x,
float y,
uint32_t rgba,
const char * text )

◆ MeasureTextCss()

void DekiEditor::EditorUI::MeasureTextCss ( float cssPx,
const char * text,
float * outW,
float * outH )

◆ PushClipRect()

void DekiEditor::EditorUI::PushClipRect ( float x0,
float y0,
float x1,
float y1,
bool intersectWithCurrent = true )

◆ PopClipRect()

void DekiEditor::EditorUI::PopClipRect ( )

◆ Image()

void DekiEditor::EditorUI::Image ( uint32_t texture,
float w,
float h,
float u0 = 0.0f,
float v0 = 0.0f,
float u1 = 1.0f,
float v1 = 1.0f )

Inline image widget (advances layout), e.g.

a texture/atlas preview.

◆ IsItemHovered()

bool DekiEditor::EditorUI::IsItemHovered ( bool allowWhenDisabled = false)

◆ IsItemClicked()

bool DekiEditor::EditorUI::IsItemClicked ( )

◆ GetContentRegionAvail()

void DekiEditor::EditorUI::GetContentRegionAvail ( float * outW,
float * outH )

◆ GetContentRegionMax()

void DekiEditor::EditorUI::GetContentRegionMax ( float * outX,
float * outY )

◆ GetFramePadding()

void DekiEditor::EditorUI::GetFramePadding ( float * outX,
float * outY )

◆ GetItemSpacing()

void DekiEditor::EditorUI::GetItemSpacing ( float * outX,
float * outY )

◆ GetItemInnerSpacing()

void DekiEditor::EditorUI::GetItemInnerSpacing ( float * outX,
float * outY )

◆ GetItemRect()

void DekiEditor::EditorUI::GetItemRect ( float * outMinX,
float * outMinY,
float * outMaxX,
float * outMaxY )

◆ GetFrameHeight()

float DekiEditor::EditorUI::GetFrameHeight ( )

◆ CalcItemWidth()

float DekiEditor::EditorUI::CalcItemWidth ( )

◆ GetFontSize()

float DekiEditor::EditorUI::GetFontSize ( )

◆ MeasureText()

void DekiEditor::EditorUI::MeasureText ( const char * text,
float * outW,
float * outH )

◆ AlignTextToFramePadding()

void DekiEditor::EditorUI::AlignTextToFramePadding ( )

◆ SetTooltip()

void DekiEditor::EditorUI::SetTooltip ( const char * text)

◆ GetTextLineHeight()

float DekiEditor::EditorUI::GetTextLineHeight ( )

◆ GetFrameHeightWithSpacing()

float DekiEditor::EditorUI::GetFrameHeightWithSpacing ( )

◆ PushItemWidth()

void DekiEditor::EditorUI::PushItemWidth ( float w)

◆ PopItemWidth()

void DekiEditor::EditorUI::PopItemWidth ( )

◆ GetMainViewportRect()

void DekiEditor::EditorUI::GetMainViewportRect ( float * outX,
float * outY,
float * outW,
float * outH )

◆ TextWrapped()

void DekiEditor::EditorUI::TextWrapped ( const char * text)

◆ SliderInt()

bool DekiEditor::EditorUI::SliderInt ( const char * id,
int * v,
int vmin,
int vmax )

◆ RadioButton()

bool DekiEditor::EditorUI::RadioButton ( const char * label,
bool active )

◆ Selectable() [1/2]

bool DekiEditor::EditorUI::Selectable ( const char * label,
bool selected )

◆ Selectable() [2/2]

bool DekiEditor::EditorUI::Selectable ( const char * label,
bool selected,
bool spanAllColumns )

◆ ImageButton()

bool DekiEditor::EditorUI::ImageButton ( const char * id,
uint32_t texture,
float w,
float h,
float u0 = 0.0f,
float v0 = 0.0f,
float u1 = 1.0f,
float v1 = 1.0f )

◆ InvisibleButton() [1/2]

bool DekiEditor::EditorUI::InvisibleButton ( const char * id,
float w,
float h )

◆ SetNextItemWidth()

void DekiEditor::EditorUI::SetNextItemWidth ( float w)

◆ BeginListClipper()

void DekiEditor::EditorUI::BeginListClipper ( int itemCount,
float itemHeight = -1.0f )

◆ ListClipperStep()

bool DekiEditor::EditorUI::ListClipperStep ( int * outStart,
int * outEnd )

◆ EndListClipper()

void DekiEditor::EditorUI::EndListClipper ( )

◆ InputTextWithHint()

bool DekiEditor::EditorUI::InputTextWithHint ( const char * id,
const char * hint,
char * buf,
int bufSize )

◆ BeginCombo()

bool DekiEditor::EditorUI::BeginCombo ( const char * label,
const char * preview )

◆ EndCombo()

void DekiEditor::EditorUI::EndCombo ( )

◆ BeginChild()

bool DekiEditor::EditorUI::BeginChild ( const char * id,
float w,
float h,
bool border = false )

◆ EndChild()

void DekiEditor::EditorUI::EndChild ( )

◆ BeginTabBar()

bool DekiEditor::EditorUI::BeginTabBar ( const char * id)

◆ EndTabBar()

void DekiEditor::EditorUI::EndTabBar ( )

◆ BeginTabItem()

bool DekiEditor::EditorUI::BeginTabItem ( const char * label)

◆ EndTabItem()

void DekiEditor::EditorUI::EndTabItem ( )

◆ TreeNodeEx()

bool DekiEditor::EditorUI::TreeNodeEx ( const char * label,
int treeFlags = 0 )

◆ TreePop()

void DekiEditor::EditorUI::TreePop ( )

◆ BeginGroup()

void DekiEditor::EditorUI::BeginGroup ( )

◆ EndGroup()

void DekiEditor::EditorUI::EndGroup ( )

◆ BeginTable()

bool DekiEditor::EditorUI::BeginTable ( const char * id,
int columns,
int tableFlags = 0,
float outerW = 0.0f,
float outerH = 0.0f )

◆ TableSetupColumn()

void DekiEditor::EditorUI::TableSetupColumn ( const char * label,
int columnFlags = 0,
float widthOrWeight = 0.0f )

◆ TableSetupScrollFreeze()

void DekiEditor::EditorUI::TableSetupScrollFreeze ( int cols,
int rows )

◆ TableHeadersRow()

void DekiEditor::EditorUI::TableHeadersRow ( )

◆ TableNextRow()

void DekiEditor::EditorUI::TableNextRow ( )

◆ TableNextColumn()

bool DekiEditor::EditorUI::TableNextColumn ( )

◆ EndTable()

void DekiEditor::EditorUI::EndTable ( )

◆ BeginToolbar()

void DekiEditor::EditorUI::BeginToolbar ( )

◆ ToolbarButton()

bool DekiEditor::EditorUI::ToolbarButton ( const char * label,
bool enabled = true,
bool active = false )

◆ ToolbarIconButton()

bool DekiEditor::EditorUI::ToolbarIconButton ( const char * id,
const char * icon,
const char * tooltip = nullptr,
bool enabled = true,
bool active = false,
bool destructive = false )

◆ EndToolbar()

void DekiEditor::EditorUI::EndToolbar ( )

◆ BeginTabLinks()

void DekiEditor::EditorUI::BeginTabLinks ( )

◆ TabLink()

bool DekiEditor::EditorUI::TabLink ( const char * label,
bool active )

◆ EndTabLinks()

void DekiEditor::EditorUI::EndTabLinks ( )

◆ SelectableCard()

bool DekiEditor::EditorUI::SelectableCard ( const char * id,
const char * title,
const char * subtitle,
bool selected,
uint32_t subtitleColor = 0 )

◆ OpenPopup()

void DekiEditor::EditorUI::OpenPopup ( const char * id)

◆ BeginPopup()

bool DekiEditor::EditorUI::BeginPopup ( const char * id)

◆ BeginPopupModal()

bool DekiEditor::EditorUI::BeginPopupModal ( const char * name,
bool * open = nullptr,
int winFlags = 0 )

◆ BeginPopupContextItem()

bool DekiEditor::EditorUI::BeginPopupContextItem ( const char * id = nullptr)

◆ OpenPopupOnItemClick()

void DekiEditor::EditorUI::OpenPopupOnItemClick ( const char * id,
int mouseButton = 1 )

◆ EndPopup()

void DekiEditor::EditorUI::EndPopup ( )

◆ CloseCurrentPopup()

void DekiEditor::EditorUI::CloseCurrentPopup ( )

◆ MenuItem()

bool DekiEditor::EditorUI::MenuItem ( const char * label,
bool enabled = true )

◆ BeginMenu()

bool DekiEditor::EditorUI::BeginMenu ( const char * label)

◆ EndMenu()

void DekiEditor::EditorUI::EndMenu ( )

◆ Begin()

bool DekiEditor::EditorUI::Begin ( const char * name,
bool * open = nullptr,
int winFlags = 0 )

◆ End()

void DekiEditor::EditorUI::End ( )

◆ SetNextWindowSize()

void DekiEditor::EditorUI::SetNextWindowSize ( float w,
float h,
bool firstUseEver = false )

◆ SetNextWindowSizeConstraints()

void DekiEditor::EditorUI::SetNextWindowSizeConstraints ( float minW,
float minH,
float maxW,
float maxH )

◆ SetNextWindowPos()

void DekiEditor::EditorUI::SetNextWindowPos ( float x,
float y,
float pivotX = 0.0f,
float pivotY = 0.0f )

◆ PushStyleColor()

void DekiEditor::EditorUI::PushStyleColor ( Col col,
uint32_t rgba )

◆ PopStyleColor()

void DekiEditor::EditorUI::PopStyleColor ( int count = 1)

◆ GetStyleColor()

uint32_t DekiEditor::EditorUI::GetStyleColor ( Col col)

◆ PushButtonTextAlign()

void DekiEditor::EditorUI::PushButtonTextAlign ( float x,
float y )

◆ PushStyleVar()

void DekiEditor::EditorUI::PushStyleVar ( StyleVar var,
float x,
float y )

◆ PopStyleVar()

void DekiEditor::EditorUI::PopStyleVar ( int count = 1)

◆ TextColored() [2/2]

void DekiEditor::EditorUI::TextColored ( uint32_t rgba,
const char * text )

◆ PushBoldFont()

void DekiEditor::EditorUI::PushBoldFont ( )

◆ PopFont()

void DekiEditor::EditorUI::PopFont ( )

◆ GetMousePos()

void DekiEditor::EditorUI::GetMousePos ( float * outX,
float * outY )

◆ GetMouseDelta()

void DekiEditor::EditorUI::GetMouseDelta ( float * outX,
float * outY )

◆ IsMouseDown()

bool DekiEditor::EditorUI::IsMouseDown ( int button)

◆ IsMouseClicked()

bool DekiEditor::EditorUI::IsMouseClicked ( int button)

◆ IsMouseDoubleClicked()

bool DekiEditor::EditorUI::IsMouseDoubleClicked ( int button)

◆ IsMouseDragging()

bool DekiEditor::EditorUI::IsMouseDragging ( int button,
float lockThreshold = -1.0f )

◆ SetMouseCursor()

void DekiEditor::EditorUI::SetMouseCursor ( MouseCursor cursor)

◆ GetMouseWheel()

float DekiEditor::EditorUI::GetMouseWheel ( )

◆ IsKeyShift()

bool DekiEditor::EditorUI::IsKeyShift ( )

◆ IsKeyCtrl()

bool DekiEditor::EditorUI::IsKeyCtrl ( )

◆ GetDpiScale()

float DekiEditor::EditorUI::GetDpiScale ( )

◆ IsKeyAlt()

bool DekiEditor::EditorUI::IsKeyAlt ( )

◆ IsKeyPressed()

bool DekiEditor::EditorUI::IsKeyPressed ( Key key,
bool repeat = true )

◆ GetDeltaTime()

float DekiEditor::EditorUI::GetDeltaTime ( )

◆ IsWindowFocused()

bool DekiEditor::EditorUI::IsWindowFocused ( bool rootAndChildWindows = false)

◆ IsItemActive()

bool DekiEditor::EditorUI::IsItemActive ( )

◆ IsItemDeactivatedAfterEdit()

bool DekiEditor::EditorUI::IsItemDeactivatedAfterEdit ( )

◆ IsItemDeactivated()

bool DekiEditor::EditorUI::IsItemDeactivated ( )

◆ SetKeyboardFocusHere()

void DekiEditor::EditorUI::SetKeyboardFocusHere ( )

◆ InvisibleButton() [2/2]

bool DekiEditor::EditorUI::InvisibleButton ( const char * id,
float w,
float h,
bool allowLeft,
bool allowMiddle,
bool allowRight = false )

◆ SetNextItemAllowOverlap()

void DekiEditor::EditorUI::SetNextItemAllowOverlap ( )

◆ DragFloat2()

bool DekiEditor::EditorUI::DragFloat2 ( const char * id,
float v[2],
float speed = 1.0f,
float vmin = 0.0f,
float vmax = 0.0f,
const char * format = "%.3f" )

◆ DragFloat3()

bool DekiEditor::EditorUI::DragFloat3 ( const char * id,
float v[3],
float speed = 1.0f,
float vmin = 0.0f,
float vmax = 0.0f,
const char * format = "%.3f" )

◆ FullBleedSeparator()

void DekiEditor::EditorUI::FullBleedSeparator ( )

◆ BeginDisabled()

void DekiEditor::EditorUI::BeginDisabled ( bool disabled = true)

◆ EndDisabled()

void DekiEditor::EditorUI::EndDisabled ( )

◆ Label()

void DekiEditor::EditorUI::Label ( const char * text)
inline

◆ Space()

void DekiEditor::EditorUI::Space ( )
inline

◆ IntField() [1/6]

bool DekiEditor::EditorUI::IntField ( const char * label,
int32_t * v,
float speed = 1.0f,
int64_t vmin = 0,
int64_t vmax = 0,
const IntCallbacks & cb = {} )

◆ IntField() [2/6]

bool DekiEditor::EditorUI::IntField ( const char * label,
uint32_t * v,
float speed = 1.0f,
int64_t vmin = 0,
int64_t vmax = 0,
const IntCallbacks & cb = {} )

◆ IntField() [3/6]

bool DekiEditor::EditorUI::IntField ( const char * label,
int16_t * v,
float speed = 1.0f,
int64_t vmin = 0,
int64_t vmax = 0,
const IntCallbacks & cb = {} )

◆ IntField() [4/6]

bool DekiEditor::EditorUI::IntField ( const char * label,
uint16_t * v,
float speed = 1.0f,
int64_t vmin = 0,
int64_t vmax = 0,
const IntCallbacks & cb = {} )

◆ IntField() [5/6]

bool DekiEditor::EditorUI::IntField ( const char * label,
int8_t * v,
float speed = 1.0f,
int64_t vmin = 0,
int64_t vmax = 0,
const IntCallbacks & cb = {} )

◆ IntField() [6/6]

bool DekiEditor::EditorUI::IntField ( const char * label,
uint8_t * v,
float speed = 1.0f,
int64_t vmin = 0,
int64_t vmax = 0,
const IntCallbacks & cb = {} )

◆ FloatField() [1/4]

bool DekiEditor::EditorUI::FloatField ( const char * label,
float * v,
float speed = 1.0f,
float vmin = 0.0f,
float vmax = 0.0f,
const char * format = "%.3f",
const FloatCallbacks & cb = {} )

◆ Vector2Field() [1/4]

bool DekiEditor::EditorUI::Vector2Field ( const char * label,
float v[2],
float speed = 1.0f,
float vmin = 0.0f,
float vmax = 0.0f,
const char * format = "%.3f",
const VecCallbacks & cb = {} )

◆ Vector3Field() [1/4]

bool DekiEditor::EditorUI::Vector3Field ( const char * label,
float v[3],
float speed = 1.0f,
float vmin = 0.0f,
float vmax = 0.0f,
const char * format = "%.3f",
const VecCallbacks & cb = {} )

◆ FloatField() [2/4]

bool DekiEditor::EditorUI::FloatField ( const char * label,
float * v,
Unit unit,
const FloatCallbacks & cb = {} )

◆ Vector2Field() [2/4]

bool DekiEditor::EditorUI::Vector2Field ( const char * label,
float v[2],
Unit unit,
const VecCallbacks & cb = {} )

◆ Vector3Field() [2/4]

bool DekiEditor::EditorUI::Vector3Field ( const char * label,
float v[3],
Unit unit,
const VecCallbacks & cb = {} )

◆ ColorField()

bool DekiEditor::EditorUI::ColorField ( const char * label,
float v[4],
const VecCallbacks & cb = {} )

◆ ColorRGBField()

bool DekiEditor::EditorUI::ColorRGBField ( const char * label,
float v[3],
const VecCallbacks & cb = {} )

◆ EnumField() [1/2]

bool DekiEditor::EditorUI::EnumField ( const char * label,
int * index,
const char *const items[],
int count,
const EnumCallbacks & cb = {} )

◆ EnumField() [2/2]

bool DekiEditor::EditorUI::EnumField ( const char * label,
int * index,
const char * itemsZeroSep,
const EnumCallbacks & cb = {} )

◆ InputField()

bool DekiEditor::EditorUI::InputField ( const char * label,
char * buf,
size_t bufSize,
const TextCallbacks & cb = {} )

◆ SliderField() [1/2]

bool DekiEditor::EditorUI::SliderField ( const char * label,
float * v,
float vmin,
float vmax,
const char * format = "%.3f",
const FloatCallbacks & cb = {} )

◆ SliderField() [2/2]

bool DekiEditor::EditorUI::SliderField ( const char * label,
int * v,
int vmin,
int vmax,
const EnumCallbacks & cb = {} )

◆ FloatField() [3/4]

bool DekiEditor::EditorUI::FloatField ( const char * label,
float value,
Unit unit,
const FloatCallbacks & cb )

◆ Vector2Field() [3/4]

bool DekiEditor::EditorUI::Vector2Field ( const char * label,
float x,
float y,
Unit unit,
const VecCallbacks & cb )

◆ Vector3Field() [3/4]

bool DekiEditor::EditorUI::Vector3Field ( const char * label,
float x,
float y,
float z,
Unit unit,
const VecCallbacks & cb )

◆ FloatField() [4/4]

bool DekiEditor::EditorUI::FloatField ( const char * label,
float value,
float speed,
float vmin,
float vmax,
const char * format,
const FloatCallbacks & cb )

◆ Vector2Field() [4/4]

bool DekiEditor::EditorUI::Vector2Field ( const char * label,
float x,
float y,
float speed,
float vmin,
float vmax,
const char * format,
const VecCallbacks & cb )

◆ Vector3Field() [4/4]

bool DekiEditor::EditorUI::Vector3Field ( const char * label,
float x,
float y,
float z,
float speed,
float vmin,
float vmax,
const char * format,
const VecCallbacks & cb )

◆ SetWidgetBackend()

void DekiEditor::EditorUI::SetWidgetBackend ( const WidgetBackend & backend)
static

◆ SetExtraWindowFlagsProvider()

void DekiEditor::EditorUI::SetExtraWindowFlagsProvider ( std::function< int(const char *)> fn)
static

◆ GetCurrentComponent()

DekiComponent * DekiEditor::EditorUI::GetCurrentComponent ( ) const
inline

◆ GetCurrentMeta()

const DekiComponentMeta * DekiEditor::EditorUI::GetCurrentMeta ( ) const
inline

◆ BeginComponent()

void DekiEditor::EditorUI::BeginComponent ( DekiComponent * comp,
const DekiComponentMeta * meta,
DrawPropertyByNameFunc drawByName,
DrawPropertyByOffsetFunc drawByOffset,
DrawDefaultPropertiesFunc drawDefault,
ResolveAssetNameFunc resolveAsset,
GetFontAtlasFunc getFontAtlas,
ModifyAssetFunc modifyAsset = nullptr )

Begin editing a component (called by InspectorPanel).

◆ EndComponent()

void DekiEditor::EditorUI::EndComponent ( )

End editing a component.


The documentation for this class was generated from the following file: