SUMO - Simulation of Urban MObility
MFXUtils.h
Go to the documentation of this file.
00001 /****************************************************************************/
00007 // Some helper functions for FOX
00008 /****************************************************************************/
00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00010 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
00011 /****************************************************************************/
00012 //
00013 //   This file is part of SUMO.
00014 //   SUMO is free software: you can redistribute it and/or modify
00015 //   it under the terms of the GNU General Public License as published by
00016 //   the Free Software Foundation, either version 3 of the License, or
00017 //   (at your option) any later version.
00018 //
00019 /****************************************************************************/
00020 #ifndef MFXUtils_h
00021 #define MFXUtils_h
00022 
00023 
00024 // ===========================================================================
00025 // included modules
00026 // ===========================================================================
00027 #ifdef _MSC_VER
00028 #include <windows_config.h>
00029 #else
00030 #include <config.h>
00031 #endif
00032 
00033 #include <fx.h>
00034 
00035 // ===========================================================================
00036 // class declaration
00037 // ===========================================================================
00038 class RGBColor;
00039 
00040 // ===========================================================================
00041 // class definitions
00042 // ===========================================================================
00047 class MFXUtils {
00048 public:
00053     static void deleteChildren(FXWindow* w) ;
00054 
00055 
00067     static FXbool userPermitsOverwritingWhenFileExists(
00068         FXWindow* const parent, const FXString& file) ;
00069 
00070 
00081     static FXString getTitleText(const FXString& appname,
00082                                  FXString filename = "") ;
00083 
00084 
00093     static FXString getDocumentName(const FXString& filename) ;
00094 
00095 
00106     static FXString assureExtension(const FXString& filename, const FXString& defaultExtension) ;
00107 
00108 
00126     static FXString getFilename2Write(FXWindow* parent,
00127                                       const FXString& header, const FXString& extension,
00128                                       FXIcon* icon, FXString& currentFolder) ;
00129 
00130 
00132     static RGBColor getRGBColor(FXColor col);
00133 
00135     static FXColor getFXColor(const RGBColor& col);
00136 
00137 };
00138 
00139 
00140 #endif
00141 
00142 /****************************************************************************/
00143 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines