1. last week

    Alfred V

    Jan 9 Pre-Release Testers

    Lexing Plugin version 4.0.0 is available at

    MacOS Mojave (macOS 10.14) uses semantic colors, as does windows-10, to adapt to light or dark mode. To set up this LexingControl, that at its base uses colors for syntax highlighting, the plugin defines two additional classes, providing semantic (catalog) colors for light-dark mode awarenesses.

    Setting up the Lexing control in the Xojo IDE is easy. The color types for fore and back colors of text and line numbers, the caret color and other marginView colors in the IDE is replaced as Integer-enumerations as seen by the popups. They indicate the semantic or catalog colors.

    Yet these properties can take colors when cast to a UInt32 data type.

    To support the theme changes, Lexing control comes with two novel events: "ThemeChange() as Boolean" and "ThemeSetup() as Boolean".

    Instead of setting up coloring in the Open event, you should move your code to the ThemeSetup event and call coloring in the ThemeChange event.

    Accompanied with this plugin are two data-type classes, XSColor and its subclass SemanticColor. XSColor is a cross-platform approach, while the SemanticColor type is specific for macOS and windows. While there are other sources, such as CSTrueColors, it would be worth checking out our implementation.

    Given LexingControl with XSColor and SemanticColor, supporting light and dark mode on macOS and high-contrast on windows with the ability to color text in ways you might not imagine, we suggest to download the demo version of this novel plugin. Those who have a license for the previous version can request the upgrade discount.

    Check it out. Development of the LexingControl rested heavily on the creation of the XSColor and SemanticColor classes and the subsequent creation of a sample project that grouped the colors in categories. This helped also in the sublimation of the color type as 0xFFAACCDD into an Integer. LexingControl in the IDE may be a good example of how Xojo controls could be visually improved in design time when it comes to assigning colors, while abandoning the rule to set colors to black to support catalog/named colors.

    Alfred van Hoek

or Sign Up to reply!