Example: Theme Renderer
Overview When a robot skill is added to an ARC workspace by a user, the control form UI will be manipulated to provide a standard look and feel. Research has demonstrated the benefits of providing users with an unified graphical experience that promotes creativity within EZ-Builder. This is done by relieving cognitive load of the user by giving them less to think about during their robot programming sessions.
Some Theme Examples Users configure theme colors for their ARC instance on a per user basis. This configuration is stored in the current logged-in user's registry. The color theme can be customized in the top ARC menu Options -> Preferences -> Window Theme.
When Is A Control Form Themed? The theme engine is called against forms when they're added to the project automatically by the ARC workspace manager. This is the same manager that allows changing desktops, smart arranging windows, loading configurations, etc.. As far as when the theme renderer is called in code, it's after the form's constructor and before the OnLoad() event.
YourPlugin.Constructor()
|
V
Theme Renderer
|
V
YourPlugin.OnLoad()
Skip Themeing of Controls There's two ways to have a control skip the theme process. This means the specified controls, and respective child controls will be skipped when the theme is applied.
- ThemeRenderer - The FormPluginMaster is the base form that your plugin must inherit. Within this FormPluginMaster is a ThemeRenderer object. You can access the ThemeRenderer.ControlsToSkipTheming in the plugin form's constructor following InitializeComponent() For example, if you had a btnSave that wished to not be themed...
public MyPlugin() {
// Define and initialize components on plugin form
InitializeComponent();
// Skip the following components from the theme renderer on form
ThemeRenderer.ControlsToSkipTheming.Add(btnSave);
}
- Tag: SkipTheme - In the properties of a control on your plugin form, you can specify SkipTheme as the Tag value. This will instruct the ThemeRenderer to skip the control and all child controls.
Is this out of date? There doesn't seem to be a GetConfiguration function within EZ_Builder.Config.Sub.PluginV1
Look at the tutorial step titled Code: Saving/Loading Configuration
The get and set configuration methods are overrides of the form. There’s a great video on the first step of this tutorial that demonstrates the step by step of building a plugin. I recommend watching that because it helps fill in any steps that were missed.
When you’ve done it once, it makes sense and voila, you can rinse and repeat
Excellent, thanks - I will do. I really must learn not to just jump ahead in the process
Hey no problem - I do it all the time, and end up frustrated because I dont know what it was that I missed. Excitement gets the best of me
Trying to follow the tutorials but can't find where the plugin page has gone. How do I add a new plugin to the ez-robot / Synthiam site to get the XML?
Never mind. Just found the "Create skill control" link
I am trying to follow the instructions for adding my own plugin but I cannot seem to find the place to register the plugin based on the instructions.
Any help is appreciated.
Thanks
The new button to create a plugin skill control is less than an inch below the button you pressed to create this question.