|
Deki 0.40.1
Modular C++ engine with a visual editor, for 2D and 3D
|
Namespaces | |
| namespace | CMakeGen |
| Generates the CMake projects for builds, from the installed packages and the platform. | |
| namespace | EditorNaming |
| namespace | EditorTexture |
| Pictures the editor UI draws: the Scene and Play views, asset previews, font atlases. | |
| namespace | Fonts |
| namespace | Localization |
| The languages the editor offers and which one is in use. | |
| namespace | Metrics |
| namespace | Motion |
| Shared timing and easing for animated editor UI. | |
| 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 |
| One row in the asset picker: an asset, or a frame of a spritesheet. More... | |
| class | AssetPipeline |
| The asset import pipeline, like Unity's: finds assets, gives them GUIDs and compiles them into the cache. More... | |
| class | AssetTypeEditor |
| An asset type a package adds: its file extensions, compile step and inspector UI. More... | |
| class | AssetTypeEditorRegistry |
| The registered AssetTypeEditors, looked up by type name. More... | |
| struct | AssetTypeHandler |
| How the editor creates, compiles and inspects one asset type. More... | |
| class | AssetTypeRegistry |
| The asset types and file extension categories the editor knows. More... | |
| struct | AtlasFrame |
| One frame in atlas mode. More... | |
| struct | BuilderDefinition |
| A build backend's toolchain definition, parsed from JSON. More... | |
| class | BuilderRegistry |
| The available firmware builders: the backends packages and plugins contribute, plus builder DLL plugins loaded from ~/.deki-editor/builders/. More... | |
| struct | BuildOptions |
| Options a build backend takes: logging, and whether to build for the simulator. More... | |
| struct | BuildProgress |
| State, status text and progress of a running build. More... | |
| struct | BuildStripSettings |
| A project's choices for stripping unused features and packages from device builds. More... | |
| struct | ChromaKeySettings |
| Optional chroma-key transparency for a texture. More... | |
| 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 |
| One toolchain component: where it installs, how it is detected and updated. More... | |
| struct | ComponentUsage |
| Which component types a project uses, and where each one was seen. More... | |
| 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 |
| The items packages add to the hierarchy's "Create Object" menu. More... | |
| 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 |
| Creates and caches the CustomEditor for each component. More... | |
| class | DeadMemory |
| Memory that is about to be freed, described as byte ranges. More... | |
| struct | DecodedImage |
| Decoded image, RGBA8 packed (4 bytes per pixel). More... | |
| struct | DeployTarget |
| One thing a build can be deployed to, as the backend enumerates them. More... | |
| struct | DeviceProfile |
| struct | DeviceProfileRow |
| One line of the report. Its values are per frame. More... | |
| struct | DialogButtonSpec |
| One button of SchematicDialogButtons: label, kind and whether it is enabled. More... | |
| struct | DownloadProgress |
| State and progress of a toolchain download. More... | |
| 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 |
| Base class of what packages add to the editor: custom editors, asset types, tools. More... | |
| 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 |
| A registered editor window: its title, menu path and factory. More... | |
| struct | FallbackDef |
| The pinned version and URL a toolchain component installs from. More... | |
| struct | FeatureDecision |
| Whether one package feature stays in a build, and why. More... | |
| class | FileInspector |
| Inspector for a native file type such as .ttf or .png. More... | |
| class | FileInspectorRegistry |
| The registered FileInspectors, looked up by file extension. More... | |
| class | FirmwareBuilderBase |
| Shared base of build backends: build thread, progress and toolchain handling. More... | |
| 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 |
| Where a build backend reports long-running work. More... | |
| struct | ImportResult |
| Outcome of an asset import: success or error, and the cache file written. More... | |
| 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 |
| Immediate-mode node-graph widget with pan, zoom, nodes, pins and links. More... | |
| 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 |
| Whether one package stays in a build, and why. More... | |
| 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 |
| Where an adopted platform came from and how it differs from that source. More... | |
| class | PlatformRegistry |
| The available platforms, all loaded from JSON: the project's own, those its packages offer, and board packs. More... | |
| struct | PlatformSyncResult |
| Result of updating or restoring a platform from its package. More... | |
| struct | PlatformTemplate |
| A platform a package offers a project, found in its platforms folder. More... | |
| struct | PostInstallDef |
| The setup command to run after installing a toolchain component, per host OS. More... | |
| 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... | |
| class | ShaderCompiler |
| Translates HLSL shaders to the GLSL an OpenGL device runs, through Slang. More... | |
| struct | ShaderCompileRequest |
| One shader stage to compile: HLSL source, entry point and defines. More... | |
| struct | ShaderStageText |
| One stage, in both dialects. More... | |
| struct | SpriteFrameData |
| A sprite frame's pixel rect within its texture, registered by frame GUID and used for rendering. More... | |
| struct | SpriteSettings |
| Optional sprite metadata baked into the texture file. More... | |
| struct | StripPlan |
| What a device build keeps and strips: features, packages, defines and source files. More... | |
| struct | SubAssetInfo |
| An item inside a parent asset, such as a sprite frame or a LOD level. More... | |
| struct | SubComponentDef |
| One archive downloaded and unpacked as part of a toolchain component. More... | |
| struct | TargetCardInfo |
| One card's header. More... | |
| struct | TargetContentConflict |
| A component this target's own content uses, from a package this target cannot have. More... | |
| struct | TexData |
| A loaded TEX file. More... | |
| struct | TexHeader |
| TEX file header. More... | |
| class | TextureImporter |
| Imports images into the texture cache, and reads and writes TEX files. More... | |
| struct | TextureSettings |
| An image's storage and filter settings, with per-target overrides. More... | |
| struct | TextureTargetSettings |
| One target's own values. More... | |
| struct | ToolchainComponent |
| One toolchain component as the Build panel shows it: status, versions and actions. More... | |
| 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 |
| Result of checking a toolchain for a newer version. More... | |
| struct | VersionCheckDef |
| How to find a toolchain component's latest version: a GitHub release or a fixed one. More... | |
Typedefs | |
| using | AssetCacheHandler = std::function<AssetCacheResult(const AssetCacheContext& ctx)> |
| Called by ProcessAsset for the extensions it is registered for. | |
| using | AssetDependencyReporter |
| Lists, by GUID, the assets an asset uses that a scene does not name: a tilemap's tilesets, a tileset's image. | |
| using | AssetExportEncoder = std::function<bool(const AssetExportContext& ctx)> |
| Writes an asset the way a given target stores it. | |
| using | AssetSourceFilesReporter = std::function<std::vector<std::string>(const std::string& absolutePath)> |
| The other files an asset is compiled from, absolute: a model's material library and texture images. | |
| using | BuildOutputCallback = std::function<void(const std::string& line, bool isError)> |
| using | BuildProgressCallback = std::function<void(const BuildProgress&)> |
| using | DownloadProgressCallback = std::function<void(const DownloadProgress&)> |
| using | HttpStatusCallback = std::function<void(const std::string&)> |
| using | SceneExportCheck |
| A look at a scene a build ships, for what its target does without that the build still allows, such as a light's shadows on a board without OpenGL. | |
| using | VersionCheckCallback = std::function<void(const ToolchainVersionInfo&)> |
Enumerations | |
| enum class | AdoptPlatformResult { AlreadyDefined , Adopted , NoTemplate , Ambiguous , Failed } |
| enum class | AssetCacheResult { NotCached , Cached , PreCached } |
| What a cache handler did. 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 | AssetCompileTarget { Texture , Audio , Data , None } |
| What an asset type compiles to. More... | |
| enum class | AssetFilterType { All , Textures , Audio , Scripts , Scenes , Fonts , Animations } |
| enum class | BuildState { Idle , Building , Deploying , Completed , Failed } |
| 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 | DownloadStatus { Idle , CheckingVersion , Downloading , Extracting , Completed , Failed } |
| enum class | EditorType { CustomEditor , AssetTypeEditor , CliTool } |
| enum class | FeatureState { Required , Pinned , Used , Kept , DefaultOn , ForcedOff , Stripped } |
| enum class | MetadataChunkType : uint32_t { Sprite = 1 , FrameList = 2 , ChromaKey = 3 , SourceSize = 4 } |
| enum class | SceneEditTool { Select , Move , Rect } |
| Scene-view editing tool that package-DLL editors can ask for. More... | |
| enum class | ShaderStage { Vertex , Fragment } |
| enum class | SpriteSlicingMode { None = 0 , Grid = 1 , Atlas = 2 } |
| 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 | ToolchainComponentStatus { Installed , NotInstalled , UpdateAvailable , Installing } |
Functions | |
| Deki::Component * | AddComponentByName (Deki::Object *object, const std::string &typeName) |
| Creates a component by its qualified class name and attaches it to object. | |
| 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. | |
| AdoptPlatformResult | AdoptPlatformTemplate (const std::string &projectPath, const std::string &platformId, std::string &detail) |
| Makes platformId the project's own, copying a template if needed. | |
| std::string | AtBuildPriority (const std::string &shellLine) |
| A shell line run at build priority where the process cannot be lowered before it starts (popen): nice -n 10 /bin/sh -c '<line>', with the job count of WithBuildJobs. | |
| 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. | |
| TextureFormat | AutomaticTextureFormat (Deki::ColorFormat screen, bool hasAlpha) |
| The format Automatic picks for a screen of this format. | |
| std::string | BakedFontAtlasGuid (const std::string &sourceGuid, int fontSize, bool bdf) |
| The GUID of the atlas of the baked form BakedFontGuid names. | |
| 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"). | |
| void | BeginPropertyContext () |
| Opens the shared property-list layout: the body indent, row gap and field padding of every property list in the editor. | |
| 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 | BuildActivityComplete (const std::string &process) |
| void | BuildActivityFail (const std::string &process, const std::string &error) |
| void | BuildActivityLog (const std::string &process, const std::string &message) |
| Reports to the sink; does nothing when none is installed. | |
| int | BuildJobCount () |
| How many compile jobs a build starting now should run: one per core, but no more than free memory holds, and at least one. | |
| unsigned long | BuildPriorityFlag () |
| Windows process creation flag for a build: below-normal priority, which the processes it starts inherit. | |
| std::string | BundledToolchainDir () |
| Absolute path to <executable dir>/toolchain (toolchain/mingw64 on Windows), whether or not it exists. | |
| void | ClearRegisteredWindows () |
| std::map< int64_t, std::vector< std::string > > | CollectTargetRequirements (const nlohmann::json &scene) |
| The "requires" of every object in scene, keyed by object id. | |
| const char * | ColorFormatName (Deki::ColorFormat f) |
| int | CompareVersions (const std::string &a, const std::string &b) |
| Compares two dotted version strings ("3.1.1" vs "3.2.0"). | |
| StripPlan | ComputeStripPlan (const std::string &projectPath, const std::string &targetPlatformId="", const std::vector< std::string > &extraSceneDirs={}) |
| std::string | CurrentCapabilityName (const std::string &name) |
| name as capabilities are called now: a renamed one's new name, any other as it is. | |
| bool | DecodeImageFile (const std::string &absolutePath, DecodedImage &out) |
| Decodes an image file (PNG/JPG/BMP/TGA/GIF) from disk into RGBA8. | |
| std::string | DescribeNoBuilder (const std::vector< ITargetBuilder * > &builders, const std::string &framework, const std::vector< std::string > &packageBuildErrors={}) |
| Why no builder matched, for the error the user sees: names the framework asked for and lists the registered ones. | |
| 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). | |
| 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. | |
| 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 | 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. | |
| void | EndPropertyContext () |
| void | EndSchematicModal () |
| 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. | |
| std::vector< std::string > | EnumerateSerialPorts () |
| Serial ports on the machine, sorted (COM1 before COM10 on Windows). | |
| const char * | FeatureStateName (FeatureState state) |
| nlohmann::json | FilterSceneForTarget (const nlohmann::json &scene, const std::set< std::string > &capabilities) |
| scene with every object the target cannot satisfy removed. | |
| 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. | |
| std::vector< TargetContentConflict > | FindTargetContentConflicts (const std::string &projectPath, const std::string &targetPlatformId) |
| void | FirstUseWindowPlacement (float width, float height) |
| Where a window first appears: width x height, centred over the editor. | |
| 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. | |
| std::string | GenerateDeterministicGuid (const std::string &seed) |
| A GUID that is always the same for the same seed. | |
| std::string | GenerateGuid () |
| A new random GUID. | |
| std::string | GetAssetDataPath (const std::string &assetPath) |
| The sidecar path for an asset: "foo.png" gives "foo.png.data". | |
| std::string | GetAssetsDirectory (const std::string &projectPath) |
| std::string | GetAssetsDirectoryRelative () |
| IBuildActivitySink * | GetBuildActivitySink () |
| The installed sink, or nullptr. Prefer the free functions below. | |
| std::string | GetBuildDirectory (const std::string &projectPath) |
| CMake/Ninja build tree. | |
| std::string | GetCacheDirectory (const std::string &projectPath) |
| The project's cache directory: <project>/generated/cache. | |
| std::string | GetCacheDirectoryRelative () |
| The cache directory relative to the project, with forward slashes. | |
| std::string | GetCachePath (const std::string &projectPath, const std::string &assetGuid) |
| The cached file for the asset assetGuid: <project>/generated/cache/<guid>. | |
| std::string | GetGeneratedDirectory (const std::string &projectPath) |
| Root of everything the editor generates. Disposable: recreated on open and build. | |
| std::string | GetOrCreateAssetGuid (const std::string &assetPath) |
| The asset's GUID, creating the .data sidecar with a new GUID if needed. | |
| std::string | GetPackageLockFile (const std::string &projectPath) |
| std::string | GetPackageLockFileName () |
| std::string | GetPackageManifestFile (const std::string &projectPath) |
| The manifest naming a project's package dependencies, and its lockfile. | |
| std::string | GetPackageManifestFileName () |
| Manifest and lock filenames, as written at the project root. | |
| std::string | GetPackagesDirectory (const std::string &projectPath) |
| std::string | GetPackagesDirectoryRelative () |
| PlatformOriginStatus | GetPlatformOrigin (const std::string &projectPath, const std::string &platformId) |
| Where platformId came from and how it differs. | |
| std::string | GetPlatformsDirectory (const std::string &projectPath) |
| std::string | GetPlatformsDirectoryRelative () |
| int | GetRegisteredWindowCount () |
| const EditorWindowMeta * | GetRegisteredWindowMeta (int index) |
| std::string | GetRuntimeDirectory (const std::string &projectPath) |
| Package DLLs the editor loads. | |
| std::string | GetSettingsDirectory (const std::string &projectPath) |
| Project settings, authored and tracked. | |
| std::string | GetShadowDirectory (const std::string &projectPath) |
| Hot-reload copies of the runtime DLLs. | |
| std::string | GetSourceDirectory (const std::string &projectPath) |
| std::string | GetSourceDirectoryRelative () |
| bool | HasBundledToolchain () |
| True if a bundled toolchain is present (its bin/ directory exists). | |
| std::string | HighestVersion (const std::vector< std::string > &versions) |
| The highest version in versions by CompareVersions, or "" when empty. | |
| bool | IsLinkOrJunction (const std::filesystem::path &path) |
| True when path is a symbolic link or, on Windows, a junction. | |
| bool | IsValidCapabilityName (const std::string &name) |
| 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 | LoadAssetData (const std::string &path, AssetData &out) |
| Reads the .data file at path into out. | |
| bool | LoadBuilderDefinition (const std::string &jsonPath, BuilderDefinition &outDef, std::string &outError) |
| The same, from a file the backend locates itself. | |
| void | LowerBuildPriority () |
| Lowers the calling process's priority. | |
| 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). | |
| std::string | NormalizeProjectRoot (const std::string &projectPath) |
| Makes a project root absolute. | |
| void | NoteProjectPlatformsChanged () |
| std::vector< std::string > | ObjectMissingCapabilities (const nlohmann::json &obj, const std::set< std::string > &capabilities) |
| What obj needs that capabilities does not offer. | |
| 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 | 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. | |
| bool | ParseBuilderDefinition (const std::string &jsonText, BuilderDefinition &outDef, std::string &outError) |
| Parses a toolchain definition from JSON text. | |
| bool | ParseColorFormat (const std::string &name, Deki::ColorFormat &out) |
| A screen format by the name a platform file uses ("RGB565", ...). | |
| bool | ParseDeviceProfile (const std::string &received, DeviceProfile &profile, std::string &error) |
| Reads a board's report (log lines around it are skipped). | |
| bool | ParseTextureFormat (const std::string &name, TextureFormat &out) |
| A texture format by the name the sidecar and the inspector use. | |
| bool | PathListHasDir (const std::string &pathList, const std::string &dir) |
| Whether dir is one of the ;-separated entries of pathList, ignoring case, slash direction and a trailing slash, as Windows does. | |
| 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) |
| void | PrepareBuildJobs () |
| Windows: sets CMAKE_BUILD_PARALLEL_LEVEL (cmake –build) and IDF_PY_BUILD_JOBS (idf.py) to BuildJobCount() for the processes this one starts next. | |
| void | PrepareToolchainPath () |
| Windows: puts ToolchainBinDir() at the front of this process's PATH unless it is on PATH already. | |
| 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::string | ProjectCCompiler () |
| std::string | ProjectCxxCompiler () |
| The C++ and C compilers to build projects with: the bundled toolchain's, otherwise the compiler this editor was built with. | |
| 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. | |
| std::vector< const PlatformConfig * > | ProjectTargets (const std::string &projectPath) |
| The platforms this project can build for, in the registry's order: its own (platforms/<id>/), those its packages offer, and the installed board packs', as ReloadProjectPlatforms fills the registry for it. | |
| float | PropertyLabelWidth (float labelStartX) |
| Width of a property row's label column: 42% of the row, kept between 5.5em and 9em. | |
| void | PushContextMenuItemStyle () |
| void | PushContextMenuPopupStyle () |
| Styling for right-click context menus. | |
| bool | QueryDeviceProfile (const std::string &port, int seconds, DeviceProfile &profile, std::string &error) |
| Measures the board on port for seconds: asks once to start (or restart) measuring, waits, then asks for the report. | |
| std::string | ReadAssetGuid (const std::string &assetPath) |
| The GUID from the asset's .data sidecar, or "" when there is none. | |
| std::string | ReadCMakeCacheVar (const std::string &buildDir, const std::string &name) |
| Value of name in <buildDir>/CMakeCache.txt, i.e. | |
| bool | ReadFileToString (const std::string &path, std::string &out, std::string &err) |
| Reads a whole file into out. | |
| TextureSettings | ReadImageTextureSettings (const std::string &imagePath) |
| The texture settings of the image at imagePath (absolute), from its sidecar (<image>.data, settings.texture); defaults when it has none. | |
| TextureSettings | ReadTextureSettings (const nlohmann::json &tex) |
| Reads settings.texture. Pass the object itself; a missing one gives defaults. | |
| void | RegisterEditorWindow (const EditorWindowMeta &meta) |
| 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. | |
| 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 | 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. | |
| 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. | |
| StripPlan | ResolveStripPlan (const std::vector< CMakeGen::PackageEntry > &allPackages, const ComponentUsage &usage, const BuildStripSettings &settings, const std::string &packagesDir) |
| Deki::TextureFilter | ResolveTextureFilter (const TextureSettings &settings, const std::string &platformId) |
| The filter an image is drawn with on platformId: FilterFor's, or Point where the target has no GPU (TargetSamplesTextures), and for a name that is not a filter. | |
| TextureFormat | ResolveTextureFormat (const std::string &assetFormat, const std::string &targetFormat, Deki::ColorFormat screen, bool hasAlpha) |
| The stored format for one target. | |
| std::string | ResolveTool (const std::string &name) |
| Returns the bundled copy of a tool when there is one; else name unchanged for PATH lookup when it is on PATH; else its full path in the toolchain folder (ToolchainBinDir) when it is there; else name. | |
| PlatformSyncResult | RestorePlatformFromPackage (const std::string &projectPath, const std::string &platformId) |
| bool | RevealInFileManager (const std::string &path) |
| Shows a file or directory in the platform's file manager. | |
| 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. | |
| 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). | |
| bool | SaveAssetData (const std::string &path, const AssetData &data) |
| Writes data to the .data file at path. Returns true on success. | |
| 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={}) |
| bool | SceneHasTargetRequirements (const nlohmann::json &scene) |
| True when the filter would change anything, so a caller can skip the copy. | |
| bool | SchematicActionLink (const char *label) |
| Right-aligned EDIT -> style action link, in ALL CAPS mono accent text with a 1px underline. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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) |
| 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 | SchematicColorEdit3 (const char *id, float col[3]) |
| 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 | 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) |
| int | SchematicDialogButtons (std::initializer_list< DialogButtonSpec > buttons) |
| 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 | 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 | SchematicDragInt (const char *id, int *v, float vSpeed=1.0f, int vMin=0, int vMax=0, const char *format="%d") |
| void | SchematicEndCombo () |
| void | SchematicEndToolbarCombo () |
| 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. | |
| 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 | 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 () |
| void | SchematicSubHeader (const char *label) |
| One rung below both of those: a DEKI_GROUP-style subdivision INSIDE a section. | |
| 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. | |
| float | SchematicToolbarComboWidth (const char *preview) |
| bool | SchematicTreeBodyBegin (bool open, ImGuiID nodeId) |
| The children of a tree node, sliding open and shut like a section body. | |
| void | SchematicTreeBodyEnd () |
| 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. | |
| float | SectionAlignedCursorX () |
| Where a section band's labels (and the rows under it) start: a fixed indent in from the band's left edge, which sits kSectionHeaderOutdent left of the cursor (never past the panel's margin). | |
| ITargetBuilder * | SelectBuilder (const std::vector< ITargetBuilder * > &builders, const std::string &framework) |
| The builder claiming framework, or nullptr. | |
| bool | SerialExchange (const std::string &port, const std::string &request, const std::function< bool(const std::string &)> &isDone, int timeoutMs, std::string &received, std::string &error) |
| Opens port, sends request and collects what comes back until isDone(received) or timeoutMs passes. | |
| void | SetBuildActivitySink (IBuildActivitySink *sink) |
| Installs the sink, or nullptr to report nowhere. | |
| void | SetTextureFilteringCapabilities (std::set< std::string > capabilities) |
| The capabilities with which the project's packages draw textures filtered (CMakeGen::TextureFilteringCapabilities of its packages). | |
| void | SetupEditorTheme (float dpiScale) |
| Applies the Deki schematic theme to ImGui. | |
| std::string | ShortTypeName (const std::string &qualified) |
| 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). | |
| void | TargetCard (const TargetCardInfo &info, bool &open, const std::function< void(float labelX, float valueX, float valueW)> &body) |
| A card. | |
| void | TargetCardRow (const char *label, float labelX, float valueX) |
| A row inside a card: the label (translated), then the cursor at valueX for its control. | |
| bool | TargetCardsBegin () |
| Starts the Targets section. | |
| void | TargetCardsEnd () |
| bool | TargetOverrideCombo (const char *id, float width, const char *preview, bool fromDefault, const std::string &defaultLabel, const std::function< const char *(int)> &label, int count, int firstIndex, int &index) |
| A dropdown whose closed box shows preview, dimmed when it comes from Default, and whose list starts with defaultLabel (choosing it sets index to firstIndex - 1), then label(firstIndex) . | |
| bool | TargetSamplesTextures (const std::string &platformId) |
| Whether platformId draws textures filtered, so a texture's filter means something there: a platform that provides a capability some package filters with (deki-rendering's "opengl"), or "" (the editor's own desktop). | |
| const char * | TextureFormatName (TextureFormat f) |
| std::string | ToolchainBinDir () |
| Windows: the folder of the GNU toolchain projects are built with - the bundled toolchain's bin/, else the folder of the compiler this editor was built with, else the first standard MSYS2 / MinGW folder that has g++. | |
| void | Tooltip (const char *fmt,...) IM_FMTARGS(1) |
| const char * | Tr (const char *english) |
| english in the current language, or english itself when there is no translation. | |
| void | TrimRegisteredWindows (int keepCount) |
| 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(). | |
| PlatformSyncResult | UpdatePlatformFromPackage (const std::string &projectPath, const std::string &platformId) |
| std::string | WithBuildJobs (const std::string &shellLine) |
| A shell line that runs with the job count of PrepareBuildJobs: export CMAKE_BUILD_PARALLEL_LEVEL=<n> IDF_PY_BUILD_JOBS=<n>; <line>, leaving out a variable the user set. | |
| 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. | |
Variables | |
| ImFont * | g_FontDisplay |
| ImFont * | g_FontDisplaySmall |
| ImFont * | g_FontLogo |
| ImFont * | g_FontMono |
| ImFont * | g_FontMonoBold |
| ImFont * | g_FontMonoSmall |
| ImFont * | g_FontUI |
| ImFont * | g_FontUIBold |
| ImFont * | g_FontUIMed |
| ImFont * | g_FontUISmall |
| constexpr const char * | kAutomaticFormat = "Automatic" |
| constexpr int | kDekiCacheVersion = 9 |
| constexpr int | kSceneCompileVersion = 2 |
| 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. | |
| 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 int | kTextureMaxSizeCount = sizeof(kTextureMaxSizes) / sizeof(kTextureMaxSizes[0]) |
| 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 float | kTooltipDelaySeconds = 1.0f |
| Every tooltip in the editor goes through here. | |
| 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.
Lists, by GUID, the assets an asset uses that a scene does not name: a tilemap's tilesets, a tileset's image.
A build ships them with it; without them the asset loads on a device and draws nothing.
Registered per extension by the package that owns the asset type, next to its cache handler. Given the asset's absolute path.
| 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, with the reason in *ctx.error, when it could not write outPath; the build then stops and lists it.
| using DekiEditor::AssetSourceFilesReporter = std::function<std::vector<std::string>(const std::string& absolutePath)> |
The other files an asset is compiled from, absolute: a model's material library and texture images.
They and their sidecars are part of its cache stamp, so a change to one, or to its settings, rebuilds the asset; and when one of them is processed, the assets compiled from it are processed again.
Registered per extension by the package that owns the asset type, next to its cache handler. Given the asset's absolute path.
| using DekiEditor::BuildOutputCallback = std::function<void(const std::string& line, bool isError)> |
| using DekiEditor::BuildProgressCallback = std::function<void(const BuildProgress&)> |
| using DekiEditor::DownloadProgressCallback = std::function<void(const DownloadProgress&)> |
| using DekiEditor::HttpStatusCallback = std::function<void(const std::string&)> |
A look at a scene a build ships, for what its target does without that the build still allows, such as a light's shadows on a board without OpenGL.
Each line added to warnings is listed in the build's output; the build goes on. capabilities are the target platform's ("opengl", ...).
| using DekiEditor::VersionCheckCallback = std::function<void(const ToolchainVersionInfo&)> |
|
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 |
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 |
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 |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
| 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.
| 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.
| 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.
| std::string DekiEditor::AtBuildPriority | ( | const std::string & | shellLine | ) |
A shell line run at build priority where the process cannot be lowered before it starts (popen): nice -n 10 /bin/sh -c '<line>', with the job count of WithBuildJobs.
The line as it is on Windows, which uses BuildPriorityFlag and PrepareBuildJobs instead.
|
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 |
The format Automatic picks for a screen of this format.
| 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::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").
| 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.
| 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::BuildActivityComplete | ( | const std::string & | process | ) |
| void DekiEditor::BuildActivityFail | ( | const std::string & | process, |
| const std::string & | error ) |
| void DekiEditor::BuildActivityLog | ( | const std::string & | process, |
| const std::string & | message ) |
Reports to the sink; does nothing when none is installed.
| int DekiEditor::BuildJobCount | ( | ) |
How many compile jobs a build starting now should run: one per core, but no more than free memory holds, and at least one.
| unsigned long DekiEditor::BuildPriorityFlag | ( | ) |
Windows process creation flag for a build: below-normal priority, which the processes it starts inherit.
0 elsewhere.
| std::string DekiEditor::BundledToolchainDir | ( | ) |
Absolute path to <executable dir>/toolchain (toolchain/mingw64 on Windows), whether or not it exists.
| void DekiEditor::ClearRegisteredWindows | ( | ) |
| 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.
|
inline |
| 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.
| StripPlan DekiEditor::ComputeStripPlan | ( | const std::string & | projectPath, |
| const std::string & | targetPlatformId = "", | ||
| const std::vector< std::string > & | extraSceneDirs = {} ) |
| std::string DekiEditor::CurrentCapabilityName | ( | const std::string & | name | ) |
name as capabilities are called now: a renamed one's new name, any other as it is.
desktop-os is hosted: an operating system starts the game as a program and gets control back when it quits (the desktop simulator, a Linux handheld). A board whose firmware is the game, RTOS included, is not hosted. The old name is read for one release, and whoever reads it from a file warns, naming the file.
| 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.
| std::string DekiEditor::DescribeNoBuilder | ( | const std::vector< ITargetBuilder * > & | builders, |
| const std::string & | framework, | ||
| const std::vector< std::string > & | packageBuildErrors = {} ) |
Why no builder matched, for the error the user sees: names the framework asked for and lists the registered ones.
Build backends come from packages, so when the project's packages did not build, packageBuildErrors (their first error lines) says that is why theirs are missing.
| 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.
| 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.
| 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::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.
| void DekiEditor::EndPropertyContext | ( | ) |
| void DekiEditor::EndSchematicModal | ( | ) |
| 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.
| 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.
| const char * DekiEditor::FeatureStateName | ( | FeatureState | state | ) |
| 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.
| 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.
| std::vector< TargetContentConflict > DekiEditor::FindTargetContentConflicts | ( | const std::string & | projectPath, |
| const std::string & | targetPlatformId ) |
| 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::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.
| 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::GenerateGuid | ( | ) |
A new random GUID.
| std::string DekiEditor::GetAssetDataPath | ( | const std::string & | assetPath | ) |
The sidecar path for an asset: "foo.png" gives "foo.png.data".
|
inline |
|
inline |
| IBuildActivitySink * DekiEditor::GetBuildActivitySink | ( | ) |
The installed sink, or nullptr. Prefer the free functions below.
|
inline |
CMake/Ninja build tree.
|
inline |
The project's cache directory: <project>/generated/cache.
|
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 cached file for the asset assetGuid: <project>/generated/cache/<guid>.
|
inline |
Root of everything the editor generates. Disposable: recreated on open and build.
| std::string DekiEditor::GetOrCreateAssetGuid | ( | const std::string & | assetPath | ) |
The asset's GUID, creating the .data sidecar with a new GUID if needed.
|
inline |
|
inline |
|
inline |
The manifest naming a project's package dependencies, and its lockfile.
|
inline |
Manifest and lock filenames, as written at the project root.
|
inline |
|
inline |
| 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.
|
inline |
|
inline |
| int DekiEditor::GetRegisteredWindowCount | ( | ) |
| const EditorWindowMeta * DekiEditor::GetRegisteredWindowMeta | ( | int | index | ) |
|
inline |
Package DLLs the editor loads.
|
inline |
Project settings, authored and tracked.
|
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 |
|
inline |
| bool DekiEditor::HasBundledToolchain | ( | ) |
True if a bundled toolchain is present (its bin/ directory exists).
| 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.
|
inline |
True when path is a symbolic link or, on Windows, a junction.
| bool DekiEditor::IsValidCapabilityName | ( | const std::string & | name | ) |
| 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::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::LoadBuilderDefinition | ( | const std::string & | jsonPath, |
| BuilderDefinition & | outDef, | ||
| std::string & | outError ) |
The same, from a file the backend locates itself.
| void DekiEditor::LowerBuildPriority | ( | ) |
Lowers the calling process's priority.
For a build's child process, after fork and before exec; what it starts inherits it. Does nothing on Windows.
|
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 |
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.
| void DekiEditor::NoteProjectPlatformsChanged | ( | ) |
| 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.
| 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::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.
| 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.
|
inline |
A screen format by the name a platform file uses ("RGB565", ...).
| bool DekiEditor::ParseDeviceProfile | ( | const std::string & | received, |
| DeviceProfile & | profile, | ||
| std::string & | error ) |
Reads a board's report (log lines around it are skipped).
False, with why, when there is no complete report.
|
inline |
A texture format by the name the sidecar and the inspector use.
False for "Automatic", an empty string, or anything unknown.
| bool DekiEditor::PathListHasDir | ( | const std::string & | pathList, |
| const std::string & | dir ) |
Whether dir is one of the ;-separated entries of pathList, ignoring case, slash direction and a trailing slash, as Windows does.
| 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 | ) |
| void DekiEditor::PrepareBuildJobs | ( | ) |
Windows: sets CMAKE_BUILD_PARALLEL_LEVEL (cmake –build) and IDF_PY_BUILD_JOBS (idf.py) to BuildJobCount() for the processes this one starts next.
A value the user set before the editor started is left alone.
Does nothing elsewhere. There, setenv while another thread reads the environment can crash that thread (SDL_Init copies it at startup), so the count goes into the shell line instead: WithBuildJobs and AtBuildPriority.
| void DekiEditor::PrepareToolchainPath | ( | ) |
Windows: puts ToolchainBinDir() at the front of this process's PATH unless it is on PATH already.
Every build the editor starts inherits it, so cmake, ninja and the compiler - whose own helpers (cc1plus, as, ld) load DLLs from that folder - are found however the editor was started: from the Start menu, from a terminal opened before MSYS2 was installed, or with MSYS2 not on the user PATH at all. Call once, first thing in main().
| 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::string DekiEditor::ProjectCCompiler | ( | ) |
| std::string DekiEditor::ProjectCxxCompiler | ( | ) |
The C++ and C compilers to build projects with: the bundled toolchain's, otherwise the compiler this editor was built with.
Packages are loaded into this process, so they must stay ABI-compatible with it.
| 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.
| std::vector< const PlatformConfig * > DekiEditor::ProjectTargets | ( | const std::string & | projectPath | ) |
The platforms this project can build for, in the registry's order: its own (platforms/<id>/), those its packages offer, and the installed board packs', as ReloadProjectPlatforms fills the registry for it.
The same list as the Build panel's, so every platform a build can target has its card.
| float DekiEditor::PropertyLabelWidth | ( | float | labelStartX | ) |
Width of a property row's label column: 42% of the row, kept between 5.5em and 9em.
A wide Inspector gives long names room, a narrow one still leaves the value usable, and below 5.5em names are cut instead.
| void DekiEditor::PushContextMenuItemStyle | ( | ) |
| 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
| bool DekiEditor::QueryDeviceProfile | ( | const std::string & | port, |
| int | seconds, | ||
| DeviceProfile & | profile, | ||
| std::string & | error ) |
Measures the board on port for seconds: asks once to start (or restart) measuring, waits, then asks for the report.
Blocks: call it off the main thread.
| std::string DekiEditor::ReadAssetGuid | ( | const std::string & | assetPath | ) |
The GUID from the asset's .data sidecar, or "" when there is none.
| 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.
|
inline |
Reads a whole file into out.
Returns false on I/O failure, with a readable reason in err.
| TextureSettings DekiEditor::ReadImageTextureSettings | ( | const std::string & | imagePath | ) |
The texture settings of the image at imagePath (absolute), from its sidecar (<image>.data, settings.texture); defaults when it has none.
How anything that stores an image (a model's textures) reads the image's own settings.
|
inline |
Reads settings.texture. Pass the object itself; a missing one gives defaults.
| void DekiEditor::RegisterEditorWindow | ( | const EditorWindowMeta & | meta | ) |
| 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.
| 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.
|
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.
|
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.
| StripPlan DekiEditor::ResolveStripPlan | ( | const std::vector< CMakeGen::PackageEntry > & | allPackages, |
| const ComponentUsage & | usage, | ||
| const BuildStripSettings & | settings, | ||
| const std::string & | packagesDir ) |
| Deki::TextureFilter DekiEditor::ResolveTextureFilter | ( | const TextureSettings & | settings, |
| const std::string & | platformId ) |
The filter an image is drawn with on platformId: FilterFor's, or Point where the target has no GPU (TargetSamplesTextures), and for a name that is not a filter.
What the compiled image and mesh record.
|
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".
| std::string DekiEditor::ResolveTool | ( | const std::string & | name | ) |
Returns the bundled copy of a tool when there is one; else name unchanged for PATH lookup when it is on PATH; else its full path in the toolchain folder (ToolchainBinDir) when it is there; else name.
name is the plain tool name ("ninja", "cmake"); the platform's executable suffix is added as needed.
| PlatformSyncResult DekiEditor::RestorePlatformFromPackage | ( | const std::string & | projectPath, |
| const std::string & | platformId ) |
| bool DekiEditor::RevealInFileManager | ( | const std::string & | path | ) |
Shows a file or directory in the platform's file manager.
| 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.
| 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.
| bool DekiEditor::SaveAssetData | ( | const std::string & | path, |
| const AssetData & | data ) |
Writes data to the .data file at path. Returns true on success.
| 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 = {} ) |
| bool DekiEditor::SceneHasTargetRequirements | ( | const nlohmann::json & | scene | ) |
True when the filter would change anything, so a caller can skip the copy.
| 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::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.
| 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.
| 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).
| 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.
| 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 ) |
| 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::SchematicColorEdit3 | ( | const char * | id, |
| float | col[3] ) |
| 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::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 ) |
| int DekiEditor::SchematicDialogButtons | ( | std::initializer_list< DialogButtonSpec > | buttons | ) |
| 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::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::SchematicDragInt | ( | const char * | id, |
| int * | v, | ||
| float | vSpeed = 1.0f, | ||
| int | vMin = 0, | ||
| int | vMax = 0, | ||
| const char * | format = "%d" ) |
| void DekiEditor::SchematicEndCombo | ( | ) |
| void DekiEditor::SchematicEndToolbarCombo | ( | ) |
| 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.
| 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::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 | ( | ) |
| 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::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).
| float DekiEditor::SchematicToolbarComboWidth | ( | const char * | preview | ) |
| 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 | ( | ) |
| 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.
| float DekiEditor::SectionAlignedCursorX | ( | ) |
Where a section band's labels (and the rows under it) start: a fixed indent in from the band's left edge, which sits kSectionHeaderOutdent left of the cursor (never past the panel's margin).
Window-relative x, ready for SetCursorPosX.
| 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.
| bool DekiEditor::SerialExchange | ( | const std::string & | port, |
| const std::string & | request, | ||
| const std::function< bool(const std::string &)> & | isDone, | ||
| int | timeoutMs, | ||
| std::string & | received, | ||
| std::string & | error ) |
Opens port, sends request and collects what comes back until isDone(received) or timeoutMs passes.
The port is opened without raising DTR or RTS, which would reset an ESP32. False only when the port could not be opened or written; what arrived is in received either way. Blocks: call it off the main thread.
| void DekiEditor::SetBuildActivitySink | ( | IBuildActivitySink * | sink | ) |
Installs the sink, or nullptr to report nowhere.
Not owned: the editor keeps its sink alive for the session.
| void DekiEditor::SetTextureFilteringCapabilities | ( | std::set< std::string > | capabilities | ) |
The capabilities with which the project's packages draw textures filtered (CMakeGen::TextureFilteringCapabilities of its packages).
The editor sets them when it opens a project; none are set before.
| void DekiEditor::SetupEditorTheme | ( | float | dpiScale | ) |
Applies the Deki schematic theme to ImGui.
Call after ImGui::CreateContext() and before the first frame.
| std::string DekiEditor::ShortTypeName | ( | const std::string & | qualified | ) |
|
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.
| void DekiEditor::TargetCard | ( | const TargetCardInfo & | info, |
| bool & | open, | ||
| const std::function< void(float labelX, float valueX, float valueW)> & | body ) |
A card.
body draws its rows when it is open, given where labels start, where values start, and how wide a value may be.
| void DekiEditor::TargetCardRow | ( | const char * | label, |
| float | labelX, | ||
| float | valueX ) |
A row inside a card: the label (translated), then the cursor at valueX for its control.
| bool DekiEditor::TargetCardsBegin | ( | ) |
Starts the Targets section.
False when it is folded: draw nothing more and do not call TargetCardsEnd.
| void DekiEditor::TargetCardsEnd | ( | ) |
| bool DekiEditor::TargetOverrideCombo | ( | const char * | id, |
| float | width, | ||
| const char * | preview, | ||
| bool | fromDefault, | ||
| const std::string & | defaultLabel, | ||
| const std::function< const char *(int)> & | label, | ||
| int | count, | ||
| int | firstIndex, | ||
| int & | index ) |
A dropdown whose closed box shows preview, dimmed when it comes from Default, and whose list starts with defaultLabel (choosing it sets index to firstIndex - 1), then label(firstIndex) .
. label(count - 1), translated. True when index changed.
| bool DekiEditor::TargetSamplesTextures | ( | const std::string & | platformId | ) |
Whether platformId draws textures filtered, so a texture's filter means something there: a platform that provides a capability some package filters with (deki-rendering's "opengl"), or "" (the editor's own desktop).
|
inline |
| std::string DekiEditor::ToolchainBinDir | ( | ) |
Windows: the folder of the GNU toolchain projects are built with - the bundled toolchain's bin/, else the folder of the compiler this editor was built with, else the first standard MSYS2 / MinGW folder that has g++.
Empty when there is none, and always empty elsewhere (the toolchain is on the system PATH there).
| void DekiEditor::Tooltip | ( | const char * | fmt, |
| ... ) |
| 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.
| void DekiEditor::TrimRegisteredWindows | ( | int | keepCount | ) |
| 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.
| PlatformSyncResult DekiEditor::UpdatePlatformFromPackage | ( | const std::string & | projectPath, |
| const std::string & | platformId ) |
| std::string DekiEditor::WithBuildJobs | ( | const std::string & | shellLine | ) |
A shell line that runs with the job count of PrepareBuildJobs: export CMAKE_BUILD_PARALLEL_LEVEL=<n> IDF_PY_BUILD_JOBS=<n>; <line>, leaving out a variable the user set.
The line as it is on Windows.
|
inline |
Writes one target's values into settings.texture, always in the object form.
An empty entry is removed.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
constexpr |
|
constexpr |
|
constexpr |
|
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.
|
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 |
|
constexpr |
The Max Size choices, as Unity offers them. 0 means no limit.
|
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.