Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

utils.hpp

Go to the documentation of this file.
00001 /* 00002 * wxChecksums 00003 * Copyright (C) 2003-2004 Julien Couot 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 */ 00019 00020 /** 00021 * \file utils.hpp 00022 * Various utility functions. 00023 */ 00024 00025 00026 #ifndef INC_UTILS_HPP 00027 #define INC_UTILS_HPP 00028 00029 //--------------------------------------------------------------------------- 00030 // For compilers that support precompilation, includes "wx.h". 00031 #include <wx/wxprec.h> 00032 00033 #ifdef __BORLANDC__ 00034 #pragma hdrstop 00035 #endif 00036 00037 #ifndef WX_PRECOMP 00038 // Include your minimal set of headers here, or wx.h 00039 #include <wx/wx.h> 00040 #endif 00041 #include <wx/filename.h> 00042 00043 #include "bytedisp.hpp" 00044 //--------------------------------------------------------------------------- 00045 00046 00047 // Compares two file names. 00048 int compareFileName(const wxString& fn1, const wxString& fn2); 00049 //--------------------------------------------------------------------------- 00050 00051 00052 // Find all the files in the subdirectories from a list of files and directories 00053 bool getFilesInSubdirectories(const wxArrayString& lFiles, wxArrayString& res, 00054 BytesDisplayer& filesSize, 00055 const wxString& matchPattern = wxEmptyString, 00056 unsigned int maxDepth = 0); 00057 //--------------------------------------------------------------------------- 00058 00059 00060 // Gets the application's name 00061 wxString getAppName(bool addVersion = true); 00062 //--------------------------------------------------------------------------- 00063 00064 00065 // Convert a wxColour value to a long value. 00066 long wxColourToLong(const wxColour& value); 00067 00068 // Convert a long value to a wxColour value. 00069 wxColour longTowxColour(long value); 00070 //--------------------------------------------------------------------------- 00071 00072 00073 // Convert the specified character to the lower case. 00074 void ToLower(wxString& s, size_t idx); 00075 00076 // Convert the specified character to the upper case. 00077 void ToUpper(wxString& s, size_t idx); 00078 00079 // Get the given token with all the possible cases. Result is added to tk. 00080 void GetAllTokenCases(wxString token, wxArrayString& tk, size_t p = 0); 00081 //--------------------------------------------------------------------------- 00082 00083 00084 #endif // INC_UTILS_HPP

Generated on Sun May 30 13:37:45 2004 for wxChecksums by doxygen 1.3.7