Jump to page: 1 2 3
Thread overview
DlangUI 0.9.0: Console backend added
Sep 09, 2016
Vadim Lopatin
Sep 09, 2016
mogu
Sep 09, 2016
Adam D. Ruppe
Sep 09, 2016
Vadim Lopatin
Sep 09, 2016
ketmar
Sep 09, 2016
Vadim Lopatin
Sep 09, 2016
ketmar
Sep 12, 2016
Rory McGuire
Sep 09, 2016
Martin Drašar
Sep 09, 2016
Vadim Lopatin
Sep 09, 2016
Nick Sabalausky
Sep 12, 2016
Steve Biedermann
Sep 12, 2016
Vadim Lopatin
Sep 13, 2016
Vadim Lopatin
Sep 13, 2016
Stefan Koch
Sep 13, 2016
Vadim Lopatin
Sep 13, 2016
Bauss
Sep 13, 2016
Vadim Lopatin
Sep 13, 2016
Vadim Lopatin
Sep 13, 2016
Rory McGuire
Sep 14, 2016
Vadim Lopatin
Sep 13, 2016
ketmar
Sep 14, 2016
Vadim Lopatin
Sep 14, 2016
ketmar
Sep 14, 2016
ketmar
Sep 14, 2016
Rory McGuire
Sep 14, 2016
ketmar
Sep 14, 2016
Rory McGuire
Sep 14, 2016
ketmar
Sep 14, 2016
ketmar
September 09, 2016
Hello!

Now it's possible to build DlangUI apps to run in console (Linux, Windows).
When DlangUI is built with version=USE_CONSOLE (dub subconfiguration "console" for dlangui library) - it works in terminal.

Such feature may be useful, e.g. to run apps on headless devices, or via SSH.

For simple apps, it's enough just to specify dlangui configuration console. No additional changes required.

If custom themes are used, additional theme files prefixed with "console_" are to be created.
If custom embedded resources are used, create additional resource list file, with "console_" prefix.

Margins, padding, size values if specified in pixels are to be changed.
Hint: use points or EMs for such values to get them working universally on both console and GUI.

If images/icons are used, and still needed in console mode, you may need to create ASCII art like text image files (.tim extension).

Some screenshots (from dlangui example1 app):

  http://i63.tinypic.com/2wn1bg9.png
  http://i66.tinypic.com/142yctx.png
  http://i64.tinypic.com/snlc08.png
  http://i64.tinypic.com/2n16vcw.png

Part of key modifiers do not work in linux console.
Mouse events working ok.

Theme for console is to be improved a bit.

Now I'm trying to get DlangIDE working in console.


Best regards,
     Vadim

September 09, 2016
On Friday, 9 September 2016 at 11:21:07 UTC, Vadim Lopatin wrote:
> Hello!
>
> Now it's possible to build DlangUI apps to run in console (Linux, Windows).
> When DlangUI is built with version=USE_CONSOLE (dub subconfiguration "console" for dlangui library) - it works in terminal.
>
> Such feature may be useful, e.g. to run apps on headless devices, or via SSH.
>
> For simple apps, it's enough just to specify dlangui configuration console. No additional changes required.
>
> If custom themes are used, additional theme files prefixed with "console_" are to be created.
> If custom embedded resources are used, create additional resource list file, with "console_" prefix.
>
> Margins, padding, size values if specified in pixels are to be changed.
> Hint: use points or EMs for such values to get them working universally on both console and GUI.
>
> If images/icons are used, and still needed in console mode, you may need to create ASCII art like text image files (.tim extension).
>
> Some screenshots (from dlangui example1 app):
>
>   http://i63.tinypic.com/2wn1bg9.png
>   http://i66.tinypic.com/142yctx.png
>   http://i64.tinypic.com/snlc08.png
>   http://i64.tinypic.com/2n16vcw.png
>
> Part of key modifiers do not work in linux console.
> Mouse events working ok.
>
> Theme for console is to be improved a bit.
>
> Now I'm trying to get DlangIDE working in console.
>
>
> Best regards,
>      Vadim

Amazing!!!!! You must be genius.
September 09, 2016
On Friday, 9 September 2016 at 11:21:07 UTC, Vadim Lopatin wrote:
> Now it's possible to build DlangUI apps to run in console (Linux, Windows).

Very nice.

> Part of key modifiers do not work in linux console.
> Mouse events working ok.

Which parts are you having trouble with? I have implemented a lot of this for my terminal.d and might be able to help.
September 09, 2016
Dne 9.9.2016 v 13:21 Vadim Lopatin via Digitalmars-d-announce napsal(a):
> Hello!
> 
> Now it's possible to build DlangUI apps to run in console (Linux, Windows).
> When DlangUI is built with version=USE_CONSOLE (dub subconfiguration
> "console" for dlangui library) - it works in terminal.

This is indeed really cool.

How gracefully does it handle when the console is of limited size? Let's say 80x25. Does it allow e.g. virtual screen of bigger size and then moving around in console?

Martin

September 09, 2016
On Friday, 9 September 2016 at 11:56:11 UTC, Adam D. Ruppe wrote:
> On Friday, 9 September 2016 at 11:21:07 UTC, Vadim Lopatin wrote:
>> Now it's possible to build DlangUI apps to run in console (Linux, Windows).
>
> Very nice.
>
>> Part of key modifiers do not work in linux console.
>> Mouse events working ok.
>
> Which parts are you having trouble with? I have implemented a lot of this for my terminal.d and might be able to help.

Keyboard support on Linux terminals seems most difficult.
Some shortcuts are being processed by terminal app. Some ctrl-combinations are causing signals. I have an idea to catch some of Ctrl+key signals, and simulate keypress.
E.g. I cannot get working text selection moving by Ctrl+Shift+Arrows.

UI layout code required surprisingly a few changes.
Most of console related fixes were made by providing separate theme file.
Only hardcoded margins/padding/size limits were needed to fix.

September 09, 2016
On Friday, 9 September 2016 at 12:04:14 UTC, Martin Drašar wrote:
> Dne 9.9.2016 v 13:21 Vadim Lopatin via Digitalmars-d-announce napsal(a):
>> Hello!
>> 
>> Now it's possible to build DlangUI apps to run in console (Linux, Windows).
>> When DlangUI is built with version=USE_CONSOLE (dub subconfiguration
>> "console" for dlangui library) - it works in terminal.
>
> This is indeed really cool.
>
> How gracefully does it handle when the console is of limited size? Let's say 80x25. Does it allow e.g. virtual screen of bigger size and then moving around in console?
>
> Martin

DlangUI provides "layouts" similar to Android ones, which should reflow and resize widgets for different screen sizes.
As well, app may load layouts from DML markup file - different for different screen size (as it's done in Android).

To simulate bigger screen, it's possible just to place controls inside ScrollWidget - and you would be able to move it with scrollbars.

September 09, 2016
On Friday, 9 September 2016 at 12:20:08 UTC, Vadim Lopatin wrote:
> Keyboard support on Linux terminals seems most difficult.
> Some shortcuts are being processed by terminal app.

here programmer has no options.

> Some ctrl-combinations are causing signals.

switch tty to raw mode, and there will be no signals. see my iv.rawtty2, for example.

> E.g. I cannot get working text selection moving by Ctrl+Shift+Arrows.

this is hightly dependent of the actual terminal emulator. in real world, it is enough to support xterm mappings, rxvt mappings and "Linux" (this is "real" console) mappings. xterm and rxvt mappings aren't really conflicting (much). again, the messy iv.rawtty2.ttyReadKey may give some clues.

of course, "best practice" is to use termcap/terminfo, but this is even bigger mess! ;-)
September 09, 2016
On Friday, 9 September 2016 at 12:33:56 UTC, ketmar wrote:
> On Friday, 9 September 2016 at 12:20:08 UTC, Vadim Lopatin wrote:
>> Keyboard support on Linux terminals seems most difficult.
>> Some shortcuts are being processed by terminal app.
>
> here programmer has no options.
>
>> Some ctrl-combinations are causing signals.
>
> switch tty to raw mode, and there will be no signals. see my iv.rawtty2, for example.
>
>> E.g. I cannot get working text selection moving by Ctrl+Shift+Arrows.
>
> this is hightly dependent of the actual terminal emulator. in real world, it is enough to support xterm mappings, rxvt mappings and "Linux" (this is "real" console) mappings. xterm and rxvt mappings aren't really conflicting (much). again, the messy iv.rawtty2.ttyReadKey may give some clues.
>
> of course, "best practice" is to use termcap/terminfo, but this is even bigger mess! ;-)

Thank you!
I'll look at it.

September 09, 2016
On 09/09/2016 07:21 AM, Vadim Lopatin wrote:
> Hello!
>
> Now it's possible to build DlangUI apps to run in console (Linux, Windows).
>
> Some screenshots (from dlangui example1 app):
>
>    http://i63.tinypic.com/2wn1bg9.png
>    http://i66.tinypic.com/142yctx.png
>    http://i64.tinypic.com/snlc08.png
>    http://i64.tinypic.com/2n16vcw.png
>

Very cool!

September 09, 2016
On Friday, 9 September 2016 at 12:52:35 UTC, Vadim Lopatin wrote:
> Thank you!
> I'll look at it.

feel free to ping me on IRC if you'll have any questions.
« First   ‹ Prev
1 2 3