Skip to content
Snippets Groups Projects
Select Git revision
  • cdcc53a139cefd47fbf9773224d38e63fab6bc11
  • master default protected
  • clem_dev
  • clem_dev_corrected
  • kokkos
  • devel
  • bcast_debug
  • MC/high_order_geometry
  • MC/mpi_nonblocking
  • MC/multigpu
  • MC/lifting_oneshot
  • MC/physent
  • curls_marco
  • MC/gefpg_lua_binding
  • emdant/dg-cherry-pick-8f1f09f5
  • v0.3.0
  • v0.2.0
  • v0.1.0
18 results

test_differentiation.cpp

Blame
  • Callbacks.cpp 41.95 KiB
    // $Id: Callbacks.cpp,v 1.23 2001-02-02 15:05:03 geuzaine Exp $
    
    #include "Gmsh.h"
    #include "GmshUI.h"
    #include "Geo.h"
    #include "Verif.h"
    #include "Mesh.h"
    #include "Draw.h"
    #include "Views.h"
    #include "Timer.h"
    #include "Visibility.h"
    #include "CreateFile.h"
    #include "OpenFile.h"
    #include "Context.h"
    #include "GUI.h"
    #include "Callbacks.h"
    
    #include <FL/fl_file_chooser.H>
    #include <errno.h>
    
    extern GUI       *WID;
    extern Mesh       M;
    extern Context_T  CTX;
    
    ///////////////////////////////////////////////////////////////////////////////
    
    // Compatibility/local routines
    
    int AddViewInUI(int i, char *Name, int Num){
      if(i > NB_BUTT_MAX -1) return 1;
      if(WID->get_context() == 2)
        WID->set_context(menu_post,0);
      return 0;
    }
    
    void MarkAllViewsChanged(int action){
      int i;
      Post_View *v;
    
      for(i = 0 ; i< List_Nbr(Post_ViewList) ; i++){
        v = (Post_View*)List_Pointer(Post_ViewList, i);
        switch(action){
        case 1: // toggle drawing mode
          if(v->IntervalsType == DRAW_POST_ISO) 
            v->IntervalsType = DRAW_POST_DISCRETE ;
          else if(v->IntervalsType == DRAW_POST_DISCRETE) 
            v->IntervalsType = DRAW_POST_CONTINUOUS ;
          else 
            v->IntervalsType = DRAW_POST_ISO ;
          break;
        case 2: // time step++
          if(v->TimeStep < v->NbTimeStep-1)
            v->TimeStep++ ;
          else
            v->TimeStep = 0 ;
          break;
        case 3: // time step--
          if(v->TimeStep > 0)
            v->TimeStep-- ;
          else
            v->TimeStep = v->NbTimeStep-1 ;
        }
        v->Changed = 1 ;
      }
    }
    
    #ifdef _USETHREADS
    
    #include <pthread.h>