[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
10.3 Option handling
To add a new option in Gmsh:
-
create the option in the
Context_T
class (‘Common/Context.h’) if it's a classical option, or in thePViewOptions
class (‘Post/PViewOptions.h’) if it's a post-processing view-dependent option; -
in ‘Common/DefaultOptions.h’, give a name (for the parser to be able to
access it), a reference to a handling routine (i.e.
opt_XXX
) and a default value for this option; -
create the handling routine
opt_XXX
in ‘Common/Options.cpp’ (and add the prototype in ‘Common/Options.h’); - optional: create the associated widget in ‘Fltk/GUI.cpp’;
-
optional: if no special callback is to be associated with the widget, add the
handling routine
opt_XXX
to the OK callback for the corresponding option panel (in ‘Fltk/Callbacks.cpp’).