Extending the Functionality of Ichigo
There are three main ways to extend the functionality of Ichigo:
Plugins ("high-level" files)
Headers ("mid-level" files)
Libraries ("low-level" files)
Plugins are files that are placed in /src/plugins and are automatically loaded. They are meant to be quick and lightweight while providing functions that eliminate repetitive code.
Headers are files that are placed in /include and are NOT automatically loaded. You must include them in a file using include "filename". They contain class implementations that can be used to instantiate objects.
Libraries are files that are placed in /lib and are automatically loaded. They are not protected by the Ichigo namespace. Instead, libraries extend the Ichigo namespace with functions meant to contain backend definitions and provide more functionality to the base Ichigo template.
The easiest way to look at it is:
If you need quick blocks of code you will call within a source file, use a plugin.
If you need a class to instantiate an object, use a header.
If you need robust functions that other files rely on, use a library.
In the following pages, we'll learn to write each of these files to provide more functionality to the template.
Last updated
Was this helpful?