MeshLib C++ Docs
Loading...
Searching...
No Matches
MRRibbonFontHolder.h
Go to the documentation of this file.
1#pragma once
2#include "exports.h"
3#include "MRRibbonFontManager.h"
4
5namespace MR
6{
9
10
12class MRVIEWER_CLASS RibbonFontHolder
13{
14public:
17 MRVIEWER_API RibbonFontHolder( const RibbonFontManager::FontType& fontType );
18 MRVIEWER_API RibbonFontHolder( const RibbonFontManager::FontType& fontType, float scale );
19 MRVIEWER_API RibbonFontHolder( const RibbonFontManager::FontType& fontType, float scale, bool pushOnCreate );
20 MRVIEWER_API ~RibbonFontHolder();
21
23 MRVIEWER_API void pushFont();
24
26 MRVIEWER_API void popFont();
27
29 bool isPushed() { return pushed_; }
30private:
31 bool pushed_ = false;
32 ImFont* font_ = nullptr;
33 float size_ = 13.f;
34};
35}
class for convenient use of ImGui::PushFont / ImGui::PopFont with ribbon fonts
Definition MRRibbonFontHolder.h:13
MRVIEWER_API ~RibbonFontHolder()
MRVIEWER_API RibbonFontHolder(const RibbonFontManager::FontType &fontType, float scale, bool pushOnCreate)
FontType
Font types used in current design.
Definition MRRibbonFontManager.h:20
MRVIEWER_API void popFont()
check the font for existence and pop it
MRVIEWER_API void pushFont()
check the font for existence and push it
bool isPushed()
font is pushed
Definition MRRibbonFontHolder.h:29
MRVIEWER_API RibbonFontHolder(const RibbonFontManager::FontType &fontType)
MRVIEWER_API RibbonFontHolder(const RibbonFontManager::FontType &fontType, float scale)
only for bindings generation
Definition MRCameraOrientationPlugin.h:8