News from the MBS Xojo Plugins Version 23.2
In this article I want to introduce you the new functionalities from the MBS Xojo Plugins in version 23.2.
CURL
With the new method SharedInstance from the classes CURLMultiMBS, CURLNMultiMBS and CURLSMultiMBS we simplify the multi transfer for our Xojo CURL Plugin. If you want more information to that then read our blogpost Easier multi transfer for our Xojo CURL Plugin. For The CURLMultiMBS classes you need a timer that calls Perform regularly. If you want to run Perform automatically you can set true in the AutoPerform property.
MongoDB
Since a few releases we also have the possibility to connect to a MongoDB database and work with it. Also in this release we extend the functionalities of MongoDB. First of all we can now convert information as Binary JSON for Mongo DB. The information is first read in an encoding of your choice or by default with UTF-8, converts to base64 and embeds it in a $binary JSON for use in MongoDB. You can use the method DataToBinary from the class MongoClientMBS for this. The data is passed as a string or MemoryBlock.
Two other new methods of this class deal with time in MongoDB. With the method NowUTC we get the current UTC timestamp. This can look like this:
{ "$date" : "2023-03-09T11:39:34Z" }Matching to this there is the method Time which gives us the matching UTC timestamp in a JSON with a time as seconds since 1970 specification.
Scintilla
We have built a new class for Scintilla into the plugins. The new classes ScintillaRangeToFormatMBS is used in printing and requires some of the graphics types from the platforms. Appropriately, we have a new FormatRange method in the ScintillaControlMBS and DesktopScintillaControlMBS classes. FormatRange can be used to draw the text onto a display surface which can include a printer display surface
Keyboard
With the new method ShowKeyboardMBS from the class Window and DesktopWindow you can show the keyboard if necessary. If you call this method a second time under Windows it will be hidden again. But there is also an own method to hide this keyboard again. For this you use the method HideKeyboardMBS from the same classes.
GraphicsMagick
With the help of GraphicsMagick you can really bring your images to life. We aded support for WebP in this version. If you want to get the version of the used WebPVersion you can now use the method WebPVersion in the classes GM16ImageMBS and GMImageMBS to get the version.
New functionalities for Mac and iOS
The MBS Xojo Plugins in version 23.2 offer some more new features for Mac and iOS users.
PhotoPicker
Relatively new is our PHPickerViewControllerMBS class which allows us to select photos from our photo library without needing permission dialogs. We introduced this component in release 22.5. Today it gets support for macOS and three new properties. First, we can identify our appearing popover so that we have access to it. For this we use the property popover . This gives us access to the underlying NSPopoverMBS object. We can also use the PopOverHeight and PopOverWidth properties to set and query the size of the popover.
Canvas
Already in version 18.2 we introduced for the class CanvasGesturesMBS the methods AddCanvas and RemoveCanvas which can add or remove a canvas to a list canvases to track. We have now extended these methods with the input possibility of the DesktopCanvas.
New functionalities for Windows users
Last but not least I want to introduce the news for windows users.
Windows PDF
For years we already have the PDFKit for Mac users to do small PDF tasks. Now Microsoft has added some PDF functions to their framework we can make them available for you. We have added the following classes for you:
- WindowsPDFDocumentMBS
- WindowsPDFExceptionMBS
- WindowsPDFPageDimensionsMBS
- WindowsPDFPageMBS
- WindowsPDFPageRenderOptionsMBS
- WindowsPDFRectMBS
- WindowsPDFSizeMBS
The main task of the Windows PDF is the reading of PDF documents and the rendering of preview images. But the range of functionalities is not nearly as great as it is for DynaPDF and the Windows PDF functions are not a replacement for DynaPDF. If you want to learn more about the differences between DynaPDF the PDFKit and the new Windows PDF functions please read out blogpost: Comparing DynaPDF vs PDFKit and WinPDF If you want more informations to that topic read our Blogpost: Windows PDF Classes
Windows Media Foundation Player
To support the work with the Windows Media Foundation Player we also added some new properties to the MFPMediaItemMBS class to help you analyze audio items. With AudioSamplesPerSecond you can query how many samples per second your audio has. With AudioBitsPerSample you can get the bits per sample. With the property AudioChannels you get the number of audio channels. If you have a video file, you can get the number of frames per second with the property VideoFrameRate. So you get the frame rate.
We hope you will also find some interesting new features. We wish you a lot of fun with MBS Xojo Plugins version 23.2. If you have any Ideas for new cool features, need a license or have any questions, please contact us.