→GUI Options: just list them all
gramplet = 'init',
=== Explanation ===
The main work of a Gramplet is performed in a function, or a class. In this very simple example, a function
'''init ''' is defined that takes a single argument, gui. The function simply sets the gui's text area to be "Hello World!", and that's it. It does this just once, and never changes.
Before a plugin can be used, it needs to be "registered". You call the register function with a number of named-arguments. There are a number of named-arguments that you can provide, including: name, height, content, title, expand, state, and data. We will explore those in detail, below.
If you wanted to put an arbitrary gtk object into the main area of a Gramplet, then you need to replace the standard textview object with your own. Here is the basic structure:
# File: Widget.py
===Cairo Clock Example===
Here is an example adding a Cairo Clock (which really keeps time)
* With GTK+3 & Gramps 5.1: [https://github.com/gramps-project/addons/blob/master/gramps51/download/ClockGramplet.addon.tgz?raw=true ClockGramplet.addon.tgz]
** OPTION is one of the menu options:
see src/gen/plug/menu/ for others