Page 2 of 10

Re: PureBasic 5.60 beta 1 is available

Posted: Fri Jan 27, 2017 3:03 pm
by IdeasVacuum
- Added: #PB_Canvas_Container support to have a container behaviour for canvas
That's seriously useful Fred 8) I think you have earned an afternoon off.....

Re: PureBasic 5.60 beta 1 is available

Posted: Fri Jan 27, 2017 3:16 pm
by walbus
Hi HanPBF

Yeah, to time, i must working on my bone mill, i looking the weekend for a sample code with BF for canvas

The Canvas gadget is the key for many innovative things

Re: PureBasic 5.60 beta 1 is available

Posted: Fri Jan 27, 2017 3:33 pm
by Justin
Great additions on the gadgrt stuff. I miss a way to enumerate the child gadgets of any container, that would be very usefull now that they respond to the resize event also to redraw the childs of a canvas container.
Also GetparentGadget () would be useful.

Re: PureBasic 5.60 beta 1 is available

Posted: Fri Jan 27, 2017 3:56 pm
by useful
- Added: #PB_EventType_Resize support for PanelGadget(), ContainerGadget(), CanvasGadget() and ScrollAreaGadget()

Assume convenience when using splitters (for example a window has not changed size and the panel have changed), but I want a visual example.

p.s. Thank you for the wonderful news!

Code: Select all

Debug #PB_EventType_Change ; The current displayed tab has been changed.
Debug #PB_EventType_Resize  ; The gadget has been resized.
Constant not found #PB_EventType_Resize

Re: PureBasic 5.60 beta 1 is available

Posted: Fri Jan 27, 2017 4:48 pm
by Fred
You are right I forgot to add it in the resident. For now you can declare it like this:

Code: Select all

#PB_EventType_Resize = 6

Re: PureBasic 5.60 beta 1 is available

Posted: Fri Jan 27, 2017 4:56 pm
by kenmo
Nice surprise, thank you!

Code: Select all

- Added: "Joe Doe <joe.doe@domain.com>" email format support for SendMail()
- Added: Compression level support for CreatePack() and CompressMemory()
- Added: Large icons and text support to ToolBar library
- Added: GetUserDirectory() to get user specific directories
- Added: #PB_Canvas_Container support to have a container behaviour for canvas
- Added: (IDE) find previous (reverse find)
Great!

Code: Select all

- Changed: ToolBar, Menu and StatusBar are now excluded from inner window area for all OS
- Changed: MenuHeight(), StatusBarHeight() and ToolBarHeight() are now deprecated (all returns 0)
This seems like taking GUI information away from the programmer...?

Re: PureBasic 5.60 beta 1 is available

Posted: Fri Jan 27, 2017 5:02 pm
by Fred
kenmo wrote:

Code: Select all

- Changed: ToolBar, Menu and StatusBar are now excluded from inner window area for all OS
- Changed: MenuHeight(), StatusBarHeight() and ToolBarHeight() are now deprecated (all returns 0)
This seems like taking GUI information away from the programmer...?
No because on OSX it worked alrealdy like that (MenuHeight()/ToolBarHeight() returned always 0), on Linux the toolbar was excluded as well, but you needed to take it in account in your window calc. On Window, the gadget Y coordinate was the window top, not the toolbar bottom like on Linux/OSX so shift were needed. It was quite a bit of mess, so this change was done to solve it and make it easy as it should have been from the start.

I wrote a small program to validate this on all OS if you want to check it:

Code: Select all

OpenWindow(0, 100, 100, 800, 400, "", #PB_Window_SizeGadget | #PB_Window_SystemMenu | #PB_Window_MaximizeGadget)

ButtonGadget(0, 0, 0, 100, 30, "CreateToolBar")
ButtonGadget(1, 110, 0, 100, 30, "FreeToolBar")
ButtonGadget(2, 220, 0, 100, 30, "CreateMenu")
ButtonGadget(3, 330, 0, 100, 30, "FreeMenu")
ButtonGadget(4, 440, 0, 100, 30, "CreateStatus")
ButtonGadget(5, 550, 0, 100, 30, "FreeStatus")
ButtonGadget(6, 0, 370, 100, 30, "Bottom")

Repeat
  Event = WaitWindowEvent()
  
  If event = #PB_Event_Gadget
    Select EventGadget()
      Case 0
        If CreateToolBar(0, WindowID(0), #PB_ToolBar_Large | #PB_ToolBar_Text)
          ToolBarStandardButton(3, #PB_ToolBarIcon_Cut, 0, "Hello")
          ToolBarStandardButton(4, #PB_ToolBarIcon_Copy, 0, "Hello")
          ToolBarStandardButton(5, #PB_ToolBarIcon_Paste, 0)
        EndIf

      Case 1
        If IsToolBar(0)
          FreeToolBar(0)
        EndIf
                
      Case 2
        CreateMenu(0, WindowID(0))
        MenuTitle("Test")
        MenuTitle("About")
        
      Case 3
        If IsMenu(0)
          FreeMenu(0)
        EndIf
        
      Case 4
        CreateStatusBar(0, WindowID(0))
        AddStatusBarField(100)
        StatusBarText(0, 0, "Test")
        
      Case 5
        If IsStatusBar(0)
          FreeStatusBar(0)
        EndIf        
    EndSelect
  EndIf
    
  If event = #PB_Event_SizeWindow
    Debug "Window inner size: "+WindowWidth(0) + "x" + WindowHeight(0)
  EndIf
  
Until Event = #PB_Event_CloseWindow
NOTE: On OSX there is no toolbarstandardbutton so you will get an empty toolbar but you get the idea
You can run it on PB 5.51 Linux/OSX/Window to see the difference.

Re: PureBasic 5.60 beta 1 is available

Posted: Fri Jan 27, 2017 5:11 pm
by chi
Thanks a lot, Fred and Team!!!

Code: Select all

- Added: (IDE) new specific popup menu for file tab to ease source file management
"Copy Full Path" and "Open Containing Folder" would be nice too... ;)

Code: Select all

- Added: GIF decoder support
- Added: SetImageFrame(), GetImageFrame(), ImageFrameCount(), AddImageFrame(), RemoveImageFrame()
How to get the native speed of a GIF? Any chance reading the frame delay somehow?

Re: PureBasic 5.60 beta 1 is available

Posted: Fri Jan 27, 2017 5:26 pm
by ts-soft

Code: Select all

- Added: SetImageFrame(), GetImageFrame(), ImageFrameCount(), AddImageFrame(), RemoveImageFrame()
I would say, it's better to say: CountImageFrame() to support the other names.

Re: PureBasic 5.60 beta 1 is available

Posted: Fri Jan 27, 2017 5:48 pm
by RomanR
Great Work :D ! Cool new features 8) !

Since you added SSL support to email, I'm waiting for SSL support for FTP (FTPS/SFTP). I wrote a liitle applikation to transfer certain files to a server. I can't use it anymore for security reasons (we stopped using FTP and sitched to SSH/SFTP)!

Would be nice to have this functionality in the near future...

Keep on coding!

Re: PureBasic 5.60 beta 1 is available

Posted: Fri Jan 27, 2017 6:22 pm
by walbus
It looks, BucketFill advanced for canvas is full compatible with the new canvas container in PB 5.60

As sample, sprites move easy behind the buttons
All BF graphic gimmicks are on demand available, behind all other gadgets

It is so simple to use, i must not make separately demo codes :wink:

Many samples come directly added to the BF modules, thread here
http://www.purebasic.fr/english/viewtop ... 12&t=66927

Amazing possibilities :o
Image
The BF Image button can make fine seamless animations, tousends variants available

Re: PureBasic 5.60 beta 1 is available

Posted: Fri Jan 27, 2017 6:35 pm
by JHPJHP
Hi PB Team,

Thank you for your professional work ethic, your dedication to an amazing product, and the tireless support you provide while trying to enjoy a regular life.

Re: PureBasic 5.60 beta 1 is available

Posted: Fri Jan 27, 2017 7:24 pm
by Mistrel
Confirmed that the IDE is working. Good job. :)

Re: PureBasic 5.60 beta 1 is available

Posted: Fri Jan 27, 2017 7:53 pm
by walbus
It's an incredible coincidence the BF for canvas just now has emerged

Re: PureBasic 5.60 beta 1 is available

Posted: Fri Jan 27, 2017 7:59 pm
by Maitre_Kanter
Youpi ! Merci la Team !