1 /****************************************************************************/ 2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo 3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. 4 // This program and the accompanying materials 5 // are made available under the terms of the Eclipse Public License v2.0 6 // which accompanies this distribution, and is available at 7 // http://www.eclipse.org/legal/epl-v20.html 8 // SPDX-License-Identifier: EPL-2.0 9 /****************************************************************************/ 10 /// @file GUITextureSubSys.h 11 /// @author Pablo Alvarez Lopez 12 /// @date Jul 2016 13 /// @version $Id$ 14 /// 15 // A class to manage gifs of SUMO 16 /****************************************************************************/ 17 #ifndef GUITextureSubSys_h 18 #define GUITextureSubSys_h 19 20 21 // =========================================================================== 22 // included modules 23 // =========================================================================== 24 #include <config.h> 25 26 #include <fx.h> 27 #include "GUITextures.h" 28 #include "GUITexturesHelper.h" 29 30 // =========================================================================== 31 // class definitions 32 // =========================================================================== 33 34 class GUITextureSubSys { 35 public: 36 /**@brief Initiate GUITextureSubSys for textures 37 * @param[in] a FOX Toolkit APP 38 */ 39 static void initTextures(FXApp* a); 40 41 /**@brief returns a texture previously defined in the enum GUITexture 42 * @param[in] GUITexture code of texture to use 43 */ 44 static GUIGlID getTexture(GUITexture which); 45 46 /**@brief Reset textures 47 * @note Necessary to avoid problems with textures (ej: white empty) 48 */ 49 static void resetTextures(); 50 51 /// @brief close GUITextureSubSys 52 static void close(); 53 54 private: 55 /// @brief constructor private because is called by the static function init(FXApp* a 56 GUITextureSubSys(FXApp* a); 57 58 /// @brief destructor 59 ~GUITextureSubSys(); 60 61 /// @pointer to Fox App 62 FXApp* myApp; 63 64 /// @brief instance of GUITextureSubSys 65 static GUITextureSubSys* myInstance; 66 67 /// @brief vector with the Gifs 68 std::map<GUITexture, GUIGlID> myTextures; 69 }; 70 71 72 #endif 73 74 /****************************************************************************/ 75 76