MeshLib Documentation
Loading...
Searching...
No Matches
MR::RibbonFontManager Class Reference

#include <MRRibbonFontManager.h>

Public Types

enum class  FontType {
  Default , Small , SemiBold , Icons ,
  Big , BigSemiBold , Headline , Monospace ,
  Count
}
 
enum class  FontFile {
  Regular , SemiBold , Monospace , Icons ,
  Count
}
 
using FontFilePaths = std::array<std::filesystem::path, size_t( FontFile::Count )>
 

Public Member Functions

MRVIEWER_API RibbonFontManager ()
 
MRVIEWER_API void loadAllFonts (ImWchar *charRanges, float scaling)
 load all fonts using in ribbon menu
 
MRVIEWER_API ImFont * getFontByType (FontType type) const
 get font by font type
 
MRVIEWER_API std::filesystem::path getMenuFontPath () const
 get ribbon menu font path
 
const FontFilePathsgetAllFontPaths () const
 returns list of all font paths
 
MRVIEWER_API void setNewFontPaths (const FontFilePaths &paths)
 

Static Public Member Functions

static MRVIEWER_API float getFontSizeByType (FontType type)
 get font size by font type
 
static MRVIEWER_API ImFont * getFontByTypeStatic (FontType type)
 
static MRVIEWER_API void initFontManagerInstance (RibbonFontManager *ribbonFontManager)
 

Member Typedef Documentation

◆ FontFilePaths

using MR::RibbonFontManager::FontFilePaths = std::array<std::filesystem::path, size_t( FontFile::Count )>

Member Enumeration Documentation

◆ FontFile

Enumerator
Regular 
SemiBold 
Monospace 
Icons 
Count 

◆ FontType

Enumerator
Default 
Small 
SemiBold 
Icons 
Big 
BigSemiBold 
Headline 
Monospace 
Count 

Constructor & Destructor Documentation

◆ RibbonFontManager()

MRVIEWER_API MR::RibbonFontManager::RibbonFontManager ( )

Member Function Documentation

◆ getAllFontPaths()

const FontFilePaths & MR::RibbonFontManager::getAllFontPaths ( ) const
inline

returns list of all font paths

◆ getFontByType()

MRVIEWER_API ImFont * MR::RibbonFontManager::getFontByType ( FontType type) const

get font by font type

◆ getFontByTypeStatic()

static MRVIEWER_API ImFont * MR::RibbonFontManager::getFontByTypeStatic ( FontType type)
static

get font by font type (need to avoid dynamic cast menu to ribbon menu)

◆ getFontSizeByType()

static MRVIEWER_API float MR::RibbonFontManager::getFontSizeByType ( FontType type)
static

get font size by font type

◆ getMenuFontPath()

MRVIEWER_API std::filesystem::path MR::RibbonFontManager::getMenuFontPath ( ) const

get ribbon menu font path

◆ initFontManagerInstance()

static MRVIEWER_API void MR::RibbonFontManager::initFontManagerInstance ( RibbonFontManager * ribbonFontManager)
static

initialize static holder for easier access to ribbon fonts (need to avoid dynamic cast menu to ribbon menu)

◆ loadAllFonts()

MRVIEWER_API void MR::RibbonFontManager::loadAllFonts ( ImWchar * charRanges,
float scaling )

load all fonts using in ribbon menu

◆ setNewFontPaths()

MRVIEWER_API void MR::RibbonFontManager::setNewFontPaths ( const FontFilePaths & paths)

sets new fonts paths note that it will trigger reload font


The documentation for this class was generated from the following file: