DialogDesign0R V1.86

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
Mesa
Enthusiast
Enthusiast
Posts: 433
Joined: Fri Feb 24, 2012 10:19 am

Re: DialogDesign0R V1.84

Post by Mesa »

I've found a bug in the toolbar managment, #PB_ToolBar_Large| #PB_ToolBar_Text doesn't work.
For information, line 330, if i change 'CreateToolBar(Items()\ToolBarID, WindowID(DialogWindow(Dialog)))' by 'CreateToolBar(Items()\ToolBarID, WindowID(DialogWindow(Dialog)),#PB_ToolBar_Large| #PB_ToolBar_Text)', it works so, something wrong with 'GetVal(flags)' (line 319) ?

M.
User avatar
HeX0R
Addict
Addict
Posts: 1187
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.84

Post by HeX0R »

there is a Trim() missing in the GetVal() procedure

Code: Select all

If FindMapElement(Cons(), Trim(StringField(ID2, i + 1, "|")))
Thanks!

I fixed the code here for now.
DD will be updated, when 6.10 had been released (to support the new Gadgets)
User avatar
HeX0R
Addict
Addict
Posts: 1187
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.85

Post by HeX0R »

Update, see => -here-
Quin
Addict
Addict
Posts: 1122
Joined: Thu Mar 31, 2022 7:03 pm
Location: Colorado, United States
Contact:

Re: DialogDesign0R V1.85

Post by Quin »

Hi HeX0R,
Nice tool you've got here! However, it's currently unable to be used by screen reader users (such as myself). The buttons and checkboxes don't seem to have labels at all, so I just hear "button, button, button, button, button, check box not checked"... etc etc. Is it possible for this to be fixed?
For whatever it's worth, you can set labels exclusively for screen readers on ButtonImageGadgets by calling SetGadgetText() on them.
Thanks.

[EDIT]: the only checkbox that's unlabeled seems to be one that isn't really a checkbox, exploring the accessible properties shows the actual roll as a button. Probably a toggle button, so the same SetGadgetText trick applies. Other than the buttons, this is seemingly fairly accessible :)
User avatar
HeX0R
Addict
Addict
Posts: 1187
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.85

Post by HeX0R »

Hi Quin,
yeah, I read it once, from you I think, that setting a text to imagebuttons will help making screen readers work properly (never was aware of that).
I had the idea to add it, but had not enough time until now.

You probably could help me, in the source is a (JSON) file called "Languages\translate.txt", which contains all the english phrases.
The "Text" element of the imagebuttons is empty usually, if you set those to meaningful names, they should appear in your screenreader (I hope so at least).
But translate.txt is not loaded on the fly, you have to recompile DD.
Or you copy it to "Languages\myown.lan" and edit it from there
This can be loaded on the fly then.

Or wait until I find the time to work on DD again (too warm, too much personal trouble these days...)
Mesa
Enthusiast
Enthusiast
Posts: 433
Joined: Fri Feb 24, 2012 10:19 am

Re: DialogDesign0R V1.85

Post by Mesa »

I've got a bug in theme.
dd 1.85, windows 10 64b, pb6.12b3 64b

It seems that the dark mode is enable but i don't want themes.

ddesign0r just launched without theme:
https://e.pcloud.link/publink/show?code ... ntfSyTxMnX

with darkmode
https://e.pcloud.link/publink/show?code ... eVcVQAR3Ky

back to no theme
https://e.pcloud.link/publink/show?code ... wJKBFW46XX
Image
Image Image Image
M.
User avatar
HeX0R
Addict
Addict
Posts: 1187
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.85

Post by HeX0R »

That happens only when you compile the DD source with PB6.12B, better use 6.11 for now.
Something seems to have changed under the hood, but I can't look into it these days.

[Edit]
o.k., I found two problems:
  1. https://www.purebasic.fr/english/viewtopic.php?t=85205
  2. Change line 2577 in DDesign0R_v02.pb into:

    Code: Select all

    CompilerIf #PB_Compiler_OS = #PB_OS_Windows And #PB_Compiler_Version < 612
    PB seems to handle the flickering splitter now on its own.
Mesa
Enthusiast
Enthusiast
Posts: 433
Joined: Fri Feb 24, 2012 10:19 am

Re: DialogDesign0R V1.85

Post by Mesa »

Hi, just found that <tab> supports 'margin' and it's not documented.
It's very usefull.

It works on Windows but i don't know if it works with macos and linux.

M.
User avatar
jacdelad
Addict
Addict
Posts: 1991
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: DialogDesign0R V1.85

Post by jacdelad »

Uh, that's interesting to know. The documentation is really poor. Still hoping for an update of the dialog library (which would be awesome).
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
HeX0R
Addict
Addict
Posts: 1187
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.85

Post by HeX0R »

As far as I remember I tested all kind of Gadgets, to find out which ones support the margin attribute (because of poor documentation).
I guess <tab> is not the only one which slipped through...

btw.:
The fix above seems to make things worse for PB6.12 final, I've removed it in my (local) source.
Mesa
Enthusiast
Enthusiast
Posts: 433
Joined: Fri Feb 24, 2012 10:19 am

Re: DialogDesign0R V1.85

Post by Mesa »

For your information, spiderbasic v3 includes the new "onsen library" with a lot of new gadgets.
Image

I don't know if you will have the desire and the time to update DialogDesign0R but in this case, this software would be almost a website creator...

You can test examples here
https://forums.spiderbasic.com/viewtopic.php?t=2521
with the free version of spiderbasic 3.01

M.
User avatar
HeX0R
Addict
Addict
Posts: 1187
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.85

Post by HeX0R »

Thanks, that looks interesting indeed!
I have some personal difficulties with spiderbasic (don't like the license duration when taking the update intervals into account).
But I will keep an eye on this, for sure, and play with the free version.
I'm still stuck in some severe personal problems and therefore need my time for more important things these days.
Mesa
Enthusiast
Enthusiast
Posts: 433
Joined: Fri Feb 24, 2012 10:19 am

Re: DialogDesign0R V1.85

Post by Mesa »

I can't get the menu icon to display. Am I forgetting something ?

Code: Select all


;
;- TOP
;
; __________________________
;|
;|  Dialog
;|
;|  Date:
;|
;|  Author: Dialog MESA
;|
;|  PB version: 
;|
;|  OS: All
;|
;|  CPU: All
;|
;|  Note:
;|
;|
;|
;|___________________________


;- Constante
#DD_WindowCount   = 1
#DD_UseExtraStuff = 1

CompilerIf #DD_UseExtraStuff
  XIncludeFile "../DialogDesign0r/DD_AddStuff.pbi"; <======== CHANGE HERE ! ! ! ! !
CompilerEndIf

Runtime Enumeration Windows
  #win
EndEnumeration


Dim DD_WindowNames.s(#DD_WindowCount)

DD_WindowNames(1) = "window_1"


Runtime Enumeration ExtraStuff
  #imagemenu
  #open
  #change
  #menubar
  #toolbar
  #toolbutton_1
  #statusbar
  #field_1
EndEnumeration

;- Declare
Declare OnMenuChange()

UsePNGImageDecoder()
#imMenu = 0
LoadImage(#imMenu, "C:\Program Files\PureBasic\Examples\Sources\Data\ToolBar\Open.png")
Runtime #imMenu

Global otherim = LoadImage(#PB_Any, "C:\Program Files\PureBasic\Examples\Sources\Data\ToolBar\Delete.png")
LoadImage(1, "C:\Program Files\PureBasic\Examples\Sources\Data\ToolBar\Delete.png")


;- XML
Procedure.s GetXMLString()
  Protected XML$
  
  XML$ + "<?xml version='1.0' encoding='UTF-16'?>"
  XML$ + ""
  XML$ + "<dialogs><!--Created by Dialog Design0R V1.85 => get it from: https://hex0rs.coderbu.de/en/sdm_downloads/dialogdesign0r/-->"
  XML$ + "  <window flags='#PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_ScreenCentered' width='800' name='window_1' xpos='0' ypos='0' id='#win'>"
  XML$ + "    <imagemenu flags='#PB_Menu_ModernLook' id='#imagemenu'>"
  XML$ + "      <title text='Project'>"
  XML$ + "        <menuitem text='open' image='#imMenu' id='#open'/>"
  XML$ + "        <menuitem text='change' id='#change' onevent='OnMenuChange()'/>"
  XML$ + "        <menubar id='#menubar'/>"
  XML$ + "      </title> "
  XML$ + "    </imagemenu>"
  XML$ + "    <toolbar text='tb' flags='#PB_ToolBar_Large' height='100' id='#toolbar'>"
  XML$ + "      <toolbutton text='tb1' tooltip='tp1' type='image' image='#imMenu' id='#toolbutton_1'/>"
  XML$ + "      <toolseparator/>"
  XML$ + "    </toolbar>"
  XML$ + "    <statusbar text='sb' id='#statusbar'>"
  XML$ + "      <field type='image' text='sbim' width='50' image='#imMenu' id='#field_1'/> "
  XML$ + "    </statusbar> "
  XML$ + "  </window>"
  XML$ + "</dialogs><!--DDesign0R Definition: PureBasic|1|1|1|__|Mesa|1-->"
  
  ProcedureReturn XML$
EndProcedure



;- Test it

CompilerIf #PB_Compiler_IsMainFile
  
  ;- Procedure runtime
  Runtime Procedure OnMenuChange()
    If StartDrawing(ImageOutput(#imMenu)); Doesn't work
      DrawingMode(#PB_2DDrawing_AllChannels)
      DrawImage(ImageID(1), 0, 0)
      StopDrawing()
    EndIf
    SetMenuItemText(#imagemenu, 1, "Delete"); it works
    
  EndProcedure
  
  
  
  ;- Entry point
  a$ = GetXMLString()
  If ParseXML(0, a$) And XMLStatus(0) = #PB_XML_Success
    For i = 1 To #DD_WindowCount
      CreateDialog(i)
      CompilerIf #DD_UseExtraStuff
        R = DEX::InitDialog(i, 0, DD_WindowNames(i), 1)
      CompilerElse
        R = OpenXMLDialog(i, 0, DD_WindowNames(i))
      CompilerEndIf
      If R
        HideWindow(DialogWindow(i), 0)
        ok = #True
        
      Else
        Debug DialogError(i)
      EndIf
    Next i
    CompilerIf Defined(PB_OS_Web, #PB_Constant) = 0 Or #PB_Compiler_OS <> #PB_OS_Web
      If ok
        While WaitWindowEvent() <> #PB_Event_CloseWindow : Wend
        
      EndIf
    CompilerEndIf
  Else
    Debug XMLStatus(0)
    Debug XMLError(0)
  EndIf
  CompilerIf #DD_UseExtraStuff
    DEX::DeInit()
  CompilerEndIf
  
CompilerEndIf

;- End


Thanx.

M.
User avatar
HeX0R
Addict
Addict
Posts: 1187
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.85

Post by HeX0R »

Code: Select all

;
;- TOP
;
; __________________________
;|
;|  Dialog
;|
;|  Date:
;|
;|  Author: Dialog MESA
;|
;|  PB version: 
;|
;|  OS: All
;|
;|  CPU: All
;|
;|  Note:
;|
;|
;|
;|___________________________


;- Constante
#DD_WindowCount   = 1
#DD_UseExtraStuff = 1

CompilerIf #DD_UseExtraStuff
  XIncludeFile "DD_AddStuff.pbi"; <======== CHANGE HERE ! ! ! ! !
CompilerEndIf

Runtime Enumeration Windows
  #win
EndEnumeration


Dim DD_WindowNames.s(#DD_WindowCount)

DD_WindowNames(1) = "window_1"


Runtime Enumeration ExtraStuff
  #imagemenu
  #open
  #change
  #menubar
  #toolbar
  #toolbutton_1
  #statusbar
  #field_1
EndEnumeration

;- Declare
Declare OnMenuChange()

UsePNGImageDecoder()
Runtime Enumeration
	#imMenu
EndEnumeration

LoadImage(#imMenu, #PB_Compiler_Home + "\Examples\Sources\Data\ToolBar\Delete.png")


;- XML
Procedure.s GetXMLString()
  Protected XML$
  
  XML$ + "<?xml version='1.0' encoding='UTF-16'?>"
  XML$ + ""
  XML$ + "<dialogs><!--Created by Dialog Design0R V1.85 => get it from: https://hex0rs.coderbu.de/en/sdm_downloads/dialogdesign0r/-->"
  XML$ + "  <window flags='#PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_ScreenCentered' width='800' name='window_1' xpos='0' ypos='0' id='#win'>"
  XML$ + "    <menu flags='#PB_Menu_ModernLook' id='#imagemenu' type='imagemenu'>"
  XML$ + "      <title text='Project'>"
  XML$ + "        <menuitem text='open' image='#imMenu' id='#open'/>"
  XML$ + "        <menuitem text='change' id='#change' onevent='OnMenuChange()'/>"
  XML$ + "        <menubar id='#menubar'/>"
  XML$ + "      </title> "
  XML$ + "    </menu>"
  XML$ + "    <toolbar text='tb' flags='#PB_ToolBar_Large' height='100' id='#toolbar'>"
  XML$ + "      <toolbutton text='tb1' tooltip='tp1' type='image' image='#imMenu' id='#toolbutton_1'/>"
  XML$ + "      <toolseparator/>"
  XML$ + "    </toolbar>"
  XML$ + "    <statusbar text='sb' id='#statusbar'>"
  XML$ + "      <field type='image' text='sbim' width='50' image='#imMenu' id='#field_1'/> "
  XML$ + "    </statusbar> "
  XML$ + "  </window>"
  XML$ + "</dialogs><!--DDesign0R Definition: PureBasic|1|1|1|__|Mesa|1-->"
  
  ProcedureReturn XML$
EndProcedure



;- Test it

CompilerIf #PB_Compiler_IsMainFile
  
  ;- Procedure runtime
  Runtime Procedure OnMenuChange()
    If StartDrawing(ImageOutput(#imMenu)); Doesn't work
      DrawingMode(#PB_2DDrawing_AllChannels)
      DrawImage(ImageID(1), 0, 0)
      StopDrawing()
    EndIf
    SetMenuItemText(#imagemenu, 1, "Delete"); it works
    
  EndProcedure
  
  
  
  ;- Entry point
  a$ = GetXMLString()
  If ParseXML(0, a$) And XMLStatus(0) = #PB_XML_Success
    For i = 1 To #DD_WindowCount
      CreateDialog(i)
      CompilerIf #DD_UseExtraStuff
        R = DEX::InitDialog(i, 0, DD_WindowNames(i), 1)
      CompilerElse
        R = OpenXMLDialog(i, 0, DD_WindowNames(i))
      CompilerEndIf
      If R
        HideWindow(DialogWindow(i), 0)
        ok = #True
        
      Else
        Debug DialogError(i)
      EndIf
    Next i
    CompilerIf Defined(PB_OS_Web, #PB_Constant) = 0 Or #PB_Compiler_OS <> #PB_OS_Web
      If ok
        While WaitWindowEvent() <> #PB_Event_CloseWindow : Wend
        
      EndIf
    CompilerEndIf
  Else
    Debug XMLStatus(0)
    Debug XMLError(0)
  EndIf
  CompilerIf #DD_UseExtraStuff
    DEX::DeInit()
  CompilerEndIf
  
CompilerEndIf

;- End


I've fixed it here for now.
ShadowStorm
Enthusiast
Enthusiast
Posts: 303
Joined: Tue Feb 14, 2017 12:07 pm

Re: DialogDesign0R V1.85

Post by ShadowStorm »

Oh, but this is beautiful!
Thank you so much!

I've given it a try, it's well done, hats off to you!
Thanks for the languages too.

But what I'd really like is an all-in-one solution, so I can use my window directly.

I don't know how to use it though :(

Anyway, it's a really cool program, thanks! :D
I am French, I do not speak English.
My apologies for the mistakes.

I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
Post Reply