If any of you read the fpc mailing lists you might have seen my message to that group regarding the announcement of a vector graphics and physics library I've been writing for FPC.
In a soon to published first release, I am taking a stab at designing a new user interface toolkit from scratch based on the vector graphics library rendered purely in OpenGL. Below is a video of my first test of this toolkit and I thought I'd share. Perhaps some of you may have some suggestions.
https://streamable.com/n42kllPlease bear in mind, this is meant to be a VERY minimal toolkit for the purpose of configuring or inputting settings in either game like programs or physics simulation programs. It includes a limited set of controls: windows, panels, sliders, push buttons, glyph buttons, check boxes, text entry, labels, image, and one custom paint control where you can draw whatever you want.
That said, everything is fully themeable and you can write or switch to different themes. The theme system manages the size of each control element, their visual representation, and the fonts and colors. It operates completely independent of the controls.
Layout is handled for you automatically by the container controls, window or panel, where children can be tiled horizontally, or vertically and placed near, center or far. Each control can have custom margins and containers can have custom size borders (space between controls and their four edges).
As mentioned before, this library will be released to a git repository soon with a FOSS license. It will be able to run on Windows, Mac, Linux, and Pi including the new Pi Zero 2 W.
If you're interested here are a few more videos of the vector graphics system I am writing:
Text Paint
https://streamable.com/m4e4qnCurtains
https://streamable.com/6o5y5oRegarding the widget system, here is a snippet that may help you understand how it's meant to be used:
// Create out widget system using a main widget with a theme
FWidget := TMainWidget.Create(DefaultTheme);
with FWidget.Add<TWindow>('about') do
begin
// You can change the theme anytime by assigning a different theme
// For example ... FWidget.Theme := OtherTheme
X := 10;
Y := 10;
Text := 'About';
// Window and panel have Fade properties to control their background
// surface opacity independent of child widget opacity
Fade := 0.25;
with This.Add<TGlyphImage>('icon') do
Text := '';
// Child widgets are arranged automatically by their container
with This.Add<TButton>('close') do
begin
Text := 'Close';
OnClick := CloseClick;
end;
// Widgets can be recalled later using FWidget.Find<Tlabel>('mouse')
with This.Add<Tlabel>('mouse') do
Text := 'Mouse move coordinates appear here';
// Widgets automatically grow to hold their content
with This.Add<TCheckBox>('option') do
Text := 'Use this option';