[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
C.4 Adding a new option
To add a new option in Gmsh:
-
create the option in the
CTX
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/optionWindow.cpp’;