But back to C++, you create a Graphics function (check how other elements such as ACID do this), then return a large list of arguments (documented in that wiki link) and flags. This will control the rendering. Set cache to 0 if your element may vary from the default based on particle properties.