Page 1 of 17

DialogDesign0R V1.86

Posted: Sat Mar 17, 2018 2:05 pm
by HeX0R
I needed a break from a bigger project, so I decided to create a small dialog designer.
There were already some suggestions from the German board, now it's your turn, I will soon stop development here (or let's say pause it to go on with my main project).

Drag&Drop will most likely not work under MacOS (I have no MacOS, feel free to integrate it), Linux should run fine, though.

Windows executables and screenshots are here, Source Code is there (you need at least PB5.40 and unicode activated!)

Re: DialogDesign0R V1.10

Posted: Sat Mar 17, 2018 2:38 pm
by Kiffi
A really useful tool. Great! Image

Thanks & Greetings ... Peter

Re: DialogDesign0R V1.10

Posted: Sat Mar 17, 2018 4:42 pm
by Andre
Great project, thank you for sharing! :D

Beside DynamicDialogs (used by me for easily "hand-coding" complex dialogs) another powerful option for PB users, to create flexible GUI as dialogs... :mrgreen:

Re: DialogDesign0R V1.13

Posted: Fri Mar 23, 2018 11:56 am
by Zebuddi123
Hi HeXOR credit where credit`s due it`s excellent thanks for sharing :)

Zebuddi.

Re: DialogDesign0R V1.14

Posted: Fri Mar 23, 2018 9:35 pm
by HeX0R
Small update, fixed missing splitter attributes and some other small things.
Seems to get rock solid slowly.

Re: DialogDesign0R V1.14

Posted: Sat Mar 24, 2018 1:03 am
by kenmo
Seems great so far, and I love such useful programs in such small files (that's PureBasic :) )

Re: DialogDesign0R V1.14

Posted: Sat Mar 24, 2018 8:04 am
by Cyllceaux
This is great....
I only changed 2 lines of code so my other xml Tools work cleaner.

Code: Select all

	FormatXML(#XML_Loaded, #PB_XML_ReFormat, 2)
	XML = ComposeXML(#XML_Loaded, #PB_XML_NoDeclaration)
to

Code: Select all

	FormatXML(#XML_Loaded, #PB_XML_ReFormat|#PB_XML_ReIndent|#PB_XML_ReduceNewline|#PB_XML_ReduceSpace)
	XML = ComposeXML(#XML_Loaded, #PB_XML_StringFormat)
I like a clean header and no bloated xml :-)

The interesting part is, the sting is saved as UTF-8 but the XML header ist UTF-16.

Re: DialogDesign0R V1.15

Posted: Sun Mar 25, 2018 9:34 pm
by HeX0R
Your code is wrong, you are creating two BOMs, or lets say you are creating one, and on top of that the following code (mine) added another BOM.

I changed the saving routine a little bit, maybe the result fits your needs better.

V1.15:
  • test.def removed SpiderBasic.def added (should contain now all differences between SpiderBasic and PureBasic)
  • Comments changed to editor, multi line comments are supported now
  • Comment length (shown in tree) and color can be changed by popup menu now (Comment Settings)
  • Saving routine updated

Re: DialogDesign0R V1.15

Posted: Mon Mar 26, 2018 10:58 am
by Michael Vogel
Great job, thanks.

PS: seems to work fine with older PB versions as well, I only added a quick macro to do so...

Code: Select all

CompilerIf #PB_Compiler_Version<560
	Macro GetUserDirectory(nil)
		(GetPathPart(ProgramFilename()))
	EndMacro
CompilerEndIf

Re: DialogDesign0R V1.15

Posted: Mon Mar 26, 2018 7:23 pm
by davido
Forgive a dumb question, please, but how does one add the generated xml to a PureBasic code file?

Re: DialogDesign0R V1.15

Posted: Mon Mar 26, 2018 7:38 pm
by HeX0R
There is no im/export function, I had something like this in mind, but nothing done yet.
For now, it just loads/saves xml files, to use it in your code, use LoadXML(), or include it as binary and use CatchXML()

Re: DialogDesign0R V1.15

Posted: Mon Mar 26, 2018 8:08 pm
by davido
@HeX0R ,
Thank you for the swift response. :D

I always use the Dialog method but keep the code in a .pbi file. Never used the xml library. However, I should have realised. :oops:

Thank you for an excellent, compact, utility. 8)

Re: DialogDesign0R V1.16

Posted: Mon Mar 26, 2018 9:21 pm
by HeX0R
V1.16
  • Selected Gadgets are now marked with 4 boxes* in the dialoge previews!
  • Some optical improvements
*Anything will be marked, besides <empty>, <tab> and <dialogs>.
If an <empty> item is on top or bottom of a box, the marked selection might be slightly wrong, but I think this is no big deal (adding this, would be a little complicated).

@Michael:
Sorry, but just using the programs directory is not really a correct replacement for GetUserDirectory(#PB_Directory_ProgramData).
I would need to add some more code, to make it similar, but I am not willing to add this, just to be compatible with older versions of PB.
But feel free to add it in your own copy, no problem.

Re: DialogDesign0R V1.16

Posted: Wed Mar 28, 2018 8:26 am
by Michael Vogel
I mentioned the macro because nothing else needs to be attapted when using your program with the LTE version of PB. As you said, it would need (OS dependend) code to do a correct replacement.

Another points: refreshing of the dialog or the short "splash" dialog at the beginning could be improved a little bit maybe.

Again not as a solution but an approach: to optimize the first it would be easier if the main window could stay active while refreshing the dialog windows. For improving the second point I've changed the dd.xml file and added the flag #PB_Window_Invisible for the main window and in the source code the line HideWindow(DialogWindow(#Dialog_Main),0) at the end of the procedure OpenWindow_Main.

Re: DialogDesign0R V1.16

Posted: Wed Mar 28, 2018 8:48 am
by HeX0R
I think I had the invisible flag set once in the past, can't remember why I removed it, I think there were some strange behaviour on linux.
I'll play with it again and see what's going on.

Funny thing, I didn't see any "splash" effects, or maybe I didn't want to :lol: