Skip to content
Snippets Groups Projects
Select Git revision
  • 7e40b8141787ab0fb7252cb070a3956a623c2442
  • master default protected
  • hierarchical-basis-refactor
  • hierarchical-basis
  • revert-ef4a3a4f
  • patch_releases_4_14
  • overlaps_tags_and_distributed_export
  • overlaps_tags_and_distributed_export_rebased
  • relaying
  • alphashapes
  • steplayer
  • bl
  • pluginMeshQuality
  • fixBugsAmaury
  • new_export_boris
  • oras_vs_osm
  • reassign_partitions
  • distributed_fwi
  • rename-classes
  • fix/fortran-api-example-t4
  • robust_partitions
  • gmsh_4_14_0
  • gmsh_4_13_1
  • gmsh_4_13_0
  • gmsh_4_12_2
  • gmsh_4_12_1
  • gmsh_4_12_0
  • gmsh_4_11_1
  • gmsh_4_11_0
  • gmsh_4_10_5
  • gmsh_4_10_4
  • gmsh_4_10_3
  • gmsh_4_10_2
  • gmsh_4_10_1
  • gmsh_4_10_0
  • gmsh_4_9_5
  • gmsh_4_9_4
  • gmsh_4_9_3
  • gmsh_4_9_2
  • gmsh_4_9_1
  • gmsh_4_9_0
41 results

Annotate.h

Blame
  • Annotate.h 1.45 KiB
    // Gmsh - Copyright (C) 1997-2016 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // bugs and problems to the public mailing list <gmsh@onelab.info>.
    
    #ifndef _ANNOTATE_H_
    #define _ANNOTATE_H_
    
    #include <string>
    #include "Plugin.h"
    
    extern "C"
    {
      GMSH_Plugin *GMSH_RegisterAnnotatePlugin();
    }
    
    class GMSH_AnnotatePlugin : public GMSH_PostPlugin
    {
     private:
      static double callback(int num, int action, double value, double *opt,
                             double step, double min, double max);
      static std::string callbackStr(int num, int action, std::string value,
                                     std::string &opt);
     public:
      GMSH_AnnotatePlugin(){}
      std::string getName() const { return "Annotate"; }
      std::string getShortHelp() const { return "Add a text annotation"; }
      std::string getHelp() const;
      int getNbOptions() const;
      StringXNumber *getOption(int iopt);  
      int getNbOptionsStr() const;
      StringXString *getOptionStr(int iopt);  
      PView *execute(PView *);
    
      static double callbackX(int, int, double);
      static double callbackY(int, int, double);
      static double callbackZ(int, int, double);
      static double callback3D(int, int, double);
      static double callbackFontSize(int, int, double);
      static std::string callbackText(int, int, std::string);
      static std::string callbackFont(int, int, std::string);
      static std::string callbackAlign(int, int, std::string);
      static void draw(void *context);
    };
    
    #endif