|
Deki 0.19.0
Modular C++ 2D engine for embedded displays and desktop
|
Namespaces | |
| namespace | CMakeGen |
| namespace | EditorNaming |
| namespace | Fonts |
| namespace | Localization |
| namespace | Metrics |
| namespace | Motion |
| namespace | Palette |
| namespace | ProjectPaths |
| The one definition of where things live inside a project. | |
| namespace | SafeNames |
Classes | |
| struct | AssetCacheContext |
| Everything a cache handler needs to write the cache files for one asset. More... | |
| struct | AssetData |
| What an asset's .data sidecar file holds: its GUID and its import settings as JSON, keyed by type name. More... | |
| class | AssetDatabase |
| Static asset import and GUID lookup for editor tools, like Unity's AssetDatabase. More... | |
| struct | AssetExportContext |
| What an asset export encoder is given. More... | |
| struct | AssetExportTarget |
| The target an asset is stored for: a platform and its screen's format. More... | |
| class | AssetFileWatcher |
| OS file watcher that feeds AssetPipeline::Tick(). More... | |
| struct | AssetInfo |
| A discovered asset. More... | |
| class | AssetPicker |
| Asset picker popup. More... | |
| struct | AssetPickerEntry |
| class | AssetPipeline |
| The asset import pipeline, like Unity's: finds assets, gives them GUIDs and compiles them into the cache. More... | |
| class | AssetTypeEditor |
| class | AssetTypeEditorRegistry |
| struct | AssetTypeHandler |
| class | AssetTypeRegistry |
| struct | AtlasFrame |
| struct | BuilderDefinition |
| class | BuilderRegistry |
| The available firmware builders: the backends packages and plugins contribute, plus builder DLL plugins loaded from ~/.deki-editor/builders/. More... | |
| struct | BuildOptions |
| struct | BuildProgress |
| struct | BuildStripSettings |
| struct | ChromaKeySettings |
| class | CliTool |
| A tool a package adds to the editor's command line and MCP server. More... | |
| struct | CliToolContext |
| What a package's CLI tool may use of the running editor. More... | |
| class | Command |
| An undoable edit. More... | |
| class | CommandHistory |
| The undo/redo history. Commands that arrive close together can merge. More... | |
| struct | ComponentDef |
| struct | ComponentUsage |
| class | CompoundCommand |
| Several commands undone and redone as one. More... | |
| struct | CreateMenuEntry |
| An item in the hierarchy's right-click "Create Object" menu, registered by a package. More... | |
| class | CreateMenuRegistry |
| class | CustomEditor |
| Custom editor for one component type, like Unity's CustomEditor: it can replace the component's Inspector UI and tell the scene view its size. More... | |
| class | CustomEditorRegistry |
| class | DeadMemory |
| Memory that is about to be freed, described as byte ranges. More... | |
| struct | DecodedImage |
| struct | DeployTarget |
| One thing a build can be deployed to, as the backend enumerates them. More... | |
| struct | DialogButtonSpec |
| struct | DownloadProgress |
| class | EditorApplication |
| The editor's state as seen by EditorWindow and CustomEditor code, like Unity's static editor access: auto& app = EditorApplication::Get(); const char* projectPath = app.GetProjectPath(); Deki::Object* selected = app.GetActiveObject();. More... | |
| class | EditorAssets |
| Loads assets onto the GPU for the editor, cached by GUID: uint32_t texId = EditorAssets::Get()->LoadTexture(guid, &w, &h); Deki2D::BitmapFont* font = EditorAssets::Get()->GetBitmapFont(bakedGuid);. More... | |
| class | EditorExtension |
| class | EditorHttpUtils |
| HTTP and archive helpers for the whole editor. More... | |
| class | EditorPaths |
| Where the editor keeps its files. More... | |
| class | EditorSettings |
| The editor's own settings, saved per user. More... | |
| class | EditorUI |
| The editor's UI controls and inspector drawing, for CustomEditor code: auto& ui = EditorUI::Get(); ui.DrawDefaultInspector(); ui.PropertyField("speed");. More... | |
| class | EditorWindow |
| Base class for standalone editor windows. More... | |
| struct | EditorWindowMeta |
| struct | FallbackDef |
| struct | FeatureDecision |
| class | FileInspector |
| class | FileInspectorRegistry |
| class | FirmwareBuilderBase |
| class | GuidCache |
| Maps asset paths to GUIDs, read from the .data sidecar files and cached in a JSON file. More... | |
| class | IAssetImporter |
| Base interface for asset importers. More... | |
| class | IBuildActivitySink |
| struct | ImportResult |
| class | IPlatformEditorUI |
| A builder's own settings UI in the platform editor. More... | |
| class | ITargetBuilder |
| A build backend: everything the editor knows about one kind of target. More... | |
| class | NodeCanvas |
| struct | NodeCanvasEvents |
| What happened this frame. Every field is false or zero unless its event fired. More... | |
| struct | NodeCanvasLink |
| One link to draw, by node ids and pin indices. More... | |
| struct | NodeCanvasNode |
| One node to draw. Pin labels are for display; events report pin indices. More... | |
| struct | NodeCanvasPalette |
| Canvas colours, packed as EditorUI::Rgba does: a<<24 | b<<16 | g<<8 | r. More... | |
| struct | PackageDecision |
| struct | PickerItem |
| One entry in a SchematicPicker list. More... | |
| struct | PlatformConfig |
| What the editor knows about a platform: its identity, the framework whose backend builds for it, that backend's settings (carried, not interpreted), its screen, compiler flags, what it offers packages and what it needs from them, and the scene it boots. More... | |
| struct | PlatformOriginStatus |
| class | PlatformRegistry |
| The available platforms, all loaded from JSON: the project's own, those its packages offer, and board packs. More... | |
| struct | PlatformSyncResult |
| struct | PlatformTemplate |
| struct | PostInstallDef |
| class | SceneView |
| The scene view's current render context, for gizmo code to read: More... | |
| struct | SceneViewContext |
| Everything BeginObject() needs to set up an object's gizmo context. More... | |
| struct | SpriteFrameData |
| A sprite frame's pixel rect within its texture, registered by frame GUID and used for rendering. More... | |
| struct | SpriteSettings |
| struct | StripPlan |
| struct | SubAssetInfo |
| An item inside a parent asset, such as a sprite frame or a LOD level. More... | |
| struct | SubComponentDef |
| struct | TargetContentConflict |
| struct | TexData |
| struct | TexHeader |
| class | TextureImporter |
| struct | TextureSettings |
| struct | TextureTargetSettings |
| One target's own values. More... | |
| struct | ToolchainComponent |
| class | ToolchainComponentManager |
| Manages a builder's toolchain components as its BuilderDefinition describes them: detects them, downloads and installs them, and checks for updates. More... | |
| struct | ToolchainVersionInfo |
| struct | VersionCheckDef |
Typedefs | |
| using | AssetCacheHandler = std::function<AssetCacheResult(const AssetCacheContext& ctx)> |
| Called by ProcessAsset for the extensions it is registered for. | |
| using | AssetExportEncoder = std::function<bool(const AssetExportContext& ctx)> |
| Writes an asset the way a given target stores it. | |
| using | DownloadProgressCallback = std::function<void(const DownloadProgress&)> |
| using | VersionCheckCallback = std::function<void(const ToolchainVersionInfo&)> |
| using | BuildOutputCallback = std::function<void(const std::string& line, bool isError)> |
| using | BuildProgressCallback = std::function<void(const BuildProgress&)> |
| using | HttpStatusCallback = std::function<void(const std::string&)> |
Enumerations | |
| enum class | AssetFilterType { All , Textures , Audio , Scripts , Scenes , Fonts , Animations } |
| enum class | AssetCacheResult { NotCached , Cached , PreCached } |
| What a cache handler did. More... | |
| enum class | AssetCompileTarget { Texture , Audio , Data , None } |
| What an asset type compiles to. More... | |
| enum class | AssetCategory { Unknown , Texture , Procedural , Audio , Font , Scene , Animation , Pipeline , Script , Data } |
| The broad family of an asset, used by the editor for icons, browser grouping and file-dialog filters. More... | |
| enum class | DownloadStatus { Idle , CheckingVersion , Downloading , Extracting , Completed , Failed } |
| enum class | AdoptPlatformResult { AlreadyDefined , Adopted , NoTemplate , Ambiguous , Failed } |
| enum class | ToolchainComponentStatus { Installed , NotInstalled , UpdateAvailable , Installing } |
| enum class | BuildState { Idle , Building , Deploying , Completed , Failed } |
| enum class | SceneEditTool { Select , Move , Rect } |
| Scene-view editing tool that package-DLL editors can ask for. More... | |
| enum class | EditorType { CustomEditor , AssetTypeEditor , CliTool } |
| enum class | DialogButton { Normal , Primary , Danger } |
| The button row at the foot of a dialog: equal-width buttons across the dialog, text centred, the safe choice first and the action last. More... | |
| enum class | FeatureState { Required , Pinned , Used , Kept , DefaultOn , ForcedOff , Stripped } |
| enum class | TexFlags : uint32_t { None = 0 , HasTransparency = 0x01 , HasAlpha = 0x02 , IsSprite = 0x04 , AllOpaque = 0x08 } |
| enum class | TextureFormat : uint32_t { RGB888 = 0 , RGBA8888 = 1 , RGB565 = 2 , RGB565A8 = 3 , ALPHA8 = 4 } |
| enum class | MetadataChunkType : uint32_t { Sprite = 1 , FrameList = 2 , ChromaKey = 3 , SourceSize = 4 } |
| enum class | SpriteSlicingMode { None = 0 , Grid = 1 , Atlas = 2 } |
Functions | |
| bool | LoadAssetData (const std::string &path, AssetData &out) |
| Reads the .data file at path into out. | |
| bool | SaveAssetData (const std::string &path, const AssetData &data) |
| Writes data to the .data file at path. Returns true on success. | |
| std::string | GetAssetDataPath (const std::string &assetPath) |
| The sidecar path for an asset: "foo.png" gives "foo.png.data". | |
| std::string | ReadAssetGuid (const std::string &assetPath) |
| The GUID from the asset's .data sidecar, or "" when there is none. | |
| std::string | GetOrCreateAssetGuid (const std::string &assetPath) |
| The asset's GUID, creating the .data sidecar with a new GUID if needed. | |
| std::string | SalvageAssetGuid (const std::string &dataPath) |
| Reads the GUID from the raw text of a sidecar that does not parse as JSON (a git merge conflict, a torn write). | |
| std::string | GenerateDeterministicGuid (const std::string &seed) |
| A GUID that is always the same for the same seed. | |
| std::string | BakedFontGuid (const std::string &sourceGuid, int fontSize, bool bdf) |
| The GUID of a font's baked form, as deki-2d bakes it (FontSyncHandler): a TrueType font has one per size ("source:size"), a BDF font one whatever the size ("source:bdf"). | |
| std::string | BakedFontAtlasGuid (const std::string &sourceGuid, int fontSize, bool bdf) |
| The GUID of the atlas of the baked form BakedFontGuid names. | |
| std::string | GenerateGuid () |
| A new random GUID. | |
| void | SetBuildActivitySink (IBuildActivitySink *sink) |
| Installs the sink, or nullptr to report nowhere. | |
| IBuildActivitySink * | GetBuildActivitySink () |
| The installed sink, or nullptr. Prefer the free functions below. | |
| void | BuildActivityLog (const std::string &process, const std::string &message) |
| Reports to the sink; does nothing when none is installed. | |
| void | BuildActivityComplete (const std::string &process) |
| void | BuildActivityFail (const std::string &process, const std::string &error) |
| bool | ParseBuilderDefinition (const std::string &jsonText, BuilderDefinition &outDef, std::string &outError) |
| Parses a toolchain definition from JSON text. | |
| bool | LoadBuilderDefinition (const std::string &jsonPath, BuilderDefinition &outDef, std::string &outError) |
| The same, from a file the backend locates itself. | |
| ITargetBuilder * | SelectBuilder (const std::vector< ITargetBuilder * > &builders, const std::string &framework) |
| The builder claiming framework, or nullptr. | |
| std::string | DescribeNoBuilder (const std::vector< ITargetBuilder * > &builders, const std::string &framework) |
| Why no builder matched, for the error the user sees: names the framework asked for and lists the registered ones. | |
| void | DrawStringListEditor (const char *label, std::vector< std::string > &list, char *newItemBuffer, size_t bufSize) |
| An editable list of strings: one row per entry with a remove button, and a field that appends. | |
| bool | IsValidCapabilityName (const std::string &name) |
| bool | PlatformFromJson (const std::string &text, PlatformConfig &config) |
| A platform as JSON text, in the one form SavePlatformToFile writes. | |
| std::string | PlatformToJson (const PlatformConfig &config) |
| std::vector< PlatformTemplate > | FindPlatformTemplates (const std::string &projectPath) |
| Every template offered by a package installed in the project, sorted by platform id then package id. | |
| AdoptPlatformResult | AdoptPlatformTemplate (const std::string &projectPath, const std::string &platformId, std::string &detail) |
| Makes platformId the project's own, copying a template if needed. | |
| bool | EnsureProjectPlatform (const std::string &projectPath, const std::string &platformId, std::string &err) |
| Call first whenever a platform is used (opening a project on it, switching to it, building for it): adopts it if it is only on offer, and loads the adopted copy into PlatformRegistry. | |
| void | RegisterPlatformTemplates (const std::string &projectPath) |
| Registers in PlatformRegistry every template the project has not adopted, so a package's platforms can be seen and chosen before they are copied in. | |
| PlatformOriginStatus | GetPlatformOrigin (const std::string &projectPath, const std::string &platformId) |
| Where platformId came from and how it differs. | |
| PlatformSyncResult | UpdatePlatformFromPackage (const std::string &projectPath, const std::string &platformId) |
| PlatformSyncResult | RestorePlatformFromPackage (const std::string &projectPath, const std::string &platformId) |
| unsigned | ProjectPlatformsRevision () |
| Goes up whenever the project's platforms or their origins may have changed (a reload, an adoption, an update, a restore), so a panel can cache GetPlatformOrigin instead of reading files every frame. | |
| void | NoteProjectPlatformsChanged () |
| void | ReloadProjectPlatforms (const std::string &projectPath) |
| Rebuilds PlatformRegistry for the project from scratch: board packs, then what its installed packages offer, then its own. | |
| bool | AddSimulationSteps (nlohmann::json &scene, const nlohmann::json &steps, std::string &error) |
| Builds a simulated build's boot scene: the board's, plus the simulator's steps. | |
| std::string | ReadCMakeCacheVar (const std::string &buildDir, const std::string &name) |
| Value of name in <buildDir>/CMakeCache.txt, i.e. | |
| ComponentUsage | ScanComponentUsage (const std::string &projectPath, const std::vector< std::string > &knownTypes, const std::vector< std::string > &scanPackageIds, const std::string &targetPlatformId="", const std::set< std::string > &targetCapabilities={}, const std::vector< std::string > &extraSceneDirs={}) |
| std::string | ShortTypeName (const std::string &qualified) |
| Deki::Component * | AddComponentByName (Deki::Object *object, const std::string &typeName) |
| Creates a component by its qualified class name and attaches it to object. | |
| void | SetupEditorTheme (float dpiScale) |
| Applies the Deki schematic theme to ImGui. | |
| void | Tooltip (const char *fmt,...) IM_FMTARGS(1) |
| void | FirstUseWindowPlacement (float width, float height) |
| Where a window first appears: width x height, centred over the editor. | |
| void | EmptyStateText (const char *text) |
| A panel's "nothing here" line (empty list, search with no result): dim, wrapped, inset like the rows above it rather than against the panel edge. | |
| int | SchematicPicker (const char *id, const char *title, const PickerItem *items, int itemCount, bool justOpened, float listHeight, const char *itemIcon=nullptr, const char *searchHint=nullptr, const char *emptyText=nullptr) |
| The editor's search-first picker: two-level browsing (categories, then what is inside one), ranked search across every level at once, full keyboard control, and a slide when you step between levels. | |
| void | BeginPropertyContext () |
| Opens the shared property-list layout: the body indent, row gap and field padding of every property list in the editor. | |
| void | EndPropertyContext () |
| bool | SchematicCollapsingHeader (const char *label, ImGuiTreeNodeFlags flags=ImGuiTreeNodeFlags_DefaultOpen) |
| Schematic collapsing header for inspector sections, with the label in Space Grotesk (Title Case as typed). | |
| bool | SchematicSectionBegin (const char *label, ImGuiTreeNodeFlags flags=ImGuiTreeNodeFlags_DefaultOpen, ImGuiID *outHeaderId=nullptr) |
| The same band as SchematicCollapsingHeader, with the body SLIDING open and shut instead of appearing and vanishing. | |
| void | SchematicSectionEnd () |
| bool | SchematicTreeBodyBegin (bool open, ImGuiID nodeId) |
| The children of a tree node, sliding open and shut like a section body. | |
| void | SchematicTreeBodyEnd () |
| bool | SchematicSectionBand (const char *label, float *outLabelX=nullptr) |
| The same band without the fold: same height, full bleed and uppercase letter-spaced label as SchematicCollapsingHeader, with no chevron and no collapsing. | |
| bool | SchematicBandTitleField (const char *id, char *buf, int bufSize, float x, float bandTop, float bandBottom, float width, const char *hint) |
| An inline rename field drawn AS a band title: no frame, background or padding, in the band's own font, size and color, centered on the band's line. | |
| void | SchematicSubHeader (const char *label) |
| One rung below both of those: a DEKI_GROUP-style subdivision INSIDE a section. | |
| bool | SchematicAddButton (const char *label, float width=0.0f) |
| The "add one more" button at the end of a list (Add Component, Add Transition): a centered outlined box (transparent fill, hairline border, dim label) that takes the accent only on hover. | |
| void | DrawTreeNodeChevronLabel (bool open, bool expandable, const char *label, ImU32 labelColor) |
| Draws a tree node's expand chevron (Tabler chevron, down=open / right=closed) and its label, in place of ImGui's filled triangle. | |
| void | FullBleedSeparator () |
| Like ImGui::Separator(), but the hairline spans the full panel width, past the indent on the left and past the scrollbar on the right, so it touches both dock seams. | |
| bool | PanelToolbar (bool *pinned=nullptr) |
| The toolbar under a panel's tab: a full-width strip with a PIN (lock-to-selection) toggle on the left, a "..." menu on the right and a hairline below. | |
| void | SearchField (const char *id, char *buf, size_t bufSize, float rightReserve=0.0f, bool bottomBorder=false, float *outSlotX=nullptr, float *outSlotY=nullptr, float *outSlotW=nullptr, float *outSlotH=nullptr, const char *hint="Search") |
| Search field in the style of the Hierarchy and Asset Browser: a dim magnifier, then a borderless transparent input, vertically centered in a full-width band of its own. | |
| bool | SchematicToolbarCombo (const char *id, int *currentIndex, const char *items, float height, bool leftDivider=false) |
| Flat dropdown matching the panel toolbar's cells: a transparent, square, borderless box with a faint white hover, height px tall, the value and chevron centered. | |
| bool | SchematicBeginToolbarCombo (const char *id, const char *preview, float height, bool leftDivider=false) |
| The same toolbar dropdown with rows of your own (sections, separators, items that do more than pick an index): Begin draws the box and returns true while the list is open; draw ImGui::Selectable rows, then call SchematicEndToolbarCombo(), only when Begin returned true. | |
| void | SchematicEndToolbarCombo () |
| float | SchematicToolbarComboWidth (const char *preview) |
| bool | SchematicActionLink (const char *label) |
| Right-aligned EDIT -> style action link, in ALL CAPS mono accent text with a 1px underline. | |
| bool | SchematicDragFloat (const char *id, float *v, float vSpeed=1.0f, float vMin=0.0f, float vMax=0.0f, const char *format="%.3f") |
| Drag widgets with LEFT-aligned value text (ImGui centers it). | |
| bool | SchematicDragInt (const char *id, int *v, float vSpeed=1.0f, int vMin=0, int vMax=0, const char *format="%d") |
| bool | SchematicDragFloat2 (const char *id, float v[2], float vSpeed=1.0f, float vMin=0.0f, float vMax=0.0f, const char *format="%.3f") |
| Drag widgets with several components sharing the rest of the row. | |
| bool | SchematicDragFloat3 (const char *id, float v[3], float vSpeed=1.0f, float vMin=0.0f, float vMax=0.0f, const char *format="%.3f") |
| bool | SchematicDragFloatAxis (const char *id, float *v, int axis, float vSpeed=1.0f, float vMin=0.0f, float vMax=0.0f, const char *format="%.3f") |
| One box of those, with its axis stamp (0 = X, 1 = Y, 2 = Z), as an item of its own: for a caller that needs each box's activation, or a different format per box (a dash for values that differ across a selection). | |
| bool | SchematicColorEdit4 (const char *id, float col[4]) |
| Schematic color editors, with the semantics of ImGui::ColorEdit4 / ColorEdit3 (rgba / rgb as 0-1 floats). | |
| bool | SchematicColorEdit3 (const char *id, float col[3]) |
| bool | SchematicCombo (const char *id, int *currentIndex, const char *const items[], int count) |
| Dropdown matching the drag fields: near-black frame, the current item left-aligned in the mono value font, a Tabler chevron on the right. | |
| bool | SchematicCombo (const char *id, int *currentIndex, const char *itemsSeparatedByZeros) |
| bool | SchematicBeginCombo (const char *id, const char *preview) |
| Open/close for custom dropdowns whose items are not a fixed string array (dynamic lists, custom preview text), with SchematicCombo's look. | |
| void | SchematicEndCombo () |
| void | DrawAllTabTopAccents () |
| Draws a 1px accent line along the top of the selected tab in every dock node with a tab bar. | |
| void | DrawDockSeams () |
| Draws the 1px frame of standalone floating windows (dialogs, undocked tool windows). | |
| bool | SchematicCheckbox (const char *label, bool *v) |
| Schematic checkbox: a 1px square border with a smaller filled square inside when checked. | |
| bool | SchematicCheckbox (const char *label, bool *v, const ImVec4 &fillColor) |
| void | PushContextMenuPopupStyle () |
| Styling for right-click context menus. | |
| void | PushContextMenuItemStyle () |
| bool | BeginSchematicModal (const char *title, float cssWidth) |
| Schematic modal dialog: centered over the main viewport, a fixed CSS-px width (auto height), generous padding, no saved settings. | |
| void | EndSchematicModal () |
| int | SchematicDialogButtons (std::initializer_list< DialogButtonSpec > buttons) |
| int | GetRegisteredWindowCount () |
| const EditorWindowMeta * | GetRegisteredWindowMeta (int index) |
| void | RegisterEditorWindow (const EditorWindowMeta &meta) |
| void | ClearRegisteredWindows () |
| void | TrimRegisteredWindows (int keepCount) |
| const char * | FeatureStateName (FeatureState state) |
| StripPlan | ResolveStripPlan (const std::vector< CMakeGen::PackageEntry > &allPackages, const ComponentUsage &usage, const BuildStripSettings &settings, const std::string &packagesDir) |
| std::vector< TargetContentConflict > | FindTargetContentConflicts (const std::string &projectPath, const std::string &targetPlatformId) |
| StripPlan | ComputeStripPlan (const std::string &projectPath, const std::string &targetPlatformId="", const std::vector< std::string > &extraSceneDirs={}) |
| bool | ReadFileToString (const std::string &path, std::string &out, std::string &err) |
| Reads a whole file into out. | |
| bool | ReplaceFileWith (const std::filesystem::path &tmp, const std::filesystem::path &target, std::string &err, bool durable=true) |
| Renames a finished temp file over target in one step. | |
| bool | AtomicWriteFile (const std::string &path, std::string_view content, std::string &err, bool durable=true) |
| Replaces path with content atomically: writes a sibling .tmp file and renames it over the destination, so a crash mid-write cannot leave a partial file. | |
| bool | IsLinkOrJunction (const std::filesystem::path &path) |
| True when path is a symbolic link or, on Windows, a junction. | |
| bool | RemoveTree (const std::filesystem::path &path, std::error_code &ec) |
| Deletes path and everything under it, like std::filesystem::remove_all, including read-only files: git keeps its pack files read-only, and remove_all cannot delete those on Windows. | |
| const char * | Tr (const char *english) |
| english in the current language, or english itself when there is no translation. | |
| const char * | TrLabel (const char *label) |
| An ImGui label in the current language: the translated text before any "##", then "###" and the English label, so the ID never changes. | |
| constexpr const char * | TrMark (const char *english) |
| Marks English text for translation where it is written, in a table of labels, without translating it: whatever shows it later passes it to Tr(). | |
| std::string | NormalizeProjectRoot (const std::string &projectPath) |
| Makes a project root absolute. | |
| std::string | GetGeneratedDirectory (const std::string &projectPath) |
| Root of everything the editor generates. Disposable: recreated on open and build. | |
| std::string | GetCacheDirectoryRelative () |
| The cache directory relative to the project, with forward slashes. | |
| std::string | GetCacheDirectory (const std::string &projectPath) |
| The project's cache directory: <project>/generated/cache. | |
| std::string | GetCachePath (const std::string &projectPath, const std::string &assetGuid) |
| The cached file for the asset assetGuid: <project>/generated/cache/<guid>. | |
| std::string | GetRuntimeDirectory (const std::string &projectPath) |
| Package DLLs the editor loads. | |
| std::string | GetBuildDirectory (const std::string &projectPath) |
| CMake/Ninja build tree. | |
| std::string | GetShadowDirectory (const std::string &projectPath) |
| Hot-reload copies of the runtime DLLs. | |
| std::string | GetSettingsDirectory (const std::string &projectPath) |
| Project settings, authored and tracked. | |
| std::string | GetSourceDirectory (const std::string &projectPath) |
| std::string | GetAssetsDirectory (const std::string &projectPath) |
| std::string | GetPackagesDirectory (const std::string &projectPath) |
| std::string | GetPackageManifestFile (const std::string &projectPath) |
| The manifest naming a project's package dependencies, and its lockfile. | |
| std::string | GetPackageLockFile (const std::string &projectPath) |
| std::string | GetPlatformsDirectory (const std::string &projectPath) |
| std::string | GetAssetsDirectoryRelative () |
| std::string | GetSourceDirectoryRelative () |
| std::string | GetPackagesDirectoryRelative () |
| std::string | GetPackageManifestFileName () |
| Manifest and lock filenames, as written at the project root. | |
| std::string | GetPackageLockFileName () |
| std::string | GetPlatformsDirectoryRelative () |
| bool | LaunchDetached (const std::string &program, const std::vector< std::string > &args) |
| Launches program with args, detached, without a console window. | |
| bool | LaunchDetachedInDirectory (const std::string &program, const std::vector< std::string > &args, const std::string &workingDirectory) |
| Launches program from workingDirectory, detached, keeping its console. | |
| bool | OpenInCodeEditor (const std::string &filePath, int line=-1) |
| Opens a source file in the user's code editor, at line when it is not -1. | |
| bool | RevealInFileManager (const std::string &path) |
| Shows a file or directory in the platform's file manager. | |
| std::vector< std::string > | ObjectMissingCapabilities (const nlohmann::json &obj, const std::set< std::string > &capabilities) |
| What obj needs that capabilities does not offer. | |
| nlohmann::json | FilterSceneForTarget (const nlohmann::json &scene, const std::set< std::string > &capabilities) |
| scene with every object the target cannot satisfy removed. | |
| bool | SceneHasTargetRequirements (const nlohmann::json &scene) |
| True when the filter would change anything, so a caller can skip the copy. | |
| bool | PreserveTargetRequirements (const std::string &scenePath, const nlohmann::json &before) |
| Copies every object's "requires" from before (the file as it was) into the file the editor has just rewritten, matching objects by id. | |
| std::map< int64_t, std::vector< std::string > > | CollectTargetRequirements (const nlohmann::json &scene) |
| The "requires" of every object in scene, keyed by object id. | |
| std::vector< std::string > | EnumerateSerialPorts () |
| Serial ports on the machine, sorted (COM1 before COM10 on Windows). | |
| int | RunShellCommand (const std::string &commandLine, const std::string &workingDirectory, const std::function< void(const std::string &line)> &onLine, const std::atomic< bool > *cancel=nullptr) |
| Runs commandLine through the platform shell: cmd.exe /S /C "<line>" on Windows, /bin/sh -c elsewhere. | |
| bool | ParseTextureFormat (const std::string &name, TextureFormat &out) |
| A texture format by the name the sidecar and the inspector use. | |
| const char * | TextureFormatName (TextureFormat f) |
| bool | ParseColorFormat (const std::string &name, Deki::ColorFormat &out) |
| A screen format by the name a platform file uses ("RGB565", ...). | |
| const char * | ColorFormatName (Deki::ColorFormat f) |
| TextureFormat | AutomaticTextureFormat (Deki::ColorFormat screen, bool hasAlpha) |
| The format Automatic picks for a screen of this format. | |
| TextureFormat | ResolveTextureFormat (const std::string &assetFormat, const std::string &targetFormat, Deki::ColorFormat screen, bool hasAlpha) |
| The stored format for one target. | |
| bool | DecodeImageFile (const std::string &absolutePath, DecodedImage &out) |
| Decodes an image file (PNG/JPG/BMP/TGA/GIF) from disk into RGBA8. | |
| TextureSettings | ReadTextureSettings (const nlohmann::json &tex) |
| Reads settings.texture. Pass the object itself; a missing one gives defaults. | |
| void | WriteTextureTarget (nlohmann::json &tex, const std::string &platformId, const TextureTargetSettings &t) |
| Writes one target's values into settings.texture, always in the object form. | |
| void | MaxSizeDims (int srcW, int srcH, int maxSize, int &outW, int &outH) |
| The size an image of srcW x srcH is stored at under maxSize (0 = no limit): unchanged when it fits, else its larger side becomes maxSize and the other keeps the proportion (at least 1). | |
| int | SourceToStored (int v, int sourceSize, int storedSize) |
| A source-pixel coordinate on one axis (a rect edge, not a size) in stored pixels: round(v * stored / source). | |
| int | CompareVersions (const std::string &a, const std::string &b) |
| Compares two dotted version strings ("3.1.1" vs "3.2.0"). | |
| std::string | HighestVersion (const std::vector< std::string > &versions) |
| The highest version in versions by CompareVersions, or "" when empty. | |
Variables | |
| constexpr int | kDekiCacheVersion = 5 |
| constexpr int | kSceneCompileVersion = 2 |
| constexpr const char * | kSimulationSceneDir = "simulation" |
| Where a simulated build keeps its boot scene: this directory under the builder's build directory, as boot.scene. | |
| constexpr const char * | kSimulationCardDir = "sd_card" |
| What the simulated board's SD card holds, under kSimulationSceneDir: the assets, exported as the SD Card Deploy panel exports them, for a target that keeps them on the card; empty for one that keeps them inside. | |
| ImFont * | g_FontUI |
| ImFont * | g_FontUISmall |
| ImFont * | g_FontUIMed |
| ImFont * | g_FontUIBold |
| ImFont * | g_FontMono |
| ImFont * | g_FontMonoSmall |
| ImFont * | g_FontMonoBold |
| ImFont * | g_FontDisplay |
| ImFont * | g_FontDisplaySmall |
| ImFont * | g_FontLogo |
| constexpr float | kTooltipDelaySeconds = 1.0f |
| Every tooltip in the editor goes through here. | |
| constexpr const char * | kAutomaticFormat = "Automatic" |
| constexpr int | kTextureMaxSizes [] = { 0, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192 } |
| The Max Size choices, as Unity offers them. 0 means no limit. | |
| constexpr int | kTextureMaxSizeCount = sizeof(kTextureMaxSizes) / sizeof(kTextureMaxSizes[0]) |
| using DekiEditor::AssetCacheHandler = std::function<AssetCacheResult(const AssetCacheContext& ctx)> |
Called by ProcessAsset for the extensions it is registered for.
Writes the cache files and registers sub-assets.
Packages register handlers through AssetPipeline::OnStarted, to override a built-in handler or to support a new file type.
| using DekiEditor::AssetExportEncoder = std::function<bool(const AssetExportContext& ctx)> |
Writes an asset the way a given target stores it.
Registered per extension by the package that owns the asset type, next to its cache handler. Returns false when it could not write outPath; the export then reports it and ships nothing for that asset.
| using DekiEditor::DownloadProgressCallback = std::function<void(const DownloadProgress&)> |
| using DekiEditor::VersionCheckCallback = std::function<void(const ToolchainVersionInfo&)> |
| using DekiEditor::BuildOutputCallback = std::function<void(const std::string& line, bool isError)> |
| using DekiEditor::BuildProgressCallback = std::function<void(const BuildProgress&)> |
| using DekiEditor::HttpStatusCallback = std::function<void(const std::string&)> |
|
strong |
|
strong |
What a cache handler did.
ProcessAsset updates the asset's cache state from it, so the handler never touches AssetCacheContext or AssetInfo.
| Enumerator | |
|---|---|
| NotCached | |
| Cached | |
| PreCached | |
|
strong |
|
strong |
The broad family of an asset, used by the editor for icons, browser grouping and file-dialog filters.
Each package declares the category of the extensions it owns (RegisterCategory or AssetTypeHandler::category). Extensions and asset type names belong to the owning package behind a registry, never hardcoded in deki-engine or deki-editor.
| Enumerator | |
|---|---|
| Unknown | |
| Texture | |
| Procedural | |
| Audio | |
| Font | |
| Scene | |
| Animation | |
| Pipeline | |
| Script | |
| Data | |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
The button row at the foot of a dialog: equal-width buttons across the dialog, text centred, the safe choice first and the action last.
Primary is the accent button that does what the dialog is for; Danger is theme red, for deleting or discarding. Returns the index clicked, or -1.
switch (SchematicDialogButtons({ { "Cancel" }, { "Delete", DialogButton::Danger } }))
| Enumerator | |
|---|---|
| Normal | |
| Primary | |
| Danger | |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
| bool DekiEditor::LoadAssetData | ( | const std::string & | path, |
| AssetData & | out ) |
Reads the .data file at path into out.
Returns false when the file is missing or invalid.
| bool DekiEditor::SaveAssetData | ( | const std::string & | path, |
| const AssetData & | data ) |
Writes data to the .data file at path. Returns true on success.
| std::string DekiEditor::GetAssetDataPath | ( | const std::string & | assetPath | ) |
The sidecar path for an asset: "foo.png" gives "foo.png.data".
| std::string DekiEditor::ReadAssetGuid | ( | const std::string & | assetPath | ) |
The GUID from the asset's .data sidecar, or "" when there is none.
| std::string DekiEditor::GetOrCreateAssetGuid | ( | const std::string & | assetPath | ) |
The asset's GUID, creating the .data sidecar with a new GUID if needed.
| std::string DekiEditor::SalvageAssetGuid | ( | const std::string & | dataPath | ) |
Reads the GUID from the raw text of a sidecar that does not parse as JSON (a git merge conflict, a torn write).
Returns "" when the text holds no GUID or more than one distinct GUID: a conflict on the GUID itself cannot be settled here.
| std::string DekiEditor::GenerateDeterministicGuid | ( | const std::string & | seed | ) |
A GUID that is always the same for the same seed.
Used for derived assets such as font sizes.
| std::string DekiEditor::BakedFontGuid | ( | const std::string & | sourceGuid, |
| int | fontSize, | ||
| bool | bdf ) |
The GUID of a font's baked form, as deki-2d bakes it (FontSyncHandler): a TrueType font has one per size ("source:size"), a BDF font one whatever the size ("source:bdf").
| std::string DekiEditor::BakedFontAtlasGuid | ( | const std::string & | sourceGuid, |
| int | fontSize, | ||
| bool | bdf ) |
The GUID of the atlas of the baked form BakedFontGuid names.
| std::string DekiEditor::GenerateGuid | ( | ) |
A new random GUID.
| void DekiEditor::SetBuildActivitySink | ( | IBuildActivitySink * | sink | ) |
Installs the sink, or nullptr to report nowhere.
Not owned: the editor keeps its sink alive for the session.
| IBuildActivitySink * DekiEditor::GetBuildActivitySink | ( | ) |
The installed sink, or nullptr. Prefer the free functions below.
| void DekiEditor::BuildActivityLog | ( | const std::string & | process, |
| const std::string & | message ) |
Reports to the sink; does nothing when none is installed.
| void DekiEditor::BuildActivityComplete | ( | const std::string & | process | ) |
| void DekiEditor::BuildActivityFail | ( | const std::string & | process, |
| const std::string & | error ) |
| bool DekiEditor::ParseBuilderDefinition | ( | const std::string & | jsonText, |
| BuilderDefinition & | outDef, | ||
| std::string & | outError ) |
Parses a toolchain definition from JSON text.
On failure, says why in outError.
Text, not a path, is the main form: a backend lives in a package whose DLL is built into the project's runtime directory, far from its sources, so it carries its definition inside itself.
| bool DekiEditor::LoadBuilderDefinition | ( | const std::string & | jsonPath, |
| BuilderDefinition & | outDef, | ||
| std::string & | outError ) |
The same, from a file the backend locates itself.
| ITargetBuilder * DekiEditor::SelectBuilder | ( | const std::vector< ITargetBuilder * > & | builders, |
| const std::string & | framework ) |
The builder claiming framework, or nullptr.
Separate from the registry so it can be tested without loading a real builder.
| std::string DekiEditor::DescribeNoBuilder | ( | const std::vector< ITargetBuilder * > & | builders, |
| const std::string & | framework ) |
Why no builder matched, for the error the user sees: names the framework asked for and lists the registered ones.
| void DekiEditor::DrawStringListEditor | ( | const char * | label, |
| std::vector< std::string > & | list, | ||
| char * | newItemBuffer, | ||
| size_t | bufSize ) |
An editable list of strings: one row per entry with a remove button, and a field that appends.
Draws an editable string list (defines, flags, etc.).
newItemBuffer is the caller's scratch for the field. label is English: it is shown in the editor's language and is also the list's ID.
| bool DekiEditor::IsValidCapabilityName | ( | const std::string & | name | ) |
| bool DekiEditor::PlatformFromJson | ( | const std::string & | text, |
| PlatformConfig & | config ) |
A platform as JSON text, in the one form SavePlatformToFile writes.
Reading accepts every older spelling; writing produces only this one, so two platform files mean the same thing exactly when their round trips are equal.
| std::string DekiEditor::PlatformToJson | ( | const PlatformConfig & | config | ) |
| std::vector< PlatformTemplate > DekiEditor::FindPlatformTemplates | ( | const std::string & | projectPath | ) |
Every template offered by a package installed in the project, sorted by platform id then package id.
Reads directories only; no package is loaded.
| AdoptPlatformResult DekiEditor::AdoptPlatformTemplate | ( | const std::string & | projectPath, |
| const std::string & | platformId, | ||
| std::string & | detail ) |
Makes platformId the project's own, copying a template if needed.
detail names the package adopted from, the packages in conflict, or the error. Never overwrites a platform the project already defines.
| bool DekiEditor::EnsureProjectPlatform | ( | const std::string & | projectPath, |
| const std::string & | platformId, | ||
| std::string & | err ) |
Call first whenever a platform is used (opening a project on it, switching to it, building for it): adopts it if it is only on offer, and loads the adopted copy into PlatformRegistry.
A template's boot scene path is relative to the project, so a platform chosen but never copied in would build without one.
False, with the reason, only when adopting was needed and failed. A platform nobody offers is not an error here: it may come from a board pack, and if it comes from nowhere the caller's own lookup reports it.
| void DekiEditor::RegisterPlatformTemplates | ( | const std::string & | projectPath | ) |
Registers in PlatformRegistry every template the project has not adopted, so a package's platforms can be seen and chosen before they are copied in.
Call before loading the project's own platforms, which override these.
| PlatformOriginStatus DekiEditor::GetPlatformOrigin | ( | const std::string & | projectPath, |
| const std::string & | platformId ) |
Where platformId came from and how it differs.
Only reads files; the registry is not touched.
| PlatformSyncResult DekiEditor::UpdatePlatformFromPackage | ( | const std::string & | projectPath, |
| const std::string & | platformId ) |
| PlatformSyncResult DekiEditor::RestorePlatformFromPackage | ( | const std::string & | projectPath, |
| const std::string & | platformId ) |
| unsigned DekiEditor::ProjectPlatformsRevision | ( | ) |
Goes up whenever the project's platforms or their origins may have changed (a reload, an adoption, an update, a restore), so a panel can cache GetPlatformOrigin instead of reading files every frame.
| void DekiEditor::NoteProjectPlatformsChanged | ( | ) |
| void DekiEditor::ReloadProjectPlatforms | ( | const std::string & | projectPath | ) |
Rebuilds PlatformRegistry for the project from scratch: board packs, then what its installed packages offer, then its own.
For when the installed packages change under an open project, so a package's boards appear when it is installed and go when it is removed.
| bool DekiEditor::AddSimulationSteps | ( | nlohmann::json & | scene, |
| const nlohmann::json & | steps, | ||
| std::string & | error ) |
Builds a simulated build's boot scene: the board's, plus the simulator's steps.
For ITargetBuilder::MakeSimulationBootScene.
steps is an array of {"name", "type", "properties"} (the qualified component type and its property values). Each becomes a child of the object holding the Deki::PlatformSetupComponent, with an id unique in the scene, listed after the board's own setup steps so it runs last: a simulator's display is installed after the board's and is the one the game renders to. Every other object and step is kept as it was.
scene may be null (a platform with no boot scene of its own); it then becomes a boot scene with only a PlatformSetupComponent and the steps, which boots the project's startup scene as the device would.
False, with error set, when steps is not an array of such objects or the scene has no objects array.
| std::string DekiEditor::ReadCMakeCacheVar | ( | const std::string & | buildDir, |
| const std::string & | name ) |
Value of name in <buildDir>/CMakeCache.txt, i.e.
the text after '=' on the name:TYPE=value line. "" when the cache or the entry is missing.
| ComponentUsage DekiEditor::ScanComponentUsage | ( | const std::string & | projectPath, |
| const std::vector< std::string > & | knownTypes, | ||
| const std::vector< std::string > & | scanPackageIds, | ||
| const std::string & | targetPlatformId = "", | ||
| const std::set< std::string > & | targetCapabilities = {}, | ||
| const std::vector< std::string > & | extraSceneDirs = {} ) |
| std::string DekiEditor::ShortTypeName | ( | const std::string & | qualified | ) |
| Deki::Component * DekiEditor::AddComponentByName | ( | Deki::Object * | object, |
| const std::string & | typeName ) |
Creates a component by its qualified class name and attaches it to object.
Returns the new component, or nullptr when the class is not registered.
For package editor code that builds objects for the user, such as a custom editor adding the children a component needs. It is the path the editor's own commands and panels use. Scripts use obj->AddComponent<T>() instead.
| void DekiEditor::SetupEditorTheme | ( | float | dpiScale | ) |
Applies the Deki schematic theme to ImGui.
Call after ImGui::CreateContext() and before the first frame.
| void DekiEditor::Tooltip | ( | const char * | fmt, |
| ... ) |
| void DekiEditor::FirstUseWindowPlacement | ( | float | width, |
| float | height ) |
Where a window first appears: width x height, centred over the editor.
Call just before its Begin. Applies only the first time (FirstUseEver), so a window the user moved, resized or docked stays there. Otherwise ImGui opens a floating window at (60, 60), over the toolbar.
| void DekiEditor::EmptyStateText | ( | const char * | text | ) |
A panel's "nothing here" line (empty list, search with no result): dim, wrapped, inset like the rows above it rather than against the panel edge.
| int DekiEditor::SchematicPicker | ( | const char * | id, |
| const char * | title, | ||
| const PickerItem * | items, | ||
| int | itemCount, | ||
| bool | justOpened, | ||
| float | listHeight, | ||
| const char * | itemIcon = nullptr, | ||
| const char * | searchHint = nullptr, | ||
| const char * | emptyText = nullptr ) |
The editor's search-first picker: two-level browsing (categories, then what is inside one), ranked search across every level at once, full keyboard control, and a slide when you step between levels.
Draws the BODY of a popup the caller has already begun and placed, so the same list serves Add Component in the Inspector and Add Action in a node graph stack. Returns the index of the item chosen this frame, or -1. justOpened resets the query and level and takes keyboard focus.
| void DekiEditor::BeginPropertyContext | ( | ) |
Opens the shared property-list layout: the body indent, row gap and field padding of every property list in the editor.
Any panel that shows property rows uses this instead of its own numbers, so a widget has the same height and spacing in the Inspector and in package tool windows. Pair with EndPropertyContext.
| void DekiEditor::EndPropertyContext | ( | ) |
| bool DekiEditor::SchematicCollapsingHeader | ( | const char * | label, |
| ImGuiTreeNodeFlags | flags = ImGuiTreeNodeFlags_DefaultOpen ) |
Schematic collapsing header for inspector sections, with the label in Space Grotesk (Title Case as typed).
Returns true if expanded. Keeps ImGui's CollapsingHeader behavior, so BeginPopupContextItem / OpenPopupOnItemClick still attach to it. With ImGuiTreeNodeFlags_Leaf (and DefaultOpen) it is the same band with no chevron and no folding: a column title in a tool window.
| bool DekiEditor::SchematicSectionBegin | ( | const char * | label, |
| ImGuiTreeNodeFlags | flags = ImGuiTreeNodeFlags_DefaultOpen, | ||
| ImGuiID * | outHeaderId = nullptr ) |
The same band as SchematicCollapsingHeader, with the body SLIDING open and shut instead of appearing and vanishing.
if (SchematicSectionBegin("Transform")) { ...rows...; SchematicSectionEnd(); }
Returns true whenever the body must be submitted, including the frames where the section is closing, since a body that is not submitted cannot be animated away. During those frames the body is clipped to the animated height (so the hidden part cannot be hit) and the layout below is pulled up to match. Call SchematicSectionEnd() ONLY when this returned true (as with SchematicBeginCombo / SchematicEndCombo).
A section opened for the very first time has no measured height yet, so it opens instantly; every toggle after that animates. outHeaderId receives the band's ImGui id, even when this returns false. A caller that forces a section open (the property filter does, so a match is never hidden under a collapsed header) needs it to read and later restore the state ImGui keeps for that id.
| void DekiEditor::SchematicSectionEnd | ( | ) |
| bool DekiEditor::SchematicTreeBodyBegin | ( | bool | open, |
| ImGuiID | nodeId ) |
The children of a tree node, sliding open and shut like a section body.
Wraps whatever the caller draws between the node and its TreePop:
const bool open = ImGui::TreeNodeEx(...);
const ImGuiID nid = ImGui::GetItemID(); // capture straight after
if (SchematicTreeBodyBegin(open, nid)) { ...children... }
SchematicTreeBodyEnd(); // ALWAYS, whatever Begin said
if (open) ImGui::TreePop(); // ImGui's own push, unchanged
Returns true whenever the children must be submitted, including the frames where the node is closing. While it closes, ImGui has already dropped the indent and id scope it pushes for an open node, so this pushes them back (and pops them in End); otherwise the children would lay out at the wrong depth and change identity during the animation.
Unlike the section pair, End is called every time: open and "submit the children" are different questions here, and pairing on the wrong one is an easy mistake.
| void DekiEditor::SchematicTreeBodyEnd | ( | ) |
| bool DekiEditor::SchematicSectionBand | ( | const char * | label, |
| float * | outLabelX = nullptr ) |
The same band without the fold: same height, full bleed and uppercase letter-spaced label as SchematicCollapsingHeader, with no chevron and no collapsing.
For a header that TITLES a panel rather than grouping something to fold away. The whole row is clickable (returns true when clicked, e.g. to start an inline rename) and lights up on hover like the header; pass an id-only "###id" label to draw the band empty and place your own control on it. outLabelX receives the screen x of the label, for callers that place their own control on the band and want it to start where the text did.
| bool DekiEditor::SchematicBandTitleField | ( | const char * | id, |
| char * | buf, | ||
| int | bufSize, | ||
| float | x, | ||
| float | bandTop, | ||
| float | bandBottom, | ||
| float | width, | ||
| const char * | hint ) |
An inline rename field drawn AS a band title: no frame, background or padding, in the band's own font, size and color, centered on the band's line.
Pass the band's label x (SchematicSectionBand's outLabelX) and its item rect, so the text lands exactly where the title was and the header looks the same when a rename starts. Returns true when the text changed this frame; the usual IsItem* queries work after it.
| void DekiEditor::SchematicSubHeader | ( | const char * | label | ) |
One rung below both of those: a DEKI_GROUP-style subdivision INSIDE a section.
Same uppercase letter-spaced style, smaller and dimmer, with a rule from the end of the label to the content edge. Draws at the current cursor and reserves its own row.
| bool DekiEditor::SchematicAddButton | ( | const char * | label, |
| float | width = 0.0f ) |
The "add one more" button at the end of a list (Add Component, Add Transition): a centered outlined box (transparent fill, hairline border, dim label) that takes the accent only on hover.
Quieter than a filled button on purpose: at the bottom of a list it is an invitation, not another control to fill in. width 0 uses a comfortable default, clamped to the space available. Returns true when clicked.
| void DekiEditor::DrawTreeNodeChevronLabel | ( | bool | open, |
| bool | expandable, | ||
| const char * | label, | ||
| ImU32 | labelColor ) |
Draws a tree node's expand chevron (Tabler chevron, down=open / right=closed) and its label, in place of ImGui's filled triangle.
Call IMMEDIATELY after an empty-label TreeNodeEx drawn with a transparent ImGuiCol_Text (so the triangle is hidden), while any pushed FramePadding is still active. expandable: the node can open (leaves draw no chevron). labelColor: the label's color; capture GetColorU32(ImGuiCol_Text) BEFORE pushing the transparent color.
| void DekiEditor::FullBleedSeparator | ( | ) |
Like ImGui::Separator(), but the hairline spans the full panel width, past the indent on the left and past the scrollbar on the right, so it touches both dock seams.
Use it to bound a component section like a window edge.
| bool DekiEditor::PanelToolbar | ( | bool * | pinned = nullptr | ) |
The toolbar under a panel's tab: a full-width strip with a PIN (lock-to-selection) toggle on the left, a "..." menu on the right and a hairline below.
Call once right after ImGui::Begin(...), before the panel's content. pinned is the panel's own flag that PIN toggles; only the Inspector pins, so a null flag skips the toolbar. Returns the pin state (true = the panel freezes its content instead of following the selection). The bar currently scrolls with the content.
| void DekiEditor::SearchField | ( | const char * | id, |
| char * | buf, | ||
| size_t | bufSize, | ||
| float | rightReserve = 0.0f, | ||
| bool | bottomBorder = false, | ||
| float * | outSlotX = nullptr, | ||
| float * | outSlotY = nullptr, | ||
| float * | outSlotW = nullptr, | ||
| float * | outSlotH = nullptr, | ||
| const char * | hint = "Search" ) |
Search field in the style of the Hierarchy and Asset Browser: a dim magnifier, then a borderless transparent input, vertically centered in a full-width band of its own.
Call once where the search row goes; content below flows under it. buf/bufSize hold the text.
rightReserve (px) keeps that much room free at the right of the row for a neighbouring control (e.g. a filter dropdown), flush with the window's right edge. The band keeps the input's short height; the reserved slot's rect (full band height, flush right) comes back in outSlotX / outSlotY / outSlotW / outSlotH so the caller can put a toolbar-style control there. bottomBorder draws a full-width hairline under the row.
hint is the placeholder. Say what THIS field searches: a bare "Search" in a panel that already has a title wastes the line, and the same field means different things in the inspector and in a picker popup.
While there is text, a dim x shows at the right of the input; clicking it or pressing Escape in the field empties the buffer, so the user can always see how to clear the filter. The hint is English and shown in the editor's language.
| bool DekiEditor::SchematicToolbarCombo | ( | const char * | id, |
| int * | currentIndex, | ||
| const char * | items, | ||
| float | height, | ||
| bool | leftDivider = false ) |
Flat dropdown matching the panel toolbar's cells: a transparent, square, borderless box with a faint white hover, height px tall, the value and chevron centered.
items is a "A\0B\0" zero-separated list. leftDivider draws a 1px line on the box's left edge (the toolbar cell divider) to set it off from a neighbour. Returns true the frame the selection changes (and writes *currentIndex).
| bool DekiEditor::SchematicBeginToolbarCombo | ( | const char * | id, |
| const char * | preview, | ||
| float | height, | ||
| bool | leftDivider = false ) |
The same toolbar dropdown with rows of your own (sections, separators, items that do more than pick an index): Begin draws the box and returns true while the list is open; draw ImGui::Selectable rows, then call SchematicEndToolbarCombo(), only when Begin returned true.
Size the box with SetNextItemWidth; SchematicToolbarComboWidth(preview) fits it to its text.
| void DekiEditor::SchematicEndToolbarCombo | ( | ) |
| float DekiEditor::SchematicToolbarComboWidth | ( | const char * | preview | ) |
| bool DekiEditor::SchematicActionLink | ( | const char * | label | ) |
Right-aligned EDIT -> style action link, in ALL CAPS mono accent text with a 1px underline.
Call after a section header, on the same row. Returns true if clicked.
| bool DekiEditor::SchematicDragFloat | ( | const char * | id, |
| float * | v, | ||
| float | vSpeed = 1.0f, | ||
| float | vMin = 0.0f, | ||
| float | vMax = 0.0f, | ||
| const char * | format = "%.3f" ) |
Drag widgets with LEFT-aligned value text (ImGui centers it).
Same signature as ImGui::DragFloat / DragInt. They call the ImGui widget with an empty format, so it draws no value, and draw the formatted value left-aligned on the window draw list. Edit mode (Ctrl+click to type) is ImGui's normal text input.
| bool DekiEditor::SchematicDragInt | ( | const char * | id, |
| int * | v, | ||
| float | vSpeed = 1.0f, | ||
| int | vMin = 0, | ||
| int | vMax = 0, | ||
| const char * | format = "%d" ) |
| bool DekiEditor::SchematicDragFloat2 | ( | const char * | id, |
| float | v[2], | ||
| float | vSpeed = 1.0f, | ||
| float | vMin = 0.0f, | ||
| float | vMax = 0.0f, | ||
| const char * | format = "%.3f" ) |
Drag widgets with several components sharing the rest of the row.
They sit in a BeginGroup/EndGroup, so callers can use ImGui::IsItemActivated / IsItemDeactivatedAfterEdit on the group as a whole (for command history). Returns true if any component changed.
| bool DekiEditor::SchematicDragFloat3 | ( | const char * | id, |
| float | v[3], | ||
| float | vSpeed = 1.0f, | ||
| float | vMin = 0.0f, | ||
| float | vMax = 0.0f, | ||
| const char * | format = "%.3f" ) |
| bool DekiEditor::SchematicDragFloatAxis | ( | const char * | id, |
| float * | v, | ||
| int | axis, | ||
| float | vSpeed = 1.0f, | ||
| float | vMin = 0.0f, | ||
| float | vMax = 0.0f, | ||
| const char * | format = "%.3f" ) |
One box of those, with its axis stamp (0 = X, 1 = Y, 2 = Z), as an item of its own: for a caller that needs each box's activation, or a different format per box (a dash for values that differ across a selection).
| bool DekiEditor::SchematicColorEdit4 | ( | const char * | id, |
| float | col[4] ) |
Schematic color editors, with the semantics of ImGui::ColorEdit4 / ColorEdit3 (rgba / rgb as 0-1 floats).
One cell per channel (a vertical color stripe and a 0-255 value), plus a combined swatch on the right that opens the full picker when clicked.
| bool DekiEditor::SchematicColorEdit3 | ( | const char * | id, |
| float | col[3] ) |
| bool DekiEditor::SchematicCombo | ( | const char * | id, |
| int * | currentIndex, | ||
| const char *const | items[], | ||
| int | count ) |
Dropdown matching the drag fields: near-black frame, the current item left-aligned in the mono value font, a Tabler chevron on the right.
Same semantics as ImGui::Combo. The second overload takes one "Item1\0Item2\0\0" zero-separated string.
| bool DekiEditor::SchematicCombo | ( | const char * | id, |
| int * | currentIndex, | ||
| const char * | itemsSeparatedByZeros ) |
| bool DekiEditor::SchematicBeginCombo | ( | const char * | id, |
| const char * | preview ) |
Open/close for custom dropdowns whose items are not a fixed string array (dynamic lists, custom preview text), with SchematicCombo's look.
The caller draws its own ImGui::Selectable items between Begin and End. Returns true if open; call SchematicEndCombo() only then. preview is the closed box's text (may be empty).
| void DekiEditor::SchematicEndCombo | ( | ) |
| void DekiEditor::DrawAllTabTopAccents | ( | ) |
Draws a 1px accent line along the top of the selected tab in every dock node with a tab bar.
Call once per frame after all panels have rendered (right before ImGui::Render).
| void DekiEditor::DrawDockSeams | ( | ) |
Draws the 1px frame of standalone floating windows (dialogs, undocked tool windows).
WindowBorderSize is 0 so docked panels do not double the dock separator, which leaves those windows without a border. Docked panels need nothing here; ImGui's 1px dock separator is their seam. Call once per frame after all panels have rendered (right before ImGui::Render). Pairs with the border settings in SetupEditorTheme.
| bool DekiEditor::SchematicCheckbox | ( | const char * | label, |
| bool * | v ) |
Schematic checkbox: a 1px square border with a smaller filled square inside when checked.
Use instead of ImGui::Checkbox where the schematic look matters. fillColor is the inner square's color (default Accent).
| bool DekiEditor::SchematicCheckbox | ( | const char * | label, |
| bool * | v, | ||
| const ImVec4 & | fillColor ) |
| void DekiEditor::PushContextMenuPopupStyle | ( | ) |
Styling for right-click context menus.
Every context menu in the editor (hierarchy, asset browser, inspector, console, ...) uses these so popups look like the menu bar's File/Edit dropdowns: real WindowPadding, and once open, wider ItemSpacing for taller rows and full-width hover.
ImGui forces the split: WindowPadding must be pushed BEFORE the popup begins (the window takes it at Begin()), while ItemSpacing is pushed AFTER it opens (it reads back the popup's WindowPadding.x and applies only to the open scope). Sizes are GetFontSize() multiples, so they follow DPI. Each Push has one matching ImGui::PopStyleVar() at the call site:
PushContextMenuPopupStyle(); // before Begin* if (ImGui::BeginPopupContextItem()) { PushContextMenuItemStyle(); // after Begin* ImGui::MenuItem(...); ImGui::PopStyleVar(); // ItemSpacing ImGui::EndPopup(); } ImGui::PopStyleVar(); // WindowPadding
| void DekiEditor::PushContextMenuItemStyle | ( | ) |
| bool DekiEditor::BeginSchematicModal | ( | const char * | title, |
| float | cssWidth ) |
Schematic modal dialog: centered over the main viewport, a fixed CSS-px width (auto height), generous padding, no saved settings.
Every modal in the editor uses it so they all look like the Package Manager's Add Package dialog. Begin/End popup rules: call EndSchematicModal() (which wraps ImGui::EndPopup()) only when this returned true.
OpenPopup("Create New Folder"); // elsewhere, as usual if (BeginSchematicModal("Create New Folder", 440.0f)) { ...content... EndSchematicModal(); }
| void DekiEditor::EndSchematicModal | ( | ) |
| int DekiEditor::SchematicDialogButtons | ( | std::initializer_list< DialogButtonSpec > | buttons | ) |
| int DekiEditor::GetRegisteredWindowCount | ( | ) |
| const EditorWindowMeta * DekiEditor::GetRegisteredWindowMeta | ( | int | index | ) |
| void DekiEditor::RegisterEditorWindow | ( | const EditorWindowMeta & | meta | ) |
| void DekiEditor::ClearRegisteredWindows | ( | ) |
| void DekiEditor::TrimRegisteredWindows | ( | int | keepCount | ) |
| const char * DekiEditor::FeatureStateName | ( | FeatureState | state | ) |
| StripPlan DekiEditor::ResolveStripPlan | ( | const std::vector< CMakeGen::PackageEntry > & | allPackages, |
| const ComponentUsage & | usage, | ||
| const BuildStripSettings & | settings, | ||
| const std::string & | packagesDir ) |
| std::vector< TargetContentConflict > DekiEditor::FindTargetContentConflicts | ( | const std::string & | projectPath, |
| const std::string & | targetPlatformId ) |
| StripPlan DekiEditor::ComputeStripPlan | ( | const std::string & | projectPath, |
| const std::string & | targetPlatformId = "", | ||
| const std::vector< std::string > & | extraSceneDirs = {} ) |
|
inline |
Reads a whole file into out.
Returns false on I/O failure, with a readable reason in err.
|
inline |
Renames a finished temp file over target in one step.
On failure the target is untouched and the temp file is kept. durable also waits for the rename to reach the disk (Windows): use it for what the user wrote; a cache, which can be rebuilt, skips the wait.
|
inline |
Replaces path with content atomically: writes a sibling .tmp file and renames it over the destination, so a crash mid-write cannot leave a partial file.
On failure the destination is left exactly as it was, and err names the step that failed.
|
inline |
True when path is a symbolic link or, on Windows, a junction.
|
inline |
Deletes path and everything under it, like std::filesystem::remove_all, including read-only files: git keeps its pack files read-only, and remove_all cannot delete those on Windows.
A link or junction is removed as a link; what it points to is never entered or changed. True when nothing is left at path.
| const char * DekiEditor::Tr | ( | const char * | english | ) |
english in the current language, or english itself when there is no translation.
Icons and spaces in front of the text are kept and not looked up: ICON_TI_PLUS " New Project" uses the entry for "New Project". The result lives as long as the editor.
| const char * DekiEditor::TrLabel | ( | const char * | label | ) |
An ImGui label in the current language: the translated text before any "##", then "###" and the English label, so the ID never changes.
A label that already has "###" keeps its own ID part. A label that starts with "##" shows nothing and is returned as it is.
|
constexpr |
Marks English text for translation where it is written, in a table of labels, without translating it: whatever shows it later passes it to Tr().
tools/ci/check_translations.py finds the text by this mark.
|
inline |
Makes a project root absolute.
Every path below is built on this. Package DLLs are loaded with LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR, which rejects a relative path (ERROR_INVALID_PARAMETER), so a relative project root would make every package fail to load.
|
inline |
Root of everything the editor generates. Disposable: recreated on open and build.
|
inline |
The cache directory relative to the project, with forward slashes.
The asset database stores cache locations in this form so a project moves between machines. It must agree with GetCacheDirectory below.
|
inline |
The project's cache directory: <project>/generated/cache.
|
inline |
The cached file for the asset assetGuid: <project>/generated/cache/<guid>.
|
inline |
Package DLLs the editor loads.
|
inline |
CMake/Ninja build tree.
|
inline |
Hot-reload copies of the runtime DLLs.
A sibling of runtime/, never a child: runtime/ is the copy source, and a destination inside it would make the loader list its own copies.
|
inline |
Project settings, authored and tracked.
|
inline |
|
inline |
|
inline |
|
inline |
The manifest naming a project's package dependencies, and its lockfile.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Manifest and lock filenames, as written at the project root.
|
inline |
|
inline |
| bool DekiEditor::LaunchDetached | ( | const std::string & | program, |
| const std::vector< std::string > & | args ) |
Launches program with args, detached, without a console window.
Returns false if the process could not be started (e.g. program not found). Returns at once; the exit status is never reported.
| bool DekiEditor::LaunchDetachedInDirectory | ( | const std::string & | program, |
| const std::vector< std::string > & | args, | ||
| const std::string & | workingDirectory ) |
Launches program from workingDirectory, detached, keeping its console.
For something the user watches, like the built game, which finds its assets relative to its own directory and logs to stdout. LaunchDetached is for helpers and gives neither.
| bool DekiEditor::OpenInCodeEditor | ( | const std::string & | filePath, |
| int | line = -1 ) |
Opens a source file in the user's code editor, at line when it is not -1.
The editor is VS Code (code).
| bool DekiEditor::RevealInFileManager | ( | const std::string & | path | ) |
Shows a file or directory in the platform's file manager.
| std::vector< std::string > DekiEditor::ObjectMissingCapabilities | ( | const nlohmann::json & | obj, |
| const std::set< std::string > & | capabilities ) |
What obj needs that capabilities does not offer.
Empty means it belongs on this target. An empty capability set keeps everything, which is what a caller with no target (the editor) wants.
| nlohmann::json DekiEditor::FilterSceneForTarget | ( | const nlohmann::json & | scene, |
| const std::set< std::string > & | capabilities ) |
scene with every object the target cannot satisfy removed.
Removing a parent removes its children too.
| bool DekiEditor::SceneHasTargetRequirements | ( | const nlohmann::json & | scene | ) |
True when the filter would change anything, so a caller can skip the copy.
| bool DekiEditor::PreserveTargetRequirements | ( | const std::string & | scenePath, |
| const nlohmann::json & | before ) |
Copies every object's "requires" from before (the file as it was) into the file the editor has just rewritten, matching objects by id.
Returns true if anything was re-applied.
The engine's Object does not hold "requires", since it is a build-time key the runtime never sees. Saving a scene rebuilds the JSON from objects, so without this step the key would be lost without warning. Doing it after the save keeps one file and costs no engine ABI. An object deleted meanwhile is not found, so its entry is dropped.
| std::map< int64_t, std::vector< std::string > > DekiEditor::CollectTargetRequirements | ( | const nlohmann::json & | scene | ) |
The "requires" of every object in scene, keyed by object id.
Empty when the scene has none, the common case, so a caller can skip the work.
| std::vector< std::string > DekiEditor::EnumerateSerialPorts | ( | ) |
Serial ports on the machine, sorted (COM1 before COM10 on Windows).
In the SDK because a build backend whose devices sit on a serial port offers them as deploy targets (ITargetBuilder::EnumerateDeployTargets); the Serial Monitor panel uses the same list.
| int DekiEditor::RunShellCommand | ( | const std::string & | commandLine, |
| const std::string & | workingDirectory, | ||
| const std::function< void(const std::string &line)> & | onLine, | ||
| const std::atomic< bool > * | cancel = nullptr ) |
Runs commandLine through the platform shell: cmd.exe /S /C "<line>" on Windows, /bin/sh -c elsewhere.
stdout and stderr are merged and passed to onLine one line at a time as they arrive, on the calling thread, without the newline; empty lines are skipped.
An empty workingDirectory means the current one. When cancel becomes true the command is stopped. On Windows that kills the whole process tree, since a build step's work runs in grandchildren (idf.py -> ninja -> compilers).
Returns the command's exit code, or -1 when it could not be started or was cancelled.
|
inline |
A texture format by the name the sidecar and the inspector use.
False for "Automatic", an empty string, or anything unknown.
|
inline |
|
inline |
A screen format by the name a platform file uses ("RGB565", ...).
|
inline |
|
inline |
The format Automatic picks for a screen of this format.
|
inline |
The stored format for one target.
assetFormat is settings.texture.format and targetFormat that target's entry in settings.texture.targets; either may be empty or "Automatic".
| bool DekiEditor::DecodeImageFile | ( | const std::string & | absolutePath, |
| DecodedImage & | out ) |
Decodes an image file (PNG/JPG/BMP/TGA/GIF) from disk into RGBA8.
Returns false if the file cannot be opened or decoded.
|
inline |
Reads settings.texture. Pass the object itself; a missing one gives defaults.
|
inline |
Writes one target's values into settings.texture, always in the object form.
An empty entry is removed.
|
inline |
The size an image of srcW x srcH is stored at under maxSize (0 = no limit): unchanged when it fits, else its larger side becomes maxSize and the other keeps the proportion (at least 1).
|
inline |
A source-pixel coordinate on one axis (a rect edge, not a size) in stored pixels: round(v * stored / source).
The runtime (Deki2D::Sprite) uses the same rule, so a frame the encoder resampled lands where the loader looks.
| int DekiEditor::CompareVersions | ( | const std::string & | a, |
| const std::string & | b ) |
Compares two dotted version strings ("3.1.1" vs "3.2.0").
Returns -1 if a < b, 0 if equal, 1 if a > b.
Missing trailing segments count as 0, so "1.1" == "1.1.0" and "1.1" < "1.1.2". Segments parse with atoi, so a suffix on a segment is ignored ("1.2.0-rc1" equals "1.2.0"); the package and framework manifests this reads carry only numeric versions.
| std::string DekiEditor::HighestVersion | ( | const std::vector< std::string > & | versions | ) |
The highest version in versions by CompareVersions, or "" when empty.
Use this, not the first entry: registry and lock files list versions oldest first.
|
constexpr |
|
constexpr |
|
constexpr |
Where a simulated build keeps its boot scene: this directory under the builder's build directory, as boot.scene.
The editor writes it; a backend that computes its own strip plan counts the scenes in it.
|
constexpr |
What the simulated board's SD card holds, under kSimulationSceneDir: the assets, exported as the SD Card Deploy panel exports them, for a target that keeps them on the card; empty for one that keeps them inside.
The editor fills it on every simulated build; the backend makes the card.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
constexpr |
Every tooltip in the editor goes through here.
None appears until the pointer has rested for kTooltipDelaySeconds, so sweeping across a toolbar does not flicker boxes.
Same signature as ImGui::SetTooltip. The wait is measured on the hovered item, or, over hand-drawn regions that are not ImGui items, on the pointer standing still; callers need not say which.
|
constexpr |
|
constexpr |
The Max Size choices, as Unity offers them. 0 means no limit.
|
constexpr |