ufe 5.5
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
uiInfoHandler.h
Go to the documentation of this file.
1#line 1 "S:/jenkins/workspace/ECP/ufe/ufe-full-python3.11-windows/ufe/include/uiInfoHandler.h"
2#ifndef _uiInfoHandler
3#define _uiInfoHandler
4
5// ===========================================================================
6// Copyright 2020 Autodesk, Inc. All rights reserved.
7//
8// Use of this software is subject to the terms of the Autodesk license
9// agreement provided at the time of installation or download, or which
10// otherwise accompanies this software in either electronic or hard copy form.
11// ===========================================================================
12
13#include "common/ufeExport.h"
14
15#include "sceneItem.h"
16#include "types.h"
17
18#include <string>
19
21
23
29
30 CellInfo() = default;
32 const std::string& argFontName,
33 double argFontPointSize,
34 bool argFontBold,
35 bool argFontItalics,
36 bool argFontStrikeout,
37 const Color3f& argTextFgColor,
38 const Color3f& argTextBgColor
39 );
40 CellInfo(const CellInfo&) = default;
41
44
46 double fontPointSize{-1.0};
47
49 bool fontBold{false};
50
52 bool fontItalics{false};
53
55 bool fontStrikeout{false};
56
59
62};
63
70{
71public:
72 typedef std::shared_ptr<UIInfoHandler> Ptr;
73
74 enum Quadrant {None, UpperLeft, UpperRight, LowerLeft, LowerRight};
75
76 enum Mode
77 {
81 Selected
82 };
83
84 struct Icon {
85 Icon() {}
86 Icon(const std::string& baseIconArg)
87 : baseIcon(baseIconArg) {}
88 Icon(const std::string& baseIconArg, Mode modeArg)
89 : baseIcon(baseIconArg), mode(modeArg) {}
90 Icon(const std::string& baseIconArg, const std::string& badgeIconArg, Quadrant posArg)
91 : baseIcon(baseIconArg), badgeIcon(badgeIconArg), pos(posArg) {}
92
95 Quadrant pos{None};
96 Mode mode{Normal};
97 };
98
103
105 UIInfoHandler() = default;
107 UIInfoHandler(const UIInfoHandler&) = default;
109 virtual ~UIInfoHandler() = default;
110
118 virtual bool treeViewCellInfo(const SceneItem::Ptr& item, CellInfo& info) const = 0;
119
126 virtual Icon treeViewIcon(const SceneItem::Ptr& item) const;
127
133 virtual std::string treeViewTooltip(const SceneItem::Ptr& item) const;
134
137 virtual std::string getLongRunTimeLabel() const = 0;
138};
139
140}
141
142#endif // _uiInfoHandler
std::shared_ptr< SceneItem > Ptr
Definition: sceneItem.h:44
UIInfoHandler()=default
Constructor.
virtual Icon treeViewIcon(const SceneItem::Ptr &item) const
virtual std::string getLongRunTimeLabel() const =0
UIInfoHandler(const UIInfoHandler &)=default
Default copy constructor.
virtual bool treeViewCellInfo(const SceneItem::Ptr &item, CellInfo &info) const =0
virtual std::string treeViewTooltip(const SceneItem::Ptr &item) const
std::shared_ptr< UIInfoHandler > Ptr
Definition: uiInfoHandler.h:72
virtual ~UIInfoHandler()=default
Destructor.
static Ptr uiInfoHandler(Rtid rt)
std::string string(const Path &path)
uint32_t Rtid
Definition: rtid.h:26
Structure for information to draw a text cell.
Definition: uiInfoHandler.h:28
CellInfo()=default
Color3f textFgColor
Text foreground color.
Definition: uiInfoHandler.h:58
Color3f textBgColor
Text background color.
Definition: uiInfoHandler.h:61
std::string fontName
Font family name.
Definition: uiInfoHandler.h:43
CellInfo(const CellInfo &)=default
CellInfo(const std::string &argFontName, double argFontPointSize, bool argFontBold, bool argFontItalics, bool argFontStrikeout, const Color3f &argTextFgColor, const Color3f &argTextBgColor)
Icon(const std::string &baseIconArg)
Definition: uiInfoHandler.h:86
Icon(const std::string &baseIconArg, Mode modeArg)
Definition: uiInfoHandler.h:88
Icon(const std::string &baseIconArg, const std::string &badgeIconArg, Quadrant posArg)
Definition: uiInfoHandler.h:90
#define UFE_NS_DEF
Definition: ufe.h:35
Definition of macros for symbol visibility.
#define UFE_SDK_DECL
Definition: ufeExport.h:36