Page 1 of 6

DialogDesigner2 — a tool to compose XML dialogs

Posted: Thu Mar 23, 2017 9:08 pm
by Lunasole
There will be no long description here (unlike what I'm often writing in such cases ^_^), because I've got tired after finishing today tool code itself. So just a short story about utility:

- It's editor to design GUIs for PB "Dialog" library
- It does that exactly by "mouse programming", the results may be exported to XML or .pb source file
- It also provides some limits to follow PB dialog library rules, thus making things easier for someone who didn't know that library
- It also has some annoying limitations for now :)

Generally might be a good concept and I've seen that since I've posted it there were few more such editors here posted, so maybe useful a bit.

Here is download:
Something like a FAQ:
  • Q: I'm adding gadget to a window and it shows "container is full", why?
    A: Dialogs are made slightly different way than regular UI. First you should add a "container" to a window, then go on with adding gadgets (and additional containers for them)

    Q: How about Linux version, how about freedom?
    A: That's currently not possible as DD2 originally focused on WinAPI, maybe Wine can help

    Q: Why there is "Import" function disabled?
    A: Because I left it for own usage (too funny it was to say "for commercial"), I had planned some variants with that (but then abandoned at all for a long time.

Re: DialogDesigner2 — a tool to compose XML dialogs

Posted: Thu Mar 23, 2017 11:54 pm
by Andre
Because of limited time I just did a short test - and I must say your project looks promising! :D
(such a designer makes GUI designing with exported XML dialog code easier and often allow a speed-up in developing...)

For the moment I have one suggestion: when exporting the designed dialog into PB code - it would be good, if you could add some basic code for loading/opening the dialog and a basic event loop (at least optional).

Thank you for your effort! 8)

Re: DialogDesigner2 — a tool to compose XML dialogs

Posted: Fri Mar 24, 2017 1:00 am
by ts-soft
@Lunasole
Can you add a hint, there is windows-executable only and no source!

Re: DialogDesigner2 — a tool to compose XML dialogs

Posted: Fri Mar 24, 2017 10:38 am
by Lunasole
Andre wrote: For the moment I have one suggestion: when exporting the designed dialog into PB code - it would be good, if you could add some basic code for loading/opening the dialog and a basic event loop (at least optional).
Thanks for reply.
That's nice idea. going to add some option in future version [after fixing some of those limits of course. for example currently all items are ordered automatically and names are always lower-case ^^]

ts-soft wrote:@Lunasole
Can you add a hint, there is windows-executable only and no source!
What about windows-only, it is already added to "homepage"

Re: DialogDesigner2 — a tool to compose XML dialogs

Posted: Fri Mar 24, 2017 3:59 pm
by infratec
Since I always wanted to do something with this library...

I just tested your program :wink:

I was not able to add a second gadget to a window.
'New' at the window is greyed out.

Than it is a bit confusing that there are closing crosses at the two inner windows, but they does nothing.

So at the moment I'm a bit lost. I can only create a window with one gadget inside.
(0.0.0.6)

Bernd

Re: DialogDesigner2 — a tool to compose XML dialogs

Posted: Fri Mar 24, 2017 6:12 pm
by srod
@Infratec : a dialog window (in the PB sense) is a single element container (it can only contain a single item such as a gadget or a container element such as a vBox). Instead of adding a gadget, add a container such as a vBox which can contain multiple entitites. You can then add gadgets to the vBox etc. Once you get used to the way the dialogs work then they are very useful.

@Lunasole, this is not bad at all. Far from complete, but a bloody great start! :) For me, the first feature request is to be able to move elements up and down the tree and into and out of containers etc. Second, could we select individual items for expanding as we can with : expand='item:2' for example. Very useful when combined with empty elements which you already support.

But, this is really good. I really like it.

Thanks for sharing.

Re: DialogDesigner2 — a tool to compose XML dialogs

Posted: Fri Mar 24, 2017 7:52 pm
by Lunasole
infratec wrote: So at the moment I'm a bit lost. I can only create a window with one gadget inside.
(0.0.0.6)
That's because that library follows something like web-design rules, unlike "classical" ways of building UI. I.e. you not just adding controls, you first should add container for them (like <div> in CSS). There are lot of containers with different properties, see for example PB helpfile for OpenXMLDialog() function.
Generally you should add window, add some container and only then start adding "gadgets" (as @srod said already)

> Than it is a bit confusing that there are closing crosses at the two inner windows, but they does nothing.
Those controls are "for future" (if there will be ability to hide 2 tool windows, etc), but well should be better to remove them for now :))

srod wrote: @Lunasole, this is not bad at all. Far from complete, but a bloody great start! :) For me, the first feature request is to be able to move elements up and down the tree and into and out of containers etc. Second, could we select individual items for expanding as we can with : expand='item:2' for example. Very useful when combined with empty elements which you already support.

But, this is really good. I really like it.

Thanks for sharing.
Thanks you 2 for responce, both things you mentioned already planned, just not done yet because of their "relatively higher" complexity (or saying shorter, "это геморно)").
There also "min" "max" "value" properties are not supported yet (and maybe something else like this, don't remember exactly, as I didn't made any "true serious plan" for that ^^ well properties can be added quickly, will continue with that all when there will be some time&wish)

Re: DialogDesigner2 — a tool to compose XML dialogs

Posted: Sun Mar 26, 2017 1:45 am
by Lunasole
Hi again, just spend some time reviewing code and here is update. However still not done with those two important things (with "expand" and items reordering), that will be somehow later ^^

0.0.0.7
- removed item names limits (they were always lowercase previously)
- now item names are filtered (no spec chars allowed for objects which have events support)
- added all specific properties missing before: option: "group"; scrollarea: "scrolling,innerheight,innerwidth,step"; scrollbar: "page", splitter: "firstmin,secondmin";
- added some another option to export code (with some init code, instead of embedded xml only)
- fixed stupid bug with tree (in some condition it was causing infinite loop or crash)
- removed those fake x-buttons from tool windows :)
- few internal improvements of property editing window
- improved tooltips of property editing window
- little-but-nice improvements of preview window

Re: DialogDesigner2 — a tool to compose XML dialogs

Posted: Sun Mar 26, 2017 7:14 am
by infratec
Hi,

maybe it would be nice (for such beginners like me), if you can disable the gadgets if a window is selected.
Because it makes only sense to add a kind of a container.
This will avoid my first mistake: add a gadget to a window and then wondering why nothing else is possible.

Bernd

Re: DialogDesigner2 — a tool to compose XML dialogs

Posted: Sun Mar 26, 2017 9:05 am
by loulou2522
infratec wrote:Hi,

maybe it would be nice (for such beginners like me), if you can disable the gadgets if a window is selected.
Because it makes only sense to add a kind of a container.
This will avoid my first mistake: add a gadget to a window and then wondering why nothing else is possible.

Bernd
I don't understand because the exe file is considere by a virus and deleted by m antivirus. Can we have the source pb Please ?

Re: DialogDesigner2 — a tool to compose XML dialogs

Posted: Sun Mar 26, 2017 12:22 pm
by Lunasole
infratec wrote:Hi,

maybe it would be nice (for such beginners like me), if you can disable the gadgets if a window is selected.
Because it makes only sense to add a kind of a container.
Sometimes you may need just a window with a single control (for example one with just multi-line text on it), for such cases should be allowed to add control to a window directly.
But well, that disabling of "New" menu maybe really confusing, I'll add some other way to show that container is full.
loulou2522 wrote:the exe file is considere by a virus and deleted by m antivirus.
I can suggest you only to delete your "antivirus" as it is useless, if can't recognize file produced with PB compiler and packed with UPX ^_^

Re: DialogDesigner2 — a tool to compose XML dialogs

Posted: Wed Mar 29, 2017 6:22 am
by Lunasole
Updated to 0.0.0.8

Code: Select all

- Interface Tree: added support of items move/sort (all this is done using "drag&drop")
- Interface Tree: added list icons also ^_^
- Interface Tree: improved menu
- fixed bug with event callbacks generation
Now I'm really glad to see how that drag'n'drop item sorting does, despite the fact that it cost me few hours last night [when finally decided to do it this way] and propably some of my precious long hair :)
Hope there wouldn't be any bug with this stuff

Re: DialogDesigner2 — a tool to compose XML dialogs

Posted: Wed Mar 29, 2017 10:27 am
by Lunasole
Hope there wouldn't be any bug with this stuff
Hah, of course it was.
Just updated file again because of that

Code: Select all

ElseIf #WM_LBUTTONUP
This piece of mistake was causing drag'drop not work on WinXP (while worked well on Win7). Should be OK now, further going to add "item:" for expand, also maybe some other ideas to make this stuff close to "useful" and forget about it for a while.

Re: DialogDesigner2 — a tool to compose XML dialogs

Posted: Thu Mar 30, 2017 9:14 am
by Kwai chang caine
Very nice and simple 8)
Just a question, i can't resize the the windows with the mouse, is it the normal behavior ? :|

Re: DialogDesigner2 — a tool to compose XML dialogs

Posted: Thu Mar 30, 2017 9:18 am
by srod
Nice. The drag/drop works well here, though the canvas is not refreshed after a drag until you select the dialog and then the window.

The thing is though such an implementation makes it difficult to move a control into an empty container. If you drop the control atop an empty container then of course it does not place the control into the container, but instead (and inevitably) just reorders things. How about adding a couple of 'left' and 'right' buttons so that, if we click the right button, for example, the currently selected entity is placed into the preceding container? That would be sweet! :)

One last thing, any chance of adding the max/min buttons to your main Window as the Window is initially sized larger than my desktop!

A great utility though, one which I would love to use. Just need the save and load from file and I'm good to go!