MeshLib C++ Docs
Loading...
Searching...
No Matches
MRRibbonLayoutConfig.h
Go to the documentation of this file.
1#pragma once
2#include "MRRibbonMenu.h"
3#include "MRPch/MRJson.h"
4
5namespace MR
6{
7
9{
10 std::optional<RibbonMenuUIConfig> menuUIConfig;
11 std::optional<Color> monochromeRibbonIcons; // if present all ribbon items will be drawn with this monochrome color (if available)
12 std::optional<Json::Value> colorTheme; // if present will be applied
13 std::optional<Json::Value> ribbonStructure; // analogue for ui.json file, if present will replace current layout
14 std::optional<Json::Value> ribbonItemsOverrides; // analogue for items.json file, if present will override icon, caption, tooltip, droplist and helplink
15};
16
17// parse given json and setup `RibbonConfig` from it
18MRVIEWER_API RibbonConfig createRibbonConfigFromJson( const Json::Value& root );
19
20// apply given config to the application
21MRVIEWER_API void applyRibbonConfig( const RibbonConfig& config );
22
23}
MRVIEWER_API void applyRibbonConfig(const RibbonConfig &config)
MRVIEWER_API RibbonConfig createRibbonConfigFromJson(const Json::Value &root)
Definition MRRibbonLayoutConfig.h:9
std::optional< RibbonMenuUIConfig > menuUIConfig
Definition MRRibbonLayoutConfig.h:10
std::optional< Json::Value > colorTheme
Definition MRRibbonLayoutConfig.h:12
std::optional< Color > monochromeRibbonIcons
Definition MRRibbonLayoutConfig.h:11
std::optional< Json::Value > ribbonItemsOverrides
Definition MRRibbonLayoutConfig.h:14
std::optional< Json::Value > ribbonStructure
Definition MRRibbonLayoutConfig.h:13