ProGUI Update, Graph Library and Experimental V2

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
the.weavster
Addict
Addict
Posts: 1537
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: ProGUI Update, Graph Library and Experimental V2

Post by the.weavster »

Is the WebBrowser widget IE?

If so does it default to the most recent version of IE?
PrincieD
Enthusiast
Enthusiast
Posts: 642
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI Update, Graph Library and Experimental V2

Post 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.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
PrincieD
Enthusiast
Enthusiast
Posts: 642
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI Update, Graph Library and Experimental V2

Post 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.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
Cyllceaux
Enthusiast
Enthusiast
Posts: 458
Joined: Mon Jun 23, 2014 1:18 pm
Contact:

Re: ProGUI Update, Graph Library and Experimental V2

Post by Cyllceaux »

Oh... there is some DPI-Bugs
Image
PrincieD
Enthusiast
Enthusiast
Posts: 642
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI Update, Graph Library and Experimental V2

Post 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.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
PrincieD
Enthusiast
Enthusiast
Posts: 642
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI Update, Graph Library and Experimental V2

Post 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).
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: ProGUI Update, Graph Library and Experimental V2

Post 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.
PrincieD
Enthusiast
Enthusiast
Posts: 642
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI Update, Graph Library and Experimental V2

Post 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.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: ProGUI Update, Graph Library and Experimental V2

Post by Kuron »

PrincieD wrote:Hmm interesting
Even moreso when you consider MS has backported Canary (the new Edge) to Windows 7.
Best wishes to the PB community. Thank you for the memories. ♥️
PrincieD
Enthusiast
Enthusiast
Posts: 642
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI Update, Graph Library and Experimental V2

Post 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
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
PrincieD
Enthusiast
Enthusiast
Posts: 642
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI Update, Graph Library and Experimental V2

Post 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.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
PrincieD
Enthusiast
Enthusiast
Posts: 642
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI Update, Graph Library and Experimental V2

Post 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.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
PrincieD
Enthusiast
Enthusiast
Posts: 642
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI Update, Graph Library and Experimental V2

Post 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).
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
PrincieD
Enthusiast
Enthusiast
Posts: 642
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI Update, Graph Library and Experimental V2

Post 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.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
coffee
User
User
Posts: 77
Joined: Fri Oct 06, 2017 10:43 am

Re: ProGUI Update, Graph Library and Experimental V2

Post by coffee »

windows 7 is not needed for me
Post Reply