It is currently Tue Sep 26, 2017 10:55 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 68 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Sun May 14, 2017 2:40 pm 
Offline
User
User
User avatar

Joined: Sun Jan 08, 2017 10:27 pm
Posts: 83
Location: France
Thanks, I have now managed to add several Gadgets :)
I had initially tried with a ScrollArea Container, seems better with HBox, VBox, GridBox or MultiBox.
The Faq's on the 1st post should be usefull for newsbie like me.


Top
 Profile  
Reply with quote  
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Wed May 17, 2017 1:35 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Feb 25, 2013 5:51 pm
Posts: 510
Location: US or Estonia
This is something both SB and PB desperately needs. I'd even argue Dialog lib should replace the Window, Toolbar, Menu, and Gadget libraries completely since static geometry is pretty much obsolete in the field of UI/UX in 2017(since there is stuff with CGA all the way to 4K resolutions and different dynamic aspect ratios) and writing your own handlers even from templates is annoying.

Feature Requests from my brief testing:
  • Copy to Clipboard for both code and xml export
  • Some form of code stub to handle relative font sizing with native PB and SB font per platform. Basically LoadFont with a relative value for "Size" using window timer or thread state machine and sweep all text based gadgets using SetGadgetFont?

I made a pretty complex UI with it within 30 minutes of downloading it. My only complaints are with Dialog lib itself in how it has no way to control height expansion(no maxheight on anything but Window and SingleBox) and how it handles image cropping.

I think PB Dialog lib XML is identical to SB Dialog lib XML so your tool already works there too..

_________________
The truth hurts.


Top
 Profile  
Reply with quote  
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Wed May 17, 2017 3:07 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Oct 26, 2015 2:55 am
Posts: 819
Location: Ukraine
tj1010 wrote:
This is something both SB and PB desperately needs. I'd even argue Dialog lib should replace the Window, Toolbar, Menu, and Gadget libraries completely since static geometry is pretty much obsolete in the field of UI/UX in 2017(since there is stuff with CGA all the way to 4K resolutions and different dynamic aspect ratios) and writing your own handlers even from templates is annoying.

...
I made a pretty complex UI with it within 30 minutes of downloading it. My only complaints are with Dialog lib itself in how it has no way to control height expansion(no maxheight on anything but Window and SingleBox) and how it handles image cropping.


Yes that library is really cool thing and decreases UI pain a lot, even though it is obliously not fully completed for now.

However it also has another problem -- those "runtime" procedures and dialogs xml itself are placed into binary as plain text, that of course allows easily to modify them and generally makes binary much more hackable. I was planning to add some obfuscation/encryption to fix this partially (and there are some other related ideas), but currently all remains as is.


Quote:
I think PB Dialog lib XML is identical to SB Dialog lib XML so your tool already works there too..

Nice if so. Btw I wouldn't be surprised if it was created for SB originally ^_^ As it really follows a lot concepts from web / CSS.


Quote:
Feature Requests from my brief testing:
  • Copy to Clipboard for both code and xml export
  • Some form of code stub to handle relative font sizing with native PB and SB font per platform. Basically LoadFont with a relative value for "Size" using window timer or thread state machine and sweep all text based gadgets using SetGadgetFont?


Nice 2 ideas, one which is first I'll probably add when program finally will get own options/config (thus it will be possible to switch export behavior between file and CB, to not bloat popup menu).

What about 2nd, I have idea of adding code like this (and related function to define font from designer):
Code:
  Define x = LoadFont(#PB_Any, "Consolas", 25)
  SetGadgetFont(-1, FontID(x))

Executed before dialogs open, it will replace all dialog gadgets font with one loaded, then dialog library automatically resizes controls and windows to fit all text with that loaded font/size.

Just didn't get what you mean as relative font size value? DPI scale factor? (if yes, it's not needed, at least Windows scales fonts automatically)


// hell I'm writing too much text after overdosed coffee + got brain hyperactivity from weather which is finally nice & summer :mrgreen:

_________________
All the elements in life's complexity
Making struggle infinite


Top
 Profile  
Reply with quote  
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Wed May 17, 2017 5:35 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Feb 25, 2013 5:51 pm
Posts: 510
Location: US or Estonia
Lunasole wrote:
...
Yes that library is really cool thing and decreases UI pain a lot, even though it is obliously not fully completed for now.

However it also has another problem -- those "runtime" procedures and dialogs xml itself are placed into binary as plain text, that of course allows easily to modify them and generally makes binary much more hackable. I was planning to add some obfuscation/encryption to fix this partially (and there are some other related ideas), but currently all remains as is.
...

What about 2nd, I have idea of adding code like this (and related function to define font from designer):
Code:
  Define x = LoadFont(#PB_Any, "Consolas", 25)
  SetGadgetFont(-1, FontID(x))

Executed before dialogs open, it will replace all dialog gadgets font with one loaded, then dialog library automatically resizes controls and windows to fit all text with that loaded font/size.

Just didn't get what you mean as relative font size value? DPI scale factor? (if yes, it's not needed, at least Windows scales fonts automatically)


Proportionate to what it was in it's first state while maintaining aspect ratio. Like if a string field got taller and wider go as wide and tall as possible up to original proportion without breaking font aspect ratio. Basically keeping font same size relative to the gadget as it was originally.

I'm not even sure this is possible though without API stuff. You basically have to reload fonts and I seem to remember PB falls back to rounded font sizes or something.

A good test case would be a 800x600 dialog window maximized or dragged up to 4k.

_________________
The truth hurts.


Last edited by tj1010 on Wed May 17, 2017 6:12 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Wed May 17, 2017 6:05 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Oct 26, 2015 2:55 am
Posts: 819
Location: Ukraine
tj1010 wrote:
Proportionate to what it was in it's first state while maintaining aspect ratio. Like if a string field got taller and wider go as wide and tall as possible up to original proportion without breaking font aspect ratio. Basically keeping font same size relative to the gadget as it was originally.

I'm not even sure this is possible though without API stuff. You basically have to reload fonts and I seem to remember PB falls back to rounded font sizes or something.


I think too this will need API. Also it looks too complicated/specific to add it to code generator.

But your idea give me other idea ^^ For example, it is not too hard to make some simplest "plugin" system for Designer, to allow anyone generate code as they want, using custom DLL coded in PB for that.

// but well, "on a second view" such idea also looks too big for such a small tool. I don't think that lot of ppl are or will be using DD2
Probably should better ask Fred for plugin support :D (hah, I already did it once, seems it's hard for 3 platforms simultaneously)

Anyway, thanks for reply

_________________
All the elements in life's complexity
Making struggle infinite


Top
 Profile  
Reply with quote  
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Wed May 17, 2017 7:24 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Feb 25, 2013 5:51 pm
Posts: 510
Location: US or Estonia
I'll probably use it regularly to prototype and export XML. My big projects hide screens by hiding containers. The write&run process of UI design is exponentially longer and more expensive. I do the same thing on mobile.

EDIT: Regarding XML hacking: Base64 over AES encrypt or ROT13 or packed memory in resource section. Anyone who can beat that can patch a UI structure and handler anyway..

_________________
The truth hurts.


Top
 Profile  
Reply with quote  
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Sun May 28, 2017 1:06 am 
Offline
Addict
Addict
User avatar

Joined: Mon Oct 26, 2015 2:55 am
Posts: 819
Location: Ukraine
Spent some time for 1.0.0.5 :) See changes in that readme.

tj1010 wrote:
EDIT: Regarding XML hacking: Base64 over AES encrypt or ROT13 or packed memory in resource section. Anyone who can beat that can patch a UI structure and handler anyway..


Btw adding handlers using BindEvent() for example (instead of XML) should make some difference also.
Anyway "just ideas", for now I didn't needed something with encrypted or obfuscated dialogs

_________________
All the elements in life's complexity
Making struggle infinite


Top
 Profile  
Reply with quote  
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Wed May 31, 2017 11:18 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Feb 25, 2013 5:51 pm
Posts: 510
Location: US or Estonia
You have to restart to get the clipboard to work after clicking it. "Import XML" is a must for multi-sitting UI/UX projects; I can kind of see how to code this just crawling xml tree and mapping attributes using a stack technique and just fail gracefully on all parsing errors instead of trying to heuristically solve them..

Another design problem I find with Dialog lib in both SB and PB is you can't just swap containers in place with visible for easy app screens.. Your options are swapping windows or loading different dialogs. This is a problem because dialog-windows size to content and not desktop or desktop changes so you have to iterate over all windows and adjust window sizes relative to desktop or mobile screen new dimensions.. This means thread or timer or callback and custom aspect ratio calculating code.. You can only have one window for #PB_Window_Background in SB too so that shortcut is missed..

_________________
The truth hurts.


Top
 Profile  
Reply with quote  
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Wed Jun 07, 2017 3:59 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Mar 02, 2004 1:20 pm
Posts: 927
Location: Amphibios 9
@Lunasole: Is there any chance to compile a linux-version?

Thanks in advance & Greetings ... Peter


Top
 Profile  
Reply with quote  
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Wed Jun 07, 2017 10:39 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Oct 26, 2015 2:55 am
Posts: 819
Location: Ukraine
Kiffi wrote:
@Lunasole: Is there any chance to compile a linux-version?


I like idea, but don't like linux a lot ^^ I like it's "ideology", but don't like what it became on practice. As for me modern linux is like USSR with it perverted socialism realization.

Well that was some useless "lyric" :mrgreen:
Some key parts of DD2 are made using WinAPI customizations and I'm pretty sure linux can't even provide comparable analogues for that, so generally it looks impossible to port it and I'd suggest only to use something like Wine on linux (hope it works fine and can help)

_________________
All the elements in life's complexity
Making struggle infinite


Top
 Profile  
Reply with quote  
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Thu Jun 08, 2017 8:55 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Feb 25, 2013 5:51 pm
Posts: 510
Location: US or Estonia
People can't even get static layouts to work typically under GTK3..

_________________
The truth hurts.


Top
 Profile  
Reply with quote  
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Tue Jun 27, 2017 1:51 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Dec 18, 2004 11:56 am
Posts: 429
Location: Vienna - Austria
Thx for sharing, this is absolutely useful stuff!

_________________
Go, tell it on the mountains.


Top
 Profile  
Reply with quote  
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Wed Jun 28, 2017 7:45 am 
Offline
Enthusiast
Enthusiast

Joined: Tue Oct 14, 2014 12:09 pm
Posts: 171
Is there some news about your wonderfull programm ?
Thanks


Top
 Profile  
Reply with quote  
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Wed Jun 28, 2017 10:44 am 
Offline
Addict
Addict
User avatar

Joined: Mon Oct 26, 2015 2:55 am
Posts: 819
Location: Ukraine
loulou2522 wrote:
Is there some news about your wonderfull programm ?

Well currently I don't have "big reasonable ideas" of new things ^^
Here is some update made recently:
Quote:
1.0.0.6
- Output: greatly changed events handling code (now it used 'native' event binding, instead of xml-defined)
// surely that bloats resulting code, but also:
// - bypasses PB bugs with canvas/other controls
// - removes runtime procedures/library
// - generally is "more flexible" ^^
// no more OnEvent attribute in exported code XML, while special "dd2events" attribute used on raw XML export (ignored by dialogs library as invalid)
- Output: now every event handler has local variable "this"
- Output: fixed missing window declares in cases when no UI callbacks generated

_________________
All the elements in life's complexity
Making struggle infinite


Top
 Profile  
Reply with quote  
 Post subject: Re: DialogDesigner2 — a tool to compose XML dialogs
PostPosted: Fri Jul 21, 2017 10:00 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Jan 20, 2014 6:32 pm
Posts: 136
Can you please compile for linux?

Thanks

_________________
WARNING: I dont know what I am doing! I just put stuff here and there and sometimes like magic it works. So please improve on my code and post your changes so I can learn more. TIA


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 68 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye