NOTICE: NXP has started migrating LPCWare.com to NXP.com. Many LPCware.com pages are being redirected to NXP.com. Please visit software and tools page for information on LPC microcontrollers.
This blog describes how to use and customize the emWin skins to change the look of the emWin widgets.
What is skinning?
Skinning is a method of changing the appearance of one or multiple widgets. It allows changing the look by using a dedicated skin which defines how the widgets are rendered. This makes it easy to change the appearance of a complete group of widgets in a similar way by changing only the skin. Without skinning, widget member functions have to be used to change the look for each single widget or the callback function has to be overwritten.
Skinning makes only sense if a widget consists of several widget specific details. It does not make sense for each kind of widget. A TEXT widget for example does not require a separate skin, because it consists only of the text itself.
Currently the following widgets support skinning:
Using skinning is very easy; with just a few command, your GUI can have a more modern and more appealing look already! Currently emWin comes with one standard skin, called SKIN_FLEX. This skin can be used by calling the widget's SetDefaultSkin() function. E.g. to use the SKIN_FLEX skin on all buttons in your GUI, simply call the following function before drawing the GUI:
The default skin (SkinFlex) can easily be customized.
An example for a button with SkinFlex skin is provided below:
More information can be found on the segger website: http://www.segger.com/skinning.html
Also one of the demo applications provided by segger (http://www.segger.com/emwin-samples.html) show how to apply skinning: