DialogDesign0R V1.84

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.17

Post by HeX0R »

V1.17
two bugs fixed, and the selection boxes will follow now the resizing.
I've also added the invisible flag now without booting-up linux, I am a little short on time these days.
to optimize the first it would be easier if the main window could stay active while refreshing the dialog windows.
How should I do that? This is no simple refresh, this is a recreation!
We don't have a possibility to refresh a dialoge when XML changed on the fly, so the only chance I had was to close the dialog and recreate it.
Of course it will "splash" then.
User avatar
Michael Vogel
Addict
Addict
Posts: 2666
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: DialogDesign0R V1.17

Post by Michael Vogel »

Seems not to be that easy to get rid of the flickering, maybe some additional functions for the dialog lib would be fine (PB6?)...
...I never player around with xml dialogs, refreshing things in windows is easier :wink:

Here's a try to keep the main window in front and to use a "shadow" copy of the dialog to reduce the blending effect (in reality, it pulsates here which also doesn't look that fine):

Code: Select all


Enumeration
	#Xml
	#Dlg
EndEnumeration

Global Dim RefreshCounter(99)
Global xml.s

Procedure UpdateDialog(id)

	Protected flag


	flag=RefreshCounter(id)
	RefreshCounter(id)+1

	id=id<<1+flag&1

	Debug id
	CreateDialog(id)
	OpenXMLDialog(id,#Xml,"Window_Main", 200, 200)
	HideWindow(DialogWindow(id),0,#PB_Window_NoActivate)
	If flag
		HideWindow(DialogWindow(id!1),1)
	EndIf
	SetForegroundWindow_(WindowID(0))

EndProcedure

OpenWindow(0,800,400,600,200,"Main")
StickyWindow(0,1)

If LoadXML(#Xml,"Test.xml") And XMLStatus(#Xml) = #PB_XML_Success

	Repeat
		Select WaitWindowEvent()
		Case #WM_CHAR
			UpdateDialog(#Dlg)
		Case #PB_Event_CloseWindow
			End
		EndSelect
	ForEver

EndIf
Here's the demo xml:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

<dialogs>
  <window name="Window_Main" flags="#pb_window_invisible|#PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_ScreenCentered" minwidth="800" minheight="680">
    <vbox expand="item:2">
      <hbox align="center" expand="no">
        <buttonimage name="newfile" width="20" height="20" />
        <buttonimage name="loadfile" width="20" height="20" />
        <buttonimage name="savefile" width="20" height="20" />
        <buttonimage name="savefileas" width="20" height="20" />
        <empty width="35"/>
        <buttonimage name="showall" width="20" height="20" />
        <buttonimage name="hideall" width="20" height="20" />
        <empty width="10"/>
        <text text="Dialog Definition:"/>
        <vbox>
          <combobox width="100" name="definition" />
          <empty/>
        </vbox>
        <text text="Dialog Refresh Time:"/>
        <trackbar name="refreshdelay" width="100" min="1" max="10" flags="#PB_TrackBar_Ticks" value="2"/>
        <text name="refreshtime" text="1000 ms"/> 
      </hbox>
      <hbox>
        <splitter flags="#PB_Splitter_Vertical | #PB_Splitter_Separator" name="splitter">
          <frame text="Objects:" width="150">
            <tree name="tree_objects" flags="#PB_Tree_AlwaysShowSelection" /> 
          </frame>
          <vbox width="400" expand="item:4">
            <frame text="Properties">
              <gridbox columns="4" colexpand="yes" rowexpand="no">
                <text text="ID:"/>
                <string name="_id" width="150"/>
                <text text="Width:"/>
                <string name="width" width="150"/>
                <text text="Name:"/>
                <string name="name"/>
                <text text="Height:"/>
                <string name="height"/>
                <text text="Text:"/>
                <string name="text"/>
                <frame colspan="2" text="Flags" width="250" height="140" rowspan="6">
                  <tree name="flags" flags="#PB_Tree_NoLines | #PB_Tree_CheckBoxes" /> 
                </frame>
                <text text="Min:"/>
                <string name="min"/>
                <text text="Max:"/>
                <string name="max"/>
                <text text="Value:"/>
                <string name="value"/>
                <text text="Group:"/>
                <string name="group"/>
                <text text="Page:"/>
                <string name="page"/>
                <checkbox name="invisible" colspan="2" text="Invisible"/>
                <frame text="Event Procedures" colspan="2" rowspan="3">
                  <vbox>
                    <combobox name="onevents"/>
                    <string name="onevent_proc"/>
                  </vbox> 
                </frame>
                <checkbox name="disabled" text="Disabled" colspan="2"/>
                <hbox colspan="2" align="" expand="no">
                  <buttonimage name="userattributes" width="24" height="24"/>
                  <buttonimage name="refresh" width="24" height="24"/>
                  <buttonimage name="move_up" width="24" height="24"/>
                  <buttonimage name="move_down" width="24" height="24"/>
                </hbox> 
              </gridbox> 
            </frame>
            <frame text="Special Properties">
              <multibox>
                <container name="container_window" invisible="yes">
                  <gridbox columns="4">
                    <text text="MinWidth:"/>
                    <string name="minwidth"/>
                    <text text="MinHeight:"/>
                    <string name="minheight"/>
                    <text text="MaxWidth:"/>
                    <string name="maxwidth"/>
                    <text text="MaxHeight:"/>
                    <string name="maxheight"/>
                  </gridbox> 
                </container>
                <container name="container_boxes" invisible="yes">
                  <gridbox columns="4">
                    <text text="Spacing:"/>
                    <string name="spacing"/>
                    <text text="Align:"/>
                    <combobox name="alignbox"/>
                    <text text="Expand:"/>
                    <combobox name="expandbox"/>
                    <text text="Item:"/>
                    <string name="expandboxitem"/>
                  </gridbox> 
                </container>
                <container name="container_gridbox" invisible="yes">
                  <gridbox columns="4">
                    <text text="Columns:"/>
                    <string name="columns"/>
                    <text text="Colspacing:"/>
                    <string name="colspacing"/>
                    <empty colspan="2"/>
                    <text text="Rowspacing:"/>
                    <string name="rowspacing"/>
                    <text text="Colexpand:"/>
                    <combobox name="colexpand"/>
                    <text text="Item:"/>
                    <string name="colexpanditem"/>
                    <text text="Rowexpand:"/>
                    <combobox name="rowexpand"/>
                    <text text="Item:"/>
                    <string name="rowexpanditem"/> 
                  </gridbox> 
                </container>
                <container name="container_multibox" invisible="yes"/>
                <container name="container_singlebox" invisible="yes">
                  <gridbox columns="4">
                    <text text="Margin:"/>
                    <combobox name="margincombo"/>
                    <text text="Value:"/>
                    <string name="marginext"/>
                    <text text="Expand:"/>
                    <combobox name="expandsingle"/>
                    <text text="Align:"/>
                    <tree name="alignsingle" flags="#PB_Tree_NoButtons | #PB_Tree_CheckBoxes" rowspan="3"/>
                    <text text="ExpandWidth:"/>
                    <string name="expandwidth"/>
                    <empty/>
                    <text text="ExpandHeight:"/>
                    <string name="expandheight"/> 
                  </gridbox> 
                </container>
                <container name="container_splitter" invisible="yes">
                  <gridbox columns="4">
                    <text text="FirstMin:"/>
                    <string name="firstmin"/>
                    <text text="SecondMin:"/>
                    <string name="secondmin"/>
                  </gridbox> 
                </container>
                <container name="container_scrollarea" invisible="yes">
                  <gridbox columns="4">
                    <text text="Scrolling:"/>
                    <combobox name="scrolling"/>
                    <empty colspan="2"/>
                    <text text="InnerHeight:"/>
                    <string name="innerheight"/>
                    <text text="InnerWidth:"/>
                    <string name="innerwidth"/> 
                  </gridbox> 
                </container>
                <container name="container_comment" invisible="yes">
                  <hbox expand="item:2">
                    <text text="Comment:"/>
                    <editor name="comment"/>
                  </hbox> 
                </container> 
              </multibox> 
            </frame>
            <frame text="GridBox Childs">
              <hbox expand="yes" alignbox="top/left">
                <text text="Colspan:"/>
                <string name="colspan" width="125"/>
                <text text="Rowspan:"/>
                <string name="rowspan" width="125"/>
              </hbox> 
            </frame>
            <frame text="Log:">
              <editor name="log" flags="#PB_Editor_ReadOnly" height="60"/> 
            </frame> 
          </vbox> 
        </splitter> 
      </hbox> 
    </vbox> 
  </window>
  </dialogs>
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.18

Post by HeX0R »

V1.18
  • Window Items can be moved up and down now
  • When dragging to the edge the tree will start scrolling now (Windows only)
  • Additional Dialog XML files can be added via drag&drop (move from windows explorer or any other file browser to the tree)
  • Refreshing of the dialogs a little improved
  • bugs fixed
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: DialogDesign0R V1.18

Post by Kwai chang caine »

Very nice and usefull
Thanks for sharing 8)
ImageThe happiness is a road...
Not a destination
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.19

Post by HeX0R »

V1.19
  • Drag&Drop for Linux was broken...
  • Drag&Drop from File Explorer under Linux doesn't work (without rebuilding everything), so I added a new menu (Load additional Dialogs).
  • AddOn system introduced
  • Example AddOn (Load/Save dialog from PB source code) added. Must be compiled as AddOn_LoadPB.dll or similar. Important is the AddOn_ the following is then used as name
  • Minor design changes
Regarding add-ons:
Take a look at DD_Addon_LoadPB.pb, everything should be described there.
With this system it should also be possible to create an AddOn, which can load/save dialogs from/to resources, maybe someone else will do such an AddOn?

I'm doing a feature freeze now!
Installing too many features holds the danger of breaking too many things, so I leave it that way and just fix the bugs.
Feature requests are still welcome, but may only be implemented at some point (or do it yourself, source is there).
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 448
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: DialogDesign0R V1.19

Post by Didelphodon »

Awesome tool! Thx for your efforts!
Go, tell it on the mountains.
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.21

Post by HeX0R »

V1.21
Although I said I'm freezing the features now, I recognized that MacOS users can't use drag'n drop at all.
I've added now a simple copy and paste functionality (via popup menu), I didn't add a "cut" menu, shouldn't be a big deal to delete the copied block afterwards.
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.24

Post by HeX0R »

V1.24
Some bugs fixed, design changed slightly and added a simple undo/redo functionality.
User avatar
idle
Always Here
Always Here
Posts: 5042
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: DialogDesign0R V1.24

Post by idle »

Really great tool, thanks.
Windows 11, Manjaro, Raspberry Pi OS
Image
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.25

Post by HeX0R »

V1.25

An additional editor window has been requested, containing all of the IDs, Names and procedure names for easy copy&paste to the source code.
This list will not be automatically updated, only as soon as you press "save" or load a new dialog.
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.25

Post by HeX0R »

Since there are no more bug reports, V1.25 is now the final version.
I've also added compiled windows executables to first post for the lazy guys.
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.26

Post by HeX0R »

Updated to V1.26
I had some bad AHA effects, when loading a SpiderBasic Dialog into DD without switching the Dialog Type first to SpiderBasic.
Therefore, now DD will store the dialog type inside the XML (as comment at the end) and will automatically switch the type correctly.
And I also added some more tooltips.
Adding tooltips is much less time consuming than creating a help file (which most likely never will happen anyway :lol: )
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.30

Post by HeX0R »

V1.30
  • Added possibility to save an additional file which contains all of the names/ids/procedures (de/activate this on top of the constant window, if you can't see this window, reactivate it with F2)
    Please check/change the included save_template.json file, it is responsible for the look of the output file
  • Added a simple update check (once a day)
  • Changed the included AddOn, it will now handle both PureBasic and SpiderBasic sources (please delete the former AddOn)
  • Removed the "tool" flag from the constant window and added a minimize possibility
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.32

Post by HeX0R »

V1.31

1.) Fixed automatic switching of dialoge types when using add-ons
2.) Added possibility to store XML also into the additional file (optional, new checkbox in constant window)
3.) default_save_template updated, please make sure to integrate the changes into your save_template.json (or just replace it)
4.) Fixed some typos

V1.32

1.) Seems some firewalls don't like the automatic update, this might be due to my domain suggerating it is a really EVIL site!
Anyway, I removed the auto-check and added a user-driven update-check (recognized the new icon in the top right corner?
2.) Added TABs to the constant output (shouldn't be needed, but has been requested)
forumuser
User
User
Posts: 98
Joined: Wed Apr 18, 2018 8:24 am

Re: DialogDesign0R V1.32

Post by forumuser »

V1.32

settings.prefs is saved and it contains correct values for x, y, w and h
when the main window is closed but when DD is started again, it will
always use it's default values (e.g. x=0, y=0) instead of the saved
ones from the .prefs file...
Post Reply