Skip to content

OpenECS-std 0.7.0

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 18 Nov 13:47
· 224 commits to dev since this release
d6c9112

OpenECS-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.search is a search field, which Ctrl+F reaches, and ui.matches matches each word. The settings window, the launcher, the panel list and the plugin list have one.
  • ui.menu opens a menu at a point, such as where a right click was; onMenu gives the place.
  • ui.section is a heading that shows and hides its children; ui.color is a swatch with a picker; ui.path is a field with a button that opens a file dialog; ui.graph draws 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 with onDrop.
  • 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 with wrap = true breaks into lines. A slider gives onSubmit the value its drag ends on.
  • Styles are values that a variable keeps, with ui's own from ui.styles(). ui.inspect outlines every element and names the one under the pointer.
  • ui.show draws 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 cell and fit take 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 overflow when changes were lost and gone when 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) and ui.table(columns, rows, props) take their props last.
  • Selectors, tabs and dropdowns take selected and onSelect, a number from 1.
  • The settings ui.margin, ui.rowPadding, ui.titleSize and ui.noteSize are gone: use ui's styles.
  • A prop that ui does not know, and an id that two elements share, are a misuse.
  • draw.measure takes 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.gz and openecs-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.