Repository navigation
OpenECS-std 0.7.0
Pre-releaseOpenECS-std 0.7.0 adds seven plugins: files, viewer and console, which a tool shows its project with; regex, markdown, syntax and video. It adds the profiler and the key list, which every tool loads. ui gains search, menus, sections, colour pickers, paths, graphs, dragging and dropping, and draws only what changed. The release has the plugins built for Linux and Windows.
It comes out with OpenECS 0.7.0, which ships these plugins built, in its plugins/ folder. The examples of OpenECS-examples 0.7.0 use them.
What you can do
Show a project's files. files is a panel of a folder, as a tree or as a grid of tiles. A search shows only the files whose name holds its text. A right click opens a menu: New for a folder and for each kind of file the tool gives, then Open, Rename and Delete. Show in file manager opens the system's file manager on the file. The tree drags a file onto other panels.
Look at a file. viewer shows a file as it is: text, with its code coloured, images and sounds. Its lines and path wrap at the panel's width.
Show a program's output. console keeps entries that other plugins add, each framed in its level's colour, with its time. A file and line that an entry names, such as main.lua:12, is a link that opens the file in your code editor, with the command of console.editor. An entry equal to the last one stacks with a count. Toggles and a search filter the entries. A click chooses an entry, a double click goes to its place, a right click opens Go to and Copy, and Ctrl+C copies it. On Windows, console.editor finds code as code.cmd.
See where the time goes. The profiler, Alt+W then F, shows each plugin's own time, each panel's draw and each step of the frames, as OpenECS measures them while Measure is on. A graph shows the last frames. Copy report puts it all on the clipboard as text.
Change any key. The key list, Alt+W then K, shows every key binding by scope. A click on a key and a new key press give its function that key; Remove takes a key away, Reset goes back to the preset's, and Add a key binds any function. The changes go into your settings.
Find text with regular expressions. regex compiles patterns with PCRE2: test, match, matchAll, replace, split and escape, with named groups.
Show Markdown. markdown reads Markdown with md4c into a tree of nodes, or into ui's elements, with emphasis, code and links in their styles.
Colour code. syntax highlights C, Lua and JSON with tree-sitter, as ranges by kind or as ui's spans for each line.
Play video. video plays MPEG-1 files with their sound, with pl_mpeg: play, pause, seek, loop, volume, and draw into a panel.
Build views faster with ui.
ui.searchis a search field, which Ctrl+F reaches, andui.matchesmatches each word. The settings window, the launcher, the panel list and the plugin list have one.ui.menuopens a menu at a point, such as where a right click was;onMenugives the place.ui.sectionis a heading that shows and hides its children;ui.coloris a swatch with a picker;ui.pathis a field with a button that opens a file dialog;ui.graphdraws bars of numbers, which stack in colours.- Lists, tables and trees choose many items with Ctrl and Shift, and drag their items with
onDrag. Data dropped on a panel goes to the element withonDrop. - A text may be a list of spans, each with its style, colour and link. A field shows a placeholder while it is empty. A number field takes a sum, such as
32*4, and a drag sideways changes it. A row withwrap = truebreaks into lines. A slider givesonSubmitthe value its drag ends on. - Styles are values that a variable keeps, with ui's own from
ui.styles().ui.inspectoutlines every element and names the one under the pointer. ui.showdraws only what changed since the last show, so a hover no longer redraws a whole panel.
More in the others. compress makes and reads tar archives. draw makes a font bold, italic, underlined or struck, and replaces an image's pixels. net's error tells why a connection failed. The settings window resets a setting you changed.
Small fixes
- Every function that can fail outside its caller gives nil and why, and a wrong argument is a misuse that stops the caller (OpenECS DESIGN 1.4). Plugins no longer log the failures they return.
- textgrid's
cellandfittake the surface's scale, so their cells are the drawn ones. - The SQLite library is built as
sqlite3, so a second build no longer compiles it and the sqlite plugin again. - fs's watches tell
overflowwhen changes were lost andgonewhen the folder is. - gpu builds without gcc's analyzer warnings, and hash with gcc 16.
What will break
Plugin API 3. Every plugin's manifest says api = 3, so the plugins need OpenECS 0.7.0. Change api = 2 to 3 in your own plugins.
Errors. A function that fails gives nil and why, in place of logging. Registrations, such as ecs.service.register and ecs.key.bind, raise on a misuse and return nothing, so assert(...) around them fails: drop the assert.
ui.
ui.tree(nodes, props)andui.table(columns, rows, props)take their props last.- Selectors, tabs and dropdowns take
selectedandonSelect, a number from 1. - The settings
ui.margin,ui.rowPadding,ui.titleSizeandui.noteSizeare gone: use ui's styles. - A prop that ui does not know, and an id that two elements share, are a misuse.
draw.measuretakes the surface's scale.
textgrid. textgrid.cell(size, scale) and textgrid.fit(width, height, size, scale) take the scale.
Building. std's build compiles PCRE2, md4c, tree-sitter with its grammars, and pl_mpeg too. Update the submodules first, as README.md says.
Downloads
openecs-std-0.7.0-linux-x86_64.tar.gzandopenecs-std-0.7.0-windows-x86_64.zip: the plugins built, as above, with the licenses of the libraries in them.openecs-std-0.7.0-source.tar.gz: the source with the libraries it compiles in. Build it inside a checkout of OpenECS, as README.md says.SHA256SUMS: checksums of the archives.
The standard plugins are under the zlib license. The libraries in dependencies/ keep their own licenses, which OpenECS's release lists.