Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/utils/gui/images/GUITextureSubSys.h
169684 views
1
/****************************************************************************/
2
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4
// This program and the accompanying materials are made available under the
5
// terms of the Eclipse Public License 2.0 which is available at
6
// https://www.eclipse.org/legal/epl-2.0/
7
// This Source Code may also be made available under the following Secondary
8
// Licenses when the conditions for such availability set forth in the Eclipse
9
// Public License 2.0 are satisfied: GNU General Public License, version 2
10
// or later which is available at
11
// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13
/****************************************************************************/
14
/// @file GUITextureSubSys.h
15
/// @author Pablo Alvarez Lopez
16
/// @date Jul 2016
17
///
18
// A class to manage gifs of SUMO
19
/****************************************************************************/
20
#pragma once
21
#include <config.h>
22
23
#include <utils/foxtools/fxheader.h>
24
#include <utils/xml/SUMOXMLDefinitions.h>
25
26
#include "GUITextures.h"
27
#include "GUITexturesHelper.h"
28
29
// ===========================================================================
30
// class definitions
31
// ===========================================================================
32
33
class GUITextureSubSys {
34
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 returns texture associated to the given POI image
47
static GUIGlID getPOITexture(POIIcon POIIcon);
48
49
/**@brief Reset textures
50
* @note Necessary to avoid problems with textures (ej: white empty)
51
*/
52
static void resetTextures();
53
54
/// @brief close GUITextureSubSys
55
static void close();
56
57
private:
58
/// @brief constructor private because is called by the static function init(FXApp* a
59
GUITextureSubSys(FXApp* app);
60
61
/// @brief destructor
62
~GUITextureSubSys();
63
64
/// @pointer to Fox App
65
FXApp* myApp;
66
67
/// @brief instance of GUITextureSubSys
68
static GUITextureSubSys* myInstance;
69
70
/// @brief vector with the Gifs
71
std::map<GUITexture, GUIGlID> myTextures;
72
73
/// @brief map with textures
74
std::map<POIIcon, GUIGlID> myPOITextures;
75
};
76
77