MyGUI 3.4.3
MyGUI_BackwardCompatibility.cpp
Go to the documentation of this file.
1/*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7#include "MyGUI_Precompiled.h"
9#include "MyGUI_Button.h"
10#include "MyGUI_ComboBox.h"
11#include "MyGUI_EditBox.h"
12#include "MyGUI_ItemBox.h"
13#include "MyGUI_ListBox.h"
14#include "MyGUI_MenuControl.h"
15#include "MyGUI_MenuItem.h"
16#include "MyGUI_MultiListBox.h"
17#include "MyGUI_ProgressBar.h"
18#include "MyGUI_ScrollView.h"
19#include "MyGUI_TabControl.h"
20#include "MyGUI_Widget.h"
21#include "MyGUI_Window.h"
22#include "MyGUI_TabItem.h"
23#include "MyGUI_Canvas.h"
24#include "MyGUI_LayoutManager.h"
25#include "MyGUI_FontManager.h"
27#include "MyGUI_Gui.h"
29#include "MyGUI_InputManager.h"
30#include "MyGUI_RenderManager.h"
32#include "MyGUI_PluginManager.h"
33#include "MyGUI_SkinManager.h"
34#include "MyGUI_WidgetManager.h"
37
38namespace MyGUI
39{
40
41#ifndef MYGUI_DONT_USE_OBSOLETE
42
44 {
45 static_cast<Button*>(this)->setStateSelected(_value);
46 }
48 {
49 return static_cast<const Button*>(this)->getStateSelected();
50 }
52 {
53 static_cast<Button*>(this)->setStateSelected(_value);
54 }
56 {
57 return static_cast<const Button*>(this)->getStateSelected();
58 }
60 {
61 return static_cast<const Button*>(this)->_getImageBox();
62 }
64 {
65 if (static_cast<Button*>(this)->_getImageBox())
66 static_cast<Button*>(this)->_getImageBox()->setImageIndex(_index);
67 }
69 {
70 if (static_cast<const Button*>(this)->_getImageBox())
71 return static_cast<const Button*>(this)->_getImageBox()->getImageIndex();
72 return ITEM_NONE;
73 }
74
75 void MemberObsolete<ImageBox>::addItemFrameDublicate(size_t _index, size_t _indexSourceFrame)
76 {
77 static_cast<ImageBox*>(this)->addItemFrameDuplicate(_index, _indexSourceFrame);
78 }
79 void MemberObsolete<ImageBox>::insertItemFrameDublicate(size_t _index, size_t _indexFrame, size_t _indexSourceFrame)
80 {
81 static_cast<ImageBox*>(this)->insertItemFrameDuplicate(_index, _indexFrame, _indexSourceFrame);
82 }
83
84
86 {
87 return static_cast<const ComboBox*>(this)->getIndexSelected();
88 }
90 {
91 static_cast<ComboBox*>(this)->setIndexSelected(_index);
92 }
94 {
95 static_cast<ComboBox*>(this)->clearIndexSelected();
96 }
97
98 void MemberObsolete<ComboBox>::insertItem(size_t _index, const UString& _name)
99 {
100 static_cast<ComboBox*>(this)->insertItemAt(_index, _name);
101 }
102 void MemberObsolete<ComboBox>::setItem(size_t _index, const UString& _item)
103 {
104 static_cast<ComboBox*>(this)->setItemNameAt(_index, _item);
105 }
106 const UString& MemberObsolete<ComboBox>::getItem(size_t _index) const
107 {
108 return static_cast<const ComboBox*>(this)->getItemNameAt(_index);
109 }
111 {
112 static_cast<ComboBox*>(this)->removeItemAt(_index);
113 }
115 {
116 static_cast<ComboBox*>(this)->removeAllItems();
117 }
119 {
120 return static_cast<const ComboBox*>(this)->getIndexSelected();
121 }
123 {
124 static_cast<ComboBox*>(this)->clearIndexSelected();
125 }
127 {
128 static_cast<ComboBox*>(this)->setIndexSelected(_index);
129 }
130
132 {
133 static_cast<ComboBox*>(this)->setMaxListLength(_value);
134 }
136 {
137 return static_cast<const ComboBox*>(this)->getMaxListLength();
138 }
139
140
142 {
143 static_cast<EditBox*>(this)->setVisibleVScroll(_visible);
144 }
146 {
147 return static_cast<EditBox*>(this)->isVisibleVScroll();
148 }
150 {
151 static_cast<EditBox*>(this)->setVisibleHScroll(_visible);
152 }
154 {
155 return static_cast<EditBox*>(this)->isVisibleHScroll();
156 }
157
158 void MemberObsolete<EditBox>::setTextColour(size_t _start, size_t _count, const Colour& _colour)
159 {
160 static_cast<EditBox*>(this)->setTextIntervalColour(_start, _count, _colour);
161 }
162 void MemberObsolete<EditBox>::getTextSelect(size_t& _start, size_t& _end) const
163 {
164 _start = static_cast<const EditBox*>(this)->getTextSelectionStart();
165 _end = static_cast<const EditBox*>(this)->getTextSelectionEnd();
166 }
167 UString MemberObsolete<EditBox>::getText(size_t _start, size_t _count) const
168 {
169 return static_cast<const EditBox*>(this)->getTextInterval(_start, _count);
170 }
171 void MemberObsolete<EditBox>::setTextSelect(size_t _start, size_t _end)
172 {
173 static_cast<EditBox*>(this)->setTextSelection(_start, _end);
174 }
176 {
177 static_cast<EditBox*>(this)->deleteTextSelection();
178 }
180 {
181 return static_cast<const EditBox*>(this)->getTextSelection();
182 }
184 {
185 return static_cast<EditBox*>(this)->isTextSelection();
186 }
188 {
189 static_cast<EditBox*>(this)->setTextSelectionColour(_colour);
190 }
191
192
194 {
195 return static_cast<const ItemBox*>(this)->getIndexSelected();
196 }
198 {
199 static_cast<ItemBox*>(this)->setIndexSelected(_index);
200 }
202 {
203 static_cast<ItemBox*>(this)->clearIndexSelected();
204 }
205
206 void MemberObsolete<ItemBox>::insertItem(size_t _index, Any _data)
207 {
208 static_cast<ItemBox*>(this)->insertItemAt(_index, _data);
209 }
210 void MemberObsolete<ItemBox>::setItemData(size_t _index, Any _data)
211 {
212 static_cast<ItemBox*>(this)->setItemDataAt(_index, _data);
213 }
215 {
216 static_cast<ItemBox*>(this)->removeItemAt(_index);
217 }
219 {
220 static_cast<ItemBox*>(this)->removeAllItems();
221 }
223 {
224 return static_cast<const ItemBox*>(this)->getIndexSelected();
225 }
227 {
228 static_cast<ItemBox*>(this)->clearIndexSelected();
229 }
231 {
232 static_cast<ItemBox*>(this)->setIndexSelected(_index);
233 }
234
236 {
237 return static_cast<const ItemBox*>(this)->getWidgetDrag();
238 }
240 {
241 static_cast<ItemBox*>(this)->resetDrag();
242 }
243
245 {
246 static_cast<ItemBox*>(this)->setVerticalAlignment(_value);
247 }
249 {
250 return static_cast<const ItemBox*>(this)->getVerticalAlignment();
251 }
252
253
255 {
256 return static_cast<const ListBox*>(this)->getIndexSelected();
257 }
259 {
260 static_cast<ListBox*>(this)->setIndexSelected(_index);
261 }
263 {
264 static_cast<ListBox*>(this)->clearIndexSelected();
265 }
266
267 void MemberObsolete<ListBox>::insertItem(size_t _index, const UString& _item)
268 {
269 static_cast<ListBox*>(this)->insertItemAt(_index, _item);
270 }
271 void MemberObsolete<ListBox>::setItem(size_t _index, const UString& _item)
272 {
273 static_cast<ListBox*>(this)->setItemNameAt(_index, _item);
274 }
275 const UString& MemberObsolete<ListBox>::getItem(size_t _index) const
276 {
277 return static_cast<const ListBox*>(this)->getItemNameAt(_index);
278 }
280 {
281 static_cast<ListBox*>(this)->removeItemAt(_index);
282 }
284 {
285 static_cast<ListBox*>(this)->removeAllItems();
286 }
288 {
289 return static_cast<ListBox*>(this)->findItemIndexWith(_item);
290 }
292 {
293 return static_cast<const ListBox*>(this)->getIndexSelected();
294 }
296 {
297 static_cast<ListBox*>(this)->clearIndexSelected();
298 }
300 {
301 static_cast<ListBox*>(this)->setIndexSelected(_index);
302 }
304 {
305 static_cast<ListBox*>(this)->beginToItemAt(_index);
306 }
308 {
309 static_cast<ListBox*>(this)->beginToItemFirst();
310 }
312 {
313 static_cast<ListBox*>(this)->beginToItemLast();
314 }
316 {
317 static_cast<ListBox*>(this)->beginToItemSelected();
318 }
319 bool MemberObsolete<ListBox>::isItemVisible(size_t _index, bool _fill)
320 {
321 return static_cast<ListBox*>(this)->isItemVisibleAt(_index, _fill);
322 }
324 {
325 return static_cast<ListBox*>(this)->isItemSelectedVisible(_fill);
326 }
327
328
330 {
331 static_cast<MenuControl*>(this)->setVisible(true);
332 }
334 {
335 static_cast<MenuControl*>(this)->setVisible(false);
336 }
338 {
339 return static_cast<MenuControl*>(this)->getVisible();
340 }
341
343 {
344 static_cast<MenuControl*>(this)->setItemChildVisibleAt(_index, true);
345 }
347 {
348 static_cast<MenuControl*>(this)->setItemChildVisible(_item, true);
349 }
351 {
352 static_cast<MenuControl*>(this)->setItemChildVisibleAt(_index, false);
353 }
355 {
356 static_cast<MenuControl*>(this)->setItemChildVisible(_item, false);
357 }
358
360 {
361 static_cast<MenuControl*>(this)->setVerticalAlignment(_value);
362 }
364 {
365 return static_cast<const MenuControl*>(this)->getVerticalAlignment();
366 }
367
369 {
370 static_cast<MenuItem*>(this)->setItemChildVisible(true);
371 }
373 {
374 static_cast<MenuItem*>(this)->setItemChildVisible(false);
375 }
376
377
379 {
380 return static_cast<const MultiListBox*>(this)->getIndexSelected();
381 }
383 {
384 static_cast<MultiListBox*>(this)->setIndexSelected(_index);
385 }
387 {
388 static_cast<MultiListBox*>(this)->clearIndexSelected();
389 }
390
391 size_t MemberObsolete<MultiListBox>::findItem(size_t _column, const UString& _name)
392 {
393 return static_cast<MultiListBox*>(this)->findSubItemWith(_column, _name);
394 }
395 const UString& MemberObsolete<MultiListBox>::getSubItem(size_t _column, size_t _index) const
396 {
397 return static_cast<const MultiListBox*>(this)->getSubItemNameAt(_column, _index);
398 }
399 void MemberObsolete<MultiListBox>::setSubItem(size_t _column, size_t _index, const UString& _name)
400 {
401 static_cast<MultiListBox*>(this)->setSubItemNameAt(_column, _index, _name);
402 }
404 {
405 static_cast<MultiListBox*>(this)->removeColumnAt(_column);
406 }
408 {
409 static_cast<MultiListBox*>(this)->removeAllColumns();
410 }
412 {
413 return static_cast<const MultiListBox*>(this)->getColumnWidthAt(_column);
414 }
416 {
417 return static_cast<const MultiListBox*>(this)->getColumnNameAt(_column);
418 }
419 void MemberObsolete<MultiListBox>::setColumnWidth(size_t _column, int _width)
420 {
421 static_cast<MultiListBox*>(this)->setColumnWidthAt(_column, _width);
422 }
424 {
425 static_cast<MultiListBox*>(this)->addColumn(_name, _width);
426 }
427 void MemberObsolete<MultiListBox>::setColumnName(size_t _column, const UString& _name)
428 {
429 static_cast<MultiListBox*>(this)->setColumnNameAt(_column, _name);
430 }
431 void MemberObsolete<MultiListBox>::insertColumn(size_t _column, int _width, const UString& _name)
432 {
433 static_cast<MultiListBox*>(this)->insertColumnAt(_column, _name, _width);
434 }
436 {
437 return static_cast<const MultiListBox*>(this)->getIndexSelected();
438 }
440 {
441 static_cast<MultiListBox*>(this)->clearIndexSelected();
442 }
444 {
445 static_cast<MultiListBox*>(this)->setIndexSelected(_index);
446 }
447 void MemberObsolete<MultiListBox>::insertItem(size_t _index, const UString& _name)
448 {
449 static_cast<MultiListBox*>(this)->insertItemAt(_index, _name);
450 }
451 void MemberObsolete<MultiListBox>::setItem(size_t _index, const UString& _name)
452 {
453 static_cast<MultiListBox*>(this)->setItemNameAt(_index, _name);
454 }
456 {
457 return static_cast<const MultiListBox*>(this)->getItemNameAt(_index);
458 }
460 {
461 static_cast<MultiListBox*>(this)->removeItemAt(_index);
462 }
464 {
465 static_cast<MultiListBox*>(this)->removeAllItems();
466 }
467
468
470 {
471 if (_value == Align::Right)
472 static_cast<ProgressBar*>(this)->setFlowDirection(FlowDirection::RightToLeft);
473 else if (_value == Align::Top)
474 static_cast<ProgressBar*>(this)->setFlowDirection(FlowDirection::TopToBottom);
475 else if (_value == Align::Bottom)
476 static_cast<ProgressBar*>(this)->setFlowDirection(FlowDirection::BottomToTop);
477 else
478 static_cast<ProgressBar*>(this)->setFlowDirection(FlowDirection::LeftToRight);
479 }
480
482 {
483 if (static_cast<const ProgressBar*>(this)->getFlowDirection() == FlowDirection::RightToLeft)
484 return Align::Right;
485 if (static_cast<const ProgressBar*>(this)->getFlowDirection() == FlowDirection::TopToBottom)
486 return Align::Top;
487 if (static_cast<const ProgressBar*>(this)->getFlowDirection() == FlowDirection::BottomToTop)
488 return Align::Bottom;
489
490 return Align::Left;
491 }
492
493
495 {
496 static_cast<ScrollView*>(this)->setVisibleVScroll(_visible);
497 }
499 {
500 return static_cast<ScrollView*>(this)->isVisibleVScroll();
501 }
503 {
504 static_cast<ScrollView*>(this)->setVisibleHScroll(_visible);
505 }
507 {
508 return static_cast<ScrollView*>(this)->isVisibleHScroll();
509 }
510
511
513 {
514 return static_cast<const TabControl*>(this)->getButtonWidthAt(_index);
515 }
517 {
518 return static_cast<const TabControl*>(this)->getButtonWidth(_sheet);
519 }
521 {
522 static_cast<TabControl*>(this)->setButtonWidthAt(_index, _width);
523 }
525 {
526 static_cast<TabControl*>(this)->setButtonWidth(_sheet, _width);
527 }
529 {
530 static_cast<TabControl*>(this)->beginToItemAt(_index);
531 }
533 {
534 static_cast<TabControl*>(this)->beginToItemSelected();
535 }
537 {
538 return static_cast<const TabControl*>(this)->getItemCount();
539 }
541 {
542 return static_cast<const TabControl*>(this)->getItemName(_sheet);
543 }
545 {
546 return static_cast<const TabControl*>(this)->getItemNameAt(_index);
547 }
549 {
550 return static_cast<const TabControl*>(this)->getItemAt(_index);
551 }
552 void MemberObsolete<TabControl>::setSheetNameIndex(size_t _index, const UString& _name, int _width)
553 {
554 static_cast<TabControl*>(this)->setItemNameAt(_index, _name);
555 }
556 void MemberObsolete<TabControl>::setSheetName(TabItem* _sheet, const UString& _name, int _width)
557 {
558 static_cast<TabControl*>(this)->setItemName(_sheet, _name);
559 }
561 {
562 return static_cast<TabControl*>(this)->addItem(_name, _width);
563 }
564 TabItem* MemberObsolete<TabControl>::insertSheet(size_t _index, const UString& _name, int _width)
565 {
566 return static_cast<TabControl*>(this)->insertItemAt(_index, _name);
567 }
569 {
570 static_cast<TabControl*>(this)->removeItemAt(_index);
571 }
573 {
574 static_cast<TabControl*>(this)->removeItem(_sheet);
575 }
576 void MemberObsolete<TabControl>::selectSheetIndex(size_t _index, bool _smooth)
577 {
578 static_cast<TabControl*>(this)->setIndexSelected(_index);
579 }
581 {
582 static_cast<TabControl*>(this)->setItemSelected(_sheet);
583 }
585 {
586 return static_cast<const TabControl*>(this)->getIndexSelected();
587 }
588
590 {
591 return static_cast<const TabControl*>(this)->getIndexSelected();
592 }
594 {
595 static_cast<TabControl*>(this)->setIndexSelected(_index);
596 }
597
598
600 {
601 return static_cast<Widget*>(this)->getEnabled();
602 }
604 {
605 return static_cast<Widget*>(this)->getInheritsAlpha();
606 }
608 {
609 return static_cast<Widget*>(this)->getNeedKeyFocus();
610 }
612 {
613 return static_cast<Widget*>(this)->getNeedMouseFocus();
614 }
616 {
617 return static_cast<Widget*>(this)->getInheritsPick();
618 }
620 {
621 return static_cast<Widget*>(this)->getVisible();
622 }
623
624
626 {
627 static_cast<Window*>(this)->setVisibleSmooth(true);
628 }
630 {
631 static_cast<Window*>(this)->setVisibleSmooth(false);
632 }
634 {
635 static_cast<Window*>(this)->setMinSize(_minmax.left, _minmax.top);
636 static_cast<Window*>(this)->setMaxSize(_minmax.right, _minmax.bottom);
637 }
638 void MemberObsolete<Window>::setMinMax(int _min_w, int _min_h, int _max_w, int _max_h)
639 {
640 static_cast<Window*>(this)->setMinSize(_min_w, _min_h);
641 static_cast<Window*>(this)->setMaxSize(_max_w, _max_h);
642 }
644 {
645 return {
646 static_cast<const Window*>(this)->getMinSize().width,
647 static_cast<const Window*>(this)->getMinSize().height,
648 static_cast<const Window*>(this)->getMaxSize().width,
649 static_cast<const Window*>(this)->getMaxSize().height};
650 }
651
652 bool MemberObsolete<FontManager>::load(const std::string& _file)
653 {
654 return ResourceManager::getInstance().load(_file);
655 }
656
658 xml::ElementPtr _node2,
659 std::string_view _file,
660 Version _version,
661 std::string_view _tag)
662 {
664 while (_node.next())
665 {
666 if (_node->getName() == _tag)
667 {
668 std::string name;
669 if (!_node->findAttribute("name", name))
670 return;
671
672 std::string_view type;
673 if (_node->findAttribute("resolution").empty())
674 type = "ResourceManualFont";
675 else
676 type = "ResourceTrueTypeFont";
677
678 xml::Document doc;
679 xml::ElementPtr root = doc.createRoot("MyGUI");
680 xml::ElementPtr node = root->createChild("Resource");
681 node->addAttribute("type", type);
682 node->addAttribute("name", name);
683
684 std::string tmp;
685 if (_node->findAttribute("source", tmp))
686 {
687 xml::ElementPtr prop = node->createChild("Property");
688 prop->addAttribute("key", "Source");
689 prop->addAttribute("value", tmp);
690 }
691
692 if (_node->findAttribute("size", tmp))
693 {
694 xml::ElementPtr prop = node->createChild("Property");
695 prop->addAttribute("key", "Size");
696 prop->addAttribute("value", tmp);
697 }
698
699 if (_node->findAttribute("resolution", tmp))
700 {
701 xml::ElementPtr prop = node->createChild("Property");
702 prop->addAttribute("key", "Resolution");
703 prop->addAttribute("value", tmp);
704 }
705
706 if (_node->findAttribute("antialias_colour", tmp))
707 {
708 xml::ElementPtr prop = node->createChild("Property");
709 prop->addAttribute("key", "Antialias");
710 prop->addAttribute("value", tmp);
711 }
712
713 if (_node->findAttribute("space_width", tmp))
714 {
715 xml::ElementPtr prop = node->createChild("Property");
716 prop->addAttribute("key", "SpaceWidth");
717 prop->addAttribute("value", tmp);
718 }
719
720 if (_node->findAttribute("tab_width", tmp))
721 {
722 xml::ElementPtr prop = node->createChild("Property");
723 prop->addAttribute("key", "TabWidth");
724 prop->addAttribute("value", tmp);
725 }
726
727 if (_node->findAttribute("cursor_width", tmp))
728 {
729 xml::ElementPtr prop = node->createChild("Property");
730 prop->addAttribute("key", "CursorWidth");
731 prop->addAttribute("value", tmp);
732 }
733
734 if (_node->findAttribute("distance", tmp))
735 {
736 xml::ElementPtr prop = node->createChild("Property");
737 prop->addAttribute("key", "Distance");
738 prop->addAttribute("value", tmp);
739 }
740
741 if (_node->findAttribute("offset_height", tmp))
742 {
743 xml::ElementPtr prop = node->createChild("Property");
744 prop->addAttribute("key", "OffsetHeight");
745 prop->addAttribute("value", tmp);
746 }
747
748 if (_node->findAttribute("default_height", tmp))
749 {
750 xml::ElementPtr prop = node->createChild("Property");
751 prop->addAttribute("key", "DefaultHeight");
752 prop->addAttribute("value", tmp);
753 }
754
755 xml::ElementPtr codes = node->createChild("Codes");
756
758 while (codeold.next("Code"))
759 {
760 xml::ElementPtr codenew = codes->createChild("Code");
761
762 if (codeold->findAttribute("range", tmp))
763 codenew->addAttribute("range", tmp);
764
765 if (codeold->findAttribute("hide", tmp))
766 codenew->addAttribute("hide", tmp);
767
768 if (codeold->findAttribute("index", tmp))
769 codenew->addAttribute("index", tmp);
770
771 if (codeold->findAttribute("coord", tmp))
772 codenew->addAttribute("coord", tmp);
773 }
774
775 ResourceManager::getInstance().loadFromXmlNode(root, _file, _version);
776 }
777 }
778 }
779
781 {
782 static_cast<Gui*>(this)->destroyWidgets(_widgets);
783 }
784
785 bool MemberObsolete<Gui>::injectMouseMove(int _absx, int _absy, int _absz)
786 {
787 return InputManager::getInstance().injectMouseMove(_absx, _absy, _absz);
788 }
790 {
791 return InputManager::getInstance().injectMousePress(_absx, _absy, _id);
792 }
794 {
795 return InputManager::getInstance().injectMouseRelease(_absx, _absy, _id);
796 }
798 {
799 return InputManager::getInstance().injectKeyPress(_key, _text);
800 }
805
818
819 bool MemberObsolete<Gui>::load(const std::string& _file)
820 {
821 return ResourceManager::getInstance().load(_file);
822 }
823
836
845
847 {
849 }
850
855
860
865
866 bool MemberObsolete<LanguageManager>::load(const std::string& _file)
867 {
868 return ResourceManager::getInstance().load(_file);
869 }
870
871 bool MemberObsolete<LayerManager>::load(const std::string& _file)
872 {
873 return ResourceManager::getInstance().load(_file);
874 }
875
877 {
878 return static_cast<LayoutManager*>(this)->loadLayout(_file);
879 }
880
881 bool MemberObsolete<PluginManager>::load(const std::string& _file)
882 {
883 return ResourceManager::getInstance().load(_file);
884 }
885
887 {
888 static_cast<PointerManager*>(this)->setDefaultPointer(_value);
889 }
891 {
892 static_cast<PointerManager*>(this)->setVisible(true);
893 }
895 {
896 static_cast<PointerManager*>(this)->setVisible(false);
897 }
899 {
900 return static_cast<PointerManager*>(this)->isVisible();
901 }
902 bool MemberObsolete<PointerManager>::load(const std::string& _file)
903 {
904 return ResourceManager::getInstance().load(_file);
905 }
907 xml::ElementPtr _node,
908 std::string_view _file,
909 Version _version,
910 std::string_view _tag)
911 {
912 std::string_view pointer;
913 std::string_view layer;
914
916 while (node.next())
917 {
918 if (node->getName() == _tag)
919 {
920 layer = node->findAttribute("layer");
921 pointer = node->findAttribute("default");
922
923 // сохраняем
924 std::string_view shared_text = node->findAttribute("texture");
925
926 // берем детей и крутимся, основной цикл
928 while (info.next("Info"))
929 {
930 std::string_view name = info->findAttribute("name");
931 if (name.empty())
932 continue;
933
934 std::string_view texture = info->findAttribute("texture");
935
936 std::string_view type =
937 (shared_text.empty() && texture.empty()) ? "ResourceImageSetPointer" : "ResourceManualPointer";
938
939 xml::Document doc;
940 xml::ElementPtr root = doc.createRoot("MyGUI");
941 xml::ElementPtr newnode = root->createChild("Resource");
942 newnode->addAttribute("type", type);
943 newnode->addAttribute("name", name);
944
945 std::string tmp;
946 if (info->findAttribute("point", tmp))
947 {
948 xml::ElementPtr prop = newnode->createChild("Property");
949 prop->addAttribute("key", "Point");
950 prop->addAttribute("value", tmp);
951 }
952
953 if (info->findAttribute("size", tmp))
954 {
955 xml::ElementPtr prop = newnode->createChild("Property");
956 prop->addAttribute("key", "Size");
957 prop->addAttribute("value", tmp);
958 }
959
960 if (info->findAttribute("resource", tmp))
961 {
962 xml::ElementPtr prop = newnode->createChild("Property");
963 prop->addAttribute("key", "Resource");
964 prop->addAttribute("value", tmp);
965 }
966
967 if (info->findAttribute("offset", tmp))
968 {
969 xml::ElementPtr prop = newnode->createChild("Property");
970 prop->addAttribute("key", "Coord");
971 prop->addAttribute("value", tmp);
972 }
973
974 if (!shared_text.empty() || !texture.empty())
975 {
976 xml::ElementPtr prop = newnode->createChild("Property");
977 prop->addAttribute("key", "Texture");
978 prop->addAttribute("value", shared_text.empty() ? texture : shared_text);
979 }
980
981 ResourceManager::getInstance().loadFromXmlNode(root, _file, _version);
982 }
983 }
984 }
985
986 if (!layer.empty())
987 static_cast<PointerManager*>(this)->setLayerName(layer);
988
989 if (!pointer.empty())
990 static_cast<PointerManager*>(this)->setDefaultPointer(pointer);
991 }
992
994 {
995 return static_cast<const ResourceManager*>(this)->getCount();
996 }
997 IResourcePtr MemberObsolete<ResourceManager>::getResource(std::string_view _name, bool _throw) const
998 {
999 return static_cast<const ResourceManager*>(this)->getByName(_name, _throw);
1000 }
1001
1003 {
1004 return static_cast<const SkinManager*>(this)->getByName(_name);
1005 }
1006 bool MemberObsolete<SkinManager>::load(const std::string& _file)
1007 {
1008 return ResourceManager::getInstance().load(_file);
1009 }
1011 xml::ElementPtr _node,
1012 std::string_view /*_file*/,
1013 Version _version,
1014 std::string_view _tag)
1015 {
1016 const std::string& resourceCategory = ResourceManager::getInstance().getCategoryName();
1017
1018 // берем детей и крутимся, основной цикл со скинами
1020 while (skin.next(_tag))
1021 {
1022 std::string_view type = skin->findAttribute("type");
1023 if (type.empty())
1024 type = "ResourceSkin";
1025
1026 IObject* object = FactoryManager::getInstance().createObject(resourceCategory, type);
1027 if (object != nullptr)
1028 {
1029 ResourceSkin* data = object->castType<ResourceSkin>();
1030 data->deserialization(skin.current(), _version);
1031
1033 }
1034 }
1035 }
1036
1037
1039 {
1040 static_cast<WidgetManager*>(this)->destroyWidgets(_widgets);
1041 }
1042 Widget* MemberObsolete<WidgetManager>::findWidgetT(std::string_view _name, bool _throw)
1043 {
1044 return Gui::getInstance().findWidgetT(_name, _throw);
1045 }
1046 Widget* MemberObsolete<WidgetManager>::findWidgetT(std::string_view _name, std::string_view _prefix, bool _throw)
1047 {
1048 return Gui::getInstance().findWidgetT(_name, _prefix, _throw);
1049 }
1050 void MemberObsolete<WidgetManager>::parse(Widget* _widget, std::string_view _key, std::string_view _value)
1051 {
1052 _widget->setProperty(_key, _value);
1053 }
1054
1055
1056#endif // MYGUI_DONT_USE_OBSOLETE
1057
1058#ifndef MYGUI_DONT_USE_OBSOLETE
1059
1060 static std::string_view convertAlignToDirection(std::string_view _value)
1061 {
1062 Align align = utility::parseValue<Align>(_value);
1063 if (align == Align::Right)
1065 if (align == Align::Top)
1067 if (align == Align::Bottom)
1070 }
1071
1072 static std::string convertRectToCoord(std::string_view _value)
1073 {
1074 IntRect rect = IntRect::parse(_value);
1075 IntCoord coord(rect.left, rect.top, rect.width(), rect.height());
1076 return coord.print();
1077 }
1078
1079 using SetString = std::set<std::string, std::less<>>;
1083
1084#endif // MYGUI_DONT_USE_OBSOLETE
1085
1087 {
1088#ifndef MYGUI_DONT_USE_OBSOLETE
1089 return mPropertyIgnore.find(_key) != mPropertyIgnore.end();
1090#else
1091 return false;
1092#endif // MYGUI_DONT_USE_OBSOLETE
1093 }
1094
1095 bool BackwardCompatibility::checkProperty(Widget* _owner, std::string& _key, std::string& _value)
1096 {
1097#ifndef MYGUI_DONT_USE_OBSOLETE
1098 if (mPropertyIgnore.find(_key) != mPropertyIgnore.end())
1099 return false;
1100
1101 MapString::iterator item = mPropertyRename.find(_key);
1102 if (item != mPropertyRename.end())
1103 {
1104 MYGUI_LOG(
1105 Warning,
1106 (*item).first << " is deprecated, use " << (*item).second << " ["
1108 _key = (*item).second;
1109 }
1110 else if (_key == "Progress_StartPoint")
1111 {
1112 MYGUI_LOG(
1113 Warning,
1114 "Progress_StartPoint is deprecated, use Progress_FlowDirection"
1115 << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1116 _key = "Progress_FlowDirection";
1117 _value = convertAlignToDirection(_value);
1118 }
1119 else if (_key == "ComboBox_AddItem")
1120 {
1121 MYGUI_LOG(
1122 Warning,
1123 "ComboBox_AddItem is deprecated"
1124 << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1125 ComboBox* widget = _owner->castType<ComboBox>(false);
1126 if (widget != nullptr)
1127 widget->addItem(_value);
1128 return false;
1129 }
1130 else if (_key == "List_AddItem")
1131 {
1132 MYGUI_LOG(
1133 Warning,
1134 "List_AddItem is deprecated"
1135 << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1136 ListBox* widget = _owner->castType<ListBox>(false);
1137 if (widget != nullptr)
1138 widget->addItem(_value);
1139 return false;
1140 }
1141 else if (_key == "Tab_AddSheet")
1142 {
1143 MYGUI_LOG(
1144 Warning,
1145 "Tab_AddSheet is deprecated"
1146 << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1147 TabControl* widget = _owner->castType<TabControl>(false);
1148 if (widget != nullptr)
1149 widget->addItem(_value);
1150 return false;
1151 }
1152 else if (_key == "Tab_AddItem")
1153 {
1154 MYGUI_LOG(
1155 Warning,
1156 "Tab_AddItem is deprecated"
1157 << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1158 TabControl* widget = _owner->castType<TabControl>(false);
1159 if (widget != nullptr)
1160 widget->addItem(_value);
1161 return false;
1162 }
1163 else if (_key == "Window_MinMax")
1164 {
1165 MYGUI_LOG(
1166 Warning,
1167 "Window_MinMax is deprecated, use Window_MinSize or Window_MaxSize"
1168 << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1169 Window* widget = _owner->castType<Window>(false);
1170 if (widget != nullptr)
1171 {
1172 IntRect rect = IntRect::parse(_value);
1173 widget->setMinSize(rect.left, rect.top);
1174 widget->setMaxSize(rect.right, rect.bottom);
1175 }
1176 return false;
1177 }
1178 else if (_key == "ImageRect")
1179 {
1180 MYGUI_LOG(
1181 Warning,
1182 "ImageRect is deprecated, use ImageCoord"
1183 << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1184 _key = "ImageCoord";
1185 _value = convertRectToCoord(_value);
1186 }
1187 else if (_key == "StartPoint")
1188 {
1189 MYGUI_LOG(
1190 Warning,
1191 "StartPoint is deprecated, use FlowDirection"
1192 << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1193 _key = "FlowDirection";
1194 _value = convertAlignToDirection(_value);
1195 }
1196
1197#endif // MYGUI_DONT_USE_OBSOLETE
1198 return true;
1199 }
1200
1202 {
1203#ifndef MYGUI_DONT_USE_OBSOLETE
1204 mPropertyRename["Widget_Caption"] = "Caption";
1205 mPropertyRename["Button_Pressed"] = "StateSelected";
1206 mPropertyRename["ButtonPressed"] = "StateSelected";
1207 mPropertyRename["StateCheck"] = "StateSelected";
1208 mPropertyRename["Edit_ShowVScroll"] = "VisibleVScroll";
1209 mPropertyRename["Edit_ShowHScroll"] = "VisibleHScroll";
1210 mPropertyRename["ScrollView_VScroll"] = "VisibleVScroll";
1211 mPropertyRename["ScrollView_HScroll"] = "VisibleHScroll";
1212 mPropertyRename["Progress_Position"] = "RangePosition";
1213 mPropertyRename["Scroll_Position"] = "RangePosition";
1214 mPropertyRename["Tab_SelectSheet"] = "SelectItem";
1215 mPropertyRename["Image_Texture"] = "ImageTexture";
1216 mPropertyRename["Image_Coord"] = "ImageRegion";
1217 mPropertyRename["Image_Tile"] = "ImageTile";
1218 mPropertyRename["Image_Index"] = "ImageIndex";
1219 mPropertyRename["Image_Resource"] = "ImageResource";
1220 mPropertyRename["Image_Group"] = "ImageGroup";
1221 mPropertyRename["Image_Name"] = "ImageName";
1222 mPropertyRename["MenuItem_Id"] = "MenuItemId";
1223 mPropertyRename["MenuItem_Type"] = "MenuItemType";
1224 mPropertyRename["Combo_MaxLength"] = "MaxListLength";
1225 mPropertyRename["AlignText"] = "TextAlign";
1226 mPropertyRename["ToStick"] = "Snap";
1227 mPropertyRename["ListSmoothShow"] = "SmoothShow";
1228 mPropertyRename["HeightList"] = "MaxListLength";
1229 mPropertyRename["AlignVert"] = "VerticalAlignment";
1230
1231 mPropertyIgnore.insert("DragLayer");
1232 mPropertyIgnore.insert("SkinLine");
1233 mPropertyIgnore.insert("HeightLine");
1234 mPropertyIgnore.insert("SkinLine");
1235 mPropertyIgnore.insert("HeightLine");
1236 mPropertyIgnore.insert("SeparatorHeight");
1237 mPropertyIgnore.insert("SeparatorSkin");
1238 mPropertyIgnore.insert("SubmenuImageSize");
1239 mPropertyIgnore.insert("SubMenuSkin");
1240 mPropertyIgnore.insert("SubMenuLayer");
1241 mPropertyIgnore.insert("DistanceButton");
1242 mPropertyIgnore.insert("ButtonSkin");
1243 mPropertyIgnore.insert("ButtonType");
1244 mPropertyIgnore.insert("ButtonSize");
1245 mPropertyIgnore.insert("ButtonOffset");
1246 mPropertyIgnore.insert("DefaultLayer");
1247 mPropertyIgnore.insert("FadeSkin");
1248 mPropertyIgnore.insert("FadeLayer");
1249 mPropertyIgnore.insert("SkinButton");
1250 mPropertyIgnore.insert("HeightButton");
1251 mPropertyIgnore.insert("SkinList");
1252 mPropertyIgnore.insert("SkinButtonEmpty");
1253 mPropertyIgnore.insert("WidthSeparator");
1254 mPropertyIgnore.insert("SkinSeparator");
1255 mPropertyIgnore.insert("TrackSkin");
1256 mPropertyIgnore.insert("TrackWidth");
1257 mPropertyIgnore.insert("TrackMin");
1258 mPropertyIgnore.insert("TrackStep");
1259 mPropertyIgnore.insert("TrackFill");
1260 mPropertyIgnore.insert("OffsetBar");
1261 mPropertyIgnore.insert("ButtonSkin");
1262 mPropertyIgnore.insert("EmptyBarSkin");
1263 mPropertyIgnore.insert("TrackRangeMargins");
1264 mPropertyIgnore.insert("MinTrackSize");
1265 mPropertyIgnore.insert("MainMove");
1266 mPropertyIgnore.insert("LevelOffset");
1267 mPropertyIgnore.insert("State");
1268
1269 mSkinRename["StaticImage"] = "ImageBox";
1270 mSkinRename["StaticText"] = "TextBox";
1271 mSkinRename["HScroll"] = "ScrollBarH";
1272 mSkinRename["VScroll"] = "ScrollBarV";
1273 mSkinRename["ItemBoxH"] = "ItemBox";
1274 mSkinRename["ItemBoxV"] = "ItemBox";
1275 mSkinRename["VSlider"] = "SliderV";
1276 mSkinRename["HSlider"] = "SliderH";
1277 mSkinRename["Progress"] = "ProgressBar";
1278 mSkinRename["ProgressFill"] = "ProgressBarFill";
1279 mSkinRename["List"] = "ListBox";
1280 mSkinRename["MultiList"] = "MultiListBox";
1281 mSkinRename["Edit"] = "EditBox";
1282 mSkinRename["EditStretch"] = "EditBoxStretch";
1283 mSkinRename["EditEmpty"] = "EditBoxEmpty";
1284 mSkinRename["RadioBox"] = "RadioButton";
1285 mSkinRename["Tab"] = "TabControl";
1286 mSkinRename["WordWrap"] = "WordWrapEmpty";
1287 mSkinRename["WordWrapSimple"] = "WordWrapEmpty";
1288 mSkinRename["ButtonSmall"] = "Button";
1289 mSkinRename["ButtonImageText"] = "ButtonImage";
1290
1291 mSkinRename["TileClient"] = "ClientTileSkin";
1292 mSkinRename["DefaultClient"] = "ClientDefaultSkin";
1293 mSkinRename["Panel"] = "PanelSkin";
1294 mSkinRename["PanelSmall"] = "PanelSkin";
1295 mSkinRename["Separator1"] = "SepUpVSkin";
1296 mSkinRename["Separator2"] = "SepDownVSkin";
1297 mSkinRename["Separator3"] = "SepUpHSkin";
1298 mSkinRename["Separator4"] = "SepDownHSkin";
1299 mSkinRename["MarkerWhite"] = "WhiteSkin";
1300 mSkinRename["ButtonLeft"] = "ButtonLeftSkin";
1301 mSkinRename["ButtonRight"] = "ButtonRightSkin";
1302 mSkinRename["ButtonUp"] = "ButtonUpSkin";
1303 mSkinRename["ButtonDown"] = "ButtonDownSkin";
1304 mSkinRename["ButtonV"] = "ButtonAcceptSkin";
1305 mSkinRename["ButtonX"] = "ButtonCloseSkin";
1306 mSkinRename["ButtonMinusPlus"] = "ButtonExpandSkin";
1307#endif // MYGUI_DONT_USE_OBSOLETE
1308 }
1309
1310 std::string_view BackwardCompatibility::getPropertyRename(std::string_view _propertyName)
1311 {
1312#ifndef MYGUI_DONT_USE_OBSOLETE
1313 MapString::const_iterator item = mPropertyRename.find(_propertyName);
1314 if (item != mPropertyRename.end())
1315 return (*item).second;
1316#endif // MYGUI_DONT_USE_OBSOLETE
1317 return _propertyName;
1318 }
1319
1321 std::string_view _categoryName,
1322 std::string_view _factoryName)
1323 {
1324#ifndef MYGUI_DONT_USE_OBSOLETE
1325 if (_categoryName == "Widget")
1326 {
1327 if (_factoryName == "HScroll")
1328 {
1329 MYGUI_LOG(
1330 Warning,
1331 "HScroll factory is deprecated, use " << ScrollBar::getClassTypeName() << " ["
1332 << LayoutManager::getInstance().getCurrentLayout() << "]");
1333 }
1334 else if (_factoryName == "VScroll")
1335 {
1336 MYGUI_LOG(
1337 Warning,
1338 "VScroll factory is deprecated, use " << ScrollBar::getClassTypeName() << " ["
1339 << LayoutManager::getInstance().getCurrentLayout() << "]");
1340 }
1341 else if (_factoryName == "RenderBox")
1342 {
1343 MYGUI_LOG(
1344 Warning,
1345 "RenderBox factory is deprecated, use " << Canvas::getClassTypeName() << " ["
1346 << LayoutManager::getInstance().getCurrentLayout() << "]");
1347 }
1348 else if (_factoryName == "Sheet")
1349 {
1350 MYGUI_LOG(
1351 Warning,
1352 "Sheet factory is deprecated, use " << TabItem::getClassTypeName() << " ["
1353 << LayoutManager::getInstance().getCurrentLayout() << "]");
1354 }
1355 else if (_factoryName == "StaticImage")
1356 {
1357 MYGUI_LOG(
1358 Warning,
1359 "StaticImage factory is deprecated, use "
1360 << ImageBox::getClassTypeName() << " [" << LayoutManager::getInstance().getCurrentLayout()
1361 << "]");
1362 }
1363 else if (_factoryName == "StaticText")
1364 {
1365 MYGUI_LOG(
1366 Warning,
1367 "StaticText factory is deprecated, use " << TextBox::getClassTypeName() << " ["
1368 << LayoutManager::getInstance().getCurrentLayout() << "]");
1369 }
1370 else if (_factoryName == "Progress")
1371 {
1372 MYGUI_LOG(
1373 Warning,
1374 "Progress factory is deprecated, use " << ProgressBar::getClassTypeName() << " ["
1375 << LayoutManager::getInstance().getCurrentLayout() << "]");
1376 }
1377 else if (_factoryName == "List")
1378 {
1379 MYGUI_LOG(
1380 Warning,
1381 "List factory is deprecated, use " << ListBox::getClassTypeName() << " ["
1382 << LayoutManager::getInstance().getCurrentLayout() << "]");
1383 }
1384 else if (_factoryName == "Edit")
1385 {
1386 MYGUI_LOG(
1387 Warning,
1388 "Edit factory is deprecated, use " << EditBox::getClassTypeName() << " ["
1389 << LayoutManager::getInstance().getCurrentLayout() << "]");
1390 }
1391 else if (_factoryName == "Tab")
1392 {
1393 MYGUI_LOG(
1394 Warning,
1395 "Tab factory is deprecated, use " << TabControl::getClassTypeName() << " ["
1396 << LayoutManager::getInstance().getCurrentLayout() << "]");
1397 }
1398 else if (_factoryName == "MultiList")
1399 {
1400 MYGUI_LOG(
1401 Warning,
1402 "MultiList factory is deprecated, use " << MultiListBox::getClassTypeName() << " ["
1403 << LayoutManager::getInstance().getCurrentLayout() << "]");
1404 }
1405 else if (_factoryName == "MenuCtrl")
1406 {
1407 MYGUI_LOG(
1408 Warning,
1409 "MenuCtrl factory is deprecated, use " << MenuControl::getClassTypeName() << " ["
1410 << LayoutManager::getInstance().getCurrentLayout() << "]");
1411 }
1412 }
1413#endif // MYGUI_DONT_USE_OBSOLETE
1414 return _factoryName;
1415 }
1416
1417 std::string_view BackwardCompatibility::getSkinRename(std::string_view _skinName)
1418 {
1419#ifndef MYGUI_DONT_USE_OBSOLETE
1420 MapString::iterator item = mSkinRename.find(_skinName);
1421 if (item != mSkinRename.end())
1422 {
1423 MYGUI_LOG(
1424 Warning,
1425 (*item).first << " skin is deprecated, use " << (*item).second << " ["
1427 return (*item).second;
1428 }
1429#endif // MYGUI_DONT_USE_OBSOLETE
1430 return _skinName;
1431 }
1432
1434 {
1435#ifndef MYGUI_DONT_USE_OBSOLETE
1436 mPropertyRename.clear();
1437#endif // MYGUI_DONT_USE_OBSOLETE
1438 }
1439
1441 {
1442#ifndef MYGUI_DONT_USE_OBSOLETE
1444 const std::string& widgetCategory = MyGUI::WidgetManager::getInstance().getCategoryName();
1445 factory.registerFactory<HScroll>(widgetCategory);
1446 factory.registerFactory<VScroll>(widgetCategory);
1447 factory.registerFactory<Canvas>(widgetCategory, "RenderBox");
1448 factory.registerFactory<TabItem>(widgetCategory, "Sheet");
1449 factory.registerFactory<ImageBox>(widgetCategory, "StaticImage");
1450 factory.registerFactory<TextBox>(widgetCategory, "StaticText");
1451 factory.registerFactory<ProgressBar>(widgetCategory, "Progress");
1452 factory.registerFactory<ListBox>(widgetCategory, "List");
1453 factory.registerFactory<EditBox>(widgetCategory, "Edit");
1454 factory.registerFactory<TabControl>(widgetCategory, "Tab");
1455 factory.registerFactory<MultiListBox>(widgetCategory, "MultiList");
1456 factory.registerFactory<MenuControl>(widgetCategory, "MenuCtrl");
1457#endif // MYGUI_DONT_USE_OBSOLETE
1458 }
1459
1460} // namespace MyGUI
#define MYGUI_LOG(level, text)
static std::string_view getSkinRename(std::string_view _skinName)
static bool isIgnoreProperty(std::string_view _key)
static std::string_view getPropertyRename(std::string_view _propertyName)
static bool checkProperty(Widget *_owner, std::string &_key, std::string &_value)
static std::string_view getFactoryRename(std::string_view _categoryName, std::string_view _factoryName)
widget description should be here.
wrapper over Texture - shows the texture. Implemented: resizing of texture (see TextureResizeMode); r...
static std::string_view getClassTypeName()
widget description should be here.
void addItem(const UString &_name, Any _data=Any::Null)
Add an item to the end of a array.
widget description should be here.
static std::string_view getClassTypeName()
void registerFactory(std::string_view _category, std::string_view _type, Delegate::IDelegate *_delegate)
static FactoryManager & getInstance()
IObject * createObject(std::string_view _category, std::string_view _type)
void frameEvent(float _time) const
Widget * findWidgetT(std::string_view _name, bool _throw=true) const
static Gui & getInstance()
Definition MyGUI_Gui.cpp:34
Type * castType(bool _throw=true)
widget description should be here.
static std::string_view getClassTypeName()
const IntPoint & getLastPressedPosition(MouseButton _id) const
bool injectMousePress(int _absx, int _absy, MouseButton _id)
bool injectMouseMove(int _absx, int _absy, int _absz)
static InputManager & getInstance()
bool injectMouseRelease(int _absx, int _absy, MouseButton _id)
bool injectKeyPress(KeyCode _key, Char _text=0)
bool injectKeyRelease(KeyCode _key)
widget description should be here.
static LayerManager & getInstance()
void resizeView(const IntSize &_viewSize)
const std::string & getCurrentLayout() const
static LayoutManager & getInstance()
widget description should be here.
void addItem(const UString &_name, Any _data=Any::Null)
Add an item to the end of a array.
static std::string_view getClassTypeName()
widget description should be here.
static std::string_view getClassTypeName()
widget description should be here.
widget description should be here.
static std::string_view getClassTypeName()
static PointerManager & getInstance()
void setVisible(bool _visible)
widget description should be here.
static std::string_view getClassTypeName()
virtual const IntSize & getViewSize() const =0
static RenderManager & getInstance()
const std::string & getCategoryName() const
void loadFromXmlNode(xml::ElementPtr _node, std::string_view _file, Version _version)
bool load(const std::string &_file)
static ResourceManager & getInstance()
void addResource(IResourcePtr _item)
void deserialization(xml::ElementPtr _node, Version _version) override
static std::string_view getClassTypeName()
widget description should be here.
widget description should be here.
static std::string_view getClassTypeName()
TabItem * addItem(const UString &_name, Any _data=Any::Null)
Add an item to the end of a array.
widget description should be here.
static std::string_view getClassTypeName()
widget description should be here.
static std::string_view getClassTypeName()
A UTF-16 string with implicit conversion to/from std::string and std::wstring.
widget description should be here.
void setProperty(std::string_view _key, std::string_view _value)
const std::string & getCategoryName() const
static WidgetManager & getInstance()
widget description should be here.
void setMinSize(const IntSize &_value)
void setMaxSize(const IntSize &_value)
ElementPtr createRoot(std::string_view _name)
bool findAttribute(std::string_view _name, std::string &_value)
ElementEnumerator getElementEnumerator()
const std::string & getName() const
void addAttribute(std::string_view _key, const T &_value)
ElementPtr createChild(std::string_view _name, std::string_view _content={}, ElementType _type=ElementType::Normal)
T parseValue(std::string_view _value)
std::set< std::string, std::less<> > SetString
static MapString mPropertyRename
static std::string_view convertAlignToDirection(std::string_view _value)
std::map< std::string, std::string, std::less<> > MapString
Definition MyGUI_Types.h:40
static std::string convertRectToCoord(std::string_view _value)
static SetString mPropertyIgnore
unsigned int Char
Definition MyGUI_Types.h:50
constexpr size_t ITEM_NONE
static MapString mSkinRename
std::vector< Widget * > VectorWidgetPtr
std::string_view print() const
std::string print() const
static TRect< int > parse(std::string_view _value)