Skip to content
Snippets Groups Projects
Select Git revision
  • e4c8f816819076455bd2c854fca272550b3e6e04
  • master default protected
  • dof-renumbering
  • test-dof-hash
  • gdemesy-master-patch-30528
  • eval-space-time
  • oscillating_multiharm
  • MH_movement
  • axisqu
  • write_vtu_and_ensight_formats
  • movingband
  • CP_1972_add_vtu_file_writing
  • mortar
  • fast_freq_sweep_Resolution
  • applyresolvent_again
  • marteaua-master-patch-54323
  • patch-1
  • binde-master-patch-08072
  • binde-master-patch-52461
  • BCGSL
  • resolvent
  • getdp_3_5_0
  • getdp_3_4_0
  • getdp_3_3_0
  • getdp_3_2_0
  • getdp_3_1_0
  • getdp_3_0_4
  • getdp_3_0_3
  • getdp_3_0_2
  • getdp_3_0_1
  • getdp_3_0_0
  • onelab_mobile_2.1.0
  • getdp_2_11_3 protected
  • getdp_2_11_2 protected
  • getdp_2_11_1 protected
  • getdp_2_11_0 protected
  • getdp_2_10_0 protected
  • getdp_2_9_2 protected
  • getdp_2_9_1 protected
  • getdp_2_9_0 protected
  • getdp_2_8_0 protected
41 results

Get_Geometry.h

Blame
  • GUI_Extras.cpp 15.81 KiB
    // $Id: GUI_Extras.cpp,v 1.14 2006-01-06 00:34:23 geuzaine Exp $
    //
    // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
    //
    // This program is free software; you can redistribute it and/or modify
    // it under the terms of the GNU General Public License as published by
    // the Free Software Foundation; either version 2 of the License, or
    // (at your option) any later version.
    //
    // This program is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    // GNU General Public License for more details.
    //
    // You should have received a copy of the GNU General Public License
    // along with this program; if not, write to the Free Software
    // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
    // USA.
    // 
    // Please report all bugs and problems to <gmsh@geuz.org>.
    
    #include "Gmsh.h"
    #include "GmshUI.h"
    #include "Mesh.h"
    #include "File_Picker.h"
    #include "Shortcut_Window.h"
    #include "CreateFile.h"
    #include "Options.h"
    #include "Context.h"
    #include "Draw.h"
    
    #include <FL/Fl_Button.H>
    #include <FL/Fl_Return_Button.H>
    #include <FL/Fl_Value_Slider.H>
    #include <FL/Fl_Menu_Window.H>
    #include <errno.h>
    
    extern Context_T CTX;
    
    // File chooser
    
    static File_Picker *fc = NULL;
    
    int file_chooser(int multi, int create, const char *message,
    		 const char *filter, char *fname)
    {
      static char thefilter[1024] = "";
      static int thefilterindex = 0;
    
      Fl_File_Chooser::show_label = "Format:";
      Fl_File_Chooser::all_files_label = "All files (*)";
    
      if(strncmp(thefilter, filter, 1024)) {
        // reset the filter and the selection if the filter has changed
        strncpy(thefilter, filter, 1024);
        thefilterindex = 0;
      }
    
      if(!fc) {
        fc = new File_Picker(getenv("PWD") ? "." : CTX.home_dir, thefilter, 
    			 Fl_File_Chooser::SINGLE, message);
        fc->position(CTX.file_chooser_position[0], CTX.file_chooser_position[1]);
      }
    
      if(multi)
        fc->type(Fl_File_Chooser::MULTI);
      else if(create)
        fc->type(Fl_File_Chooser::CREATE);
      else
        fc->type(Fl_File_Chooser::SINGLE);