D language for Graphical User Interface and Cross Platform Development
Виталий Фадеев
vital.fadeev at gmail.com
Mon Jun 29 13:14:04 UTC 2020
On Sunday, 28 June 2020 at 18:01:08 UTC, c-smile wrote:
> On Thursday, 25 June 2020 at 20:42:25 UTC, Robert M. Münch
> wrote:
>> On 2020-06-25 03:33:23 +0000, Виталий Фадеев said:
>>
>>> What about Sciter ?
>>>
>>> Site: https://sciter.com/
>>>
>>> D: https://github.com/sciter-sdk/Sciter-Dport
>>
>> It looks interesting but I never tried it. Any experience with
>> it?
>
> Sciter's author here.
>
>
> If to consider a "perfect and modern D GUI library":
>
> 1. It should have unified DOM serializable to HTML/XHTML. There
> are many good reasons for that, from Accessibility (a.k.a.
> Section 508), to things like enabling React alike functionality
> and JSX. D syntax may even support JSX natively in the way I
> did in Sciter's script:
> https://sciter.com/docs/content/script/language/ssx.htm
>
> 2. It should be style-able, so is CSS or its subset. It is
> again flexible and 95% UI developers know it already.
> Style-ability here means not just colors but flexibility and
> configurability of element flows (layout manager in Java AWT
> terms).
>
> 3. It shall use GPU rendering as much as possible. That's the
> must for high-DPI monitors.
>
> 4. Implementation shall be compact - each D GUI application
> will include it statically and compilations time shall be short.
>
> Please let me know if someone will start doing anything close
> to the the above in D - I can help.
I do.
Everything goes well.
1. HTML will be later, JSX not planned.
Idea is to use native D language.
Like this:
void main()
{
with ( new App )
{
with ( CR!Screen )
{
with ( CR!Window )
{
with ( CR!Element )
{
classes ~= "row";
with ( CR!Element )
{
classes ~= "c1/3 menu";
}
with ( CR!Element )
{
classes ~= "c2/3 search center";
}
with ( CR!Element )
{
classes ~= "c3/3 indicators right";
}
}
with ( CR!Element )
{
classes ~= "row";
with ( CR!Element )
{
classes ~= "c1/1 video center";
}
}
}
}
}
}
2. CSS, of course :)
There will be a function for style.
And destylization.
Like this:
struct Style
{
string className;
CHECKER[] checkers;
STYLER styler;
UNSTYLER unstyler;
uint weight;
}
using:
styles ~= new Style( "row", [], ( ElementStyled* element ) {
element.width = "parent";
});
And CSS. How we all love.
Like this:
.row {
width: 100%;
}
3. Windows GDI as main concept. For using on Android will be
OpenGL.
Will be surface backend. Like this:
interface ISurface
{
void BeginPaint ( );
void RelArea ( AREA relArea );
void AbsArea ( AREA absArea );
void Path ( POINT[] points );
void Color ( COLOR color );
void Style ( LINE_STYLE style );
void Weight ( WEIGHT weight );
void Font ( FONT font );
void Fill ( );
void Stroke ( );
void MoveTo ( int x, int y );
void LineTo ( int x, int y );
void AngleArc ( int cx, int cy, int r, float startAngle,
float sweepAngle, int direction );
void Char ( wchar c );
void Text ( string text );
void Image ( Image image );
void EndPaint ( );
}
This is past version. Now I think it will be easier Screen /
Window / GPU-Backend.
I want keep small Node / Element. And want to use Window as
Element in DocTree.
It will be beautiful. and I want to keep the principle of
similarity.
4. Here we have: clibs + D runtime + Phobos. We’ll come up with
something later...
I want beauty & fast Windows Shell!
I want beauty & fast Windows Open/Save/Select folder dialogs!
I want beauty & fast Windows file manager!
I want beauty & fast Windows applications!
I want beauty & fast & usable Android Offline Maps!
And I love Linux & I want also on Linux!
)
More information about the Digitalmars-d
mailing list