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