manpagez: man pages & more
info gmsh
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.3 Option handling

To add a new option in Gmsh:

  1. create the option in the Context_T class (‘Common/Context.h’) if it's a classical option, or in the PViewOptions class (‘Post/PViewOptions.h’) if it's a post-processing view-dependent option;
  2. 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;
  3. create the handling routine opt_XXX in ‘Common/Options.cpp’ (and add the prototype in ‘Common/Options.h’);
  4. optional: create the associated widget in ‘Fltk/GUI.cpp’;
  5. 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’).

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.