As of TouchGFX 4.7.0 the source code for the standard widgets and containers is now included in the distribution. The source code is located in this folder
In order to maintain backwards compatibility, the core library still contains compiled versions of the standard widgets and containers. It is therefore not necessary to compile these files in your project.
- Modifying the standard widgets/containers directly is discouraged
The source code is primarily intended as inspiration and a way to learn about the inner workings of TouchGFX widgets. If you want something to behave differently than the standard implementation, you will in the vast majority of cases be able to achieve this by either subclassing or creating custom containers and this is still the recommended approach. The reason for this recommendation is twofold: first, you will make it more difficult to upgrade TouchGFX version, since you must manually merge any changes you did. Second, you risk breaking any standard widgets or containers that make use of the one you are changing and rely on a specific behavior.
Therefore, if you must modify a standard widget/container, we recommend you take a copy of it, rename it and use that instead.
That being said, you are free to do whatever you judge is right of course. If you add the source code for a standard widget into your project, your linker will choose this version instead of the one in the core library, so you do have access to modifying the standard widgets by adding the source code to your compilation.