Page 4 of 7

Re: ProGUI Update, Graph Library and Experimental V2

Posted: Sat Jun 20, 2020 8:32 pm
by the.weavster
Is the WebBrowser widget IE?

If so does it default to the most recent version of IE?

Re: ProGUI Update, Graph Library and Experimental V2

Posted: Sat Jun 20, 2020 8:53 pm
by PrincieD
the.weavster wrote:Is the WebBrowser widget IE?

If so does it default to the most recent version of IE?
Yep, I think so - it's just a standard PB WebGadget placed inside of a PanelEx page (so its rendering is diverted onto the PanelEx compositing buffer).

Chris.

Re: ProGUI Update, Graph Library and Experimental V2

Posted: Tue Jun 23, 2020 4:12 pm
by PrincieD
Hi guys,

I've just released an update that fixes a bug with the x64 dll version not closing correctly. I’ve also recompiled all the binaries and examples with the latest PureBasic 5.72 LTS so should benefit from lots of improvements and bug fixes by Fred there.
http://www.progui.co.uk/downloads/ProGUI.zip
http://www.progui.co.uk/downloads/ProGUI_Examples.zip

Cheers!

Chris.

Re: ProGUI Update, Graph Library and Experimental V2

Posted: Wed Jun 24, 2020 8:54 am
by Cyllceaux
Oh... there is some DPI-Bugs
Image

Re: ProGUI Update, Graph Library and Experimental V2

Posted: Wed Jun 24, 2020 11:28 am
by PrincieD
Cyllceaux wrote:Oh... there is some DPI-Bugs
Image
Cheers for reporting Cyllceaux, I'm aware of this and high DPI support for V2 is a top priority.

Chris.

Re: ProGUI Update, Graph Library and Experimental V2

Posted: Wed Jun 24, 2020 11:45 am
by PrincieD
PrincieD wrote:
the.weavster wrote:Is the WebBrowser widget IE?

If so does it default to the most recent version of IE?
Yep, I think so - it's just a standard PB WebGadget placed inside of a PanelEx page (so its rendering is diverted onto the PanelEx compositing buffer).

Chris.
Actually I think it is the old IE control under the hood, I wonder if there's a way to get PB to use the latest version (swap a DLL or something).

Re: ProGUI Update, Graph Library and Experimental V2

Posted: Wed Jun 24, 2020 1:36 pm
by Kuron
PrincieD wrote:I wonder if there's a way to get PB to use the latest version (swap a DLL or something).
You may want to look at the work Patrice has done with the other PB over here.

He has it working quite well.

Re: ProGUI Update, Graph Library and Experimental V2

Posted: Wed Jun 24, 2020 2:45 pm
by PrincieD
Kuron wrote:
PrincieD wrote:I wonder if there's a way to get PB to use the latest version (swap a DLL or something).
You may want to look at the work Patrice has done with the other PB over here.

He has it working quite well.
Hmm interesting, this is some pretty awesome work too: viewtopic.php?f=27&t=72703 just a shame about the huge file sizes.

Re: ProGUI Update, Graph Library and Experimental V2

Posted: Wed Jun 24, 2020 2:52 pm
by Kuron
PrincieD wrote:Hmm interesting
Even moreso when you consider MS has backported Canary (the new Edge) to Windows 7.

Re: ProGUI Update, Graph Library and Experimental V2

Posted: Fri Jun 26, 2020 5:13 pm
by PrincieD
Here's another V2 demo:

http://www.progui.co.uk/downloads/Diver ... ering2.zip

The panels can be moved around by dragging with the mouse.

Image

Re: ProGUI Update, Graph Library and Experimental V2

Posted: Sat Jul 11, 2020 6:31 pm
by PrincieD
Hi Guys, just a little V2 progress update. I've been working on getting a new render sub-system in place which is powered by Direct2D (GPU accelerated), it really needs this for DPI awareness as the old GDI/GDI+ API starts to struggle rendering full screen on 1080p never mind 4K+ lol

Here's a little demo: http://www.progui.co.uk/downloads/Direct2D_Demo.zip

Image

And here's the demo rendering code:

Code: Select all

Procedure callback(hwnd, message, wparam, lparam)
    
    Select message
            
        Case #WM_ERASEBKGND
            
            ProcedureReturn 1
            
        Case #WM_PAINT
            
            ImgBeginDraw(timg)
            
            ImgBlit(timg1, 0, 0, winwidth, winheight, 0, 0)
            
            GetCursorPos_(p.POINT)
            ScreenToClient_(WindowID(0), p)
           
            ImgBeginDraw(timg2)
            ImgBox(0, 0, 20, 20, RGB(255, 0, 0), 1)
            ImgEndDraw()
            
            w = 300
            h = 300
            rc.RECT_F
            rc\left = p\x-(w/2)
            rc\top = p\y-(h/2)
            rc\right = rc\left + w
            rc\bottom = rc\top + h
            ImgBeginLayer(rc, 0.8, brush, *tborder)
            ImgRect(rc, RGB(255, 255, 255), 1)
            
            ForEach object()
                ;ImgDrawEx(object()\img, 20, 20, 20, 20, object()\x, object()\y, 200, 200, object()\alpha)
                ImgDraw(object()\img, object()\x, object()\y, -1, -1, object()\alpha)
            Next
            ;BrushSetSimpleTransform(boingBrush, (1/w)*p\y, (1/w)*p\y, 420, 420, p\x/10, -28, -28)
            ;ImgFillBox(220, 220, 400, 400, boingBrush)
            ;ImgBox(180, 180, 200, 200, RGB(0, 0, 255), 1)
            
            ;ImgFillBox(220, 220, 400, 400, *tborder\bottomright)
            ImgDrawBorder(*tborder, 220, 200, 400, 400, 1)
            ImgDrawBorder(*tborder, 120, 100, p\x, p\y, 1)
            
            w = 100
            h = 100
            rc.RECT_F
            rc\left = p\x-(w/2)
            rc\top = p\y-(h/2)
            rc\right = rc\left + w
            rc\bottom = rc\top + h
            ImgBeginLayer(rc, 1, 0, 0)
            ImgBox(0, 0, 2000, 2000, RGB(0, 255, 0), 1)
            ImgEndLayer()
            
            ImgEndLayer()
            
            ImgEndDraw()
            
            dc = BeginPaint_(WindowID(0), @ps.PAINTSTRUCT)
            ps\fErase = 0
            
            ImgToHdc(timg, dc)
            
            EndPaint_(WindowID(0), @ps)
            
        Default
            
            ProcedureReturn #PB_ProcessPureBasicEvents
            
    EndSelect
    
EndProcedure
If you move the mouse around in the example you can see the new ImgBeginLayer() command in action which clips all subsequent rendering operations inside a semi-transparent layer (0.8% opacity) with alpha masked border :)
You can do some crazy shit with this lol ideal for games programming too!
Also the new Img subsytem can easily be expanded to support different "Drivers", which makes cross-platform support fairly trivial in the future :)

Cheers!

Chris.

Re: ProGUI Update, Graph Library and Experimental V2

Posted: Sun Jul 12, 2020 1:00 am
by PrincieD
Haha ok this an example of "crazy shit": http://www.progui.co.uk/downloads/Direct2D_Demo.zip (added another demo!)

Image

Bare in mind this not optimised at all!

And the code:

Code: Select all

Procedure callback(hwnd, message, wparam, lparam)
    
    Select message
            
        Case #WM_ERASEBKGND
            
            ProcedureReturn 1
            
        Case #WM_PAINT
            
            ImgBeginDraw(timg)
            
            ImgBlit(timg1, 0, 0, winwidth, winheight, 0, 0)
            
            GetCursorPos_(p.POINT)
            ScreenToClient_(WindowID(0), p)
            
            ImgBeginDraw(timg2)
            ImgBox(0, 0, 20, 20, RGB(255, 0, 0), 1)
            ImgEndDraw()
            
            w = 300
            h = 300
            
            BrushSetSimpleTransform(boingBrush, (1/w)*p\y, (1/w)*p\y, 420, 420, p\x/10, -28, -28)
            BrushSetOpacity(boingBrush, 0.2)
            ImgFillBox(0, 0, winwidth, winheight, boingBrush)
            BrushSetOpacity(boingBrush, 1)
            
            rc.RECT_F
            rc\left = p\x-(w/2)
            rc\top = p\y-(h/2)
            rc\right = rc\left + w
            rc\bottom = rc\top + h
            ImgBeginLayer(rc, 0.8, brush, *tborder)
            ImgRect(rc, RGB(255, 255, 255), 1)
            
            ForEach object()
                ;ImgDrawEx(object()\img, 20, 20, 20, 20, object()\x, object()\y, 200, 200, object()\alpha)
                ImgDraw(object()\img, object()\x, object()\y, -1, -1, object()\alpha)
            Next
            BrushSetSimpleTransform(boingBrush, (0.5/w)*p\y, (0.5/w)*p\y, 420, 420, p\x/20, -28, -28)
            ImgFillBox(220, 220, 400, 400, boingBrush)
            ;ImgBox(180, 180, 200, 200, RGB(0, 0, 255), 1)
            
            ;ImgFillBox(220, 220, 400, 400, *tborder\bottomright)
            ImgDrawBorder(*tborder, 220, 200, 400, 400, 1)
            ImgDrawBorder(*tborder, 120, 100, p\x, p\y, 1)
            
            w = 200
            h = 200
            rc.RECT_F
            rc\left = p\x-(w/2)
            rc\top = p\y-(h/2)
            rc\right = rc\left + w
            rc\bottom = rc\top + h
            ImgBeginLayer(rc, 1, 0, *tborder)
            ImgBox(0, 0, 2000, 2000, RGB(0, 50, 255), 1)
            ForEach object()
                ImgDrawEx(object()\img, 0, 0, -1, -1, object()\x, object()\y, 150, 150, object()\alpha)
            Next
            ImgEndLayer()
            
            ImgEndLayer()
            
            ImgEndDraw()
            
            dc = BeginPaint_(WindowID(0), @ps.PAINTSTRUCT)
            ps\fErase = 0
            
            ImgToHdc(timg, dc)
            
            EndPaint_(WindowID(0), @ps)
            
        Default
            
            ProcedureReturn #PB_ProcessPureBasicEvents
            
    EndSelect
    
EndProcedure
Chris.

Re: ProGUI Update, Graph Library and Experimental V2

Posted: Sun Jul 12, 2020 2:02 am
by PrincieD
How are you guys liking the new API naming convention? I'm thinking noun + verb (acting on noun) i.e. ImgDraw(), BrushOpacity() and for creating an object CreateImg(), CreateBrush(), FreeImg() etc.. it feels logical and efficient and nice to code (all you have to think of as a coder is the object type and the action you want to perform on it). In the PB IDE for instance when you type "Img" it will auto-complete (tooltip) and give you all the commands related to manipulating the Img (oop style).

Re: ProGUI Update, Graph Library and Experimental V2

Posted: Sat Jul 25, 2020 11:06 pm
by PrincieD
Is anyone bothered about support for OSs older than Windows 7 in V2? Initially it will only be >= 7. I'm currently in the middle of getting high DPI working with independent per window DPI (Windows 10) - so you can have different windows of your app on different monitors with separate DPI. I'm thinking the "LoadImg" command could take semicolon separated filenames for different DPI versions.

Chris.

Re: ProGUI Update, Graph Library and Experimental V2

Posted: Sun Jul 26, 2020 10:04 am
by coffee
windows 7 is not needed for me