Skip to content
Snippets Groups Projects
Select Git revision
  • 4608e03c213fb6d19fb9561dfe47d7261c20e872
  • master default protected
  • overlaps_tags_and_distributed_export
  • patches-4.14
  • steplayer
  • bl
  • pluginMeshQuality
  • fixBugsAmaury
  • hierarchical-basis
  • alphashapes
  • relaying
  • new_export_boris
  • oras_vs_osm
  • reassign_partitions
  • distributed_fwi
  • rename-classes
  • fix/fortran-api-example-t4
  • robust_partitions
  • reducing_files
  • fix_overlaps
  • 3115-issue-fix
  • 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

t8.geo

Blame
  • onelabGroup.h 2.73 KiB
    // Gmsh - Copyright (C) 1997-2019 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
    
    #ifndef ONELAB_GROUP_H
    #define ONELAB_GROUP_H
    
    #include <vector>
    #include <FL/Fl.H>
    #include <FL/Fl_Tree.H>
    #include <FL/Fl_Button.H>
    #include <FL/Fl_Menu_Button.H>
    #include <FL/Fl_Input.H>
    #include "onelab.h"
    
    class viewButton;
    
    class onelabGroup : public Fl_Group {
    private:
      Fl_Tree *_tree;
      Fl_Button *_butt[2];
      Fl_Menu_Button *_gear;
      int _gearOptionsStart, _gearOptionsEnd;
      std::vector<Fl_Widget *> _treeWidgets;
      std::vector<char *> _treeStrings;
      bool _stop;
      double _baseWidth, _indent;
      int _minWindowWidth, _minWindowHeight;
      double _widgetLabelRatio;
      std::set<std::string> _manuallyClosed;
      bool _enableTreeWidgetResize;
      void _computeWidths();
      template <class T> void _addParameter(T &p);
      Fl_Widget *_addParameterWidget(onelab::number &p, int ww, int hh,
                                     Fl_Tree_Item *n, bool highlight, Fl_Color c);
      Fl_Widget *_addParameterWidget(onelab::string &p, int ww, int hh,
                                     Fl_Tree_Item *n, bool highlight, Fl_Color c);
      void _addMenu(const std::string &path, Fl_Callback *callback, void *data);
      void _addSolverMenu(int num);
      void _addViewMenu(int num);
      std::set<std::string> _getClosedGmshMenus();
      void _addGmshMenus();
    
    public:
      onelabGroup(int x, int y, int w, int h, const char *l = 0);
      void updateGearMenu();
      void rebuildSolverList();
      void rebuildTree(bool deleteWidgets);
      void enableTreeWidgetResize(bool value) { _enableTreeWidgetResize = value; }
      void redrawTree() { _tree->redraw(); }
      void openTreeItem(const std::string &name);
      void setButtonVisibility();
      void setButtonMode(const std::string &butt0, const std::string &butt1);
      bool isBusy();
      int getMinWindowWidth() { return _minWindowWidth; }
      int getMinWindowHeight() { return _minWindowHeight; }
      std::string getPath(Fl_Tree_Item *item);
      void insertInManuallyClosed(const std::string &path)
      {
        _manuallyClosed.insert(path);
      }
      void removeFromManuallyClosed(const std::string &path)
      {
        _manuallyClosed.erase(path);
      }
      bool isManuallyClosed(const std::string &path)
      {
        return _manuallyClosed.find(path) != _manuallyClosed.end();
      }
      viewButton *getViewButton(int num);
      void openCloseViewButton(int num);
      void addSolver(const std::string &name, const std::string &exe,
                     const std::string &hostName, int index);
      void removeSolver(const std::string &name);
      void checkForErrors(const std::string &client);
      bool stop() { return _stop; }
      void stop(bool val) { _stop = val; }
    };
    
    void solver_cb(Fl_Widget *w, void *data);
    void onelab_cb(Fl_Widget *w, void *data);
    
    #endif