2018-12-05 14:38:58 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2017 Statoil ASA
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2018-12-05 14:38:58 +01:00
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2018-12-05 14:38:58 +01:00
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2018-12-05 14:38:58 +01:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2019-05-06 10:36:05 +02:00
|
|
|
#include "cafFixedAtlasFont.h"
|
2020-05-09 11:23:58 +02:00
|
|
|
#include "cafFontTools.h"
|
2019-09-05 09:43:17 +02:00
|
|
|
|
2019-02-04 14:23:16 +01:00
|
|
|
#include "cvfObject.h"
|
2018-12-05 14:38:58 +01:00
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
|
2019-02-04 14:23:16 +01:00
|
|
|
namespace caf
|
|
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
template <typename T>
|
|
|
|
|
class AppEnum;
|
2019-02-04 14:23:16 +01:00
|
|
|
}
|
|
|
|
|
|
2018-12-05 14:38:58 +01:00
|
|
|
class RimSummaryCaseCollection;
|
|
|
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2018-12-05 14:38:58 +01:00
|
|
|
//==================================================================================================
|
|
|
|
|
class RiaFontCache
|
|
|
|
|
{
|
|
|
|
|
public:
|
2020-05-09 11:23:58 +02:00
|
|
|
using FontSize = caf::FontTools::FontSize;
|
|
|
|
|
using FontSizeEnum = caf::FontTools::FontSizeEnum;
|
2018-12-05 14:38:58 +01:00
|
|
|
|
2020-06-08 09:09:11 +00:00
|
|
|
static cvf::ref<caf::FixedAtlasFont> getFont( FontSize fontSize );
|
2020-05-09 11:23:58 +02:00
|
|
|
static cvf::ref<caf::FixedAtlasFont> getFont( int pointSize );
|
2020-01-07 12:03:40 +01:00
|
|
|
static FontSize legacyEnumToPointSize( int enumValue );
|
2020-05-09 11:23:58 +02:00
|
|
|
static void clear();
|
2019-11-21 07:10:07 +01:00
|
|
|
|
2018-12-05 14:38:58 +01:00
|
|
|
private:
|
2020-05-09 11:23:58 +02:00
|
|
|
static std::map<caf::FixedAtlasFont::FontSize, cvf::ref<caf::FixedAtlasFont>> ms_fonts;
|
2018-12-05 14:38:58 +01:00
|
|
|
};
|