Gorgon Game Engine
Template.h
Go to the documentation of this file.
1 
3 #pragma once
4 
5 #include "../Types.h"
6 #include "../Geometry/Margin.h"
7 #include "../Geometry/Size.h"
8 #include "../Event.h"
9 #include "../Containers/Collection.h"
10 #include "../Graphics/Drawables.h"
11 #include "../Graphics/Animations.h"
12 #include "Dimension.h"
13 
14 //TODO: Add baseline for all components
15 
16 namespace Gorgon {
17  namespace Graphics {
18  class TextRenderer;
19  }
20 
24  namespace UI {
25 
26  // TextPlaceholder
27  // TextPlaceholder should have its own layer (same for others?)
28  // Obtained size, position
29  //
30 
38  None = 0,
39 
41  TopLeft = 1,
46 
54 
61 
68 
73 
78  };
79 
81  inline bool IsLeft(Anchor a) {
82  switch(a) {
83  case Anchor::TopLeft:
84  case Anchor::BottomLeft:
85  case Anchor::MiddleLeft:
88  return true;
89  default:
90  return false;
91  }
92  }
93 
95  inline bool IsRight(Anchor a) {
96  switch(a) {
97  case Anchor::TopRight:
102  return true;
103  default:
104  return false;
105  }
106  }
107 
109  inline bool IsCenter(Anchor a) {
110  switch(a) {
111  case Anchor::TopCenter:
114  return true;
115  default:
116  return false;
117  }
118  }
119 
121  inline bool IsTop(Anchor a) {
122  switch(a) {
123  case Anchor::TopRight:
124  case Anchor::TopLeft:
125  case Anchor::TopCenter:
128  return true;
129  default:
130  return false;
131  }
132  }
133 
135  inline bool IsBottom(Anchor a) {
136  switch(a) {
137  case Anchor::BottomLeft:
138  case Anchor::BottomRight:
142  return true;
143  default:
144  return false;
145  }
146  }
147 
149  inline bool IsMiddle(Anchor a) {
150  switch(a) {
151  case Anchor::MiddleLeft:
152  case Anchor::MiddleRight:
154  return true;
155  default:
156  return false;
157  }
158  }
159 
167  };
168 
177 
180 
181  None = Never,
182 
185 
188 
191 
194 
198 
199 
202 
205 
208 
214 
221 
225 
228 
231 
234 
237 
240 
243 
246 
249 
252 
255 
259 
263 
267 
271 
275 
279 
283 
287 
291 
295 
299 
303 
306 
309 
310 
311 
314 
317 
320 
323 
326 
329 
332 
335 
338 
341 
344 
347 
350 
353 
356 
359 
362 
365 
368  };
369 
371  inline bool IsMouseRelated(ComponentCondition condition) {
372  switch(condition) {
375  return true;
376  default:
377  return false;
378  }
379  }
380 
381 
382  class ComponentTemplate;
383  class PlaceholderTemplate;
384  class TextholderTemplate;
385  class GraphicsTemplate;
386  class ContainerTemplate;
387  class IgnoredTemplate;
388 
392  class Template {
393  public:
394 
396  enum SizeMode {
399 
402 
405  Multiples
406  };
407 
409  }
410 
411  Template(Template &&) = default;
412 
413  Template &operator =(Template &&) = default;
414 
417  components.Destroy();
418  }
419 
423 
427 
431 
435 
439 
443 
447 
451 
455 
459 
461  void Remove(int index) {
462  components.Delete(index);
463  ChangedEvent();
464  }
465 
467  ComponentTemplate &Release(int index);
468 
471  void Assume(ComponentTemplate &component);
472 
474  int GetCount() const {
475  return components.GetCount();
476  }
477 
480  ComponentTemplate &Get(int index) const {
481  return components[index];
482  }
483 
486  ComponentTemplate &operator[](int index) const {
487  return components[index];
488  }
489 
492  xsizing = x;
493  ysizing = y;
494  ChangedEvent();
495  }
496 
499  return xsizing;
500  }
501 
504  return ysizing;
505  }
506 
508  void SetSize(int w, int h) {
509  size = {w, h};
510  ChangedEvent();
511  }
512 
514  void SetSize(Geometry::Size value) {
515  size = value;
516  ChangedEvent();
517  }
518 
521  return size;
522  }
523 
525  int GetWidth() const {
526  return size.Width;
527  }
528 
530  int GetHeight() const {
531  return size.Height;
532  }
533 
536  void SetAdditionalSize(int w, int h) {
537  additional = {w, h};
538  ChangedEvent();
539  }
540 
544  additional = value;
545  ChangedEvent();
546  }
547 
551  return additional;
552  }
553 
557  durations[{from, to}] = duration;
558  ChangedEvent();
559  }
560 
563  if(durations.count({from, to}))
564  return durations.at({from, to});
565  else
566  return 0;
567  }
568 
571  void SetSpacing(int value) {
572  spacing = value;
573  ChangedEvent();
574  }
575 
578  int GetSpacing() const {
579  return spacing;
580  }
581 
582 
585 
586  std::string Name;
587 
588  private:
590  std::vector<Event<ComponentTemplate>::Token> tokens;
591  std::map<std::pair<ComponentCondition, ComponentCondition>, int> durations;
592 
593  SizeMode xsizing = Free, ysizing = Free;
594  Geometry::Size size;
595  Geometry::Size additional = {0, 0};
596  int spacing = 4;
597  };
598 
601  public:
602 
604  virtual ~ComponentTemplate() { }
605 
608 
611 
616 
620 
626  };
627 
629  enum SizingMode {
632 
635 
639 
642  ShrinkOnly
643  };
644 
646  enum DataEffect {
649 
652 
654 
656 
657  //Value texts can automatically be calculated depending on the widget
659 
660  //Value texts can automatically be calculated depending on the widget
662 
663  //Value texts can automatically be calculated depending on the widget
665 
666  //Value texts can automatically be calculated depending on the widget
668 
673 
676 
685  };
686 
692 
698 
702 
706 
710 
714 
721 
726 
730 
735 
740 
745 
746 
752 
755 
758 
761 
764 
765  };
766 
772  enum ValueSource {
773  UseFirst = 1,
778 
785 
786  UseThird = 4,
789 
793 
795  UseGray = 16,
796 
798  UseL = 32,
799 
801  UseH = 64,
802 
804  UseC = 128,
805 
809  UseTransition = 0x10000,
810 
813 
817 
820 
823 
828 
831 
835 
839 
841 
844 
846  };
847 
850  enum Tag {
852 
879  ListTag
880  };
881 
886  enum RepeatMode {
887  NoRepeat = 0,
888 
889  Minor = 1,
890  Major = 2,
891 
892  XGrid = 4,
893  YGrid = 8,
894 
895  XTick = 16,
896  YTick = 20,
897 
902 
907  };
908 
910  virtual ComponentType GetType() const noexcept = 0;
911 
913  void SetPosition(int x, int y, Dimension::Unit unit = Dimension::Pixel) { position = {{x, unit}, {y, unit}}; ChangedEvent(); }
914 
916  void SetPosition(Geometry::Point pos, Dimension::Unit unit = Dimension::Pixel) { position = {{pos.X, unit}, {pos.Y, unit}}; ChangedEvent(); }
917 
920 
922  void SetPosition(Point value) { position = value; ChangedEvent(); }
923 
926 
929  Point GetPosition() const { return position; }
930 
933 
935  void SetCenter(int x, int y, Dimension::Unit unit = Dimension::Pixel) { center = {{x, unit}, {y, unit}}; ChangedEvent(); }
936 
938  void SetCenter(Geometry::Point pos, Dimension::Unit unit = Dimension::Pixel) { center = {{pos.X, unit}, {pos.Y, unit}}; ChangedEvent(); }
939 
941  void SetCenter(Dimension x, Dimension y) { center = {x, y}; ChangedEvent(); }
942 
944  void SetCenter(Point value) { center = value; ChangedEvent(); }
945 
947  Point GetCenter() const { return center; }
948 
949 
950 
952  void SetSize(int w, int h, Dimension::Unit unit = Dimension::Pixel) { SetSize({{w, unit}, {h, unit}}); }
953 
956 
958  void SetSize(Dimension w, Dimension h) { SetSize({w, h}); }
959 
961  void SetSize(Size size) {
962  this->size = size;
963 
964  if(sizingw == Automatic && size.Width.GetValue() != 0)
965  sizingw = Fixed;
966 
967  if(sizingh == Automatic && size.Height.GetValue() != 0)
968  sizingh = Fixed;
969 
970  ChangedEvent();
971  }
972 
974  void SetSizing(SizingMode value) { sizingw = sizingh = value; ChangedEvent(); }
975 
977  void SetSizing(SizingMode hor, SizingMode vert) { sizingw = hor; sizingh = vert; ChangedEvent(); }
978 
981  Size GetSize() const { return size; }
982 
985 
988 
989 
992  void SetMargin(int value, Dimension::Unit unit = Dimension::Pixel) { margin = {{value, unit}}; ChangedEvent(); }
993 
996  void SetMargin(int hor, int ver, Dimension::Unit unit = Dimension::Pixel) { margin = {{hor, unit}, {ver, unit}}; ChangedEvent(); }
997 
1000  void SetMargin(int left, int top, int right, int bottom, Dimension::Unit unit = Dimension::Pixel) {
1001  margin = {{left, unit}, {top, unit}, {right, unit}, {bottom, unit}};
1002  ChangedEvent();
1003  }
1004 
1008  margin = {{value.Left, unit}, {value.Top, unit}, {value.Right, unit}, {value.Bottom, unit}};
1009  ChangedEvent();
1010  }
1011 
1014  void SetMargin(Dimension value) { margin = {value}; ChangedEvent(); }
1015 
1018  void SetMargin(Dimension hor, Dimension ver) { margin = {hor, ver}; ChangedEvent(); }
1019 
1022  void SetMargin(Dimension left, Dimension top, Dimension right, Dimension bottom) { margin = {left, top, right, bottom}; ChangedEvent(); }
1023 
1026  void SetMargin(Margin value) { margin = value; ChangedEvent(); }
1027 
1029  Margin GetMargin() const { return margin; }
1030 
1031 
1034  void SetIndent(int value, Dimension::Unit unit = Dimension::Pixel) { indent = {{value, unit}}; ChangedEvent(); }
1035 
1038  void SetIndent(int hor, int ver, Dimension::Unit unit = Dimension::Pixel) { indent = {{hor, unit}, {ver, unit}}; ChangedEvent(); }
1039 
1042  void SetIndent(int left, int top, int right, int bottom, Dimension::Unit unit = Dimension::Pixel) {
1043  indent = {{left, unit}, {top, unit}, {right, unit}, {bottom, unit}};
1044  ChangedEvent();
1045  }
1046 
1050  indent = {{value.Left, unit}, {value.Top, unit}, {value.Right, unit}, {value.Bottom, unit}};
1051  ChangedEvent();
1052  }
1053 
1056  void SetIndent(Dimension value) { indent = {value}; ChangedEvent(); }
1057 
1060  void SetIndent(Dimension hor, Dimension ver) { indent = {hor, ver}; ChangedEvent(); }
1061 
1064  void SetIndent(Dimension left, Dimension top, Dimension right, Dimension bottom) { indent = {left, top, right, bottom}; ChangedEvent(); }
1065 
1068  void SetIndent(Margin value) { indent = value; ChangedEvent(); }
1069 
1071  Margin GetIndent() const { return indent; }
1072 
1073 
1074 
1076  void SetDataEffect(DataEffect effect) {
1077  dataeffect = effect;
1078 
1079  ChangedEvent();
1080  }
1081 
1084 
1086  void SetValueOrdering(int first, int second, int third, int fourth) {
1087  valueordering = {{first, second, third, fourth}};
1088 
1089  ChangedEvent();
1090  }
1091 
1093  std::array<int, 4> GetValueOrdering() const {
1094  return valueordering;
1095  }
1096 
1099  void SetValueModification(ValueModification mod, ValueSource source = UseFirst, std::array<float, 4> min = {{0, 0, 0, 0}}, std::array<float, 4> max = {{1, 1, 1, 1}}) {
1100  valuemod = mod;
1101  valuemin = min;
1102  valuemax = max;
1103  this->source = source;
1104 
1105  ChangedEvent();
1106  }
1107 
1110  void SetValueRange(std::array<float, 4> min, std::array<float, 4> max) {
1111  valuemin = min;
1112  valuemax = max;
1113 
1114  ChangedEvent();
1115  }
1116 
1119  void SetValueRange(int channel, float min, float max) {
1120  ASSERT(channel>=0 && channel<4, "Channel index out of bounds");
1121 
1122  valuemin[channel] = min;
1123  valuemax[channel] = max;
1124 
1125  ChangedEvent();
1126  }
1127 
1130 
1133  source = value;
1134 
1135  ChangedEvent();
1136  }
1137 
1140  return source;
1141  }
1142 
1144  void SetTag(Tag value) {
1145  tag = value;
1146 
1147  ChangedEvent();
1148  }
1149 
1151  Tag GetTag() const {
1152  return tag;
1153  }
1154 
1158  repeat = value;
1159 
1160  ChangedEvent();
1161  }
1162 
1165  return repeat;
1166  }
1167 
1168 
1170  std::array<float, 4> GetValueMin() const { return valuemin; }
1171 
1173  std::array<float, 4> GetValueRange() const { return {{valuemax[0]-valuemin[0], valuemax[1]-valuemin[1], valuemax[2]-valuemin[2], valuemax[3]-valuemin[3]}}; }
1174 
1176  std::array<float, 4> GetValueMax() const { return valuemax; }
1177 
1179  float GetValueMin(int channel) const {
1180  ASSERT(channel>=0 && channel<4, "Channel index out of bounds");
1181 
1182  return valuemin[channel];
1183  }
1184 
1186  float GetValueRange(int channel) const {
1187  ASSERT(channel>=0 && channel<4, "Channel index out of bounds");
1188 
1189  return valuemax[channel]-valuemin[channel];
1190  }
1191 
1193  float GetValueMax(int channel) const {
1194  ASSERT(channel>=0 && channel<4, "Channel index out of bounds");
1195 
1196  return valuemax[channel];
1197  }
1198 
1199 
1202  this->previous = previous;
1203  this->container = container;
1204  this->my = my;
1205 
1206  ChangedEvent();
1207  }
1208 
1211  Anchor GetPreviousAnchor() const { return previous; }
1212 
1216 
1218  Anchor GetMyAnchor() const { return my; }
1219 
1220 
1221 
1223  void SetBaseline(int value) { baseline = value; ChangedEvent(); }
1224 
1226  int GetBaseline() const { return baseline; }
1227 
1228 
1229 
1232  void SetIndex(int value) { index = value; ChangedEvent(); }
1233 
1235  int GetIndex() const { return index; }
1236 
1237 
1238 
1243 
1246 
1249 
1252 
1255 
1257  void SetReversible(bool value) { reversible = value; ChangedEvent(); }
1258 
1260  bool IsReversible() const { return reversible; }
1261 
1262 
1267  void SetClip(bool value) {
1268  clip = value;
1269  }
1270 
1272  bool GetClip() const {
1273  return clip;
1274  }
1275 
1276 
1280 
1281  protected:
1282 
1284  bool clip = false;
1285 
1286  bool reversible = false;
1287 
1288 
1291 
1295 
1298 
1301 
1304 
1306  std::array<int, 4> valueordering{0,1,2,3};
1307 
1309  std::array<float, 4> valuemin = {{0, 0, 0, 0}}, valuemax = {{1, 1, 1, 1}};
1310 
1314 
1318 
1321 
1323  Point position = {0, 0};
1324 
1327 
1330 
1334 
1337 
1340 
1345 
1349 
1353 
1355  int baseline = 0;
1356 
1361  int index = 0;
1362  };
1363 
1365  return ComponentTemplate::ValueSource((int)l | (int)r);
1366  }
1367 
1371  public:
1372 
1374  sizingw = Automatic;
1375  sizingh = Automatic;
1376  }
1377 
1379  virtual ComponentType GetType() const noexcept override {
1381  }
1382 
1384  void SetTemplate(const Template &value) {
1385  temp = &value;
1386  ChangedEvent();
1387  }
1388 
1390  bool HasTemplate() const {
1391  return temp != nullptr;
1392  }
1393 
1397  const Template &GetTemplate() const {
1398  ASSERT(temp, "Template is empty.");
1399  return *temp;
1400  }
1401 
1402  private:
1403  const Template *temp = nullptr;
1404  };
1405 
1409  public:
1410 
1412  virtual ComponentType GetType() const noexcept override {
1413  return ComponentType::Ignored;
1414  }
1415 
1416  };
1417 
1423  public:
1429  }
1430 
1432  virtual ComponentType GetType() const noexcept override {
1434  }
1435 
1437  bool IsReady() const;
1438 
1441  renderer = &value;
1442  }
1443 
1446  ASSERT(renderer, "Renderer is not set.");
1447 
1448  return *renderer;
1449  }
1450 
1453  color = value;
1454 
1455  ChangedEvent();
1456  }
1457 
1460  return color;
1461  }
1462 
1463 
1466  targetcolor = value;
1467 
1468  ChangedEvent();
1469  }
1470 
1473  return targetcolor;
1474  }
1475 
1478  void SetText(const std::string &value) {
1479  text = value;
1480 
1481  ChangedEvent();
1482  }
1483 
1485  std::string GetText() const {
1486  return text;
1487  }
1488 
1489  private:
1490  const Graphics::TextRenderer *renderer = nullptr;
1491  Graphics::RGBAf color = 1.0f;
1492  Graphics::RGBAf targetcolor = 0.f;
1493  std::string text;
1494  };
1495 
1497  public:
1498  VisualProvider(Event<ComponentTemplate> &changed) : changed(&changed) { }
1499 
1501  changed(&changed), provider(&content)
1502  { }
1503 
1505  changed(&changed), drawable(&content)
1506  { }
1507 
1509  bool HasContent() const {
1510  return drawable != nullptr || provider != nullptr;
1511  }
1512 
1514  bool IsAnimation() const {
1515  return provider != nullptr;
1516  }
1517 
1519  bool IsDrawable() const {
1520  return drawable != nullptr;
1521  }
1522 
1525  if(provider == nullptr) {
1526  throw std::runtime_error("Animation not set.");
1527  }
1528 
1529  return *provider;
1530  }
1531 
1534  if(drawable == nullptr) {
1535  throw std::runtime_error("Drawable not set.");
1536  }
1537 
1538  return *drawable;
1539  }
1540 
1542  if(drawable)
1543  return *drawable;
1544  else if(provider) {
1545  return provider->CreateAnimation(controller);
1546  }
1547  else {
1548  throw std::runtime_error("Visual provider is empty.");
1549  }
1550  }
1551 
1553  void SetDrawable(const Graphics::Drawable &value) {
1554  drawable = &value;
1555  provider = nullptr;
1556 
1557  (*changed)();
1558  }
1559 
1562  drawable = nullptr;
1563  provider = &value;
1564 
1565  (*changed)();
1566  }
1567 
1568  private:
1569  Event<ComponentTemplate> *changed;
1570 
1571  const Graphics::Drawable *drawable = nullptr;
1572  const Graphics::AnimationProvider *provider = nullptr;
1573  };
1574 
1581  public:
1582 
1585  sizingw = Automatic;
1586  sizingh = Automatic;
1587  }
1588 
1592  }
1593 
1597  }
1598 
1600  virtual ComponentType GetType() const noexcept override {
1601  return ComponentType::Graphics;
1602  }
1603 
1605 
1608  void SetFillArea(bool value) {
1609  fill = value;
1610 
1611  ChangedEvent();
1612  }
1613 
1615  bool GetFillArea() const {
1616  return fill;
1617  }
1618 
1621  color = value;
1622 
1623  ChangedEvent();
1624  }
1625 
1628  return color;
1629  }
1630 
1633  targetcolor = value;
1634 
1635  ChangedEvent();
1636  }
1637 
1640  return targetcolor;
1641  }
1642 
1645 
1646  private:
1647  bool fill = true;
1648  Geometry::Margin padding = {0, 0, 0, 0};
1649  Graphics::RGBAf color = 1.0f;
1650  Graphics::RGBAf targetcolor = 0.f;
1651  };
1652 
1656  public:
1658  void SetPadding(int value, Dimension::Unit unit = Dimension::Pixel) { padding ={{value, unit}}; ChangedEvent(); }
1659 
1661  void SetPadding(int hor, int ver, Dimension::Unit unit = Dimension::Pixel) { padding ={{hor, unit},{ver, unit}}; ChangedEvent(); }
1662 
1664  void SetPadding(int left, int top, int right, int bottom, Dimension::Unit unit = Dimension::Pixel) {
1665  padding ={{left, unit},{top, unit},{right, unit},{bottom, unit}};
1666  ChangedEvent();
1667  }
1668 
1671  padding ={{value.Left, unit},{value.Top, unit},{value.Right, unit},{value.Bottom, unit}};
1672  ChangedEvent();
1673  }
1674 
1676  void SetPadding(Dimension value) { padding ={value}; ChangedEvent(); }
1677 
1679  void SetPadding(Dimension hor, Dimension ver) { padding ={hor, ver}; ChangedEvent(); }
1680 
1682  void SetPadding(Dimension left, Dimension top, Dimension right, Dimension bottom) { padding = {left, top, right, bottom}; ChangedEvent(); }
1683 
1685  void SetPadding(Margin value) { padding = value; ChangedEvent(); }
1686 
1688  Margin GetPadding() const { return padding; }
1689 
1690 
1691 
1694  void SetBorderSize(int value) { bordersize ={value}; ChangedEvent(); }
1695 
1698  void SetBorderSize(int hor, int ver) { bordersize ={hor, ver}; ChangedEvent(); }
1699 
1702  void SetBorderSize(int left, int top, int right, int bottom) { bordersize = {left, top, right, bottom}; ChangedEvent(); }
1703 
1706  void SetBorderSize(Geometry::Margin value) { bordersize = value; ChangedEvent(); }
1707 
1709  Geometry::Margin GetBorderSize() const { return bordersize; }
1710 
1711 
1714  void SetShadowExtent(int value) { padding ={value}; ChangedEvent(); }
1715 
1718  void SetShadowExtent(int hor, int ver) { shadowextent ={hor, ver}; ChangedEvent(); }
1719 
1722  void SetShadowExtent(int left, int top, int right, int bottom) { shadowextent = {left, top, right, bottom}; ChangedEvent(); }
1723 
1726  void SetShadowExtent(Geometry::Margin value) { shadowextent = value; ChangedEvent(); }
1727 
1729  Geometry::Margin GetShadowExtent() const { return shadowextent; }
1730 
1731 
1732 
1735  void SetOverlayExtent(int value) { overlayextent ={value}; ChangedEvent(); }
1736 
1739  void SetOverlayExtent(int hor, int ver) { overlayextent ={hor, ver}; ChangedEvent(); }
1740 
1743  void SetOverlayExtent(int left, int top, int right, int bottom) { overlayextent = {left, top, right, bottom}; ChangedEvent(); }
1744 
1747  void SetOverlayExtent(Geometry::Margin value) { overlayextent = value; ChangedEvent(); }
1748 
1750  Geometry::Margin GetOverlayExtent() const { return overlayextent; }
1751 
1753  void SetOrientation(Graphics::Orientation value) { orientation = value; ChangedEvent(); }
1754 
1756  Graphics::Orientation GetOrientation() const { return orientation; }
1757 
1761  ContainerTemplate &AddIndex(int componentindex) {
1762  indices.push_back(componentindex);
1763  ChangedEvent();
1764 
1765  return *this;
1766  }
1767 
1771  void InsertIndex(int before, int componentindex) {
1772  indices.insert(indices.begin() + before, componentindex);
1773  ChangedEvent();
1774  }
1775 
1777  void RemoveIndexAt(int index) {
1778  indices.erase(indices.begin() + index);
1779  ChangedEvent();
1780  }
1781 
1783  int GetCount() const {
1784  return (int)indices.size();
1785  }
1786 
1788  int operator[] (int index) const {
1789  return indices[index];
1790  }
1791 
1793  int &operator[] (int index) {
1794  return indices[index];
1795  }
1796 
1798  virtual ComponentType GetType() const noexcept override {
1799  return ComponentType::Container;
1800  }
1801 
1804  void SetReportMouse(bool value);
1805 
1806  bool GetReportMouse() const;
1807 
1808 
1811 
1814 
1815  private:
1816  Margin padding;
1817  Geometry::Margin bordersize, shadowextent, overlayextent;
1818  std::vector<int> indices;
1820  bool reportmouse = false;
1821  };
1822 
1823 } }
Gorgon::UI::ComponentTemplate::State4Icon
@ State4Icon
Definition: Template.h:684
Gorgon::UI::Disabled
@ Disabled
Component is visible when the widget is disabled.
Definition: Template.h:184
Gorgon::UI::ComponentTemplate::position
Point position
Position of the component.
Definition: Template.h:1323
Gorgon::UI::ComponentTemplate::indent
Margin indent
Indent is added to the margin and padding on the edge of the container.
Definition: Template.h:1336
Gorgon::UI::Dimension
Dimension data for components. Allows relative position and sizing.
Definition: Dimension.h:9
Gorgon::UI::ComponentTemplate::GetPreviousAnchor
Anchor GetPreviousAnchor() const
Returns the anchor point of the previous component that this component will attach to.
Definition: Template.h:1211
Gorgon::UI::Last
@ Last
In a list this denotes the item is at the last place.
Definition: Template.h:239
Gorgon::UI::ComponentTemplate::UseW
@ UseW
Definition: Template.h:792
Gorgon::UI::PlaceholderTemplate::PlaceholderTemplate
PlaceholderTemplate()
Definition: Template.h:1373
Gorgon::UI::Template::Get
ComponentTemplate & Get(int index) const
Returns the component at the given index.
Definition: Template.h:480
Gorgon::UI::LabelIsSet
@ LabelIsSet
Data effect of the component is set.
Definition: Template.h:322
Gorgon::UI::ContainerTemplate::SetPadding
void SetPadding(int left, int top, int right, int bottom, Dimension::Unit unit=Dimension::Pixel)
Changes the padding of the component. Padding is the minimum spacing inside the component.
Definition: Template.h:1664
Gorgon::UI::ComponentTemplate::NoModification
@ NoModification
Nothing will be modified.
Definition: Template.h:691
Gorgon::UI::ComponentTemplate::UseLH
@ UseLH
Definition: Template.h:836
Gorgon::Graphics::Orientation
Orientation
2D orientation constants
Definition: Graphics.h:39
Gorgon::UI::ComponentTemplate::GetValueMin
std::array< float, 4 > GetValueMin() const
Returns the value scale minimum.
Definition: Template.h:1170
Gorgon::UI::ComponentTemplate::Automatic
@ Automatic
Given size is not used, object is sized to its contents.
Definition: Template.h:634
Gorgon::UI::ComponentTemplate::ValueSourceMaxPower
@ ValueSourceMaxPower
Maximum power of two.
Definition: Template.h:812
Gorgon::UI::ContainerTemplate::InsertIndex
void InsertIndex(int before, int componentindex)
Insert an index to the specified location in the container.
Definition: Template.h:1771
Gorgon::UI::ComponentTemplate::UseC
@ UseC
Chromacity.
Definition: Template.h:804
Gorgon::UI::ComponentTemplate::index
int index
Component index.
Definition: Template.h:1361
Gorgon::UI::Middle
@ Middle
In a list this denotes the item is somewhere in the middle.
Definition: Template.h:236
Gorgon::UI::ContainerTemplate::AddIndex
ContainerTemplate & AddIndex(int componentindex)
Adds an index to the container.
Definition: Template.h:1761
Gorgon::UI::First
@ First
In a list this denotes the item is at the first place.
Definition: Template.h:233
Gorgon::UI::IsRight
bool IsRight(Anchor a)
Returns if an anchor is on the right.
Definition: Template.h:95
Gorgon::UI::ComponentTemplate::my
Anchor my
Anchor point of the current component.
Definition: Template.h:1352
Gorgon::UI::ComponentTemplate::UseSize
@ UseSize
Definition: Template.h:815
Gorgon::UI::ComponentTemplate::TopTag
@ TopTag
Definition: Template.h:868
Gorgon::UI::ComponentTemplate::SetIndent
void SetIndent(Dimension left, Dimension top, Dimension right, Dimension bottom)
Changes the indent of the component.
Definition: Template.h:1064
Gorgon::UI::ComponentTemplate::UseSecond
@ UseSecond
Definition: Template.h:779
Gorgon::UI::Template::Multiples
@ Multiples
Size of the template should be incremented at the multiples of the size and addition size should be a...
Definition: Template.h:405
Gorgon::UI::ComponentTemplate::dataeffect
DataEffect dataeffect
The effect that the data will have on this component.
Definition: Template.h:1297
Gorgon::UI::ComponentTemplate::PolarAbsolute
@ PolarAbsolute
The given coordinates are polar coordinates, The radius is given in pixels and angle is specified in ...
Definition: Template.h:625
Gorgon::UI::ComponentTemplate::XGrid
@ XGrid
Definition: Template.h:892
Gorgon::UI::Even
@ Even
In lists denotes the item is in even position.
Definition: Template.h:230
Gorgon::UI::ComponentTemplate::RightTag
@ RightTag
Definition: Template.h:867
Gorgon::UI::ComponentTemplate::State2Icon
@ State2Icon
Definition: Template.h:682
Gorgon::UI::ComponentTemplate::YMajorTick
@ YMajorTick
Definition: Template.h:906
Gorgon::UI::ContainerTemplate::Background
VisualProvider Background
Background graphics.
Definition: Template.h:1810
Gorgon::UI::TextIsSet
@ TextIsSet
Data effect of the component is set.
Definition: Template.h:316
Gorgon::UI::TextholderTemplate
Textholder is designed to hold text data.
Definition: Template.h:1422
Gorgon::UI::TextholderTemplate::GetTargetColor
Graphics::RGBAf GetTargetColor() const
Returns the target color that will be used for BlendColor value modification.
Definition: Template.h:1472
Gorgon::UI::ComponentTemplate::ValueText3
@ ValueText3
Definition: Template.h:664
Gorgon::UI::ComponentTemplate::HeaderTag
@ HeaderTag
Definition: Template.h:877
Gorgon::UI::ComponentTemplate::SetValueModification
void SetValueModification(ValueModification mod, ValueSource source=UseFirst, std::array< float, 4 > min={{0, 0, 0, 0}}, std::array< float, 4 > max={{1, 1, 1, 1}})
Sets the property that will be affected by the value of the widget.
Definition: Template.h:1099
Gorgon::UI::ComponentTemplate::SetBaseline
void SetBaseline(int value)
Changes the baseline of the current component. If set to 0, it will be determined automatically.
Definition: Template.h:1223
Gorgon::UI::ComponentTemplate::UseLCH
@ UseLCH
Definition: Template.h:842
Gorgon::UI::ComponentTemplate::UseG
@ UseG
Definition: Template.h:782
Gorgon::UI::ComponentTemplate::SetSize
void SetSize(Dimension w, Dimension h)
Changes the size of the component. If sizing mode is automatic, it will be set to fixed.
Definition: Template.h:958
Gorgon::UI::ComponentTemplate::ContentsTag
@ ContentsTag
Definition: Template.h:872
Gorgon::UI::ComponentTemplate::UseHeight
@ UseHeight
Definition: Template.h:781
Gorgon::UI::Template::SetConditionDuration
void SetConditionDuration(ComponentCondition from, ComponentCondition to, int duration)
Changes the duration of a component condition.
Definition: Template.h:556
Gorgon::UI::ComponentTemplate::GetValueSource
ValueSource GetValueSource() const
Returns the value source that will be used.
Definition: Template.h:1139
Gorgon::UI::ComponentTemplate::repeat
RepeatMode repeat
Whether the component will be repeated along an axis.
Definition: Template.h:1317
Gorgon::UI::ComponentTemplate::SetMargin
void SetMargin(int value, Dimension::Unit unit=Dimension::Pixel)
Changes the margin of the component.
Definition: Template.h:992
Gorgon::UI::Down
@ Down
This is activated when the mouse is pressed on the component stack.
Definition: Template.h:197
Gorgon::UI::ComponentTemplate::Icon
@ Icon
Data will effect the displayed graphics.
Definition: Template.h:678
Gorgon::UI::ComponentTemplate::valuemax
std::array< float, 4 > valuemax
Definition: Template.h:1309
Gorgon::UI::ComponentTemplate::YDragTag
@ YDragTag
Definition: Template.h:862
Gorgon::Geometry::basic_Margin::Left
T_ Left
Left margin.
Definition: Margin.h:167
Gorgon::UI::FirstBaselineRight
@ FirstBaselineRight
Baseline right, for text, this aligns to the baseline of the first line.
Definition: Template.h:67
Gorgon::UI::ComponentTemplate::Absolute
@ Absolute
Absolute positioning, coordinates will start from the container.
Definition: Template.h:619
Gorgon::UI::GraphicsTemplate::GetType
virtual ComponentType GetType() const noexcept override
Returns the type of the component.
Definition: Template.h:1600
Gorgon::UI::ComponentTemplate::tag
Tag tag
Tag identifies a component for various modifications depending on the widget.
Definition: Template.h:1313
Gorgon::UI::ContainerTemplate::GetCount
int GetCount() const
Returns the number of component indices stored in this container.
Definition: Template.h:1783
Gorgon::UI::ComponentTemplate::SetMargin
void SetMargin(Dimension value)
Changes the margin of the component.
Definition: Template.h:1014
Gorgon::UI::ComponentTemplate::UseTransition
@ UseTransition
This channel will give the progress of a transition.
Definition: Template.h:809
Gorgon::UI::ComponentTemplate::Relative
@ Relative
Component will be placed relative to the previous component.
Definition: Template.h:610
Gorgon::UI::PlaceholderTemplate
Defines a placeholder according to the Box Model.
Definition: Template.h:1370
Gorgon::UI::Ch2V0
@ Ch2V0
Channel 2 value is 0, the value will be rounded to 4 decimal points before comparison.
Definition: Template.h:270
Gorgon::Event
This class provides event mechanism.
Definition: Event.h:134
Gorgon::UI::ComponentTemplate::UseR
@ UseR
Red or radius for polar coordinates.
Definition: Template.h:777
Gorgon::UI::ContainerTemplate::GetPadding
Margin GetPadding() const
Returns the padding.
Definition: Template.h:1688
Gorgon::UI::ComponentTemplate::SetMargin
void SetMargin(int left, int top, int right, int bottom, Dimension::Unit unit=Dimension::Pixel)
Changes the margin of the component.
Definition: Template.h:1000
Gorgon::Graphics::AnimationProvider
A regular drawable animation provider.
Definition: Animations.h:28
Gorgon::UI::ComponentTemplate::ModifyAlpha
@ ModifyAlpha
Value modifies the opacity of the component.
Definition: Template.h:709
Gorgon::UI::ComponentTemplate::SetRepeatMode
void SetRepeatMode(RepeatMode value)
Changes the repeat mode of this component.
Definition: Template.h:1157
Gorgon::UI::ComponentTemplate::SetMargin
void SetMargin(Margin value)
Changes the margin of the component.
Definition: Template.h:1026
Gorgon::UI::Template::Name
std::string Name
Definition: Template.h:586
Gorgon::UI::ComponentTemplate::SelectionTag
@ SelectionTag
Definition: Template.h:874
Gorgon::UI::Ch2V05
@ Ch2V05
Channel 2 value is 0.5, the value will be rounded to 4 decimal points before comparison.
Definition: Template.h:274
Gorgon::UI::MiddleLeft
@ MiddleLeft
Middle left.
Definition: Template.h:48
Dimension.h
Gorgon::UI::State1TextIsSet
@ State1TextIsSet
Data effect of the component is set.
Definition: Template.h:337
Gorgon::UI::Template
This class stores visual information about a widget template.
Definition: Template.h:392
Gorgon::UI::ContainerTemplate::SetBorderSize
void SetBorderSize(int hor, int ver)
Changes the border size of the component.
Definition: Template.h:1698
Gorgon::Graphics::TextRenderer::IsReady
virtual bool IsReady() const =0
Whether the render can render text.
Gorgon::Animation::ControllerBase
Controllers are required to progress animations.
Definition: Animation.h:65
Gorgon::UI::Template::Fixed
@ Fixed
Size of the template is fixed and should not be modified.
Definition: Template.h:401
Gorgon::UI::TopCenter
@ TopCenter
Top center.
Definition: Template.h:43
Gorgon::UI::Ch4V0
@ Ch4V0
Channel 4 value is 0, the value will be rounded to 4 decimal points before comparison.
Definition: Template.h:294
Gorgon::UI::ContainerTemplate::GetReportMouse
bool GetReportMouse() const
Gorgon::UI::Ch3V0
@ Ch3V0
Channel 3 value is 0, the value will be rounded to 4 decimal points before comparison.
Definition: Template.h:282
Gorgon::Geometry::basic_Point::X
T_ X
X coordinate.
Definition: Point.h:368
Gorgon::UI::Template::AddGraphics
GraphicsTemplate & AddGraphics(int index, ComponentCondition cond)
This will create a new drawable and return it.
Definition: Template.h:442
Gorgon::UI::ComponentTemplate::SetValueOrdering
void SetValueOrdering(int first, int second, int third, int fourth)
Changes the ordering of the values. This allows swaps like X-Y. You should specify which channel will...
Definition: Template.h:1086
Gorgon::UI::ComponentTemplate::UseRBA
@ UseRBA
Definition: Template.h:833
Gorgon::UI::VisualProvider::GetAnimation
const Graphics::AnimationProvider & GetAnimation() const
Returns the content as animation provider.
Definition: Template.h:1524
Gorgon::UI::ComponentTemplate::State1Text
@ State1Text
Definition: Template.h:669
Gorgon::UI::ComponentTemplate::State3Icon
@ State3Icon
Definition: Template.h:683
Gorgon::UI::Ch4V1
@ Ch4V1
Channel 4 value is 1, the value will be rounded to 4 decimal points before comparison.
Definition: Template.h:302
Gorgon::UI::StateIcon4IsSet
@ StateIcon4IsSet
Data effect of the component is set.
Definition: Template.h:364
Gorgon::UI::Hover
@ Hover
Mouse is over the widget, or over a particular repeat.
Definition: Template.h:193
Gorgon::Geometry::basic_Size::Height
T_ Height
Height of this size object.
Definition: Size.h:261
Gorgon::UI::ContainerTemplate::operator[]
int operator[](int index) const
Returns the component index at the given location.
Definition: Template.h:1788
Gorgon::UI::ComponentTemplate::SetPosition
void SetPosition(Geometry::Point pos, Dimension::Unit unit=Dimension::Pixel)
Changes the coordinates of the component to the given position.
Definition: Template.h:916
Gorgon::UI::ComponentTemplate::GetValueMax
float GetValueMax(int channel) const
Returns the value scale maximum.
Definition: Template.h:1193
Gorgon::UI::ComponentTemplate::GetCondition
ComponentCondition GetCondition() const
Returns the current component condition.
Definition: Template.h:1248
Gorgon::UI::ComponentTemplate::Label
@ Label
Definition: Template.h:655
Gorgon::UI::TextholderTemplate::SetText
void SetText(const std::string &value)
Sets the default text for the textholder.
Definition: Template.h:1478
Gorgon::UI::Template::GetAdditionalSize
Geometry::Size GetAdditionalSize() const
Returns the additional size.
Definition: Template.h:550
Gorgon::UI::ComponentTemplate::GetValueMax
std::array< float, 4 > GetValueMax() const
Returns the value scale maximum.
Definition: Template.h:1176
Gorgon::UI::ComponentTemplate::UseGA
@ UseGA
Definition: Template.h:827
Gorgon::UI::ContainerTemplate::SetPadding
void SetPadding(Margin value)
Changes the padding of the component. Padding is the minimum spacing inside the component.
Definition: Template.h:1685
Gorgon::UI::ComponentTemplate::DecrementTag
@ DecrementTag
Definition: Template.h:865
Gorgon::UI::ComponentTemplate::ModifyRotation
@ ModifyRotation
Data affects the rotation of the component.
Definition: Template.h:725
Gorgon::UI::Template::Remove
void Remove(int index)
Removes the component at the given index.
Definition: Template.h:461
Gorgon::UI::ComponentTemplate::UseYZ
@ UseYZ
Definition: Template.h:818
Gorgon::UI::ContainerTemplate::SetBorderSize
void SetBorderSize(int value)
Changes the border size of the component.
Definition: Template.h:1694
Gorgon::UI::ComponentTemplate::GetHorizontalSizing
SizingMode GetHorizontalSizing() const
Returns the horizontal sizing mode of the component.
Definition: Template.h:984
Gorgon::UI::ComponentTemplate::XMajorGrid
@ XMajorGrid
Definition: Template.h:900
Gorgon::UI::VisualProvider
Definition: Template.h:1496
Gorgon::UI::TopLeft
@ TopLeft
Top left.
Definition: Template.h:41
Gorgon::UI::ComponentTemplate::XTick
@ XTick
Definition: Template.h:895
Gorgon::UI::ComponentTemplate::size
Size size
Size of the object.
Definition: Template.h:1329
Gorgon::UI::ComponentTemplate::SetValueRange
void SetValueRange(std::array< float, 4 > min, std::array< float, 4 > max)
Changes the data range, which scales the data effect on the component.
Definition: Template.h:1110
Gorgon::UI::ComponentTemplate::SpacerTag
@ SpacerTag
Definition: Template.h:878
Gorgon::UI::ComponentTemplate::GetValueOrdering
std::array< int, 4 > GetValueOrdering() const
Returns the ordering of value channels.
Definition: Template.h:1093
Gorgon::UI::ComponentTemplate::SetValueRange
void SetValueRange(int channel, float min, float max)
Changes the data range, which scales the data effect on the component.
Definition: Template.h:1119
Gorgon::UI::ComponentTemplate::margin
Margin margin
Margin around the object, will be collapsed with other object margins and padding.
Definition: Template.h:1333
Gorgon::UI::ComponentTemplate::XDragTag
@ XDragTag
Definition: Template.h:861
Gorgon::UI::LastBaselineLeft
@ LastBaselineLeft
Baseline left, for text, this aligns to the baseline of the last line.
Definition: Template.h:72
Gorgon::UI::ComponentTemplate::ModifyY
@ ModifyY
Modifies the Y coordinate of the component regardless of the container direction.
Definition: Template.h:705
Gorgon::UI::ComponentTemplate::GrowOnly
@ GrowOnly
Given size is the minimum, if the contents are bigger, the object be resized to fit.
Definition: Template.h:638
Gorgon::UI::ComponentTemplate::SetSize
void SetSize(Geometry::Size size, Dimension::Unit unit=Dimension::Pixel)
Changes the size of the component. The given values are ignored if the sizing mode is Automatic.
Definition: Template.h:955
Gorgon::UI::ComponentTemplate::SetDataEffect
void SetDataEffect(DataEffect effect)
Sets the data effect for this component. Default is None.
Definition: Template.h:1076
Gorgon::UI::ContainerTemplate::GetOverlayExtent
Geometry::Margin GetOverlayExtent() const
Returns the overlay extent.
Definition: Template.h:1750
Gorgon::UI::ComponentTemplate::IsReversible
bool IsReversible() const
Returns whether this component transition can be reversed.
Definition: Template.h:1260
Gorgon::UI::ComponentTemplate::SetClip
void SetClip(bool value)
Whether to clip the contents of this container, default value is false.
Definition: Template.h:1267
Gorgon::UI::ContainerTemplate::SetOverlayExtent
void SetOverlayExtent(Geometry::Margin value)
Changes the overlay extent of the component.
Definition: Template.h:1747
Gorgon::Graphics::RGBAf
Represents a four channel 32 bit float per channel color information.
Definition: Color.h:373
Gorgon::UI::Template::Template
Template()
Definition: Template.h:408
Gorgon::UI::HScroll
@ HScroll
There is space horizontally to be scrolled.
Definition: Template.h:248
Gorgon::UI::ComponentTemplate::GetPositioning
PositionType GetPositioning() const
Returns the positioning method of the component.
Definition: Template.h:932
Gorgon::UI::Odd
@ Odd
In lists denotes the item is in odd position.
Definition: Template.h:227
Gorgon::UI::BottomRight
@ BottomRight
Bottom right.
Definition: Template.h:60
Gorgon::UI::PlaceholderTemplate::GetTemplate
const Template & GetTemplate() const
Returns the sub template of this placeholder.
Definition: Template.h:1397
Gorgon::UI::ComponentTemplate::UseRB
@ UseRB
Definition: Template.h:822
Gorgon::UI::ComponentTemplate::SetIndex
void SetIndex(int value)
Changes the index of the current component.
Definition: Template.h:1232
Gorgon::UI::VisualProvider::VisualProvider
VisualProvider(Event< ComponentTemplate > &changed, const Graphics::Drawable &content)
Definition: Template.h:1504
Gorgon::UI::ComponentTemplate::UseCH
@ UseCH
Definition: Template.h:838
Gorgon::UI::Template::SetSize
void SetSize(int w, int h)
Changes the size of the template.
Definition: Template.h:508
Gorgon::UI::Template::AddTextholder
TextholderTemplate & AddTextholder(int index, ComponentCondition cond)
This will create a new textholder and return it.
Definition: Template.h:430
Gorgon::UI::ComponentTemplate::GetMyAnchor
Anchor GetMyAnchor() const
Returns the anchor point of this component.
Definition: Template.h:1218
Gorgon::UI::TextholderTemplate::TextholderTemplate
TextholderTemplate()
Definition: Template.h:1424
Gorgon::UI::ComponentTemplate::SetIndent
void SetIndent(int value, Dimension::Unit unit=Dimension::Pixel)
Changes the indent of the component.
Definition: Template.h:1034
Gorgon::UI::ComponentTemplate::None
@ None
Nothing will be affected.
Definition: Template.h:648
Gorgon::UI::GraphicsTemplate::GetColor
Graphics::RGBAf GetColor() const
Returns current tint color.
Definition: Template.h:1627
Gorgon::UI::ComponentTemplate::~ComponentTemplate
virtual ~ComponentTemplate()
Destructor.
Definition: Template.h:604
Gorgon::UI::ComponentTemplate::UnknownTag
@ UnknownTag
Do not use this tag for regular components, it is used to identify substacks without a tag.
Definition: Template.h:854
Gorgon::UI::Opened
@ Opened
This condition is triggered when the widget is opened like a combobox showing its list part.
Definition: Template.h:213
Gorgon::UI::ComponentTemplate::SetCondition
void SetCondition(ComponentCondition value)
Sets the condition when this component will be visible.
Definition: Template.h:1242
Gorgon::UI::ContainerTemplate::GetBorderSize
Geometry::Margin GetBorderSize() const
Returns the border size.
Definition: Template.h:1709
Gorgon::UI::ComponentTemplate::GetBaseline
int GetBaseline() const
Returns the baseline. If set to 0, it will be detected automatically.
Definition: Template.h:1226
Gorgon::UI::ComponentTemplate
Defines an object according to the Box Model.
Definition: Template.h:600
Gorgon::UI::State4
@ State4
Fourth state of the widget, first state is Always.
Definition: Template.h:207
Gorgon::UI::ComponentTemplate::ModifyXAndWidth
@ ModifyXAndWidth
Modifies X position and width.
Definition: Template.h:754
Gorgon::UI::ComponentTemplate::ToggleTag
@ ToggleTag
Definition: Template.h:871
Gorgon::UI::TextholderTemplate::GetText
std::string GetText() const
Returns the default text for the textholder.
Definition: Template.h:1485
Gorgon::UI::DataEffectStart
@ DataEffectStart
Do not use this value.
Definition: Template.h:313
Gorgon::UI::Dimension::Pixel
@ Pixel
Fixed pixel based dimensions.
Definition: Dimension.h:18
Gorgon::UI::Closed
@ Closed
This condition is triggered when the widget is closed like a tree view item that is folded,...
Definition: Template.h:220
Gorgon::UI::Template::GetSize
Geometry::Size GetSize() const
Returns the size of the template.
Definition: Template.h:520
Gorgon::UI::VisualProvider::IsAnimation
bool IsAnimation() const
Of this drawable template has animation content.
Definition: Template.h:1514
Gorgon::UI::ComponentTemplate::ModifyWidth
@ ModifyWidth
Width of this component will be affected.
Definition: Template.h:739
Gorgon::UI::ComponentTemplate::SetIndent
void SetIndent(int hor, int ver, Dimension::Unit unit=Dimension::Pixel)
Changes the indent of the component.
Definition: Template.h:1038
Gorgon::UI::ComponentTemplate::SetPositioning
void SetPositioning(PositionType value)
Changes the positioning method of the component.
Definition: Template.h:925
Gorgon::UI::Template::~Template
~Template()
Destructor.
Definition: Template.h:416
Gorgon::UI::ComponentTemplate::CaretTag
@ CaretTag
Definition: Template.h:875
Gorgon::UI::ComponentTemplate::ModifyYAndWidth
@ ModifyYAndWidth
Modifies Y position and width.
Definition: Template.h:760
Gorgon::UI::Container
@ Container
Definition: Template.h:165
Gorgon::UI::TitleIsSet
@ TitleIsSet
Data effect of the component is set.
Definition: Template.h:319
Gorgon::UI::ComponentTemplate::GetPosition
Point GetPosition() const
Returns the current position of the component.
Definition: Template.h:929
Gorgon::UI::ComponentTemplate::ValueModification
ValueModification
Which property will the value of the widget affect.
Definition: Template.h:689
Gorgon::UI::ComponentTemplate::SetCenter
void SetCenter(int x, int y, Dimension::Unit unit=Dimension::Pixel)
Changes the center coordinate that will be used in rotation.
Definition: Template.h:935
Gorgon::UI::ComponentTemplate::UseFirst
@ UseFirst
Definition: Template.h:773
Gorgon::UI::ComponentTemplate::HScrollTag
@ HScrollTag
Definition: Template.h:856
Gorgon::UI::ComponentTemplate::Text
@ Text
Works only for TextholderTemplate, data will affect the text that is displayed.
Definition: Template.h:651
Gorgon::UI::ContainerTemplate::SetShadowExtent
void SetShadowExtent(int hor, int ver)
Changes the shadow extent of the component.
Definition: Template.h:1718
Gorgon::UI::ComponentTemplate::reversible
bool reversible
Definition: Template.h:1286
Gorgon::UI::ComponentTemplate::valuemod
ValueModification valuemod
The property of the component that will be affected by the value.
Definition: Template.h:1300
Gorgon::UI::Placeholder
@ Placeholder
Definition: Template.h:162
Gorgon::UI::ComponentTemplate::previous
Anchor previous
Anchor point of the previous component that this component will be attached to.
Definition: Template.h:1344
Gorgon::UI::None
@ None
This anchor position should is only used to denote object will not be anchored to a previous object,...
Definition: Template.h:38
Gorgon::Geometry::basic_Margin::Top
T_ Top
Top margin.
Definition: Margin.h:170
Gorgon::UI::Template::GetYSizing
SizeMode GetYSizing() const
Returns the sizing mode.
Definition: Template.h:503
Gorgon::UI::ComponentTemplate::ChangedEvent
Event< ComponentTemplate > ChangedEvent
This event will be fired whenever any property is changed.
Definition: Template.h:1279
Gorgon
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
Gorgon::Geometry::basic_Size
This class represents a 2D geometric size.
Definition: Size.h:23
Gorgon::UI::ComponentTemplate::GetRepeatMode
RepeatMode GetRepeatMode() const
Returns the repeat mode of this component.
Definition: Template.h:1164
Gorgon::UI::ComponentTemplate::UseT
@ UseT
Theta for polar coordinates.
Definition: Template.h:784
Gorgon::UI::ComponentTemplate::SetSizing
void SetSizing(SizingMode hor, SizingMode vert)
Changes the sizing mode of the component.
Definition: Template.h:977
Gorgon::UI::ComponentTemplate::condition
ComponentCondition condition
Condition when this component will be visible.
Definition: Template.h:1290
Gorgon::UI::ValueText3IsSet
@ ValueText3IsSet
Data effect of the component is set.
Definition: Template.h:331
Gorgon::UI::ComponentTemplate::ModifyYAndHeight
@ ModifyYAndHeight
Modifies Y position and height.
Definition: Template.h:763
Gorgon::UI::ComponentTemplate::UseB
@ UseB
Definition: Template.h:788
Gorgon::UI::ComponentTemplate::SetMargin
void SetMargin(Dimension hor, Dimension ver)
Changes the margin of the component.
Definition: Template.h:1018
Gorgon::UI::Template::GetSpacing
int GetSpacing() const
Returns the spacing required for this template.
Definition: Template.h:578
Gorgon::UI::ComponentTemplate::UseRA
@ UseRA
Definition: Template.h:825
Gorgon::UI::Template::GetCount
int GetCount() const
Returns the number of components in the template.
Definition: Template.h:474
Gorgon::UI::ContainerTemplate::SetPadding
void SetPadding(Geometry::Margin value, Dimension::Unit unit=Dimension::Pixel)
Changes the padding of the component. Padding is the minimum spacing inside the component.
Definition: Template.h:1670
Gorgon::Graphics::AnimationProvider::CreateAnimation
virtual Animation & CreateAnimation(Gorgon::Animation::ControllerBase &timer) const override=0
This function should create a new animation with the given controller and if owner parameter is set t...
Gorgon::UI::ComponentTemplate::ModifyXAndHeight
@ ModifyXAndHeight
Modifies X position and height.
Definition: Template.h:757
Gorgon::UI::VisualProvider::VisualProvider
VisualProvider(Event< ComponentTemplate > &changed)
Definition: Template.h:1498
Gorgon::UI::ValueText4IsSet
@ ValueText4IsSet
Data effect of the component is set.
Definition: Template.h:334
Gorgon::UI::VisualProvider::SetDrawable
void SetDrawable(const Graphics::Drawable &value)
Sets the content from a drawable.
Definition: Template.h:1553
Gorgon::UI::Template::operator[]
ComponentTemplate & operator[](int index) const
Returns the component at the given index.
Definition: Template.h:486
Gorgon::UI::ContainerTemplate::SetOverlayExtent
void SetOverlayExtent(int left, int top, int right, int bottom)
Changes the overlay extent of the component.
Definition: Template.h:1743
Gorgon::UI::ComponentTemplate::SetPosition
void SetPosition(Dimension x, Dimension y)
Changes the coordinates of the component to the given position.
Definition: Template.h:919
Gorgon::UI::IsBottom
bool IsBottom(Anchor a)
Returns if the given anchor is at bottom.
Definition: Template.h:135
Gorgon::UI::ComponentTemplate::UseBA
@ UseBA
Definition: Template.h:826
Gorgon::UI::ComponentTemplate::Major
@ Major
Definition: Template.h:890
Gorgon::UI::ComponentTemplate::ModifyColor
@ ModifyColor
Value modifies the color of the component.
Definition: Template.h:713
Gorgon::UI::ComponentTemplate::SetPosition
void SetPosition(Point value)
Changes the coordinates of the component to the given position.
Definition: Template.h:922
Gorgon::UI::Template::operator=
Template & operator=(Template &&)=default
Gorgon::UI::ComponentTemplate::GetValueRange
float GetValueRange(int channel) const
Returns the range of the value scale.
Definition: Template.h:1186
Gorgon::UI::ContainerTemplate::SetReportMouse
void SetReportMouse(bool value)
Mouse reporting allows component stack to report mouse events over this container to be reported sepa...
Gorgon::UI::VisualProvider::GetDrawable
const Graphics::Drawable & GetDrawable() const
Returns the content as a drawable.
Definition: Template.h:1533
Gorgon::UI::ComponentTemplate::UseGrayAlpha
@ UseGrayAlpha
Definition: Template.h:840
Gorgon::UI::ComponentTemplate::SetIndent
void SetIndent(Margin value)
Changes the indent of the component.
Definition: Template.h:1068
Gorgon::UI::ComponentTemplate::baseline
int baseline
Manually set baseline for this component. When 0, it will not be effective.
Definition: Template.h:1355
Gorgon::UI::GraphicsTemplate::SetTargetColor
void SetTargetColor(Graphics::RGBAf value)
Sets the target tint color for BlendColor value modification.
Definition: Template.h:1632
Gorgon::UI::ComponentTemplate::ViewPortTag
@ ViewPortTag
Definition: Template.h:873
Gorgon::UI::ComponentTemplate::UseY
@ UseY
Definition: Template.h:780
Gorgon::UI::ValueText2IsSet
@ ValueText2IsSet
Data effect of the component is set.
Definition: Template.h:328
Gorgon::UI::TopRight
@ TopRight
Top right.
Definition: Template.h:45
Gorgon::UI::ComponentTemplate::VScrollTag
@ VScrollTag
Definition: Template.h:857
Gorgon::UI::ContainerTemplate::SetShadowExtent
void SetShadowExtent(Geometry::Margin value)
Changes the shadow extent of the component.
Definition: Template.h:1726
Gorgon::UI::ComponentTemplate::container
Anchor container
Anchor point of the container that this component will be attached to, if it is attaching to its pare...
Definition: Template.h:1348
Gorgon::UI::ComponentTemplate::UseThird
@ UseThird
Definition: Template.h:786
Gorgon::UI::Default
@ Default
This widget is the default widget of its container.
Definition: Template.h:305
Gorgon::UI::ComponentTemplate::ListTag
@ ListTag
Definition: Template.h:879
ASSERT
#define ASSERT(expression, message,...)
Replaces regular assert to allow messages and backtrace.
Definition: Assert.h:161
Gorgon::UI::ComponentTemplate::SetMargin
void SetMargin(Dimension left, Dimension top, Dimension right, Dimension bottom)
Changes the margin of the component.
Definition: Template.h:1022
Gorgon::UI::ComponentTemplate::GetSize
Size GetSize() const
Returns the size of the component.
Definition: Template.h:981
Gorgon::UI::VScroll
@ VScroll
There is space vertically to be scrolled.
Definition: Template.h:251
Gorgon::UI::ComponentTemplate::SetCenter
void SetCenter(Dimension x, Dimension y)
Changes the center coordinate that will be used in rotation.
Definition: Template.h:941
Gorgon::UI::Template::GetWidth
int GetWidth() const
Returns the size of the template.
Definition: Template.h:525
Gorgon::UI::BottomLeft
@ BottomLeft
Bottom left.
Definition: Template.h:56
Gorgon::UI::TextholderTemplate::GetType
virtual ComponentType GetType() const noexcept override
Returns the type of the component.
Definition: Template.h:1432
Gorgon::UI::IsTop
bool IsTop(Anchor a)
Returns if the given anchor is at top.
Definition: Template.h:121
Gorgon::Containers::Collection
Collection is a container for reference typed objects.
Definition: Collection.h:21
Gorgon::UI::ComponentTemplate::DragTag
@ DragTag
Definition: Template.h:858
Gorgon::UI::TextholderTemplate::SetRenderer
void SetRenderer(const Graphics::TextRenderer &value)
Changes the renderer.
Definition: Template.h:1440
Gorgon::UI::ComponentTemplate::GetMargin
Margin GetMargin() const
Returns the margin.
Definition: Template.h:1029
Gorgon::UI::ComponentTemplate::ModifyAnimation
@ ModifyAnimation
Data will affect the progress of the animation.
Definition: Template.h:729
Gorgon::UI::ComponentTemplate::DragBarTag
@ DragBarTag
Definition: Template.h:860
Gorgon::UI::Template::SetSize
void SetSize(Geometry::Size value)
Changes the size of the template.
Definition: Template.h:514
Gorgon::UI::Template::AddPlaceholder
PlaceholderTemplate & AddPlaceholder(int index, ComponentCondition cond)
This will create a new placeholder and return it.
Definition: Template.h:422
Gorgon::UI::ComponentTemplate::AutoStart
@ AutoStart
Definition: Template.h:674
Gorgon::UI::ContainerTemplate::GetOrientation
Graphics::Orientation GetOrientation() const
Returns the current orientation of the container.
Definition: Template.h:1756
Gorgon::UI::State4TextIsSet
@ State4TextIsSet
Data effect of the component is set.
Definition: Template.h:346
Gorgon::UI::ComponentType
ComponentType
Types of components, see respective classes for details.
Definition: Template.h:161
Gorgon::UI::ComponentTemplate::valueordering
std::array< int, 4 > valueordering
Changes the ordering of the value source.
Definition: Template.h:1306
Gorgon::UI::LastBaselineRight
@ LastBaselineRight
Baseline right, for text, this aligns to the baseline of the last line.
Definition: Template.h:77
Gorgon::UI::Template::Template
Template(Template &&)=default
Gorgon::UI::ComponentTemplate::UseH
@ UseH
Hue.
Definition: Template.h:801
Gorgon::UI::ComponentTemplate::YMajorGrid
@ YMajorGrid
Definition: Template.h:901
Gorgon::UI::ContainerTemplate::GetType
virtual ComponentType GetType() const noexcept override
Returns the type of the component.
Definition: Template.h:1798
Gorgon::UI::ComponentTemplate::UseGBA
@ UseGBA
Definition: Template.h:834
Gorgon::UI::GraphicsTemplate::GetFillArea
bool GetFillArea() const
Returns whether this graphics will fill the component area.
Definition: Template.h:1615
Gorgon::UI::ComponentTemplate::AutoEnd
@ AutoEnd
Definition: Template.h:675
Gorgon::UI::VisualProvider::Instantiate
const Graphics::Drawable & Instantiate(Animation::ControllerBase &controller) const
Definition: Template.h:1541
Gorgon::UI::GraphicsTemplate::GraphicsTemplate
GraphicsTemplate()
Default constructor.
Definition: Template.h:1584
Gorgon::UI::ComponentTemplate::ValueSource
ValueSource
Which data channels should be used as the value, common combinations are listed, however,...
Definition: Template.h:772
ENUMCLASS
#define ENUMCLASS
Definition: Types.h:173
Gorgon::UI::ComponentTemplate::BlendColor
@ BlendColor
In text and graphics templates, this setting will blend the color to target color.
Definition: Template.h:720
Gorgon::UI::ContainerTemplate::SetOverlayExtent
void SetOverlayExtent(int hor, int ver)
Changes the overlay extent of the component.
Definition: Template.h:1739
Gorgon::UI::ComponentTemplate::RepeatMode
RepeatMode
Some components are repeated along some axis, this property controls how they will be repeated.
Definition: Template.h:886
Gorgon::UI::ComponentTemplate::ModifyX
@ ModifyX
Modifies the X coordinate of the component regardless of the container direction.
Definition: Template.h:701
Gorgon::UI::ComponentTemplate::SizingMode
SizingMode
Controls how the size is affected from the contents of the object.
Definition: Template.h:629
Gorgon::UI::ComponentTemplate::UseXYZ
@ UseXYZ
Definition: Template.h:829
Gorgon::UI::BottomCenter
@ BottomCenter
Bottom center.
Definition: Template.h:58
Gorgon::UI::ContainerTemplate::SetBorderSize
void SetBorderSize(int left, int top, int right, int bottom)
Changes the border size of the component.
Definition: Template.h:1702
Gorgon::UI::ComponentTemplate::ModifyPositionAndSize
@ ModifyPositionAndSize
This is a combined modification of position and size.
Definition: Template.h:751
Gorgon::UI::ComponentTemplate::UseRGBA
@ UseRGBA
Definition: Template.h:845
Gorgon::UI::GraphicsTemplate::GraphicsTemplate
GraphicsTemplate(const Graphics::Drawable &content)
Filling constructor, might cause ambiguous call due to most drawables being AnimationProviders as wel...
Definition: Template.h:1591
Gorgon::UI::ComponentTemplate::GetTag
Tag GetTag() const
Returns the tag of the component.
Definition: Template.h:1151
Gorgon::UI::ContainerTemplate::SetPadding
void SetPadding(Dimension value)
Changes the padding of the component. Padding is the minimum spacing inside the component.
Definition: Template.h:1676
Gorgon::UI::ComponentTemplate::SetCenter
void SetCenter(Point value)
Changes the center coordinate that will be used in rotation.
Definition: Template.h:944
Gorgon::UI::ComponentTemplate::State3Text
@ State3Text
Definition: Template.h:671
Gorgon::UI::ComponentTemplate::BottomTag
@ BottomTag
Definition: Template.h:869
Gorgon::UI::VisualProvider::SetAnimation
void SetAnimation(const Graphics::AnimationProvider &value)
Sets the content from an animation provider.
Definition: Template.h:1561
Gorgon::UI::ComponentTemplate::UseLC
@ UseLC
Definition: Template.h:837
Gorgon::UI::ComponentTemplate::GetContainerAnchor
Anchor GetContainerAnchor() const
Returns the anchor point of the container that this component will attach to.
Definition: Template.h:1215
Gorgon::UI::Ch2V1
@ Ch2V1
Channel 2 value is 1, the value will be rounded to 4 decimal points before comparison.
Definition: Template.h:278
Gorgon::Geometry::basic_Margin::Bottom
T_ Bottom
Bottom margin.
Definition: Margin.h:176
Gorgon::UI::ContainerTemplate::SetPadding
void SetPadding(int hor, int ver, Dimension::Unit unit=Dimension::Pixel)
Changes the padding of the component. Padding is the minimum spacing inside the component.
Definition: Template.h:1661
Gorgon::UI::Ch1V0
@ Ch1V0
Channel 1 value is 0, the value will be rounded to 4 decimal points before comparison.
Definition: Template.h:258
Gorgon::UI::ComponentTemplate::ModifyPosition
@ ModifyPosition
Position of this component will be affected by the data.
Definition: Template.h:697
Gorgon::UI::Template::AddContainer
ContainerTemplate & AddContainer(int index, ComponentCondition cond)
This will create a new drawable and return it.
Definition: Template.h:450
Gorgon::Geometry::basic_Point
This class represents a 2D point.
Definition: Point.h:32
Gorgon::UI::ComponentTemplate::Fixed
@ Fixed
The given size is absolute, it is not affected by the contents.
Definition: Template.h:631
Gorgon::UI::ComponentTemplate::SetSizing
void SetSizing(SizingMode value)
Changes the sizing mode of the component.
Definition: Template.h:974
Gorgon::UI::ComponentTemplate::NoRepeat
@ NoRepeat
Definition: Template.h:887
Gorgon::UI::ComponentTemplate::ModifyHeight
@ ModifyHeight
Height of this component will be affected.
Definition: Template.h:744
Gorgon::UI::ComponentTemplate::UseA
@ UseA
Definition: Template.h:791
Gorgon::Graphics::TextRenderer
This class allows printing text on the screen.
Definition: Font.h:152
Gorgon::UI::ComponentTemplate::ValueText4
@ ValueText4
Definition: Template.h:667
Gorgon::UI::ComponentTemplate::sizingw
SizingMode sizingw
Sizing mode.
Definition: Template.h:1326
Gorgon::UI::ComponentTemplate::SetAnchor
void SetAnchor(Anchor previous, Anchor container, Anchor my)
Changes the anchor of the component to the given values.
Definition: Template.h:1201
Gorgon::UI::ComponentTemplate::ModifySize
@ ModifySize
Size of this component will be affected.
Definition: Template.h:734
Gorgon::UI::GraphicsTemplate::SetFillArea
void SetFillArea(bool value)
TODO: add size controller.
Definition: Template.h:1608
Gorgon::UI::ContainerTemplate::SetShadowExtent
void SetShadowExtent(int left, int top, int right, int bottom)
Changes the shadow extent of the component.
Definition: Template.h:1722
Gorgon::UI::ComponentTemplate::SetValueSource
void SetValueSource(ValueSource value)
Returns the value source that will be used.
Definition: Template.h:1132
Gorgon::UI::IsMiddle
bool IsMiddle(Anchor a)
Returns if the given anchor is at middle vertically.
Definition: Template.h:149
Gorgon::UI::ComponentTemplate::SetReversible
void SetReversible(bool value)
Sets whether the component transition can be reversed. Can be used to simplify from - to - from anima...
Definition: Template.h:1257
Gorgon::UI::ComponentTemplate::GetIndent
Margin GetIndent() const
Returns the current indent.
Definition: Template.h:1071
Gorgon::UI::ComponentTemplate::UseX
@ UseX
Definition: Template.h:774
Gorgon::UI::ComponentTemplate::YTick
@ YTick
Definition: Template.h:896
Gorgon::UI::ComponentTemplate::UseL
@ UseL
Lightness.
Definition: Template.h:798
Gorgon::UI::ComponentCondition
ComponentCondition
Controls the condition when the components are visible.
Definition: Template.h:174
Gorgon::UI::Template::SetSizing
void SetSizing(SizeMode x, SizeMode y)
Changes the size mode of the template.
Definition: Template.h:491
Gorgon::UI::ComponentTemplate::UseLCHA
@ UseLCHA
Definition: Template.h:843
Gorgon::UI::ComponentTemplate::GetClip
bool GetClip() const
Returns whether currently clipping the contents.
Definition: Template.h:1272
Gorgon::UI::TextholderTemplate::IsReady
bool IsReady() const
Returns if this text holder can perform rendering.
Definition: Template.cpp:457
Gorgon::UI::ComponentTemplate::GetIndex
int GetIndex() const
Returns the component index.
Definition: Template.h:1235
Gorgon::UI::ComponentTemplate::clip
bool clip
If set to true, will clip the contents of the component to the bounds.
Definition: Template.h:1284
Gorgon::UI::ComponentTemplate::IsTransition
bool IsTransition() const
Returns whether this component is a transition component.
Definition: Template.h:1254
Gorgon::UI::ContainerTemplate::GetShadowExtent
Geometry::Margin GetShadowExtent() const
Returns the shadow extent.
Definition: Template.h:1729
Gorgon::Graphics::Orientation::Horizontal
@ Horizontal
Gorgon::UI::Active
@ Active
This is for widgets that can be activated, like a count down timer.
Definition: Template.h:245
Gorgon::UI::IsMouseRelated
bool IsMouseRelated(ComponentCondition condition)
Returns if the given condition is related to mouse events.
Definition: Template.h:371
Gorgon::UI::GraphicsTemplate::GraphicsTemplate
GraphicsTemplate(const Graphics::AnimationProvider &content)
Filling constructor, might cause ambiguous call due to most drawables being AnimationProviders as wel...
Definition: Template.h:1596
Gorgon::UI::MiddleRight
@ MiddleRight
Middle right.
Definition: Template.h:53
Gorgon::UI::ContainerTemplate::SetPadding
void SetPadding(Dimension hor, Dimension ver)
Changes the padding of the component. Padding is the minimum spacing inside the component.
Definition: Template.h:1679
Gorgon::UI::Template::SetAdditionalSize
void SetAdditionalSize(int w, int h)
Changes the additional size of the template.
Definition: Template.h:536
Gorgon::UI::Template::GetXSizing
SizeMode GetXSizing() const
Returns the sizing mode.
Definition: Template.h:498
Gorgon::UI::ComponentTemplate::source
ValueSource source
The value that will be used for this component.
Definition: Template.h:1303
Gorgon::UI::ComponentTemplate::condition_to
ComponentCondition condition_to
Condition when this component will be visible, setting condition_to will create a transition componen...
Definition: Template.h:1294
Gorgon::UI::ComponentTemplate::SetPosition
void SetPosition(int x, int y, Dimension::Unit unit=Dimension::Pixel)
Changes the coordinates of the component to the given position.
Definition: Template.h:913
Gorgon::UI::State2
@ State2
Second state of the widget, first state is Always.
Definition: Template.h:201
Gorgon::UI::ComponentTemplate::ValueText2
@ ValueText2
Definition: Template.h:661
Gorgon::UI::ComponentTemplate::UseGB
@ UseGB
Definition: Template.h:819
Gorgon::UI::IsCenter
bool IsCenter(Anchor a)
Returns if an anchor is centered horizontally.
Definition: Template.h:109
Gorgon::UI::TextholderTemplate::GetColor
Graphics::RGBAf GetColor() const
Returns current color.
Definition: Template.h:1459
Gorgon::UI::ComponentTemplate::XMinorTick
@ XMinorTick
Definition: Template.h:903
Gorgon::Geometry::basic_Margin::Right
T_ Right
Right margin.
Definition: Margin.h:173
Gorgon::UI::Template::Assume
void Assume(ComponentTemplate &component)
Adds a previously created component to the template, the ownership of the object is transferred to th...
Definition: Template.cpp:446
Gorgon::UI::Graphics
@ Graphics
Definition: Template.h:164
Gorgon::UI::Ch1V1
@ Ch1V1
Channel 1 value is 1, the value will be rounded to 4 decimal points before comparison.
Definition: Template.h:266
Gorgon::UI::Icon2IsSet
@ Icon2IsSet
Data effect of the component is set.
Definition: Template.h:352
Gorgon::UI::ComponentTemplate::SetIndent
void SetIndent(Geometry::Margin value, Dimension::Unit unit=Dimension::Pixel)
Changes the indent of the component.
Definition: Template.h:1049
Gorgon::UI::Template::Free
@ Free
This template can be freely resized.
Definition: Template.h:398
Gorgon::UI::GraphicsTemplate::SetColor
void SetColor(Graphics::RGBAf value)
Changes the color that will set tint of the drawn graphics.
Definition: Template.h:1620
Gorgon::UI::StateIcon1IsSet
@ StateIcon1IsSet
Data effect of the component is set.
Definition: Template.h:355
Gorgon::UI::Template::GetHeight
int GetHeight() const
Returns the size of the template.
Definition: Template.h:530
Gorgon::UI::ComponentTemplate::UseRG
@ UseRG
Definition: Template.h:816
Gorgon::UI::ComponentTemplate::ShrinkOnly
@ ShrinkOnly
Given size is the maximum, if the contents are smaller, the object be resized.
Definition: Template.h:642
Gorgon::UI::ComponentTemplate::SetSize
void SetSize(int w, int h, Dimension::Unit unit=Dimension::Pixel)
Changes the size of the component. The given values are ignored if the sizing mode is Automatic.
Definition: Template.h:952
Gorgon::UI::ComponentTemplate::NoTag
@ NoTag
Definition: Template.h:851
Gorgon::UI::ComponentTemplate::YMinorGrid
@ YMinorGrid
Definition: Template.h:899
Gorgon::UI::VisualProvider::IsDrawable
bool IsDrawable() const
Of this drawable template has drawable content.
Definition: Template.h:1519
Gorgon::UI::ComponentTemplate::SetTag
void SetTag(Tag value)
Changes the tag of this component.
Definition: Template.h:1144
Gorgon::UI::ComponentTemplate::YMinorTick
@ YMinorTick
Definition: Template.h:904
Gorgon::UI::Template::GetConditionDuration
int GetConditionDuration(ComponentCondition from, ComponentCondition to) const
Returns the duration of the component condition.
Definition: Template.h:562
Gorgon::UI::ComponentTemplate::UseGray
@ UseGray
Grayscale value of color.
Definition: Template.h:795
Gorgon::UI::ComponentTemplate::State4Text
@ State4Text
Definition: Template.h:672
Gorgon::UI::ComponentTemplate::UseFourth
@ UseFourth
Definition: Template.h:790
Gorgon::UI::ComponentTemplate::sizingh
SizingMode sizingh
Definition: Template.h:1326
Gorgon::UI::HVScroll
@ HVScroll
There is space both horizontally and vertically to be scrolled.
Definition: Template.h:254
Gorgon::UI::ComponentTemplate::SetIndent
void SetIndent(int left, int top, int right, int bottom, Dimension::Unit unit=Dimension::Pixel)
Changes the indent of the component.
Definition: Template.h:1042
Gorgon::UI::Focused
@ Focused
Widget has the focus.
Definition: Template.h:190
Gorgon::UI::ComponentTemplate::AbsoluteSliding
@ AbsoluteSliding
Absolute positioning, coordinates will start from the container, percent based movement will move to ...
Definition: Template.h:615
Gorgon::UI::ContainerTemplate::SetShadowExtent
void SetShadowExtent(int value)
Changes the shadow extent of the component.
Definition: Template.h:1714
Gorgon::UI::ComponentTemplate::SecondDragTag
@ SecondDragTag
Definition: Template.h:859
Gorgon::UI::MiddleCenter
@ MiddleCenter
Middle center, using this position ensures that the components will be inside each other.
Definition: Template.h:51
Gorgon::Geometry::basic_Point::Y
T_ Y
Y coordinate.
Definition: Point.h:371
Gorgon::UI::ComponentTemplate::UseRGB
@ UseRGB
Definition: Template.h:830
Gorgon::UI::ComponentTemplate::GetValueMin
float GetValueMin(int channel) const
Returns the value scale minimum.
Definition: Template.h:1179
Gorgon::UI::ComponentTemplate::State2Text
@ State2Text
Definition: Template.h:670
Gorgon::UI::StateIcon2IsSet
@ StateIcon2IsSet
Data effect of the component is set.
Definition: Template.h:358
Gorgon::UI::ComponentTemplate::center
Point center
Center point for rotation.
Definition: Template.h:1339
Gorgon::UI::GraphicsTemplate
Defines a visual component.
Definition: Template.h:1580
Gorgon::Geometry::basic_Size::Width
T_ Width
Width of this size object.
Definition: Size.h:258
Gorgon::Graphics::Drawable
Represents a drawable object, that can be drawn to the given point.
Definition: Drawables.h:17
Gorgon::UI::PlaceholderTemplate::GetType
virtual ComponentType GetType() const noexcept override
Returns the type of the component.
Definition: Template.h:1379
Gorgon::UI::Ignored
@ Ignored
Definition: Template.h:166
Gorgon::UI::IgnoredTemplate
This component type will be ignored by ComponentStack, effectively erasing Always when necessary.
Definition: Template.h:1408
Gorgon::UI::ComponentTemplate::GetValueRange
std::array< float, 4 > GetValueRange() const
Returns the range of the value scale.
Definition: Template.h:1173
Gorgon::UI::Template::Release
ComponentTemplate & Release(int index)
Releases the component and its ownership.
Definition: Template.cpp:432
Gorgon::UI::VisualProvider::VisualProvider
VisualProvider(Event< ComponentTemplate > &changed, const Graphics::AnimationProvider &content)
Definition: Template.h:1500
Gorgon::UI::ComponentTemplate::State1Icon
@ State1Icon
Definition: Template.h:681
Gorgon::UI::ComponentTemplate::ItemTag
@ ItemTag
Definition: Template.h:876
Gorgon::UI::Template::AddIgnored
IgnoredTemplate & AddIgnored(int index, ComponentCondition cond)
This will create a new ignored template.
Definition: Template.h:434
Gorgon::UI::ComponentTemplate::GetTargetCondition
ComponentCondition GetTargetCondition() const
Returns the target component condition.
Definition: Template.h:1251
Gorgon::UI::ContainerTemplate
Container class that defines an area according to the Box Model.
Definition: Template.h:1655
Gorgon::UI::ComponentTemplate::GetCenter
Point GetCenter() const
Returns the center point that would be used for rotation.
Definition: Template.h:947
Gorgon::UI::Ch3V05
@ Ch3V05
Channel 3 value is 0.5, the value will be rounded to 4 decimal points before comparison.
Definition: Template.h:286
Gorgon::UI::FirstBaselineLeft
@ FirstBaselineLeft
Baseline left, for text, this aligns to the baseline of the first line.
Definition: Template.h:64
Gorgon::UI::TextholderTemplate::GetRenderer
const Graphics::TextRenderer & GetRenderer() const
Returns the renderer for this textholder.
Definition: Template.h:1445
Gorgon::UI::Never
@ Never
Component is always disabled.
Definition: Template.h:179
Gorgon::UI::ComponentTemplate::UseWidth
@ UseWidth
Definition: Template.h:775
Gorgon::UI::Template::ChangedEvent
Event< Template > ChangedEvent
This event is fired whenever template or its components are changed.
Definition: Template.h:584
Gorgon::UI::ComponentTemplate::XMajorTick
@ XMajorTick
Definition: Template.h:905
Gorgon::UI::Ch3V1
@ Ch3V1
Channel 3 value is 1, the value will be rounded to 4 decimal points before comparison.
Definition: Template.h:290
Template.h
This file contains UI component template system.
Gorgon::UI::ComponentTemplate::PositionType
PositionType
Controls where the component will be placed.
Definition: Template.h:607
Gorgon::UI::Textholder
@ Textholder
Definition: Template.h:163
Gorgon::UI::State2TextIsSet
@ State2TextIsSet
Data effect of the component is set.
Definition: Template.h:340
Gorgon::Geometry::basic_Margin
This class defines Margin of an object or an area.
Definition: Margin.h:22
Gorgon::UI::ComponentTemplate::SetMargin
void SetMargin(Geometry::Margin value, Dimension::Unit unit=Dimension::Pixel)
Changes the margin of the component.
Definition: Template.h:1007
Gorgon::UI::ComponentTemplate::GetType
virtual ComponentType GetType() const noexcept=0
Returns the type of the component.
Gorgon::UI::ComponentTemplate::SetIndent
void SetIndent(Dimension hor, Dimension ver)
Changes the indent of the component.
Definition: Template.h:1060
Gorgon::UI::ComponentTemplate::Title
@ Title
Definition: Template.h:653
Gorgon::UI::ComponentTemplate::UseXW
@ UseXW
Definition: Template.h:824
Gorgon::UI::ComponentTemplate::GetVerticalSizing
SizingMode GetVerticalSizing() const
Returns the horizontal sizing mode of the component.
Definition: Template.h:987
Gorgon::UI::ComponentTemplate::XMinorGrid
@ XMinorGrid
Definition: Template.h:898
Gorgon::UI::ComponentTemplate::Minor
@ Minor
Definition: Template.h:889
Gorgon::UI::ComponentTemplate::Icon2
@ Icon2
Definition: Template.h:680
Gorgon::UI::ContainerTemplate::SetOrientation
void SetOrientation(Graphics::Orientation value)
Changes the orientation of the template.
Definition: Template.h:1753
Gorgon::UI::ComponentTemplate::TickTag
@ TickTag
Definition: Template.h:855
Gorgon::UI::ComponentTemplate::positioning
PositionType positioning
Positioning mode.
Definition: Template.h:1320
Gorgon::UI::GraphicsTemplate::GetTargetColor
Graphics::RGBAf GetTargetColor() const
Returns the target tint color that will be used for BlendColor value modification.
Definition: Template.h:1639
Gorgon::UI::ComponentTemplate::ValueText1
@ ValueText1
Definition: Template.h:658
Gorgon::UI::IgnoredTemplate::GetType
virtual ComponentType GetType() const noexcept override
Returns the type of the component.
Definition: Template.h:1412
Gorgon::UI::ComponentTemplate::IncrementTag
@ IncrementTag
Definition: Template.h:864
Gorgon::UI::Template::SetAdditionalSize
void SetAdditionalSize(Geometry::Size value)
Changes the additional size of the template.
Definition: Template.h:543
Gorgon::UI::StateIcon3IsSet
@ StateIcon3IsSet
Data effect of the component is set.
Definition: Template.h:361
Gorgon::UI::IsLeft
bool IsLeft(Anchor a)
Returns if an anchor is on the left.
Definition: Template.h:81
Gorgon::UI::VisualProvider::HasContent
bool HasContent() const
If this drawable has any content.
Definition: Template.h:1509
Gorgon::UI::ContainerTemplate::SetBorderSize
void SetBorderSize(Geometry::Margin value)
Changes the border size of the component.
Definition: Template.h:1706
Gorgon::UI::Max
@ Max
Do not use this condition, this is to size the arrays.
Definition: Template.h:367
Gorgon::UI::ComponentTemplate::UseRGA
@ UseRGA
Definition: Template.h:832
Gorgon::UI::ContainerTemplate::SetOverlayExtent
void SetOverlayExtent(int value)
Changes the overlay extent of the component.
Definition: Template.h:1735
Gorgon::UI::PlaceholderTemplate::SetTemplate
void SetTemplate(const Template &value)
Sets the sub template for this placeholder.
Definition: Template.h:1384
Gorgon::UI::State3TextIsSet
@ State3TextIsSet
Data effect of the component is set.
Definition: Template.h:343
Gorgon::UI::ComponentTemplate::Icon1
@ Icon1
Definition: Template.h:679
Gorgon::UI::Anchor
Anchor
Anchor position.
Definition: Template.h:32
Gorgon::UI::PlaceholderTemplate::HasTemplate
bool HasTemplate() const
Returns if this placeholder has a sub template.
Definition: Template.h:1390
Gorgon::UI::Reversed
@ Reversed
For widgets that can have reversed state.
Definition: Template.h:224
Gorgon::UI::ComponentTemplate::UseXZ
@ UseXZ
Definition: Template.h:821
Gorgon::UI::ValueText1IsSet
@ ValueText1IsSet
Data effect of the component is set.
Definition: Template.h:325
Gorgon::UI::ComponentTemplate::UseXY
@ UseXY
Definition: Template.h:814
Gorgon::UI::GraphicsTemplate::Content
VisualProvider Content
Graphical representation of the template.
Definition: Template.h:1644
Gorgon::UI::Alone
@ Alone
In a list this denotes the item alone.
Definition: Template.h:242
Gorgon::UI::ComponentTemplate::UseZ
@ UseZ
Definition: Template.h:787
Gorgon::UI::ComponentTemplate::SetIndent
void SetIndent(Dimension value)
Changes the indent of the component.
Definition: Template.h:1056
Gorgon::UI::Template::SizeMode
SizeMode
Size mode of the template, will be applied separately to X and Y dimensions.
Definition: Template.h:396
Gorgon::UI::ComponentTemplate::LeftTag
@ LeftTag
Definition: Template.h:866
Gorgon::UI::ContainerTemplate::Overlay
VisualProvider Overlay
Overlay graphics, overlay will be drawn on top of the contents.
Definition: Template.h:1813
Gorgon::UI::ComponentTemplate::SetCondition
void SetCondition(ComponentCondition from, ComponentCondition to)
Sets the condition when this component will be visible. This variant will create a transition conditi...
Definition: Template.h:1245
Gorgon::UI::ComponentTemplate::Tag
Tag
Tags mark a component to be modified in a way meaningful to specific widgets.
Definition: Template.h:850
Gorgon::UI::ComponentTemplate::DataEffect
DataEffect
Which property will the data of the widget affect.
Definition: Template.h:646
Gorgon::UI::TextholderTemplate::SetTargetColor
void SetTargetColor(Graphics::RGBAf value)
Sets the target color for BlendColor value modification.
Definition: Template.h:1465
Gorgon::UI::ComponentTemplate::SetCenter
void SetCenter(Geometry::Point pos, Dimension::Unit unit=Dimension::Pixel)
Changes the center coordinate that will be used in rotation.
Definition: Template.h:938
Gorgon::UI::ComponentTemplate::GetValueModification
ValueModification GetValueModification() const
Returns which property of this component will be modified by the value.
Definition: Template.h:1129
Gorgon::UI::ComponentTemplate::MinimapTag
@ MinimapTag
Definition: Template.h:863
Gorgon::UI::operator|
ComponentTemplate::ValueSource operator|(ComponentTemplate::ValueSource l, ComponentTemplate::ValueSource r)
Definition: Template.h:1364
Gorgon::UI::Ch4V05
@ Ch4V05
Channel 4 value is 0.5, the value will be rounded to 4 decimal points before comparison.
Definition: Template.h:298
Gorgon::UI::Template::SetSpacing
void SetSpacing(int value)
Sets the spacing required for this template.
Definition: Template.h:571
Gorgon::UI::State3
@ State3
Third state of the widget, first state is Always.
Definition: Template.h:204
Gorgon::UI::Cancel
@ Cancel
This widget is the cancel widget of its container.
Definition: Template.h:308
Gorgon::UI::Always
@ Always
Component is always active.
Definition: Template.h:176
Gorgon::UI::ContainerTemplate::SetPadding
void SetPadding(Dimension left, Dimension top, Dimension right, Dimension bottom)
Changes the padding of the component. Padding is the minimum spacing inside the component.
Definition: Template.h:1682
Gorgon::UI::Dimension::Unit
Unit
Unit for dimensions.
Definition: Dimension.h:16
Gorgon::UI::ComponentTemplate::GetDataEffect
DataEffect GetDataEffect() const
Returns how the data will affect this component.
Definition: Template.h:1083
Gorgon::UI::ComponentTemplate::SetMargin
void SetMargin(int hor, int ver, Dimension::Unit unit=Dimension::Pixel)
Changes the margin of the component.
Definition: Template.h:996
Gorgon::UI::Icon1IsSet
@ Icon1IsSet
Data effect of the component is set.
Definition: Template.h:349
Gorgon::UI::Ch1V05
@ Ch1V05
Channel 1 value is 0.5, the value will be rounded to 4 decimal points before comparison.
Definition: Template.h:262
Gorgon::UI::ComponentTemplate::valuemin
std::array< float, 4 > valuemin
If required, can be used to scale incoming data.
Definition: Template.h:1309
Gorgon::UI::Readonly
@ Readonly
Component is visible when the widget is readonly.
Definition: Template.h:187
Gorgon::UI::TextholderTemplate::SetColor
void SetColor(Graphics::RGBAf value)
Changes the color that will override default color of the text drawn.
Definition: Template.h:1452
Gorgon::UI::ComponentTemplate::YGrid
@ YGrid
Definition: Template.h:893
Gorgon::UI::ContainerTemplate::SetPadding
void SetPadding(int value, Dimension::Unit unit=Dimension::Pixel)
Changes the padding of the component. Padding is the minimum spacing inside the component.
Definition: Template.h:1658
Gorgon::UI::ContainerTemplate::RemoveIndexAt
void RemoveIndexAt(int index)
Removes the index at the given position.
Definition: Template.h:1777
Gorgon::UI::ComponentTemplate::SetSize
void SetSize(Size size)
Changes the size of the component. If sizing mode is automatic, it will be set to fixed.
Definition: Template.h:961
Gorgon::UI::Dimension::Percent
@ Percent
Dimension will be relative to the parent and given in percent.
Definition: Dimension.h:22
Gorgon::UI::ComponentTemplate::ExpandTag
@ ExpandTag
Definition: Template.h:870