Skip to content
Snippets Groups Projects
Select Git revision
  • 5b2d226f77073b87f7027c500465c4ccf65d177f
  • master default
  • cgnsUnstructured
  • partitioning
  • poppler
  • HighOrderBLCurving
  • gmsh_3_0_4
  • gmsh_3_0_3
  • gmsh_3_0_2
  • gmsh_3_0_1
  • gmsh_3_0_0
  • gmsh_2_16_0
  • gmsh_2_15_0
  • gmsh_2_14_1
  • gmsh_2_14_0
  • gmsh_2_13_2
  • gmsh_2_13_1
  • gmsh_2_12_0
  • gmsh_2_11_0
  • gmsh_2_10_1
  • gmsh_2_10_0
  • gmsh_2_9_3
  • gmsh_2_9_2
  • gmsh_2_9_1
  • gmsh_2_9_0
  • gmsh_2_8_6
26 results

Callbacks.cpp

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    Callbacks.cpp 30.31 KiB
    // $Id: Callbacks.cpp,v 1.9 2001-01-10 10:40:23 geuzaine Exp $
    
    #include "Gmsh.h"
    #include "GmshUI.h"
    #include "Geo.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>
    
    extern GUI       *WID;
    extern Mesh       M;
    extern Context_T  CTX;
    
    // Compatibility 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 ;
      }
    }
    
    void CancelMeshThread(void){
      
    }
    
    // Common callbacks 
    
    void cancel_cb(CALLBACK_ARGS){
      if(data) ((Fl_Window*)data)->hide();