ProGUI V1.38 UI Library (Small Bug Fix)

Developed or developing a new product in PureBasic? Tell the world about it.
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: ProGUI V1.37 UI Library (Small Bug Fix)

Post by Zach »

I received an email for the update release.

btw, Chris. your forum is being attacked by spam bots.
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.37 UI Library (Small Bug Fix)

Post by PrincieD »

Zach wrote:btw, Chris. your forum is being attacked by spam bots.
Thanks dude I've sorted them, bloody spam bots!

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: ProGUI V1.37 UI Library (Small Bug Fix)

Post by Zach »

Things have been quiet in ProGUI-land lately.... gearing up for a new release? :)
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.37 UI Library (Small Bug Fix)

Post by PrincieD »

Zach wrote:Things have been quiet in ProGUI-land lately.... gearing up for a new release? :)
Hey mate! yes things have been a bit quiet lately due to me having a bit of a coding slump/coders block but feel ready for the final push now. There's been some compatibility problems with getting the 'masking' system working in a unified way on both the GDI drivers and Direct2D drivers. For example under GDI masks are created using hundreds of pixel sized clipping regions based on a single 'transparent color' which only allows for opaque/fully transparent masks where as Direct2D doesn't support this type of clipping but does a great job on using an alpha mask with varying degrees of transparency (the trouble is there is no way to do this in just GDI). So I think what needs to be done is a combination of GDI and GDI+ to get alpha masks working under the GDI drivers and drop the existing clipping region method. Nothings ever straight forward lol ;)

The following screen shows a spherical gradient alpha mask in Direct2D with absolutely no performance drop:

Image

On a plus note I think I've eradicated the spam bots once and for all on the ProGUI forums by dropping the captcha method, now asks a simple question like "How many bits in a byte" :) which every programmer should know heh

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: ProGUI V1.37 UI Library (Small Bug Fix)

Post by Zach »

Hey man that is pretty cool :mrgreen:

I haven't written any code in Ages either.. kinda feel bad about it, hrmm.. I dunno, just can't seem to get moving I suppose.. But then these things keep happening between my breaks, New PB, new ProGUI, new PB Beta w/New Form Designer Beta and new ProGUI on the horizon!

lol.. I think its one of those "waiting on the tools" deals where the tools are never finished :mrgreen:

I wish I had half the brain as some of you guys seem to have. You can learn to do all this neat stuff, and know how to work at it.. I'm just struggling to stay interested at times :oops:
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.37 UI Library (Small Bug Fix)

Post by PrincieD »

Zach wrote:Hey man that is pretty cool :mrgreen:
Thanks! trying to get the same effect working in GDI without it crawling is giving me some real headaches though :?
Zach wrote:I haven't written any code in Ages either.. kinda feel bad about it, hrmm.. I dunno, just can't seem to get moving I suppose.. But then these things keep happening between my breaks, New PB, new ProGUI, new PB Beta w/New Form Designer Beta and new ProGUI on the horizon!
It sucks when the dreaded coders block happens, it's like a perpetual cycle of procrastination that's really difficult to get out of. I think the only way to move forward is just to start coding, code anything but just write some lines and hopefully you'll get your 'codejo' back ;)
Zach wrote:lol.. I think its one of those "waiting on the tools" deals where the tools are never finished :mrgreen:
lol I know I know, me too! and I'm one of the dudes writing the tools lol I wish I could fast forward into the future where it's all done and working nicely heh
Zach wrote:I wish I had half the brain as some of you guys seem to have. You can learn to do all this neat stuff, and know how to work at it.. I'm just struggling to stay interested at times :oops:
Bah don't put yourself down mate, we're all clever chaps here! just takes patience :) (I've actually been feeling pretty dumb lately, might have killed too many brain cells drinking lol)

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
ruslanx
User
User
Posts: 46
Joined: Mon Jun 06, 2011 8:28 am

Re: ProGUI V1.37 UI Library (Small Bug Fix)

Post by ruslanx »

Hi PrincieD, I use the Userlibrary to compile this example. (Last version)
.. I find a bug, memory leak with the 'AddPanelExImagePage' command, ('AddPanelExPage' same thing) .. try example .. open-close window and look in taskmanager how is increased amount of memory used ...thx.

Code: Select all


StartProGUI("", 0, 0, 0, 0, 0, 0, 0)


Enumeration
  #Window_0
  #Window_1
  #Panel_1
  #Shortcut_F2
  #Shortcut_Esc
EndEnumeration


Procedure OpenWind()
  ExamineDesktops() : Global width = DesktopWidth(0) : Global height = DesktopHeight(0)  ; 1920x1080
  
  OpenWindow(#Window_1, 0, 0, width, height, "In Fullscreen", #PB_Window_BorderLess | #PB_Window_Maximize | #PB_Window_ScreenCentered | #PB_Window_Invisible)
  AddKeyboardShortcut(#Window_1, #PB_Shortcut_Escape, #Shortcut_Esc)
  
  ; creates a new pannelex
  CreatePanelEx(#Panel_1, WindowID(#Window_1), 0, 0, width, height, 0)
  
  ;AddPanelExImagePage(#PNLX_IGNORE, #PNLX_IGNORE, #PNLX_IGNORE, #PNLX_IGNORE, #PNLX_IGNORE, #PNLX_IGNORE, #PNLX_CENTRE)  ; --- Bug (Memory Leak + 10MB)
  AddPanelExPage(-1)    ; same thing


  HideWindow(#Window_1, 0)
EndProcedure
; 


OpenWindow(#Window_0, 0, 0, 400, 200, "WebCAM_Fullscreen", #PB_Window_ScreenCentered |#PB_Window_SystemMenu)
AddKeyboardShortcut(#Window_0, #PB_Shortcut_F2, #Shortcut_F2)

; press F2 (to open window_1) and Escape to close window_1 ... look in taskmanager how memory is up with 10MB ..
; ******************************************************************************************************************

Repeat
  Event = WaitWindowEvent()
  
  Select Event
    Case #PB_Event_Menu
      Select EventMenu()
          
        Case #Shortcut_F2
          OpenWind()
          
        Case #Shortcut_Esc
          CloseWindow(#Window_1)
          FreePanelEx(-1)
          SetActiveWindow(#Window_0)
          
      EndSelect
  EndSelect
  
Until Event = #WM_CLOSE

End
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.37 UI Library (Small Bug Fix)

Post by PrincieD »

Thanks for reporting ruslanx, I've confirmed the bug - looks like the buffers aren't being released correctly doh! :oops:

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by PrincieD »

V1.38 out guys, see top of thread :)

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by ts-soft »

In the resident of ProGUI you have defined:
#background = 30
You use constants without a suffix, names like #background in the resident is not good!

Greetings - Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by PrincieD »

ts-soft wrote:In the resident of ProGUI you have defined:
#background = 30
You use constants without a suffix, names like #background in the resident is not good!

Greetings - Thomas
Thanks for reporting Thomas, yep that's not good lol I'll make sure I rename all the constants with a "#ProGUI_" suffix in the next update.

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by Zach »

Just nitpicking but, "#ProGUI_" is a prefix in this case :mrgreen:
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by PrincieD »

Zach wrote:Just nitpicking but, "#ProGUI_" is a prefix in this case :mrgreen:
:P :P hehe yep prefix not suffix :oops:

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
akee
Enthusiast
Enthusiast
Posts: 496
Joined: Wed Aug 18, 2004 9:52 am
Location: Penang, Malaysia

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by akee »

Hi PrincieD,
Any possibilities of giving more details in the documentation? I feel it is a little insufficient to quickly get started and running.

I am running through the examples and help file. Tried to add a gradient CreateGradient() to a panel AddPanelExImagePage() but it does not seem to work? -1 to 11 is ok.

BTW SetWindowFont() sets the windows's title bar font or all other gadget fonts from there.

Thanks... :)
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by PrincieD »

Hey Akee,
akee wrote:Hi PrincieD,
Any possibilities of giving more details in the documentation? I feel it is a little insufficient to quickly get started and running.
I've been thinking of writing some kind of tutorial for a while but it's difficult to know what to base it on as there are so many things that ProGUI could be used for in an application :? The examples cover most of the features of the API and I've designed them to be used as 'templates' which are easy to follow and understand when cross referenced with the help manual.
Perhaps you could give me some suggestions for a tutorial that would help you best? and if anyone else would like to make some suggestions I'd appreciate it! :)
akee wrote:I am running through the examples and help file. Tried to add a gradient CreateGradient() to a panel AddPanelExImagePage() but it does not seem to work? -1 to 11 is ok.
To add a gradient to a PanelEx page, simply pass the returned handle from CreateGradient() (make sure the colours are made using the MakeColour() command) to the Background parameter of AddPanelExImagePage, the DCCManagerUI_Example is a good example of this.

Code: Select all

; create main PanelEx
mainPanelEx = CreatePanelEx(#PannelEx_0, WindowID(#Window_0), 0, RebarHeight(rebar), w_width, w_height-RebarHeight(rebar)-23, @myPannelCallback())
    
; create nice gradient for transfers page backgorund
Gradient = CreateGradient(#VerticalGRADIENT, MakeColour(255, 133, 133, 126), MakeColour(255, 46, 44, 38))
    
;- create new transfers page
page = AddPanelExImagePage(Gradient, image(43)\normal, 0, 0, 0, 0, #PNLX_CENTRE|#PNLX_VCENTRE)
akee wrote: BTW SetWindowFont() sets the windows's title bar font or all other gadget fonts from there.
The SetWindowFont() command is just a WinAPI helper command and is really meant to be used on the HWND returned from a common control not an actual top level window. It isn't really needed for PureBasic just other languages, which of course ProGUI can be used with.

Let me know how it goes anyway Akee! :)

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
Locked