• Main Page
  • Classes
  • Files
  • Directories
  • File List
  • File Members

vtkKWFileBrowserUtilities.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Module:    $RCSfile: vtkKWFileBrowserUtilities.h,v $
00004 
00005   Copyright (c) Kitware, Inc.
00006   All rights reserved.
00007   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE.  See the above copyright notice for more information.
00012 
00013 =========================================================================*/
00014 // .NAME vtkKWFileBrowserUtilities - some constants
00015 // This work is part of the National Alliance for Medical Image
00016 // Computing (NAMIC), funded by the National Institutes of Health
00017 // through the NIH Roadmap for Medical Research, Grant U54 EB005149.
00018 // Information on the National Centers for Biomedical Computing
00019 // can be obtained from http://nihroadmap.nih.gov/bioinformatics.
00020 
00021 #ifndef __vtkKWFileBrowserUtilities_h
00022 #define __vtkKWFileBrowserUtilities_h
00023 
00024 #include <vtksys/SystemTools.hxx>
00025 #include <vtksys/stl/string>
00026 
00027 #ifdef _WIN32
00028 #define KWFileBrowser_PATH_SEPARATOR "\\"
00029 #else
00030 #define KWFileBrowser_PATH_SEPARATOR "/"
00031 #endif
00032     
00033 #define KWFileBrowser_UNIX_ROOT_DIRECTORY "/"
00034 #define KWFileBrowser_ESCAPE_CHARS "{}[]$\"\\"
00035 #define VTK_KW_FAVORITE_TOPLEVEL "KWFileBrowserFavorites"
00036 
00037 static char* KWFileBrowser_GetUnixPath(const char* path)                                    
00038 {
00039   if(path && *path)
00040     {
00041     vtksys_stl::string sBuffer = path;
00042     vtksys::SystemTools::ConvertToUnixSlashes(sBuffer);
00043     static char buffer[512];
00044     strcpy(buffer, sBuffer.c_str());
00045     return buffer;
00046     }
00047   return NULL;
00048 };
00049 
00050 #endif

Generated on Sat Dec 11 2010 02:07:57 for KWWidgets by  doxygen 1.7.2