« xDev Magazine 23.1 | Home | Things to do for the … »

News from the MBS Xojo Plugins in version 24.5

In this article I want to introduce you the new functionalities from the MBS Xojo Plugins in version 24.5.

DynaPDF

In this release, DynaPDF once again brings us a number of new features. On the one hand, we have new parser functionality with which we can remove all or individual images from a page of a document. We can also use DynaPDFParserMBS.ListImages to get a list of all images on a page.

Then we have a few new Get methods in the DynaPDFMBS class with which we can query settings. With GetAnnotColor we retrieves the color of an annotation. The function GetAnnotTextAlign returns us the text alignment of an annotation. Last but not least, GetTextBBox calculates the exact bounding box of a text string.

Phidgets

We also have a new method for the Phidget area. The shared method finalize from the PhidgetMBS class. This method is intended for use in special cases where it is desired for the Phidget library to be unloaded before a program's termination. It release memory and threads used by the Phidget library.

We also have the new InstanceCount property which allows us to get the number of Xojo Phidget instances.

WordFile

We have a new property with that you can set and query metadata properties of Word Files. In the new property PropertyValue from the class WordFileMBS you can specify the desired field name in the parameters. This allows you to query it or assign a new value to it.

Archive

There are a few new properties in the ArchiveEntry class that check whether other properties are set. These can be particularly useful for conditions in the program flow. Here is a list of these new properties:

  • FileTypeSet
  • GIDSet
  • HardLinkSet
  • PermissionsSet
  • RDevSet
  • UIDSet

WebView

We have different classes for Windows and Mac to work with WebViews. We would like to provide both operating systems with new functionalities in this area.

Windows
The classes WebView2ControlMBS and DesktopWebView2ControlMBS each get a new method AddBrowserExtension that adds the browser extension using the extension path for unpacked extensions from the local device. There is also a new event with the name AddBrowserExtensionCompleted. This event is called when the AddBrowserExtension result is available. Whether browser extensions are enabled can be returned in the AreBrowserExtensionsEnabled property. These and other properties can be found in the new release.

Mac
Now we come to the new Web View functionalities of Mac. This time they are centered on media playback. On the one hand we have events in the classes DesktopWKWebViewControlMBS, WKWebViewControlMBS and WKWebViewIOSControlMBS that fire after the web view pauses media playback or after the web view determines the current state of media playback. Then we have corresponding methods that reqest the Media Playbackstat or pause all the media playback.

New functionalities for Mac

The MBS Xojo Plugins in version 24.5 offers some more new features for Mac users

Toolbar

We upgraded the toolbar classes for macOS to include new properties in macOS Sequoia. We add NSMenuToolbarItemMBS, NSSearchToolbarItemMBS and NSTrackingSeparatorToolbarItemMBS classes. These allow you to add a separator tracking, a menu or search toolbar item to your toolbar. In addition, we have also added new events and methods to make your work easier. For example, you can use canBeInsertedAtIndex from the CustomNSToolbarMBS class to make a request to the class for a Boolean value that indicates whether the toolbar can place the item at a specified position or looks with toolbarImmovableItemIdentifiers for items that people can't remove from the toolbar or rearrange during the customization process. You can find this and much more in our release notes.

Vision

A new class has also been added to the Vision area. The VNDetectDocumentSegmentationRequestMBS class. This class detects rectangular regions that contain text in the input image. It detects a document in an image. The result that the request generates contains the four corner points of a document's quadrilateral and saliency mask. This allows us to straighten the image for further steps.

NSView and NSControl

In this release we have added some new functionalities for our NSViews and NSControls. Some are for special controls and views but we also have some functionalities for the main classes from which the other classes can inherit.

Let's start with the NSViewMBS class. In this class we have some new methods concerning scrolling. With scrollPoint we can scroll to a specific point in our view. So you can use ScrollView.documentView.scrollPoint 0, ScrollView.documentView.frame.Height-ScrollView.frame.Height to scroll to the top. With scrollRectToVisible you can even define an object of the type NSRectMBS so that this rectangle is displayed accordingly in your view. We have also added the adjustScroll method to match this. The new method autoscroll scrolls the view's closest ancestor NSClipView object proportionally to the distance of an event that occurs outside of it. View objects that track mouse-dragged events can use this method to scroll automatically when the cursor is dragged outside of the NSClipView object. Repeated invocations of this method (with an appropriate delay) result in continual scrolling, even when the mouse doesn't move.

Then we have two new features in our NSControl class. With the method sendAction we can raise the action event. In addition, we have the new method abortEditing, which terminates the current editing operation and discards any edited text.

TextView

Now we come to the new features in NSTextView. Here we have new events in the NSTextViewControlMBS and NSTextViewControlMBS classes. The event clickedOnLink fires after the user clicks a link and gives us the link as parameter.

Another new feature is that we now display writing tools in the Textview. For this we use the function showWritingTools from the class NSResponderMBS. In the classes NSTextViewControlMBS and NSTextViewControlMBS we have the events textViewWritingToolsWillBegin and textViewWritingToolsDidEnd that tells us the current beginning and ending of a writing tools session.

We also have a few properties relating to the topic of writing tools. The property writingToolsBehavior defines whether writing tools are allowed. In addition, we can use allowedWritingToolsResultOptions to query what types of results are allowed for writing tools.

n.allowedWritingToolsResultOptions = n.NSWritingToolsResultPlainText
n.writingToolsBehavior = n.NSWritingToolsBehaviorComplete

With the property isWritingToolsActive we can then query if writing tools are currently active.

NSComboBox

Now we come to the new functionalities around the ComboBoxes. Here we have two classes to which we give the same new events. The DesktopNSComboBoxControlMBS and NSComboBoxControlMBS classes. Here we have the new event SelectionDidChange that informs you that the pop-up list selection has finished changing. In contrast, SelectionIsChanging informs us that the pop-up list selection is changing at this moment. The event WillDismiss informs you that the pop-up list is about to be dismissed. In contrast, WillPopUp informs you that the pop-up list is about to be displayed.

New functionalities for Linux

Last but not least we offer a new feature for Linux users

Since version 12.4 we have a class LinuxWebViewMBS that provides us a WebKit WebView on Linux. Now we have added the new method LinuxWebViewMBS in the DesktopHTMLViewer class that queries the linux WebKit web view for the given htmlviewer. The HTML Viewer is responsible for rendering HTML.

We hope you will also find some interesting new features. We wish you a lot of fun with MBS Xojo Plugins version 24.5. If you have any Ideas for new cool features, need a license or have any questions, please contact us.

The biggest plugin in space...
11 01 25 - 10:20