A while back I was working on a effect plugin for PDN that was going well, until, I had to create my own dialog UI as IndirectUI wasn't up the the job -- basically, a complete lack of tabs. So I ended up having to make something for my needs and I decided to do so by having it build the dialog once the plugin is launched.
To make that clear: it doesn't need you to set up all the various control positions in VS, but instead, does something similar to how IndirectUI does it in that you create the control objects you want in the PluginToken class and then the PluginDialog class auto-builds the dialog UI for you.
Anyway, I decided what I would do is recreate the IndirectUI controls -- with some additional features -- along with what where the more "common" controls that developers were creating for their needs; the idea being to create a new template for developers to use so that they end up spending more time on creating effects and less time on creating a custom dialog UI for their effects.
With the plugin dialog base form UI there are a range of options you can customize:
Whether you want the version number to be added to the dialog name and how many digits,
Whether to show a checkbox toggle and what it's label is -- default is "Seamless".
Whether to show a toggle button and what the label is for it -- default is "Compare."
Also, whether to show a "DEBUG" tab for the dialog so that you can check certain states -- like where the control is "Exposed" and can be referenced via your effects script, where the current setting for controls are, positions, etc.
Here are the current controls completed (with pics):
UITab (container): currently you need to have at least one tab for the dialog to be displayed.
UITabMode: allows you to enable / disable a tab page's groups.
UIGroup (container): all controls need to be added to a group to be displayed.
UISlider: these can be customized so that the bar ticks cam be disabled and a checkbox added -- this can be set to enable the control or to be used in some other way, like if you wish to invert the slider value as an example.
UILink: this allows you to link to sliders so that one will update the other -- can be set 1/2 way and to mirror or reverse the value change.
UIReset: this lets you reset all the controls you've added to it.
UIText: a non-editable textbox control -- can be made editable however, as shown above.
UIString
UIImport: this allows you to import a file or image from clipboard; the buttons don't have any code -- you'd need to add that via your effect script -- but they can be renamed and disabled to your needs.
UIAngle: with this you can also enable an "altitude" option, the default is 0 to 100, as in percent -- you can set the max to whatever you like
UIDivider: this just draws a simple dividing ruler between two controls
UIHeader: this draws a dividing ruler along with allowing you to add a header -- like "Reset All"
UIColor: decided against the color wheel implementation and went with something else a bit more space friendly. Let's you drag a Hue (top bar) and set the Saturation and Luminance via the left square. You can also set the RGB values with the slider along with Alpha. Get / Set methods allow you to get the R, G, B, A values seperately, whereas the Value will return the current ARGB Color.
Controls on the to-do list:
UIVector
UIButton
UICheckbox
UIRadio
UIState -- for boolean controls like radio buttons where only one can be enable at a time
UINumeric
UIDropDown
UIDouble (container)
UIList (container)
UIButtonBar (container)
The PluginToken class for the current template:
To use a control within your PluginEffect class, you do the following to get the reference to it:
UISlider slider6 = (UISlider)token.GetControl(Alias.ControlName.Slider6);
Once you have the reference, you are then able to call its property get and set methods -- like "slider6.Value = 25;" -- along with public methods. ALL of them.
You can download the test plugin here. It will appear in PDN under "_Debug" via the effects menu option.
The template isn't complete yet, based on what feedback if any I get on the plugin version, I'll decide how much more work I'll do to it before making it available. Also, I have yet to test it via PDN 4.0.
FYI: debug has been enabled so there will be performance issues for the UIAngle and UIColor controls due to the debug textbox being updated. These controls are very smooth on my computer when debug is not enabled .