2018-12-05 07:38:58 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017 Statoil ASA
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2019-05-06 03:36:05 -05:00
|
|
|
#include "cafFixedAtlasFont.h"
|
2019-02-04 07:23:16 -06:00
|
|
|
#include "cvfBase.h"
|
|
|
|
#include "cvfObject.h"
|
2018-12-05 07:38:58 -06:00
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
2019-02-04 07:23:16 -06:00
|
|
|
namespace caf
|
|
|
|
{
|
|
|
|
template<typename T> class AppEnum;
|
|
|
|
}
|
|
|
|
|
2018-12-05 07:38:58 -06:00
|
|
|
class RimSummaryCaseCollection;
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
|
|
|
class RiaFontCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum FontSize
|
|
|
|
{
|
|
|
|
FONT_SIZE_8,
|
|
|
|
FONT_SIZE_10,
|
|
|
|
FONT_SIZE_12,
|
|
|
|
FONT_SIZE_14,
|
|
|
|
FONT_SIZE_16,
|
|
|
|
FONT_SIZE_24,
|
2019-05-13 06:47:03 -05:00
|
|
|
FONT_SIZE_32,
|
|
|
|
MAX_FONT_SIZE = FONT_SIZE_32
|
2018-12-05 07:38:58 -06:00
|
|
|
};
|
|
|
|
|
2019-02-04 07:23:16 -06:00
|
|
|
typedef caf::AppEnum<FontSize> FontSizeType;
|
|
|
|
|
2019-04-10 05:49:20 -05:00
|
|
|
static cvf::ref<caf::FixedAtlasFont> getFont(FontSize fontSize);
|
2019-04-10 09:13:40 -05:00
|
|
|
static int pointSizeFromFontSizeEnum(FontSize fontSize);
|
|
|
|
static FontSize fontSizeEnumFromPointSize(int pointSize);
|
2018-12-05 07:38:58 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
static std::map<FontSize, cvf::ref<caf::FixedAtlasFont>> ms_fonts;
|
|
|
|
};
|