Re: My first real dlang/dlangui app - Agile Commander

2018-01-22 Thread Andrzej Kilijański via Digitalmars-d-announce

On Monday, 22 January 2018 at 12:44:29 UTC, Kena wrote:

On Monday, 22 January 2018 at 07:40:02 UTC, Andrzej Kilijański
On Monday, 22 January 2018 at 09:42:58 UTC, Basile B. wrote:

wrote:


Hello,

It's nice to have a new commercial D-written project on the 
market :)


How does Agile Commander store the user data on the computer? 
Does it use a DBMS like SQlite or something ?


It's use simple text (JSON) file with .agic extension.

So you can add project documentation to your mercurial/git 
repository, that makes a nice feature: When you checkout older 
project sources you see the same state of project documentation 
and all what you were working at that time.


Re: My first real dlang/dlangui app - Agile Commander

2018-01-22 Thread Andrzej Kilijański via Digitalmars-d-announce

On Monday, 22 January 2018 at 09:42:58 UTC, Basile B. wrote:
On Monday, 22 January 2018 at 07:40:02 UTC, Andrzej Kilijański 
wrote:

On Sunday, 21 January 2018 at 22:45:56 UTC, Basile B. wrote:


Nice work.

Remarks:

1/ There's an obvious issue with drag and drop. You should 
store the position of the mouse (in Delphi it would be during 
the  "OnMouseDown" event)  and subtract it while moving. The 
little jump is a bit annoying i think.


2/ For some reason, DPI detection was wrong for me. It 
started with 304 (pretty big !) instead of 96.


Thanks for testing :) Do you mean the story jump just after 
you start dragging or you have issues on every mouse move?


Just after start dragging.


It was intended to reveal what is under the cursor. But maybe you 
are right. I will fix it on the option in the configuration in 
the next version :)



Do you have this DPI issues on windows or on linux?


Linux.


I think this may be a SDL problem. DlangUI uses the 
SDL_GetDisplayDPI() function to check DPI. I will check that code.




Re: My first real dlang/dlangui app - Agile Commander

2018-01-22 Thread Kena via Digitalmars-d-announce

On Monday, 22 January 2018 at 07:40:02 UTC, Andrzej Kilijański
On Monday, 22 January 2018 at 09:42:58 UTC, Basile B. wrote:

wrote:


Hello,

It's nice to have a new commercial D-written project on the 
market :)


How does Agile Commander store the user data on the computer? 
Does it use a DBMS like SQlite or something ?


Re: My first real dlang/dlangui app - Agile Commander

2018-01-22 Thread Basile B. via Digitalmars-d-announce
On Monday, 22 January 2018 at 07:40:02 UTC, Andrzej Kilijański 
wrote:

On Sunday, 21 January 2018 at 22:45:56 UTC, Basile B. wrote:


Nice work.

Remarks:

1/ There's an obvious issue with drag and drop. You should 
store the position of the mouse (in Delphi it would be during 
the  "OnMouseDown" event)  and subtract it while moving. The 
little jump is a bit annoying i think.


2/ For some reason, DPI detection was wrong for me. It started 
with 304 (pretty big !) instead of 96.


Thanks for testing :) Do you mean the story jump just after you 
start dragging or you have issues on every mouse move?


Just after start dragging.


Do you have this DPI issues on windows or on linux?


Linux.



Re: My first real dlang/dlangui app - Agile Commander

2018-01-21 Thread Andrzej Kilijański via Digitalmars-d-announce

On Sunday, 21 January 2018 at 22:45:56 UTC, Basile B. wrote:


Nice work.

Remarks:

1/ There's an obvious issue with drag and drop. You should 
store the position of the mouse (in Delphi it would be during 
the  "OnMouseDown" event)  and subtract it while moving. The 
little jump is a bit annoying i think.


2/ For some reason, DPI detection was wrong for me. It started 
with 304 (pretty big !) instead of 96.


Thanks for testing :) Do you mean the story jump just after you 
start dragging or you have issues on every mouse move?


Do you have this DPI issues on windows or on linux?


Re: My first real dlang/dlangui app - Agile Commander

2018-01-21 Thread Basile B. via Digitalmars-d-announce
On Sunday, 21 January 2018 at 18:03:41 UTC, Andrzej Kilijański 
wrote:

Hi,

I was working on my first dlang/dlangui app and dlangui itself 
(as contributor and3md) for the last ten months.
Currently first version of my software is up:) It's simple 
project management tool. Anyone can check how dlangui can look 
like and the state of the project by checking it:


https://agilecommander.com/

I created my own theme, special for my app. I think dlangui is 
pretty usable. Last year many bugs was fixed. There is a lot of 
work to do but all basic stuff just work.


Working with dlang is very pleasure. I love D way of holding 
string encoding. I come to D from Pascal/Delphi world and I 
think D is first language that can be Pascal killer (fast 
compilation, fast native code, more readable, and don't have 
circular reference problem). We (dlang/dlangui) only need more 
success stories.


DlangUI can be found here:
https://github.com/buggins/dlangui


Nice work.

Remarks:

1/ There's an obvious issue with drag and drop. You should store 
the position of the mouse (in Delphi it would be during the  
"OnMouseDown" event)  and subtract it while moving. The little 
jump is a bit annoying i think.


2/ For some reason, DPI detection was wrong for me. It started 
with 304 (pretty big !) instead of 96.


Re: My first real dlang/dlangui app - Agile Commander

2018-01-21 Thread Andrzej Kilijański via Digitalmars-d-announce
On Sunday, 21 January 2018 at 18:22:32 UTC, Guillaume Piolat 
wrote:
Welcome to D app development, and congrats about not being yet 
another SaaS!
It's becoming annoying how every website want to own you and 
your data.

(can't test you app though because no Mac version).


I created to make this app because wanted to have all my 
plans/data on my own computer:) Currently don't have a Mac but 
DlangUI works on Mac too (SDL backend).


Re: My first real dlang/dlangui app - Agile Commander

2018-01-21 Thread Guillaume Piolat via Digitalmars-d-announce
On Sunday, 21 January 2018 at 18:03:41 UTC, Andrzej Kilijański 
wrote:

Hi,

I was working on my first dlang/dlangui app and dlangui itself 
(as contributor and3md) for the last ten months.
Currently first version of my software is up:) It's simple 
project management tool. Anyone can check how dlangui can look 
like and the state of the project by checking it:


https://agilecommander.com/




Welcome to D app development, and congrats about not being yet 
another SaaS!
It's becoming annoying how every website want to own you and your 
data.

(can't test you app though because no Mac version).


My first real dlang/dlangui app - Agile Commander

2018-01-21 Thread Andrzej Kilijański via Digitalmars-d-announce

Hi,

I was working on my first dlang/dlangui app and dlangui itself 
(as contributor and3md) for the last ten months.
Currently first version of my software is up:) It's simple 
project management tool. Anyone can check how dlangui can look 
like and the state of the project by checking it:


https://agilecommander.com/

I created my own theme, special for my app. I think dlangui is 
pretty usable. Last year many bugs was fixed. There is a lot of 
work to do but all basic stuff just work.


Working with dlang is very pleasure. I love D way of holding 
string encoding. I come to D from Pascal/Delphi world and I think 
D is first language that can be Pascal killer (fast compilation, 
fast native code, more readable, and don't have circular 
reference problem). We (dlang/dlangui) only need more success 
stories.


DlangUI can be found here:
https://github.com/buggins/dlangui


Re: DlangUI v0.7.60 released

2017-08-31 Thread HyperParrow via Digitalmars-d-announce

On Thursday, 31 August 2017 at 11:59:16 UTC, Vadim Lopatin wrote:
After opening of project, it takes 10-20 seconds for DCD to 
parse and cache phobos/druntime modules so first invocation may 
be delayed.


That should not take more than 3 secs, there might be an error in 
the way you init DCD.




Re: DlangUI v0.7.60 released

2017-08-31 Thread Suliman via Digitalmars-d-announce

On Thursday, 31 August 2017 at 11:59:16 UTC, Vadim Lopatin wrote:

On Thursday, 31 August 2017 at 10:06:27 UTC, Suliman wrote:
On Thursday, 31 August 2017 at 08:51:12 UTC, Vadim Lopatin 
wrote:

On Wednesday, 30 August 2017 at 19:47:17 UTC, Dukc wrote:
On Wednesday, 30 August 2017 at 07:44:54 UTC, Vadim Lopatin 
wrote:

[snip]


From what I've followed, you sure update the project often! 
Perhaps more often than what Phobos is upgraded, by all 
developers combined. Great work.


I'm trying not to spam too often.


How to turn on autocomplete? I am starting typing but do not 
see any autocomplete suggestions.


Ctrl+Space

After opening of project, it takes 10-20 seconds for DCD to 
parse and cache phobos/druntime modules so first invocation may 
be delayed.


Can it work without Ctrl+Space ? Just show variants when typing?


Re: DlangUI v0.7.60 released

2017-08-31 Thread Vadim Lopatin via Digitalmars-d-announce

On Thursday, 31 August 2017 at 10:06:27 UTC, Suliman wrote:
On Thursday, 31 August 2017 at 08:51:12 UTC, Vadim Lopatin 
wrote:

On Wednesday, 30 August 2017 at 19:47:17 UTC, Dukc wrote:
On Wednesday, 30 August 2017 at 07:44:54 UTC, Vadim Lopatin 
wrote:

[snip]


From what I've followed, you sure update the project often! 
Perhaps more often than what Phobos is upgraded, by all 
developers combined. Great work.


I'm trying not to spam too often.


How to turn on autocomplete? I am starting typing but do not 
see any autocomplete suggestions.


Ctrl+Space

After opening of project, it takes 10-20 seconds for DCD to parse 
and cache phobos/druntime modules so first invocation may be 
delayed.


Re: DlangUI v0.7.60 released

2017-08-31 Thread aberba via Digitalmars-d-announce

On Thursday, 31 August 2017 at 02:41:08 UTC, Domain wrote:
On Wednesday, 30 August 2017 at 07:44:54 UTC, Vadim Lopatin 
wrote:
There are a lot of improvements in DlangIDE since last 
announcement.


[...]


Is there any themes to download? It's a bit ugly in windows


Ive been planning to create a new theme but stuff got in my way. 
Its still among my bazillion  plans though.


Re: DlangUI v0.7.60 released

2017-08-31 Thread Suliman via Digitalmars-d-announce

On Thursday, 31 August 2017 at 08:51:12 UTC, Vadim Lopatin wrote:

On Wednesday, 30 August 2017 at 19:47:17 UTC, Dukc wrote:
On Wednesday, 30 August 2017 at 07:44:54 UTC, Vadim Lopatin 
wrote:

[snip]


From what I've followed, you sure update the project often! 
Perhaps more often than what Phobos is upgraded, by all 
developers combined. Great work.


I'm trying not to spam too often.


How to turn on autocomplete? I am starting typing but do not see 
any autocomplete suggestions.


Re: DlangUI v0.7.60 released

2017-08-31 Thread Vadim Lopatin via Digitalmars-d-announce

On Wednesday, 30 August 2017 at 19:47:17 UTC, Dukc wrote:
On Wednesday, 30 August 2017 at 07:44:54 UTC, Vadim Lopatin 
wrote:

[snip]


From what I've followed, you sure update the project often! 
Perhaps more often than what Phobos is upgraded, by all 
developers combined. Great work.


I'm trying not to spam too often.


Re: DlangUI v0.7.60 released

2017-08-31 Thread Vadim Lopatin via Digitalmars-d-announce

On Thursday, 31 August 2017 at 02:41:08 UTC, Domain wrote:
On Wednesday, 30 August 2017 at 07:44:54 UTC, Vadim Lopatin 
wrote:
There are a lot of improvements in DlangIDE since last 
announcement.


[...]


Is there any themes to download? It's a bit ugly in windows


There are no other themes available.
Although, it's easy to create your own theme.
Instructions can be found here:

https://github.com/buggins/dlangui/wiki/Adding-New-Theme

Built in themes are created based on Eclipse look & feel on 
Windows platform.


But Dark theme is ugly in Eclipse as well :(

BTW, topic should be DlangIDE released, not DlangUI released.


Re: DlangUI v0.7.60 released

2017-08-30 Thread Domain via Digitalmars-d-announce

On Wednesday, 30 August 2017 at 07:44:54 UTC, Vadim Lopatin wrote:
There are a lot of improvements in DlangIDE since last 
announcement.


[...]


Is there any themes to download? It's a bit ugly in windows


Re: DlangUI v0.7.60 released

2017-08-30 Thread Dukc via Digitalmars-d-announce

On Wednesday, 30 August 2017 at 07:44:54 UTC, Vadim Lopatin wrote:

[snip]


From what I've followed, you sure update the project often! 
Perhaps more often than what Phobos is upgraded, by all 
developers combined. Great work.


DlangUI v0.7.60 released

2017-08-30 Thread Vadim Lopatin via Digitalmars-d-announce
There are a lot of improvements in DlangIDE since last 
announcement.


DlangIDE is a cross-platform IDE for D programming language.

Project link: https://github.com/buggins/dlangide
Release: https://github.com/buggins/dlangide/releases

Windows binaries are available (requires only DMD or LDC to work).

* DUB package as project format
* DUB is used to build and debug projects
* DCD is integrated as a library - provides code completion, go 
to definition and symbol documentation lookup.

* GDB (mago-mi on windows) debugger support

Recent changes:

* Stability fixes
* DCD support fixes
* Better UI look and feel
* UI font setting added
* List of opened files is saved on exit
* Setting to reopen recent workspace on startup
* Opens project or workspace passed as commandline parameter
* UI translations improved
* DUB Subpackages support

Thanks to DlangIDE and DlangUI contributors for PRs and issue 
reports.


Main TODO: better debugging support - variable display. Currently 
it's impossible to see content referenced by pointers, struct or 
class members. It's main stopper from using DlangIDE for everyday 
development.




DlangUI Wiki: some docs added

2017-06-14 Thread Vadim Lopatin via Digitalmars-d-announce

Hello,

I've created several Wiki pages which may be useful if you are 
using DlangUI.



Adding resources to DlangUI application:

https://github.com/buggins/dlangui/wiki/Adding-Resources


Adding new / cusomizing existing theme in DlangUI application:

https://github.com/buggins/dlangui/wiki/Adding-New-Theme


DML documentation:


https://github.com/buggins/dlangui/wiki/Using-DML-to-create-layouts



Please let me know if something has to be documented deeper.


Best regards,
Vadim


Re: Project Highlight: DlangUI

2016-10-10 Thread Vadim Lopatin via Digitalmars-d-announce

On Monday, 10 October 2016 at 14:32:43 UTC, Mike Parker wrote:

On Monday, 10 October 2016 at 13:26:59 UTC, Vadim Lopatin wrote:

Mike, is it possible to add screenshot to article before 
Console UI screenshot?
People getting confused by text UI screenshot, thinking it's 
normal for DlangUI.


Good candidate: 
http://buggins.github.io/dlangui/screenshots/screenshot-example1-windows.png


Good idea. I've updated the post.


Thank you!



Re: Project Highlight: DlangUI

2016-10-10 Thread Mike Parker via Digitalmars-d-announce

On Monday, 10 October 2016 at 13:26:59 UTC, Vadim Lopatin wrote:

Mike, is it possible to add screenshot to article before 
Console UI screenshot?
People getting confused by text UI screenshot, thinking it's 
normal for DlangUI.


Good candidate: 
http://buggins.github.io/dlangui/screenshots/screenshot-example1-windows.png


Good idea. I've updated the post.


Re: Project Highlight: DlangUI

2016-10-10 Thread Vadim Lopatin via Digitalmars-d-announce

On Friday, 7 October 2016 at 13:45:36 UTC, Mike Parker wrote:
The latest post on the D Blog is all about Vadim's DlangUI. He 
shares some of the inspiration behind it, a few implementation 
details, and plans for the future.


The post: 
https://dlang.org/blog/2016/10/07/project-highlight-dlangui/
Reddit: 
https://www.reddit.com/r/programming/comments/56besf/dlangui_a_crossplatform_gui_written_in_and_for/


Screenshots on http://buggins.github.io/dlangui/screenshots.html 
are updated to taken from latest DlangUI.

Now they are clickable - click to see non-resized version.



Re: Project Highlight: DlangUI

2016-10-10 Thread Vadim Lopatin via Digitalmars-d-announce

On Friday, 7 October 2016 at 13:45:36 UTC, Mike Parker wrote:
The latest post on the D Blog is all about Vadim's DlangUI. He 
shares some of the inspiration behind it, a few implementation 
details, and plans for the future.


The post: 
https://dlang.org/blog/2016/10/07/project-highlight-dlangui/
Reddit: 
https://www.reddit.com/r/programming/comments/56besf/dlangui_a_crossplatform_gui_written_in_and_for/


Mike, is it possible to add screenshot to article before Console 
UI screenshot?
People getting confused by text UI screenshot, thinking it's 
normal for DlangUI.


Good candidate: 
http://buggins.github.io/dlangui/screenshots/screenshot-example1-windows.png




Project Highlight: DlangUI

2016-10-07 Thread Mike Parker via Digitalmars-d-announce
The latest post on the D Blog is all about Vadim's DlangUI. He 
shares some of the inspiration behind it, a few implementation 
details, and plans for the future.


The post: 
https://dlang.org/blog/2016/10/07/project-highlight-dlangui/
Reddit: 
https://www.reddit.com/r/programming/comments/56besf/dlangui_a_crossplatform_gui_written_in_and_for/


Re: DlangUI 0.9.0: Console backend added

2016-09-14 Thread ketmar via Digitalmars-d-announce

On Wednesday, 14 September 2016 at 13:04:40 UTC, ketmar wrote:
in my editor i'm simply using rgb in [0..255] range, and 
mapping that to what terminal has. yet it is probably not the 
best way to make something nice looking when only 16 colors are 
available. heh, i should try and see how it will look like! ;-)


actually, it's not that bad, i expected much worser results.

original 256 color mode: 
http://ketmar.no-ip.org/img/tui/tui_c256.png
and this is restricted to basic 16 colors: 
http://ketmar.no-ip.org/img/tui/tui_c16a.png
still readable. my terminal has somewhat non-standard first 16 
colors (some colors are brighter than default xterm, some are 
not), that's probably why background becomes so bright. but it is 
still readable.


and this is 16 colors with "weighted translation" 
(0.30*r+0.59*g+0.11*b). looks surprisingly clean: 
http://ketmar.no-ip.org/img/tui/tui_c16b.png


Re: DlangUI 0.9.0: Console backend added

2016-09-14 Thread Rory McGuire via Digitalmars-d-announce
On Wed, Sep 14, 2016 at 3:11 PM, ketmar via Digitalmars-d-announce <
digitalmars-d-announce@puremagic.com> wrote:

> On Wednesday, 14 September 2016 at 13:08:18 UTC, Rory McGuire wrote:
>
>> Screenshots here are what can be done with terminal/ascii:
>> http://caca.zoy.org/wiki/libcaca
>>
>
> still, you can't use shading charaters to color text, so 16 colors for
> text output won't look that impressive. ;-)
>

:) true


Re: DlangUI 0.9.0: Console backend added

2016-09-14 Thread ketmar via Digitalmars-d-announce
On Wednesday, 14 September 2016 at 13:08:18 UTC, Rory McGuire 
wrote:
Screenshots here are what can be done with terminal/ascii: 
http://caca.zoy.org/wiki/libcaca


still, you can't use shading charaters to color text, so 16 
colors for text output won't look that impressive. ;-)


Re: DlangUI 0.9.0: Console backend added

2016-09-14 Thread ketmar via Digitalmars-d-announce
p.p.s. yep, VT-100 had only 4 functional keys, so we still 
enjoying having 'em encoded separately from the others.


Re: DlangUI 0.9.0: Console backend added

2016-09-14 Thread ketmar via Digitalmars-d-announce

On Wednesday, 14 September 2016 at 13:04:40 UTC, ketmar wrote:
On Wednesday, 14 September 2016 at 05:58:51 UTC, Vadim Lopatin 
CSI-with-modifier codes: \e[1;
this is common format for keys with modifiers, actually. let me 
quote my rawtty2:


  bool xtermMods (uint mci) @nogc {
switch (mci) {
  case 2: key.shift = true; return true;
  case 3: key.alt = true; return true;
  case 4: key.alt = true; key.shift = true; return true;
  case 5: key.ctrl = true; return true;
  case 6: key.ctrl = true; key.shift = true; return true;
  case 7: key.alt = true; key.ctrl = true; return true;
  case 8: key.alt = true; key.ctrl = true; key.shift = true; 
return true;

  default:
}
return false;
  }

  void xtermSpecial (char ch) @nogc {
switch (ch) {
  case 'A': key.key = TtyKey.Key.Up; break;
  case 'B': key.key = TtyKey.Key.Down; break;
  case 'C': key.key = TtyKey.Key.Right; break;
  case 'D': key.key = TtyKey.Key.Left; break;
  case 'E': key.key = TtyKey.Key.Pad5; break;
  case 'H': key.key = TtyKey.Key.Home; break;
  case 'F': key.key = TtyKey.Key.End; break;
  case 'P': key.key = TtyKey.Key.F1; break;
  case 'Q': key.key = TtyKey.Key.F2; break;
  case 'R': key.key = TtyKey.Key.F3; break;
  case 'S': key.key = TtyKey.Key.F4; break;
  case 'Z': key.key = TtyKey.Key.Tab; key.ch = 9; if 
(!key.shift && !key.alt && !key.ctrl) key.shift = true; break;

  default: badCSI(); break;
}
  }


Re: DlangUI 0.9.0: Console backend added

2016-09-14 Thread Rory McGuire via Digitalmars-d-announce
On Wed, Sep 14, 2016 at 3:04 PM, ketmar via Digitalmars-d-announce <
digitalmars-d-announce@puremagic.com> wrote:

> On Wednesday, 14 September 2016 at 05:58:51 UTC, Vadim Lopatin wrote:
>
>> Thank you!
>> Now dlangui terminal mode supports only 16 colors.
>> Some refactoring is required to support RGB colors.
>>
>
> in my editor i'm simply using rgb in [0..255] range, and mapping that to
> what terminal has. yet it is probably not the best way to make something
> nice looking when only 16 colors are available. heh, i should try and see
> how it will look like! ;-)
>

Screenshots here are what can be done with terminal/ascii:
http://caca.zoy.org/wiki/libcaca


Re: DlangUI 0.9.0: Console backend added

2016-09-14 Thread ketmar via Digitalmars-d-announce
On Wednesday, 14 September 2016 at 05:58:51 UTC, Vadim Lopatin 
wrote:

Thank you!
Now dlangui terminal mode supports only 16 colors.
Some refactoring is required to support RGB colors.


in my editor i'm simply using rgb in [0..255] range, and mapping 
that to what terminal has. yet it is probably not the best way to 
make something nice looking when only 16 colors are available. 
heh, i should try and see how it will look like! ;-)


On Wednesday, 14 September 2016 at 06:06:51 UTC, Vadim Lopatin 
wrote:



at least in Gnome terminal.


maybe gnome terminal took those keys for it's own needs -- like 
tab switching or something. in xterm, those are usual 
CSI-with-modifier codes: \e[1;, where  is 6 for 
ctrl+shift, and  is A/B/C/D for Up/Down/Right/Left 
respectively.


it is better to check everything in xterm -- this is still the 
most used terminal emulator out there. just switch it to send 
 for alt-key instead of setting high bit. ;-)


Re: DlangUI 0.9.0: Console backend added

2016-09-14 Thread Vadim Lopatin via Digitalmars-d-announce

On Tuesday, 13 September 2016 at 12:50:02 UTC, Rory McGuire wrote:

Did you get my post about the keyboard thing?
You can test it by running dub --single filename.d

output looks like:
kp: [27, 91, 49, 59, 50, 68]
kp: [27, 91, 49, 59, 53, 68]
kp: [27, 91, 49, 59, 51, 68]
kp: [27, 91, 68]

if I press:
shift+Left
ctrl+Left
alt+left
left


Single modifiers are working ok for me.
But some combinations - do not. E.g. Ctrl+Shift+Left/Up/Down - at 
least in Gnome terminal.


BTW: love what you are doing with dlangui. Are you a one person 
team?


In general, yes. But there were 24 contributors who sent pull 
requests.
Some of them contributed a lot of PRs - e.g. g4z3r(54 commits), 
MyLittleRobo(20 commits).


It would be great if more developers joined dlangui. But it 
should become more usable and popular, to attract more people. 
One of stopper here is probably poor documentation.




Re: DlangUI 0.9.0: Console backend added

2016-09-14 Thread Vadim Lopatin via Digitalmars-d-announce

On Tuesday, 13 September 2016 at 13:40:32 UTC, ketmar wrote:
On Tuesday, 13 September 2016 at 12:29:47 UTC, Vadim Lopatin 
wrote:

Screenshots on imgur: http://imgur.com/a/eaRiT


btw. please note that on most GNU/Linux terminals you can use 
simple RGB colors (with each component in [0..5] range). IRL if 
$TERM != "Linux", it is safe to assume that terminal supports 
256 colors (with rare exclustions like "screen" -- those can be 
safely ignored, screen is fubared anyway ;-).


Thank you!
Now dlangui terminal mode supports only 16 colors.
Some refactoring is required to support RGB colors.



Re: DlangUI 0.9.0: Console backend added

2016-09-13 Thread ketmar via Digitalmars-d-announce
On Tuesday, 13 September 2016 at 12:29:47 UTC, Vadim Lopatin 
wrote:

Screenshots on imgur: http://imgur.com/a/eaRiT


btw. please note that on most GNU/Linux terminals you can use 
simple RGB colors (with each component in [0..5] range). IRL if 
$TERM != "Linux", it is safe to assume that terminal supports 256 
colors (with rare exclustions like "screen" -- those can be 
safely ignored, screen is fubared anyway ;-).


Re: DlangUI 0.9.0: Console backend added

2016-09-13 Thread Rory McGuire via Digitalmars-d-announce
On Tue, Sep 13, 2016 at 2:29 PM, Vadim Lopatin via Digitalmars-d-announce <
digitalmars-d-announce@puremagic.com> wrote:

> On Tuesday, 13 September 2016 at 12:18:19 UTC, Bauss wrote:
>
>> Good job, but why do people still use tinypic in 2016, when things like
>> imgur exist that are a 1000 times faster to use, no dirty ads and images
>> won't magically be taken down someday.
>>
>
> Screenshots on imgur: http://imgur.com/a/eaRiT
>


nice, much better image site..

Did you get my post about the keyboard thing?
You can test it by running dub --single filename.d

output looks like:
kp: [27, 91, 49, 59, 50, 68]
kp: [27, 91, 49, 59, 53, 68]
kp: [27, 91, 49, 59, 51, 68]
kp: [27, 91, 68]

if I press:
shift+Left
ctrl+Left
alt+left
left



BTW: love what you are doing with dlangui. Are you a one person team?


Re: DlangUI 0.9.0: Console backend added

2016-09-13 Thread Vadim Lopatin via Digitalmars-d-announce

On Tuesday, 13 September 2016 at 12:18:19 UTC, Bauss wrote:
Good job, but why do people still use tinypic in 2016, when 
things like imgur exist that are a 1000 times faster to use, no 
dirty ads and images won't magically be taken down someday.


Thanks. I just googled tinypic with "free image hosting".
Next time will upload on imgur.


Re: DlangUI 0.9.0: Console backend added

2016-09-13 Thread Vadim Lopatin via Digitalmars-d-announce

On Tuesday, 13 September 2016 at 12:18:19 UTC, Bauss wrote:
Good job, but why do people still use tinypic in 2016, when 
things like imgur exist that are a 1000 times faster to use, no 
dirty ads and images won't magically be taken down someday.


Screenshots on imgur: http://imgur.com/a/eaRiT


Re: DlangUI 0.9.0: Console backend added

2016-09-13 Thread Bauss via Digitalmars-d-announce

On Friday, 9 September 2016 at 11:21:07 UTC, Vadim Lopatin wrote:

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



Good job, but why do people still use tinypic in 2016, when 
things like imgur exist that are a 1000 times faster to use, no 
dirty ads and images won't magically be taken down someday.


Re: DlangUI 0.9.0: Console backend added

2016-09-13 Thread Vadim Lopatin via Digitalmars-d-announce

On Tuesday, 13 September 2016 at 11:27:19 UTC, Stefan Koch wrote:
On Tuesday, 13 September 2016 at 07:51:06 UTC, Vadim Lopatin 
wrote:
On Friday, 9 September 2016 at 11:21:07 UTC, Vadim Lopatin 
wrote:

[...]


Screenshot of DlangIDE working in console:

http://i68.tinypic.com/2hrmkup.png


Looks great!
can you fix dlang-ui to build on XP ?


I don't have XP to check. What is wrong? Could you submit issue 
on github?

https://github.com/buggins/dlangui/issues


Re: DlangUI 0.9.0: Console backend added

2016-09-13 Thread Stefan Koch via Digitalmars-d-announce
On Tuesday, 13 September 2016 at 07:51:06 UTC, Vadim Lopatin 
wrote:
On Friday, 9 September 2016 at 11:21:07 UTC, Vadim Lopatin 
wrote:

[...]


Screenshot of DlangIDE working in console:

http://i68.tinypic.com/2hrmkup.png


Looks great!
can you fix dlang-ui to build on XP ?


Re: DlangUI 0.9.0: Console backend added

2016-09-13 Thread Vadim Lopatin via Digitalmars-d-announce

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).


Screenshot of DlangIDE working in console:

http://i68.tinypic.com/2hrmkup.png




Re: DlangUI 0.9.0: Console backend added

2016-09-12 Thread Vadim Lopatin via Digitalmars-d-announce
On Monday, 12 September 2016 at 08:15:57 UTC, Steve Biedermann 
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).
When DlangUI is built with version=USE_CONSOLE (dub 
subconfiguration "console" for dlangui library) - it works in 
terminal.


I just tried to compiel with subconfiguration "console" but I'm 
getting compile errors:


dub build --force
Performing "debug" build using dmd for x86.
dlangui 0.9.1: building configuration "console"...
%APPDATA%\dub\packages\dlangui-0.9.1\dlangui\3rd
party\fontconfig\package.d(7,12): Error: module loader is in 
file 'derelict\util\loader.d' which cannot be read
import path[0] = 
%APPDATA%\dub\packages\dlangui-0.9.1\dlangui\3rdparty
import path[1] = 
%APPDATA%\dub\packages\dlangui-0.9.1\dlangui\src

import path[2] = C:\D\dmd2\windows\bin\..\..\src\phobos
import path[3] = C:\D\dmd2\windows\bin\..\..\src\druntime\import
dmd failed with exit code 1.


Must be fixed in v0.9.2 (once dub registry updated version)


Re: DlangUI 0.9.0: Console backend added

2016-09-12 Thread Rory McGuire via Digitalmars-d-announce
On Fri, Sep 9, 2016 at 2:20 PM, Vadim Lopatin via Digitalmars-d-announce <
digitalmars-d-announce@puremagic.com> wrote:

> 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.
>

Hi Vadim, [0] is a short raw keyboard example, uses Jason's io, libasync
and termios:

https://gist.github.com/rjmcguire/58f3fd3d5f0934dc351cd143c1b0c880

It has quite a lot of comments, it is an experiment for keyboard io, so I
guess it might fit into dlangui nicely.

R


Re: DlangUI 0.9.0: Console backend added

2016-09-12 Thread Steve Biedermann via Digitalmars-d-announce

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).
When DlangUI is built with version=USE_CONSOLE (dub 
subconfiguration "console" for dlangui library) - it works in 
terminal.


I just tried to compiel with subconfiguration "console" but I'm 
getting compile errors:


dub build --force
Performing "debug" build using dmd for x86.
dlangui 0.9.1: building configuration "console"...
%APPDATA%\dub\packages\dlangui-0.9.1\dlangui\3rd
party\fontconfig\package.d(7,12): Error: module loader is in file 
'derelict\util\loader.d' which cannot be read
import path[0] = 
%APPDATA%\dub\packages\dlangui-0.9.1\dlangui\3rdparty

import path[1] = %APPDATA%\dub\packages\dlangui-0.9.1\dlangui\src
import path[2] = C:\D\dmd2\windows\bin\..\..\src\phobos
import path[3] = C:\D\dmd2\windows\bin\..\..\src\druntime\import
dmd failed with exit code 1.




Re: DlangUI 0.9.0: Console backend added

2016-09-09 Thread ketmar via Digitalmars-d-announce

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.


Re: DlangUI 0.9.0: Console backend added

2016-09-09 Thread Nick Sabalausky via Digitalmars-d-announce

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!



Re: DlangUI 0.9.0: Console backend added

2016-09-09 Thread Vadim Lopatin via Digitalmars-d-announce

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.



Re: DlangUI 0.9.0: Console backend added

2016-09-09 Thread ketmar via Digitalmars-d-announce

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! ;-)


Re: DlangUI 0.9.0: Console backend added

2016-09-09 Thread Vadim Lopatin via Digitalmars-d-announce

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.




Re: DlangUI 0.9.0: Console backend added

2016-09-09 Thread Martin Drašar via Digitalmars-d-announce
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



Re: DlangUI 0.9.0: Console backend added

2016-09-09 Thread Adam D. Ruppe via Digitalmars-d-announce

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.


Re: DlangUI 0.9.0: Console backend added

2016-09-09 Thread mogu via Digitalmars-d-announce

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.


DlangUI 0.9.0: Console backend added

2016-09-09 Thread Vadim Lopatin via Digitalmars-d-announce

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



Re: DlangUI on Android

2016-04-25 Thread Karabuta via Digitalmars-d-announce

On Sunday, 24 April 2016 at 11:57:18 UTC, Chris wrote:

On Sunday, 24 April 2016 at 06:19:14 UTC, thedeemon wrote:

On Saturday, 23 April 2016 at 18:16:38 UTC, Chris wrote:

Anyone interested in taking DlangUI and turning it into 
something like Swing/JavaFX for D?


What exactly do you mean by that?


Embrace DlangUI or something based on it in the same way DUB 
was embraced. Atm, only Vadim works on it as a hobby. It would 
be a pity to see it come to a standstill one day - for what 
ever reason. I think a D based UI is important, especially now 
that D is getting some attention.


+1


Re: DlangUI on Android

2016-04-24 Thread Chris via Digitalmars-d-announce

On Sunday, 24 April 2016 at 06:19:14 UTC, thedeemon wrote:

On Saturday, 23 April 2016 at 18:16:38 UTC, Chris wrote:

Anyone interested in taking DlangUI and turning it into 
something like Swing/JavaFX for D?


What exactly do you mean by that?


Embrace DlangUI or something based on it in the same way DUB was 
embraced. Atm, only Vadim works on it as a hobby. It would be a 
pity to see it come to a standstill one day - for what ever 
reason. I think a D based UI is important, especially now that D 
is getting some attention.


Re: DlangUI on Android

2016-04-24 Thread thedeemon via Digitalmars-d-announce

On Saturday, 23 April 2016 at 18:16:38 UTC, Chris wrote:

Anyone interested in taking DlangUI and turning it into 
something like Swing/JavaFX for D?


What exactly do you mean by that?



Re: DlangUI on Android

2016-04-23 Thread Chris via Digitalmars-d-announce

On Saturday, 23 April 2016 at 02:48:10 UTC, Vadim Lopatin wrote:

On Friday, 22 April 2016 at 18:49:24 UTC, Laeeth Isharc wrote:
This is a very exciting development.  (And impressive in the 
'consequent' department, as the Germans say - you said you 
would have DlangUI ported to Android some weeks after the 
working compiler, and that's what you did!).


It took about one week to make DlangUI android backend once I 
managed to build NativeActivity example by Joakim's 
instructions.


I would say it will take a week or too to make iOS backend once 
we have working compiler for iOS (in my estimations it will 
have 1K-2K lines of D code and 1K-2K lines of obj-c code.


Unfortunately, I have no experience with objective C neither 
with iOS programming.


Android port was easy for me because DlangUI was a kind of 
port/reimplementation of my C++ cross platform GUI library I 
used for my CoolReader GL project (e-book reader).


Might be useful for me to port some D code for internal 
enterprise apps to Android that currently runs on linux (I 
recognise how experimental it is, but I'm okay with that since 
mobile is just nice to have, and not yet necessary).
Please let me know issue you face when using DlangUI for mobile 
development.



Will you be at dconf?

No, I'm not planning to participate.
D is just a hobby for me.


Anyone interested in taking DlangUI and turning it into something 
like Swing/JavaFX for D?


Re: DlangUI on Android

2016-04-23 Thread FrankLike via Digitalmars-d-announce

On Saturday, 23 April 2016 at 14:35:55 UTC, Vadim Lopatin wrote:

On Saturday, 23 April 2016 at 12:45:01 UTC, FrankLike wrote:
On Saturday, 23 April 2016 at 11:42:49 UTC, Vadim Lopatin 
wrote:

[...]


Thank you.
But why nothing to be shown,only black color?


Probably something is wrong with OpenGL.
E.g. OpenGL ES3 is not supported.
Log can should failed opengl calls.


Waiting for the new apk

Thank you..


Re: DlangUI on Android

2016-04-23 Thread Vadim Lopatin via Digitalmars-d-announce

On Saturday, 23 April 2016 at 12:45:01 UTC, FrankLike wrote:

On Saturday, 23 April 2016 at 11:42:49 UTC, Vadim Lopatin wrote:

[...]


Thank you.
But why nothing to be shown,only black color?


Probably something is wrong with OpenGL.
E.g. OpenGL ES3 is not supported.
Log can should failed opengl calls.



Re: DlangUI on Android

2016-04-23 Thread FrankLike via Digitalmars-d-announce

On Saturday, 23 April 2016 at 11:42:49 UTC, Vadim Lopatin wrote:

[...]


Thank you.
But why nothing to be shown,only black color?



Re: DlangUI on Android

2016-04-23 Thread Vadim Lopatin via Digitalmars-d-announce

On Saturday, 23 April 2016 at 11:21:10 UTC, FrankLike wrote:

On Friday, 22 April 2016 at 17:02:20 UTC, Vadim Lopatin wrote:


Does it crash instantly or shows app GUI for some time?
Is your smartphone arm-based?
test-runner.apk is ok,but DLangUITetrisExample.apk and 
DlangUIHelloWorld.apk ,only shows black color.

HTC Android 5.02 ,it's arm-based,Not ok, sorry.
Where is the log file? Path?


Log messages are in Android system log.
On older androids, application CatLog (available on Market) was 
able to store logs to file. But on latest android, app cannot 
read logs of other applications, and CatLog shows none useful.
You can try CatLog, but if it does not work (if you cannot see 
any messages with 'dlangui' tag), the only way to get logs I know 
is to use 'adb' utility from Android SDK.
Download Android SDK, unpack to some folder, use 
sdk/platform-tools/adb utility.

Connect device to pc using USB.
`adb logcat` from commandline shows log messages from device.
run `adb logcat > log.txt`, then start program which crashes on 
device, then press Ctrl+C to stop adb logcat. Now file log.txt 
should contain logs with crash.


Re: DlangUI on Android

2016-04-23 Thread FrankLike via Digitalmars-d-announce

On Friday, 22 April 2016 at 17:02:20 UTC, Vadim Lopatin wrote:


Does it crash instantly or shows app GUI for some time?
Is your smartphone arm-based?
test-runner.apk is ok,but DLangUITetrisExample.apk and 
DlangUIHelloWorld.apk ,only shows black color.

HTC Android 5.02 ,it's arm-based,Not ok, sorry.
Where is the log file? Path?




Re: DlangUI on Android

2016-04-23 Thread FrankLike via Digitalmars-d-announce

On Friday, 22 April 2016 at 17:02:20 UTC, Vadim Lopatin wrote:

On Friday, 22 April 2016 at 15:02:32 UTC, FrankLike wrote:
You can downlowd sample APK: 
https://sourceforge.net/projects/crengine/files/DlangUI/


DlangUI Tetris example now works ok on Android (arm, 
android4.4+)


Android5.02 ,Not ok, sorry.


Does it crash instantly or shows app GUI for some time?
Is your smartphone arm-based?
Couldn't you collect logs with `adb logcat`?


What is the name of log file?
Nothing  is  in SDCard.


Re: DlangUI on Android

2016-04-23 Thread MrSmith via Digitalmars-d-announce

Works on Nexus 7, Android 6.0.1!


Re: DlangUI on Android

2016-04-22 Thread Vadim Lopatin via Digitalmars-d-announce

On Friday, 22 April 2016 at 18:49:24 UTC, Laeeth Isharc wrote:
This is a very exciting development.  (And impressive in the 
'consequent' department, as the Germans say - you said you 
would have DlangUI ported to Android some weeks after the 
working compiler, and that's what you did!).


It took about one week to make DlangUI android backend once I 
managed to build NativeActivity example by Joakim's instructions.


I would say it will take a week or too to make iOS backend once 
we have working compiler for iOS (in my estimations it will have 
1K-2K lines of D code and 1K-2K lines of obj-c code.


Unfortunately, I have no experience with objective C neither with 
iOS programming.


Android port was easy for me because DlangUI was a kind of 
port/reimplementation of my C++ cross platform GUI library I used 
for my CoolReader GL project (e-book reader).


Might be useful for me to port some D code for internal 
enterprise apps to Android that currently runs on linux (I 
recognise how experimental it is, but I'm okay with that since 
mobile is just nice to have, and not yet necessary).
Please let me know issue you face when using DlangUI for mobile 
development.



Will you be at dconf?

No, I'm not planning to participate.
D is just a hobby for me.




Re: DlangUI on Android

2016-04-22 Thread Vadim Lopatin via Digitalmars-d-announce

On Friday, 22 April 2016 at 18:48:26 UTC, David Nadlinger wrote:

This is a reality now mostly due to Joakim's great LDC work.


Yes, it's really GREAT work!
I just took his NativeActivity example and modified a bit to make 
dlangui's platform class implementation.


I would be nice to have all Joakim's patches in upstream LDC and 
druntime/phobos.




Re: DlangUI on Android

2016-04-22 Thread David Nadlinger via Digitalmars-d-announce

On Friday, 22 April 2016 at 18:48:26 UTC, David Nadlinger wrote:

This is a reality now mostly due to Joakim's great LDC work.


(the fact that we can deploy stuff to Android in the first place, 
that is – obviously, the UI layer is a whole separate story)


Re: DlangUI on Android

2016-04-22 Thread Laeeth Isharc via Digitalmars-d-announce

On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote:

I've implemented initial support of Android in DlangUI.


Congratulations, Vadim.

This is a very exciting development.  (And impressive in the 
'consequent' department, as the Germans say - you said you would 
have DlangUI ported to Android some weeks after the working 
compiler, and that's what you did!).


Might be useful for me to port some D code for internal 
enterprise apps to Android that currently runs on linux (I 
recognise how experimental it is, but I'm okay with that since 
mobile is just nice to have, and not yet necessary).


Will you be at dconf?


Re: DlangUI on Android

2016-04-22 Thread David Nadlinger via Digitalmars-d-announce

On Thursday, 21 April 2016 at 14:48:40 UTC, ANtlord wrote:
Am I sleeping? Can we develop UI applications for Android on D? 
It's great!


Yes – cool, right?

This is a reality now mostly due to Joakim's great LDC work.

 — David


Re: DlangUI on Android

2016-04-22 Thread TheGag96 via Digitalmars-d-announce

On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote:

(snip)


Wow, really nice stuff! I wasn't even aware we could write D for 
Android at all...




Re: DlangUI on Android

2016-04-22 Thread Vadim Lopatin via Digitalmars-d-announce

On Friday, 22 April 2016 at 15:02:32 UTC, FrankLike wrote:
You can downlowd sample APK: 
https://sourceforge.net/projects/crengine/files/DlangUI/


DlangUI Tetris example now works ok on Android (arm, 
android4.4+)


Android5.02 ,Not ok, sorry.


Does it crash instantly or shows app GUI for some time?
Is your smartphone arm-based?
Couldn't you collect logs with `adb logcat`?



Re: DlangUI on Android

2016-04-22 Thread FrankLike via Digitalmars-d-announce

On Friday, 22 April 2016 at 12:05:52 UTC, Vadim Lopatin wrote:

On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote:

Hello,

I've implemented initial support of Android in DlangUI.

Only armv7a architecture is supported so far.

You can downlowd sample APK: 
https://sourceforge.net/projects/crengine/files/DlangUI/


DlangUI Tetris example now works ok on Android (arm, 
android4.4+)


Android5.02 ,Not ok, sorry.


Re: DlangUI on Android

2016-04-22 Thread FrankLike via Digitalmars-d-announce

On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote:

Hello,

I've implemented initial support of Android in DlangUI.

[...]


Congratulations!


Re: DlangUI on Android

2016-04-22 Thread Vadim Lopatin via Digitalmars-d-announce

On Friday, 22 April 2016 at 13:41:52 UTC, Mike Parker wrote:
I was late, but I have since gotten this taken care of, so it's 
all golden.


FYI, for anyone facing a similar problem in the future and is 
hung up waiting on me to merge a pull request, the base loader 
in DerelictUtil allows overriding the default library names. So 
instead of a library like DLangUI requiring a patched Derelict 
package, you could do this:


version(Derelict_OS_Android)
DerelictFT.load("libft2.so");

You can pass multiple library names as a single, 
comma-separated string:


DerelictFT.load("libft2.so,libfreetype.so");

Or as an array (which is what the above is converted to 
internally anyway):


DerelictFT.load(["libft2.so", "libfreetype.so"]);


Thank you for your help! I've updated dlangui dub.json with 
latest DerelictFT.




Re: DlangUI on Android

2016-04-22 Thread Mike Parker via Digitalmars-d-announce

On Thursday, 21 April 2016 at 15:49:32 UTC, Vadim Lopatin wrote:

Forgot to add that DerelictFT patch is required for 
DlangUI/Android.

(Freetype library has name libft2.so on Android)

PR is submitted, but not yet integrated into DerelictFT:

https://github.com/DerelictOrg/DerelictFT/pull/9




I was late, but I have since gotten this taken care of, so it's 
all golden.


FYI, for anyone facing a similar problem in the future and is 
hung up waiting on me to merge a pull request, the base loader in 
DerelictUtil allows overriding the default library names. So 
instead of a library like DLangUI requiring a patched Derelict 
package, you could do this:


version(Derelict_OS_Android)
DerelictFT.load("libft2.so");

You can pass multiple library names as a single, comma-separated 
string:


DerelictFT.load("libft2.so,libfreetype.so");

Or as an array (which is what the above is converted to 
internally anyway):


DerelictFT.load(["libft2.so", "libfreetype.so"]);


Re: DlangUI on Android

2016-04-21 Thread Dmitry via Digitalmars-d-announce

On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote:

I've implemented initial support of Android in DlangUI.


It's great! Thank you!
And congrats with it!


Re: DlangUI on Android

2016-04-21 Thread Vadim Lopatin via Digitalmars-d-announce

On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote:

Hello,

I've implemented initial support of Android in DlangUI.



Forgot to add that DerelictFT patch is required for 
DlangUI/Android.

(Freetype library has name libft2.so on Android)

PR is submitted, but not yet integrated into DerelictFT:

https://github.com/DerelictOrg/DerelictFT/pull/9


PS:
Current build is using android-19 API (Android 4.4 Kitkat) due to 
GLES3 dependency.

Will provide support of older platforms later, if needed.



Re: DlangUI on Android

2016-04-21 Thread Vadim Lopatin via Digitalmars-d-announce

On Thursday, 21 April 2016 at 14:48:40 UTC, ANtlord wrote:

On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote:

Hello,

I've implemented initial support of Android in DlangUI.


Am I sleeping? Can we develop UI applications for Android on D? 
It's great!


Yes, and the same code may run on both desktops and Android.



Re: DlangUI on Android

2016-04-21 Thread ANtlord via Digitalmars-d-announce

On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote:

Hello,

I've implemented initial support of Android in DlangUI.


Am I sleeping? Can we develop UI applications for Android on D? 
It's great!


DlangUI on Android

2016-04-21 Thread Vadim Lopatin via Digitalmars-d-announce

Hello,

I've implemented initial support of Android in DlangUI.

Only armv7a architecture is supported so far.

You can downlowd sample APK: 
https://sourceforge.net/projects/crengine/files/DlangUI/



How to add support of Android to your DlangUI project.
=

Copy dlangui/android/android_project directory to you DlangUI 
project directory.



Probably you will want to change android package name in 
AndroidManifest.xml and application display name in 
res/values/strings.xml



Modify android_app.mk, android_build_config.mk

android_app.mk
==

Update LOCAL_SRC_FILES to include all your project's files.


android_build_config.mk
===

Update paths to Android NDK, SDK, DlangUI source directory.

Default values:
export DLANGUI_DIR=$HOME/src/d/dlangui
export NDK=$HOME/android-ndk-r11c
export SDK=$HOME/android-sdk-linux
export LDC=$HOME/ldc2-android-arm-0.17.0-alpha2-linux-x86_64
export NDK_ARCH=x86_64


Use LDC cross compiler for armv7a build according instructions

https://wiki.dlang.org/Build_LDC_for_Android#Build_a_sample_OpenGL_Android_app_ported_to_D




Re: New example IRC Client for DlangUI

2016-03-20 Thread Joel via Digitalmars-d-announce

On Wednesday, 16 March 2016 at 12:07:24 UTC, Vadim Lopatin wrote:

Hello,

I've added new example for DlangUI - IRC Client.
It's located in dlangui/examples/ircclient and available as 
dlangui:ircclient package.


For this application, AsyncSocket implementation is added to 
DlangUI.


Best regards,
 Vadim


Cool!


New example IRC Client for DlangUI

2016-03-19 Thread Vadim Lopatin via Digitalmars-d-announce

Hello,

I've added new example for DlangUI - IRC Client.
It's located in dlangui/examples/ircclient and available as 
dlangui:ircclient package.


For this application, AsyncSocket implementation is added to 
DlangUI.


Best regards,
 Vadim


Re: DlangUI

2016-01-14 Thread Vadim Lopatin via Digitalmars-d-announce

On Tuesday, 20 May 2014 at 18:13:36 UTC, Vadim Lopatin wrote:
I would like to announce my project, DlangUI library - 
cross-platform GUI for D.

https://github.com/buggins/dlangui
License: Boost License 1.0

Native library written in D (not a wrapper to other GUI 
library) - easy to extend.


OpenGLDrawable is implemented - allows to use custom OpenGL 
drawing inside DlangUI.


E.g. it's possible to draw something with OpenGL as a background, 
and put UI on top of it.


Sample: dub run dlangui:opengl


Other changes:

A lot of fixes, mainly found while DlangIDE development.

OpenGL support code refactoring and optimizations contributed by 
Viktor Makhotkin (gazer).


Dependencies now are git submodules - when developing with 
VisualD/MonoD - no more manual cloning of dependency repos is 
required.


Porting of XML/CSS visualization engine from my C++ project 
CoolReader is started.





Re: DlangUI

2015-12-20 Thread Xavier Bigand via Digitalmars-d-announce

Le 17/12/2015 17:12, Vadim Lopatin a écrit :

On Wednesday, 16 December 2015 at 13:32:21 UTC, Suliman wrote:

Is it's possible to use some native frontend with dlangui instead of
drawing all controls with OpenGL? I really dislike how all OpenGL
toolkit looks like.


OpenGL is just hardware acceleration for drawing. Resulting picture is
the same for both OpenGL and software rendering.

DlangUI will never use native controls. It draws all widgets itself.
But look and feel can be changed by providing custom theme.
You can create theme (set of .xml and .png files) to get DlangUI app
looking exactly like native one.


Is it's possible to make dlangui fully compatibility with QML to be
able easy migrate visual components from Qt solution to dlangui?


No. It's not planned at least for now.



Having a GUI library fully compatible with QML request property binding 
support. We have it in DQuick, but as we use lua instead of a javascript 
VM I am not sure about how it can be possible to be compatible. 
Translating qml files in lua format will certainly not be enough, 
because their is some gliches in QML.


Sadly we don't work a lot on DQuick, but you can take a look at 
https://github.com/D-Quick/DQuick


Re: DlangUI

2015-12-18 Thread Suliman via Digitalmars-d-announce
On Thursday, 17 December 2015 at 17:25:09 UTC, Vadim Lopatin 
wrote:
On Thursday, 17 December 2015 at 16:21:58 UTC, John Colvin 
wrote:
DlangUI will never use native controls. It draws all widgets 
itself.

But look and feel can be changed by providing custom theme.
You can create theme (set of .xml and .png files) to get 
DlangUI app looking exactly like native one.


In general I don't care about that sort of thing, but there is 
one exception: the main application menu. Unity and Aqua (OS 
X) both end up feeling odd if you don't use the system one.


Completely agree.
Once Cocoa backend is ready I'm going to implement native OSX 
menus.


Would it be possible to add native menu for Windows? I think all 
font-related stuff is should be look native or use native 
controls. Because Apps that can't handle non standard system DPI 
looks very bad.


Re: DlangUI

2015-12-18 Thread Vadim Lopatin via Digitalmars-d-announce

On Friday, 18 December 2015 at 13:56:00 UTC, Suliman wrote:
In general I don't care about that sort of thing, but there 
is one exception: the main application menu. Unity and Aqua 
(OS X) both end up feeling odd if you don't use the system 
one.


Completely agree.
Once Cocoa backend is ready I'm going to implement native OSX 
menus.


Would it be possible to add native menu for Windows? I think 
all font-related stuff is should be look native or use native 
controls. Because Apps that can't handle non standard system 
DPI looks very bad.


I see no point in implementing native Windows menus.
For high DPI, DlangUI supports loading different drawables for 
different resources, and you can specify font sizes and control 
dimensions in points or millimeters instead of pixels.

(It's similar to Android)


Re: DlangUI

2015-12-17 Thread John Colvin via Digitalmars-d-announce
On Thursday, 17 December 2015 at 16:12:32 UTC, Vadim Lopatin 
wrote:

On Wednesday, 16 December 2015 at 13:32:21 UTC, Suliman wrote:
Is it's possible to use some native frontend with dlangui 
instead of drawing all controls with OpenGL? I really dislike 
how all OpenGL toolkit looks like.


OpenGL is just hardware acceleration for drawing. Resulting 
picture is the same for both OpenGL and software rendering.


DlangUI will never use native controls. It draws all widgets 
itself.

But look and feel can be changed by providing custom theme.
You can create theme (set of .xml and .png files) to get 
DlangUI app looking exactly like native one.


In general I don't care about that sort of thing, but there is 
one exception: the main application menu. Unity and Aqua (OS X) 
both end up feeling odd if you don't use the system one.


Re: DlangUI

2015-12-17 Thread Vadim Lopatin via Digitalmars-d-announce

On Wednesday, 16 December 2015 at 16:17:00 UTC, karabuta wrote:

On Tuesday, 14 April 2015 at 11:18:38 UTC, Vadim Lopatin wrote:

Maybe tutorial on Menus, tabs, list view, and a little excell 
app


I started to work on Spreadsheet (Excel like app) example
dub run dlangui:spreadsheet
(dlangui/examples/spreadsheet)

Its implementation is in the very beginning. Worksheet split view 
support development is in progress.







Re: DlangUI

2015-12-17 Thread Vadim Lopatin via Digitalmars-d-announce

On Wednesday, 16 December 2015 at 13:32:21 UTC, Suliman wrote:
Is it's possible to use some native frontend with dlangui 
instead of drawing all controls with OpenGL? I really dislike 
how all OpenGL toolkit looks like.


OpenGL is just hardware acceleration for drawing. Resulting 
picture is the same for both OpenGL and software rendering.


DlangUI will never use native controls. It draws all widgets 
itself.

But look and feel can be changed by providing custom theme.
You can create theme (set of .xml and .png files) to get DlangUI 
app looking exactly like native one.


Is it's possible to make dlangui fully compatibility with QML 
to be able easy migrate visual components from Qt solution to 
dlangui?


No. It's not planned at least for now.



Re: DlangUI

2015-12-17 Thread Vadim Lopatin via Digitalmars-d-announce

On Thursday, 17 December 2015 at 16:21:58 UTC, John Colvin wrote:
DlangUI will never use native controls. It draws all widgets 
itself.

But look and feel can be changed by providing custom theme.
You can create theme (set of .xml and .png files) to get 
DlangUI app looking exactly like native one.


In general I don't care about that sort of thing, but there is 
one exception: the main application menu. Unity and Aqua (OS X) 
both end up feeling odd if you don't use the system one.


Completely agree.
Once Cocoa backend is ready I'm going to implement native OSX 
menus.




Re: DlangUI

2015-12-16 Thread Suliman via Digitalmars-d-announce
Is it's possible to use some native frontend with dlangui instead 
of drawing all controls with OpenGL? I really dislike how all 
OpenGL toolkit looks like.


Is it's possible to make dlangui fully compatibility with QML to 
be able easy migrate visual components from Qt solution to 
dlangui?


Re: DlangUI

2015-12-16 Thread karabuta via Digitalmars-d-announce

On Tuesday, 14 April 2015 at 11:18:38 UTC, Vadim Lopatin wrote:

On Tuesday, 20 May 2014 at 18:13:36 UTC, Vadim Lopatin wrote:

Hello!

I would like to announce my project, DlangUI library - 
cross-platform GUI for D.

https://github.com/buggins/dlangui
License: Boost License 1.0


I've added first DlangUI tutorial on DlangUI Wiki:

https://github.com/buggins/dlangui/wiki/Getting-Started

It covers creation of simple DlangUI helloworld project, and 
then illustrates layouts, standard controls, DML, and signals.


Source code for all examples is available on GitHub

https://github.com/buggins/dlangui-examples

I'm looking forward for ideas for next tutorials.


Maybe tutorial on Menus, tabs, list view, and a little excell app


Re: DlangUI

2015-05-06 Thread Vadim Lopatin via Digitalmars-d-announce

On Tuesday, 20 May 2014 at 18:13:36 UTC, Vadim Lopatin wrote:

Hello!

I would like to announce my project, DlangUI library - 
cross-platform GUI for D.

https://github.com/buggins/dlangui
License: Boost License 1.0



Project Update:

FontConfig support is added for Linux builds
Examples available on https://github.com/buggins/dlangui-examples
Getting Started tutorial: 
https://github.com/buggins/dlangui/wiki/Getting-Started

Some bugs fixed


Re: DlangUI

2015-04-15 Thread igor_p via Digitalmars-d-announce

BTW, if I remove USE_OPENGL works fine :)


Re: DlangUI

2015-04-15 Thread igor_p via Digitalmars-d-announce

Great work!!

On windows works fine.
On debian:


$ dub run dlangui:example1
Building package dlangui:example1 in 
/home/igor/devel/dlang/dlangui/dlangui/examples/example1/

Target gl3n 1.0.1 is up to date. Use --force to rebuild.
Target dlib ~master is up to date. Use --force to rebuild.
Target derelict-util 1.9.1 is up to date. Use --force to rebuild.
Target derelict-ft 1.0.2 is up to date. Use --force to rebuild.
Target derelict-sdl2 1.9.5 is up to date. Use --force to rebuild.
Target derelict-gl3 1.0.12 is up to date. Use --force to rebuild.
Target dlangui 0.6.20 is up to date. Use --force to rebuild.
Building dlangui:example1 0.6.20 configuration application, 
build type debug.

Compiling using dmd...
Linking...
Running ./examples/example1/bin/example1
2015-04-15 11:20:21.323 E  Derelict: cannot load freetype shared 
library: Failed to load symbol FT_Gzip_Uncompress from shared 
library libfreetype.so.6
object.Exception@src/dlangui/graphics/ftfonts.d(519): Cannot load 
freetype library


./examples/example1/bin/example1(bool 
dlangui.platforms.common.platform.initFontManager()+0x23) 
[0x73871f]
./examples/example1/bin/example1(int 
dlangui.platforms.sdl.sdlapp.sdlmain(immutable(char)[][])+0x23) 
[0x69ae37]

./examples/example1/bin/example1(DLANGUImain+0x25) [0x69ae11]
./examples/example1/bin/example1(_Dmain+0x20) [0x6307dc]
./examples/example1/bin/example1(_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv+0x1f) 
[0x78c393]
./examples/example1/bin/example1(void rt.dmain2._d_run_main(int, 
char**, extern (C) int function(char[][])*).tryExec(scope void 
delegate())+0x2a) [0x78c2e6]
./examples/example1/bin/example1(void rt.dmain2._d_run_main(int, 
char**, extern (C) int function(char[][])*).runAll()+0x30) 
[0x78c34c]
./examples/example1/bin/example1(void rt.dmain2._d_run_main(int, 
char**, extern (C) int function(char[][])*).tryExec(scope void 
delegate())+0x2a) [0x78c2e6]

./examples/example1/bin/example1(_d_run_main+0x193) [0x78c267]
./examples/example1/bin/example1(main+0x25) [0x66d6a9]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) 
[0x7f8738aedead]

2015-04-15 11:20:21.328 D  Destroying font manager
Error executing command run:
Program exited with code 1


Problem with freetype? or Derelict? What's wrong?

google on FT_Gzip_Uncompress show smth about 2.5-2.6 of freetype. 
May be, this is just new function. In wheezy thereis 2.4 
freetype. (


It's today fresh install (even dub)

# dmd -v
DMD64 D Compiler v2.066.1

# dpkg -l | grep freetype
ii  libfreetype6:amd642.4.9-1.1+deb7u1
   amd64FreeType 2 font engine, shared library 
files
ii  libfreetype6-dev  2.4.9-1.1+deb7u1
   amd64FreeType 2 font engine, development files


# dpkg -l | grep freeimage
ii  libfreeimage3 3.15.1-1+b1 
   amd64Support library for graphics image 
formats (library)


# dpkg -l | grep opengl
ii  libqt4-opengl:amd64   4:4.8.2+dfsg-11 
   amd64Qt 4 OpenGL module
ii  libqt4-opengl-dev 4:4.8.2+dfsg-11 
   amd64Qt 4 OpenGL library development files
ii  libsmokeqtopengl4-3   4:4.8.4-1   
   amd64Qt OpenGL SMOKE library


# dpkg -l | grep libsdl
ii  libsdl-image1.2:amd64 1.2.12-2
   amd64Image loading library for Simple 
DirectMedia Layer 1.2, libraries
ii  libsdl1.2-dev 1.2.15-5
   amd64Simple DirectMedia Layer development files
ii  libsdl1.2debian:amd64 1.2.15-5
   amd64Simple DirectMedia Layer
ii  libsdl2-2.0-0:amd64   2.0.0+dfsg1-2~bpo70+1   
   amd64Simple DirectMedia Layer
ii  libsdl2-dev   2.0.0+dfsg1-2~bpo70+1   
   amd64Simple DirectMedia Layer development files


Thanx one more time!


Re: Loading of widgets from DML markup and DML Editor in DlangUI

2015-04-14 Thread Vadim Lopatin via Digitalmars-d-announce

On Friday, 10 April 2015 at 19:26:28 UTC, Jonas Drewsen wrote:

Cool!

I am not really that much into qml... but isn't much of the 
power of qml coming from using javascript to do logic and 
bindings?


Can you do D code stuff in the DML markup to handle that part 
e.g. by mixin of the DML?


Keep up the good work.

/Jonas


So far, I'm going to implement

* automatic mapping of loaded widgets to member variables (based 
on matching of widget id and variable names, or, possible mixin 
adding of member variables for all of widgets with ids)


* automatic mapping of loaded widget signals to handlers

Mixing in handlers written in D from DML is possible, in some of 
future implementations. So far, I'm not sure that it's better 
than just having external signal handlers automatically mapped, 
e.g. by name.


sample DML:
{
HorizontalLayout {
TextWidget { text: Enter file name: }
EditLine {
id: edFileName

}
Button {
id: btnOpen
text: Open
click = onBtnOpenClick
}
}
}

...
// class members
EditLine _edFileName;
bool onBtnOpenClick(Widget src) {
window.showMessageBox(Opend, File name:d ~ 
_edFileName.text);

return true;
}

Member variable `EditLine _edFileName;` could be added 
automatically by mixin, or at least it's value can be initialized 
on load
Signal handler may be assigned either if explicitly defined in 
DML (`click = onBtnOpenClick` means widget click signal should be 
connected to member function onBtnOpenClick) or just found based 
on widget Id and signal name (e.g. if there is widget with 
id=btnOpen and class method onBtnOpenClick - loader mixin could 
automatically decide to assign this method as signal handler of 
widget (like it's dont in VB).


I'm not sure if alternative definition is better

Button {
id: btnOpen
text: Open
click = { window.showMessageBox(Opend, File 
name:d ~ edFileName.text); }

}



Re: DlangUI

2015-04-14 Thread Vadim Lopatin via Digitalmars-d-announce

On Tuesday, 20 May 2014 at 18:13:36 UTC, Vadim Lopatin wrote:

Hello!

I would like to announce my project, DlangUI library - 
cross-platform GUI for D.

https://github.com/buggins/dlangui
License: Boost License 1.0


I've added first DlangUI tutorial on DlangUI Wiki:

https://github.com/buggins/dlangui/wiki/Getting-Started

It covers creation of simple DlangUI helloworld project, and then 
illustrates layouts, standard controls, DML, and signals.


Source code for all examples is available on GitHub

https://github.com/buggins/dlangui-examples

I'm looking forward for ideas for next tutorials.


Re: DlangUI

2015-04-13 Thread John Colvin via Digitalmars-d-announce

On Monday, 13 April 2015 at 18:35:59 UTC, Vadim Lopatin wrote:

On Monday, 13 April 2015 at 17:51:54 UTC, John Colvin wrote:

On Tuesday, 20 May 2014 at 18:13:36 UTC, Vadim Lopatin wrote:

Hello!

I would like to announce my project, DlangUI library - 
cross-platform GUI for D.

https://github.com/buggins/dlangui
License: Boost License 1.0

Native library written in D (not a wrapper to other GUI 
library) - easy to extend.
As a backend, uses SDL2 on any platform, Win32 API on 
Windows, XCB on Linux. Other backends can be added easy.

Tested on Windows and Linux.
Supports hardware acceleration - drawing using OpenGL when 
built with version=USE_OPENGL.

Unicode support.
Internationalization support.
Uses Win32 API fonts on Windows, and FreeType on other 
platforms.

Same look and feel can be achieved on all platforms.
Flexible look and feel - themes and styles.
API is a bit similar to Android UI.
Flexible layout, support of different screen DPI, scaling.
Uses two phase layout like in Android.
Supports drawable resources in .png and .jpeg, nine-patch 
pngs and state drawables like in Android.

Single threaded. Use other threads for performing slow tasks.
Mouse oriented.

Actually, it's a port (with major redesign) of my library 
used for cross-platform version of my application CoolReader 
from C++.



State of project: alpha. But, already can be used for simple 
2D games and simple GUI apps.
I'm keeping in mind a goal to write D language IDE based on 
dlangui. :)

Adding support of 3D graphics is planned.


Currently implemented widgets:

TextWidget - simple static text (TODO: implement multiline 
formatting)

ImageWidget - static image
Button - simple button with text label
ImageButton - image only button
TextImageButton - button with icon and label
CheckBox - check button with label
RadioButton - radio button with label
EditLine - single line edit
EditBox - multiline editor
VSpacer - vertical spacer - just an empty widget with 
layoutHeight == FILL_PARENT, to fill vertical space in layouts
HSpacer - horizontal spacer - just an empty widget with 
layoutWidth == FILL_PARENT, to fill horizontal space in 
layouts

ScrollBar - scroll bar
TabControl - tabs widget, allows to select one of tabs
TabHost - container for pages controlled by TabControl
TabWidget - combination of TabControl and TabHost

Layouts - Similar to layouts in Android

LinearLayout - layout children horizontally or vertically 
depending on orientation

VerticalLayout - just a LinearLayout with vertical orientation
HorizontalLayout - just a LinearLayout with vertical 
orientation
FrameLayout - all children occupy the same place; usually 
onle one of them is visible
TableLayout - children are aligned into rows and columns of 
table


List Views - similar to lists in Android UI API.
ListWidget - layout dynamic items horizontally or vertically 
(one in row/column) with automatic scrollbar; can reuse 
widgets for similar items
ListAdapter - interface to provide data and widgets for 
ListWidget
WidgetListAdapter - simple implementation of ListAdapter 
interface - just a list of widgets (one per list item) to show



Sample project, example1 contains demo code for most of 
dlangui API.


Try it using DUB:

  git clone https://github.com/buggins/dlangui.git
  cd dlangui
  dub run dlangui:example1

Fonts note: on Linux, several .TTFs are loaded from hardcoded 
paths (suitable for Ubuntu).
TODO: add fontconfig support to access all available system 
fonts.


Helloworld:

// main.d
import dlangui.all;
mixin DLANGUI_ENTRY_POINT;

/// entry point for dlangui based application
extern (C) int UIAppMain(string[] args) {
  // resource directory search paths
  string[] resourceDirs = [
  appendPath(exePath, ../res/),   // for Visual D and 
DUB builds

  appendPath(exePath, ../../res/) // for Mono-D builds
  ];

  // setup resource directories - will use only existing 
directories

  Platform.instance.resourceDirs = resourceDirs;
  // select translation file - for english language
  Platform.instance.uiLanguage = en;
  // load theme from file theme_default.xml
  Platform.instance.uiTheme = theme_default;

  // create window
  Window window = Platform.instance.createWindow(My Window, 
null);

  // create some widget to show in window
  window.mainWidget = (new Button()).text(Hello 
worldd).textColor(0xFF); // red text

  // show window
  window.show();
  // run message loop
  return Platform.instance.enterMessageLoop();
}

DDOC generated documentation can be found there: 
https://github.com/buggins/dlangui/tree/master/docs

For more info see readme and example1 code.

I would be glad to see any feedback.
Can this project be useful for someone? What features/widgets 
are must have for you?



Best regards,
   Vadim  coolreader@gmail.com



Is there any way I can debug a unittest build? Start 
Debugging seems bound to the debug build.


Are asking about DlangIDE?
There is no debugging here at all.

Start Debugging currently just exdecutes

Re: DlangUI

2015-04-13 Thread Vadim Lopatin via Digitalmars-d-announce

On Monday, 13 April 2015 at 17:51:54 UTC, John Colvin wrote:

On Tuesday, 20 May 2014 at 18:13:36 UTC, Vadim Lopatin wrote:

Hello!

I would like to announce my project, DlangUI library - 
cross-platform GUI for D.

https://github.com/buggins/dlangui
License: Boost License 1.0

Native library written in D (not a wrapper to other GUI 
library) - easy to extend.
As a backend, uses SDL2 on any platform, Win32 API on Windows, 
XCB on Linux. Other backends can be added easy.

Tested on Windows and Linux.
Supports hardware acceleration - drawing using OpenGL when 
built with version=USE_OPENGL.

Unicode support.
Internationalization support.
Uses Win32 API fonts on Windows, and FreeType on other 
platforms.

Same look and feel can be achieved on all platforms.
Flexible look and feel - themes and styles.
API is a bit similar to Android UI.
Flexible layout, support of different screen DPI, scaling.
Uses two phase layout like in Android.
Supports drawable resources in .png and .jpeg, nine-patch pngs 
and state drawables like in Android.

Single threaded. Use other threads for performing slow tasks.
Mouse oriented.

Actually, it's a port (with major redesign) of my library used 
for cross-platform version of my application CoolReader from 
C++.



State of project: alpha. But, already can be used for simple 
2D games and simple GUI apps.
I'm keeping in mind a goal to write D language IDE based on 
dlangui. :)

Adding support of 3D graphics is planned.


Currently implemented widgets:

TextWidget - simple static text (TODO: implement multiline 
formatting)

ImageWidget - static image
Button - simple button with text label
ImageButton - image only button
TextImageButton - button with icon and label
CheckBox - check button with label
RadioButton - radio button with label
EditLine - single line edit
EditBox - multiline editor
VSpacer - vertical spacer - just an empty widget with 
layoutHeight == FILL_PARENT, to fill vertical space in layouts
HSpacer - horizontal spacer - just an empty widget with 
layoutWidth == FILL_PARENT, to fill horizontal space in layouts

ScrollBar - scroll bar
TabControl - tabs widget, allows to select one of tabs
TabHost - container for pages controlled by TabControl
TabWidget - combination of TabControl and TabHost

Layouts - Similar to layouts in Android

LinearLayout - layout children horizontally or vertically 
depending on orientation

VerticalLayout - just a LinearLayout with vertical orientation
HorizontalLayout - just a LinearLayout with vertical 
orientation
FrameLayout - all children occupy the same place; usually onle 
one of them is visible
TableLayout - children are aligned into rows and columns of 
table


List Views - similar to lists in Android UI API.
ListWidget - layout dynamic items horizontally or vertically 
(one in row/column) with automatic scrollbar; can reuse 
widgets for similar items
ListAdapter - interface to provide data and widgets for 
ListWidget
WidgetListAdapter - simple implementation of ListAdapter 
interface - just a list of widgets (one per list item) to show



Sample project, example1 contains demo code for most of 
dlangui API.


Try it using DUB:

   git clone https://github.com/buggins/dlangui.git
   cd dlangui
   dub run dlangui:example1

Fonts note: on Linux, several .TTFs are loaded from hardcoded 
paths (suitable for Ubuntu).
TODO: add fontconfig support to access all available system 
fonts.


Helloworld:

// main.d
import dlangui.all;
mixin DLANGUI_ENTRY_POINT;

/// entry point for dlangui based application
extern (C) int UIAppMain(string[] args) {
   // resource directory search paths
   string[] resourceDirs = [
   appendPath(exePath, ../res/),   // for Visual D and 
DUB builds

   appendPath(exePath, ../../res/) // for Mono-D builds
   ];

   // setup resource directories - will use only existing 
directories

   Platform.instance.resourceDirs = resourceDirs;
   // select translation file - for english language
   Platform.instance.uiLanguage = en;
   // load theme from file theme_default.xml
   Platform.instance.uiTheme = theme_default;

   // create window
   Window window = Platform.instance.createWindow(My Window, 
null);

   // create some widget to show in window
   window.mainWidget = (new Button()).text(Hello 
worldd).textColor(0xFF); // red text

   // show window
   window.show();
   // run message loop
   return Platform.instance.enterMessageLoop();
}

DDOC generated documentation can be found there: 
https://github.com/buggins/dlangui/tree/master/docs

For more info see readme and example1 code.

I would be glad to see any feedback.
Can this project be useful for someone? What features/widgets 
are must have for you?



Best regards,
Vadim  coolreader@gmail.com



Is there any way I can debug a unittest build? Start 
Debugging seems bound to the debug build.


Are asking about DlangIDE?
There is no debugging here at all.

Start Debugging currently just exdecutes `dub run`




  1   2   3   >