Kalama

Where Are All The Pretty Graphics?

CodeLab v3.0

January 10, 2018   -   Filed under: CodeLab

CodeLab v3.0 was released today by BoltBait, and it’s a hefty update full of new features.  NB: it requires paint.net v4.0.20+.
With version 3, we have, by far, the most robust development environment of any image manipulation program.
Here are some of the features I contributed for today’s release:

OnSetRenderInfo can be optionally utilized via the PreRender method

Previously, if you wanted to use OnSetRenderInfo(), you’d have to export your script to Visual Studio. CodeLab is now smart enough to execute SetRenderInfo. You can utilize this by placing your relevant code into a PreRender() method that looks like this:

void PreRender(Surface dst, Surface src)
{
    
}

Dark Theme + Paint.net Dark Theme

Complementing the Dark editor theme I added in v2.22, today’s release of CodeLab can inherit paint.net’s UI theming. That is to say, the entire CodeLab UI can have a dark theme applied to it.  All you have to do is enable the Dark Theme in paint.net’s settings.

Find & Replace floating panel

The new ‘Find & Replace’ is a non-modal panel anchored to the top-right corner of the editor. This allows you to scroll around and edit your code while performing search operations.  The new panel also exposes the optional search flags: Match Casing, Match Whole Word, Regular Expressions, and Interpret Escape Characters.

Format Document

This performs automatic line indentations, and end-of-line whitespace trimming.

Introspective – Intelligent Assistance for UserScript

CodeLab has provided ‘Intelligent Assistance’ features for Types (and their members) for a while now. The ‘Intelligent Assistance’ features include Tooltips, AutoCompeletion, and usage highlighting. It seemed rather silly when I realized we didn’t provide these features for the current script in the editor (aka the UserScript). You now get all the ‘Intelligent Assistance’ features for your own methods, fields, properties, ect.

AutoComplete Box filtering

The AutoComplete Box can now be filtered by object type (classes, enums, structs, properties, consts, methods, ect.).

Here are the keyboard commands to invoke filtering within the AutoComplete box:
Alt+L    Local Variables and Parameters
Alt+O    Constants
Alt+P    Properties
Alt+F    Fields
Alt+M    Methods
Alt+C    Classes
Alt+S    Structs
Alt+E    Enums
Alt+K    Keywords

Go To Definition

Press F12 to ‘Go To Definition’. Objects from the .Net Framework open the associated page on docs.microsoft.com; objects from UserScript go to location in document. Objects from paint.net assemblies do nothing, as official paint.net documentation doesn’t exist.