ufe  3.2
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.9-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 
20 UFE_NS_DEF {
21 
23 
29 
30  CellInfo() = default;
31  CellInfo(
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 {
71 public:
72  typedef std::shared_ptr<UIInfoHandler> Ptr;
73 
74  enum Quadrant {None, UpperLeft, UpperRight, LowerLeft, LowerRight};
75 
76  struct Icon {
77  Icon() {}
78  Icon(const std::string& baseIconArg)
79  : baseIcon(baseIconArg) {}
80  Icon(const std::string& baseIconArg, const std::string& badgeIconArg, Quadrant posArg)
81  : baseIcon(baseIconArg), badgeIcon(badgeIconArg), pos(posArg) {}
82 
83  std::string baseIcon; std::string badgeIcon; Quadrant pos{None};
84  };
85 
89  static Ptr uiInfoHandler(Rtid rt);
90 
92  UIInfoHandler() = default;
94  UIInfoHandler(const UIInfoHandler&) = default;
96  virtual ~UIInfoHandler() = default;
97 
105  virtual bool treeViewCellInfo(const SceneItem::Ptr& item, CellInfo& info) const = 0;
106 
113  virtual Icon treeViewIcon(const SceneItem::Ptr& item) const;
114 
120  virtual std::string treeViewTooltip(const SceneItem::Ptr& item) const;
121 
124  virtual std::string getLongRunTimeLabel() const = 0;
125 };
126 
127 }
128 
129 #endif // _uiInfoHandler
std::shared_ptr< UIInfoHandler > Ptr
Definition: uiInfoHandler.h:72
std::string string(const Path &path)
Definition of macros for symbol visibility.
std::shared_ptr< ObservableSelection > Ptr
Color3f textBgColor
Text background color.
Definition: uiInfoHandler.h:61
uint32_t Rtid
Definition: rtid.h:26
#define UFE_NS_DEF
Definition: ufe.h:35
Structure for information to draw a text cell.
Definition: uiInfoHandler.h:28
Icon(const std::string &baseIconArg, const std::string &badgeIconArg, Quadrant posArg)
Definition: uiInfoHandler.h:80
std::string fontName
Font family name.
Definition: uiInfoHandler.h:43
std::shared_ptr< SceneItem > Ptr
Definition: sceneItem.h:40
Color3f textFgColor
Text foreground color.
Definition: uiInfoHandler.h:58
Icon(const std::string &baseIconArg)
Definition: uiInfoHandler.h:78
#define UFE_SDK_DECL
Definition: ufeExport.h:36