MyGUI 3.4.1
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_LayoutManager.h"
33#include "MyGUI_PluginManager.h"
34#include "MyGUI_SkinManager.h"
35#include "MyGUI_WidgetManager.h"
38
39namespace MyGUI
40{
41
42#ifndef MYGUI_DONT_USE_OBSOLETE
43
45 {
46 static_cast<Button*>(this)->setStateSelected(_value);
47 }
49 {
50 return static_cast<const Button*>(this)->getStateSelected();
51 }
53 {
54 static_cast<Button*>(this)->setStateSelected(_value);
55 }
57 {
58 return static_cast<const Button*>(this)->getStateSelected();
59 }
61 {
62 return static_cast<const Button*>(this)->_getImageBox();
63 }
65 {
66 if (static_cast<Button*>(this)->_getImageBox())
67 static_cast<Button*>(this)->_getImageBox()->setImageIndex(_index);
68 }
70 {
71 if (static_cast<const Button*>(this)->_getImageBox())
72 return static_cast<const Button*>(this)->_getImageBox()->getImageIndex();
73 return ITEM_NONE;
74 }
75
76 void MemberObsolete<ImageBox>::addItemFrameDublicate(size_t _index, size_t _indexSourceFrame)
77 {
78 static_cast<ImageBox*>(this)->addItemFrameDuplicate(_index, _indexSourceFrame);
79 }
80 void MemberObsolete<ImageBox>::insertItemFrameDublicate(size_t _index, size_t _indexFrame, size_t _indexSourceFrame)
81 {
82 static_cast<ImageBox*>(this)->insertItemFrameDuplicate(_index, _indexFrame, _indexSourceFrame);
83 }
84
85
87 {
88 return static_cast<const ComboBox*>(this)->getIndexSelected();
89 }
91 {
92 static_cast<ComboBox*>(this)->setIndexSelected(_index);
93 }
95 {
96 static_cast<ComboBox*>(this)->clearIndexSelected();
97 }
98
99 void MemberObsolete<ComboBox>::insertItem(size_t _index, const UString& _name)
100 {
101 static_cast<ComboBox*>(this)->insertItemAt(_index, _name);
102 }
103 void MemberObsolete<ComboBox>::setItem(size_t _index, const UString& _item)
104 {
105 static_cast<ComboBox*>(this)->setItemNameAt(_index, _item);
106 }
107 const UString& MemberObsolete<ComboBox>::getItem(size_t _index) const
108 {
109 return static_cast<const ComboBox*>(this)->getItemNameAt(_index);
110 }
112 {
113 static_cast<ComboBox*>(this)->removeItemAt(_index);
114 }
116 {
117 static_cast<ComboBox*>(this)->removeAllItems();
118 }
120 {
121 return static_cast<const ComboBox*>(this)->getIndexSelected();
122 }
124 {
125 static_cast<ComboBox*>(this)->clearIndexSelected();
126 }
128 {
129 static_cast<ComboBox*>(this)->setIndexSelected(_index);
130 }
131
133 {
134 static_cast<ComboBox*>(this)->setMaxListLength(_value);
135 }
137 {
138 return static_cast<const ComboBox*>(this)->getMaxListLength();
139 }
140
141
143 {
144 static_cast<EditBox*>(this)->setVisibleVScroll(_visible);
145 }
147 {
148 return static_cast<EditBox*>(this)->isVisibleVScroll();
149 }
151 {
152 static_cast<EditBox*>(this)->setVisibleHScroll(_visible);
153 }
155 {
156 return static_cast<EditBox*>(this)->isVisibleHScroll();
157 }
158
159 void MemberObsolete<EditBox>::setTextColour(size_t _start, size_t _count, const Colour& _colour)
160 {
161 static_cast<EditBox*>(this)->setTextIntervalColour(_start, _count, _colour);
162 }
163 void MemberObsolete<EditBox>::getTextSelect(size_t& _start, size_t& _end) const
164 {
165 _start = static_cast<const EditBox*>(this)->getTextSelectionStart();
166 _end = static_cast<const EditBox*>(this)->getTextSelectionEnd();
167 }
168 UString MemberObsolete<EditBox>::getText(size_t _start, size_t _count) const
169 {
170 return static_cast<const EditBox*>(this)->getTextInterval(_start, _count);
171 }
172 void MemberObsolete<EditBox>::setTextSelect(size_t _start, size_t _end)
173 {
174 static_cast<EditBox*>(this)->setTextSelection(_start, _end);
175 }
177 {
178 static_cast<EditBox*>(this)->deleteTextSelection();
179 }
181 {
182 return static_cast<const EditBox*>(this)->getTextSelection();
183 }
185 {
186 return static_cast<EditBox*>(this)->isTextSelection();
187 }
189 {
190 static_cast<EditBox*>(this)->setTextSelectionColour(_colour);
191 }
192
193
195 {
196 return static_cast<const ItemBox*>(this)->getIndexSelected();
197 }
199 {
200 static_cast<ItemBox*>(this)->setIndexSelected(_index);
201 }
203 {
204 static_cast<ItemBox*>(this)->clearIndexSelected();
205 }
206
207 void MemberObsolete<ItemBox>::insertItem(size_t _index, Any _data)
208 {
209 static_cast<ItemBox*>(this)->insertItemAt(_index, _data);
210 }
211 void MemberObsolete<ItemBox>::setItemData(size_t _index, Any _data)
212 {
213 static_cast<ItemBox*>(this)->setItemDataAt(_index, _data);
214 }
216 {
217 static_cast<ItemBox*>(this)->removeItemAt(_index);
218 }
220 {
221 static_cast<ItemBox*>(this)->removeAllItems();
222 }
224 {
225 return static_cast<const ItemBox*>(this)->getIndexSelected();
226 }
228 {
229 static_cast<ItemBox*>(this)->clearIndexSelected();
230 }
232 {
233 static_cast<ItemBox*>(this)->setIndexSelected(_index);
234 }
235
237 {
238 return static_cast<const ItemBox*>(this)->getWidgetDrag();
239 }
241 {
242 static_cast<ItemBox*>(this)->resetDrag();
243 }
244
246 {
247 static_cast<ItemBox*>(this)->setVerticalAlignment(_value);
248 }
250 {
251 return static_cast<const ItemBox*>(this)->getVerticalAlignment();
252 }
253
254
256 {
257 return static_cast<const ListBox*>(this)->getIndexSelected();
258 }
260 {
261 static_cast<ListBox*>(this)->setIndexSelected(_index);
262 }
264 {
265 static_cast<ListBox*>(this)->clearIndexSelected();
266 }
267
268 void MemberObsolete<ListBox>::insertItem(size_t _index, const UString& _item)
269 {
270 static_cast<ListBox*>(this)->insertItemAt(_index, _item);
271 }
272 void MemberObsolete<ListBox>::setItem(size_t _index, const UString& _item)
273 {
274 static_cast<ListBox*>(this)->setItemNameAt(_index, _item);
275 }
276 const UString& MemberObsolete<ListBox>::getItem(size_t _index) const
277 {
278 return static_cast<const ListBox*>(this)->getItemNameAt(_index);
279 }
281 {
282 static_cast<ListBox*>(this)->removeItemAt(_index);
283 }
285 {
286 static_cast<ListBox*>(this)->removeAllItems();
287 }
289 {
290 return static_cast<ListBox*>(this)->findItemIndexWith(_item);
291 }
293 {
294 return static_cast<const ListBox*>(this)->getIndexSelected();
295 }
297 {
298 static_cast<ListBox*>(this)->clearIndexSelected();
299 }
301 {
302 static_cast<ListBox*>(this)->setIndexSelected(_index);
303 }
305 {
306 static_cast<ListBox*>(this)->beginToItemAt(_index);
307 }
309 {
310 static_cast<ListBox*>(this)->beginToItemFirst();
311 }
313 {
314 static_cast<ListBox*>(this)->beginToItemLast();
315 }
317 {
318 static_cast<ListBox*>(this)->beginToItemSelected();
319 }
320 bool MemberObsolete<ListBox>::isItemVisible(size_t _index, bool _fill)
321 {
322 return static_cast<ListBox*>(this)->isItemVisibleAt(_index, _fill);
323 }
325 {
326 return static_cast<ListBox*>(this)->isItemSelectedVisible(_fill);
327 }
328
329
331 {
332 static_cast<MenuControl*>(this)->setVisible(true);
333 }
335 {
336 static_cast<MenuControl*>(this)->setVisible(false);
337 }
339 {
340 return static_cast<MenuControl*>(this)->getVisible();
341 }
342
344 {
345 static_cast<MenuControl*>(this)->setItemChildVisibleAt(_index, true);
346 }
348 {
349 static_cast<MenuControl*>(this)->setItemChildVisible(_item, true);
350 }
352 {
353 static_cast<MenuControl*>(this)->setItemChildVisibleAt(_index, false);
354 }
356 {
357 static_cast<MenuControl*>(this)->setItemChildVisible(_item, false);
358 }
359
361 {
362 static_cast<MenuControl*>(this)->setVerticalAlignment(_value);
363 }
365 {
366 return static_cast<const MenuControl*>(this)->getVerticalAlignment();
367 }
368
370 {
371 static_cast<MenuItem*>(this)->setItemChildVisible(true);
372 }
374 {
375 static_cast<MenuItem*>(this)->setItemChildVisible(false);
376 }
377
378
380 {
381 return static_cast<const MultiListBox*>(this)->getIndexSelected();
382 }
384 {
385 static_cast<MultiListBox*>(this)->setIndexSelected(_index);
386 }
388 {
389 static_cast<MultiListBox*>(this)->clearIndexSelected();
390 }
391
392 size_t MemberObsolete<MultiListBox>::findItem(size_t _column, const UString& _name)
393 {
394 return static_cast<MultiListBox*>(this)->findSubItemWith(_column, _name);
395 }
396 const UString& MemberObsolete<MultiListBox>::getSubItem(size_t _column, size_t _index) const
397 {
398 return static_cast<const MultiListBox*>(this)->getSubItemNameAt(_column, _index);
399 }
400 void MemberObsolete<MultiListBox>::setSubItem(size_t _column, size_t _index, const UString& _name)
401 {
402 static_cast<MultiListBox*>(this)->setSubItemNameAt(_column, _index, _name);
403 }
405 {
406 static_cast<MultiListBox*>(this)->removeColumnAt(_column);
407 }
409 {
410 static_cast<MultiListBox*>(this)->removeAllColumns();
411 }
413 {
414 return static_cast<const MultiListBox*>(this)->getColumnWidthAt(_column);
415 }
417 {
418 return static_cast<const MultiListBox*>(this)->getColumnNameAt(_column);
419 }
420 void MemberObsolete<MultiListBox>::setColumnWidth(size_t _column, int _width)
421 {
422 static_cast<MultiListBox*>(this)->setColumnWidthAt(_column, _width);
423 }
425 {
426 static_cast<MultiListBox*>(this)->addColumn(_name, _width);
427 }
428 void MemberObsolete<MultiListBox>::setColumnName(size_t _column, const UString& _name)
429 {
430 static_cast<MultiListBox*>(this)->setColumnNameAt(_column, _name);
431 }
432 void MemberObsolete<MultiListBox>::insertColumn(size_t _column, int _width, const UString& _name)
433 {
434 static_cast<MultiListBox*>(this)->insertColumnAt(_column, _name, _width);
435 }
437 {
438 return static_cast<const MultiListBox*>(this)->getIndexSelected();
439 }
441 {
442 static_cast<MultiListBox*>(this)->clearIndexSelected();
443 }
445 {
446 static_cast<MultiListBox*>(this)->setIndexSelected(_index);
447 }
448 void MemberObsolete<MultiListBox>::insertItem(size_t _index, const UString& _name)
449 {
450 static_cast<MultiListBox*>(this)->insertItemAt(_index, _name);
451 }
452 void MemberObsolete<MultiListBox>::setItem(size_t _index, const UString& _name)
453 {
454 static_cast<MultiListBox*>(this)->setItemNameAt(_index, _name);
455 }
457 {
458 return static_cast<const MultiListBox*>(this)->getItemNameAt(_index);
459 }
461 {
462 static_cast<MultiListBox*>(this)->removeItemAt(_index);
463 }
465 {
466 static_cast<MultiListBox*>(this)->removeAllItems();
467 }
468
469
471 {
472 if (_value == Align::Right)
473 static_cast<ProgressBar*>(this)->setFlowDirection(FlowDirection::RightToLeft);
474 else if (_value == Align::Top)
475 static_cast<ProgressBar*>(this)->setFlowDirection(FlowDirection::TopToBottom);
476 else if (_value == Align::Bottom)
477 static_cast<ProgressBar*>(this)->setFlowDirection(FlowDirection::BottomToTop);
478 else
479 static_cast<ProgressBar*>(this)->setFlowDirection(FlowDirection::LeftToRight);
480 }
481
483 {
484 if (static_cast<const ProgressBar*>(this)->getFlowDirection() == FlowDirection::RightToLeft)
485 return Align::Right;
486 else if (static_cast<const ProgressBar*>(this)->getFlowDirection() == FlowDirection::TopToBottom)
487 return Align::Top;
488 else if (static_cast<const ProgressBar*>(this)->getFlowDirection() == FlowDirection::BottomToTop)
489 return Align::Bottom;
490
491 return Align::Left;
492 }
493
494
496 {
497 static_cast<ScrollView*>(this)->setVisibleVScroll(_visible);
498 }
500 {
501 return static_cast<ScrollView*>(this)->isVisibleVScroll();
502 }
504 {
505 static_cast<ScrollView*>(this)->setVisibleHScroll(_visible);
506 }
508 {
509 return static_cast<ScrollView*>(this)->isVisibleHScroll();
510 }
511
512
514 {
515 return static_cast<const TabControl*>(this)->getButtonWidthAt(_index);
516 }
518 {
519 return static_cast<const TabControl*>(this)->getButtonWidth(_sheet);
520 }
522 {
523 static_cast<TabControl*>(this)->setButtonWidthAt(_index, _width);
524 }
526 {
527 static_cast<TabControl*>(this)->setButtonWidth(_sheet, _width);
528 }
530 {
531 static_cast<TabControl*>(this)->beginToItemAt(_index);
532 }
534 {
535 static_cast<TabControl*>(this)->beginToItemSelected();
536 }
538 {
539 return static_cast<const TabControl*>(this)->getItemCount();
540 }
542 {
543 return static_cast<const TabControl*>(this)->getItemName(_sheet);
544 }
546 {
547 return static_cast<const TabControl*>(this)->getItemNameAt(_index);
548 }
550 {
551 return static_cast<const TabControl*>(this)->getItemAt(_index);
552 }
553 void MemberObsolete<TabControl>::setSheetNameIndex(size_t _index, const UString& _name, int _width)
554 {
555 static_cast<TabControl*>(this)->setItemNameAt(_index, _name);
556 }
557 void MemberObsolete<TabControl>::setSheetName(TabItem* _sheet, const UString& _name, int _width)
558 {
559 static_cast<TabControl*>(this)->setItemName(_sheet, _name);
560 }
562 {
563 return static_cast<TabControl*>(this)->addItem(_name, _width);
564 }
565 TabItem* MemberObsolete<TabControl>::insertSheet(size_t _index, const UString& _name, int _width)
566 {
567 return static_cast<TabControl*>(this)->insertItemAt(_index, _name);
568 }
570 {
571 static_cast<TabControl*>(this)->removeItemAt(_index);
572 }
574 {
575 static_cast<TabControl*>(this)->removeItem(_sheet);
576 }
577 void MemberObsolete<TabControl>::selectSheetIndex(size_t _index, bool _smooth)
578 {
579 static_cast<TabControl*>(this)->setIndexSelected(_index);
580 }
582 {
583 static_cast<TabControl*>(this)->setItemSelected(_sheet);
584 }
586 {
587 return static_cast<const TabControl*>(this)->getIndexSelected();
588 }
589
591 {
592 return static_cast<const TabControl*>(this)->getIndexSelected();
593 }
595 {
596 static_cast<TabControl*>(this)->setIndexSelected(_index);
597 }
598
599
601 {
602 return static_cast<Widget*>(this)->getEnabled();
603 }
605 {
606 return static_cast<Widget*>(this)->getInheritsAlpha();
607 }
609 {
610 return static_cast<Widget*>(this)->getNeedKeyFocus();
611 }
613 {
614 return static_cast<Widget*>(this)->getNeedMouseFocus();
615 }
617 {
618 return static_cast<Widget*>(this)->getInheritsPick();
619 }
621 {
622 return static_cast<Widget*>(this)->getVisible();
623 }
624
625
627 {
628 static_cast<Window*>(this)->setVisibleSmooth(true);
629 }
631 {
632 static_cast<Window*>(this)->setVisibleSmooth(false);
633 }
635 {
636 static_cast<Window*>(this)->setMinSize(_minmax.left, _minmax.top);
637 static_cast<Window*>(this)->setMaxSize(_minmax.right, _minmax.bottom);
638 }
639 void MemberObsolete<Window>::setMinMax(int _min_w, int _min_h, int _max_w, int _max_h)
640 {
641 static_cast<Window*>(this)->setMinSize(_min_w, _min_h);
642 static_cast<Window*>(this)->setMaxSize(_max_w, _max_h);
643 }
645 {
646 return IntRect(
647 static_cast<const Window*>(this)->getMinSize().width,
648 static_cast<const Window*>(this)->getMinSize().height,
649 static_cast<const Window*>(this)->getMaxSize().width,
650 static_cast<const Window*>(this)->getMaxSize().height);
651 }
652
653 bool MemberObsolete<FontManager>::load(const std::string& _file)
654 {
655 return ResourceManager::getInstance().load(_file);
656 }
657
658 void MemberObsolete<FontManager>::loadOldFontFormat(xml::ElementPtr _node2, const std::string& _file, Version _version, const std::string& _tag)
659 {
661 while (_node.next())
662 {
663 if (_node->getName() == _tag)
664 {
665 std::string name;
666 if (!_node->findAttribute("name", name))
667 return;
668
669 std::string type;
670 if (type.empty())
671 {
672 if (_node->findAttribute("resolution").empty())
673 type = "ResourceManualFont";
674 else
675 type = "ResourceTrueTypeFont";
676 }
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 }
789 bool MemberObsolete<Gui>::injectMousePress( int _absx, int _absy, MouseButton _id )
790 {
791 return InputManager::getInstance().injectMousePress(_absx, _absy, _id);
792 }
793 bool MemberObsolete<Gui>::injectMouseRelease( int _absx, int _absy, MouseButton _id )
794 {
795 return InputManager::getInstance().injectMouseRelease(_absx, _absy, _id);
796 }
798 {
799 return InputManager::getInstance().injectKeyPress(_key, _text);
800 }
802 {
804 }
805
807 {
809 }
811 {
813 }
815 {
817 }
818
819 bool MemberObsolete<Gui>::load(const std::string& _file)
820 {
821 return ResourceManager::getInstance().load(_file);
822 }
823
825 {
827 }
829 {
831 }
833 {
835 }
836
838 {
840 }
842 {
844 }
845
847 {
849 }
850
852 {
854 }
855
857 {
859 }
860
862 {
864 }
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 }
906 void MemberObsolete<PointerManager>::loadOldPointerFormat(xml::ElementPtr _node, const std::string& _file, Version _version, const std::string& _tag)
907 {
908 std::string pointer;
909 std::string layer;
910
912 while (node.next())
913 {
914 if (node->getName() == _tag)
915 {
916 layer = node->findAttribute("layer");
917 pointer = node->findAttribute("default");
918
919 // сохраняем
920 std::string shared_text = node->findAttribute("texture");
921
922 // берем детей и крутимся, основной цикл
924 while (info.next("Info"))
925 {
926 std::string name = info->findAttribute("name");
927 if (name.empty())
928 continue;
929
930 std::string texture = info->findAttribute("texture");
931
932 std::string type = (shared_text.empty() && texture.empty()) ? "ResourceImageSetPointer" : "ResourceManualPointer";
933
934 xml::Document doc;
935 xml::ElementPtr root = doc.createRoot("MyGUI");
936 xml::ElementPtr newnode = root->createChild("Resource");
937 newnode->addAttribute("type", type);
938 newnode->addAttribute("name", name);
939
940 std::string tmp;
941 if (info->findAttribute("point", tmp))
942 {
943 xml::ElementPtr prop = newnode->createChild("Property");
944 prop->addAttribute("key", "Point");
945 prop->addAttribute("value", tmp);
946 }
947
948 if (info->findAttribute("size", tmp))
949 {
950 xml::ElementPtr prop = newnode->createChild("Property");
951 prop->addAttribute("key", "Size");
952 prop->addAttribute("value", tmp);
953 }
954
955 if (info->findAttribute("resource", tmp))
956 {
957 xml::ElementPtr prop = newnode->createChild("Property");
958 prop->addAttribute("key", "Resource");
959 prop->addAttribute("value", tmp);
960 }
961
962 if (info->findAttribute("offset", tmp))
963 {
964 xml::ElementPtr prop = newnode->createChild("Property");
965 prop->addAttribute("key", "Coord");
966 prop->addAttribute("value", tmp);
967 }
968
969 if (!shared_text.empty() || !texture.empty())
970 {
971 xml::ElementPtr prop = newnode->createChild("Property");
972 prop->addAttribute("key", "Texture");
973 prop->addAttribute("value", shared_text.empty() ? texture : shared_text);
974 }
975
976 ResourceManager::getInstance().loadFromXmlNode(root, _file, _version);
977 }
978 }
979 }
980
981 if (!layer.empty())
982 static_cast<PointerManager*>(this)->setLayerName(layer);
983
984 if (!pointer.empty())
985 static_cast<PointerManager*>(this)->setDefaultPointer(pointer);
986 }
987
989 {
990 return static_cast<const ResourceManager*>(this)->getCount();
991 }
992 IResourcePtr MemberObsolete<ResourceManager>::getResource(const std::string& _name, bool _throw) const
993 {
994 return static_cast<const ResourceManager*>(this)->getByName(_name, _throw);
995 }
996
997 ResourceSkin* MemberObsolete<SkinManager>::getSkin(const std::string& _name) const
998 {
999 return static_cast<const SkinManager*>(this)->getByName(_name);
1000 }
1001 bool MemberObsolete<SkinManager>::load(const std::string& _file)
1002 {
1003 return ResourceManager::getInstance().load(_file);
1004 }
1005 void MemberObsolete<SkinManager>::loadOldSkinFormat(xml::ElementPtr _node, const std::string& _file, Version _version, const std::string& _tag)
1006 {
1007 std::string resourceCategory = ResourceManager::getInstance().getCategoryName();
1008
1009 // берем детей и крутимся, основной цикл со скинами
1011 while (skin.next(_tag))
1012 {
1013 std::string type = skin->findAttribute("type");
1014 if (type.empty())
1015 type = "ResourceSkin";
1016
1017 IObject* object = FactoryManager::getInstance().createObject(resourceCategory, type);
1018 if (object != nullptr)
1019 {
1020 ResourceSkin* data = object->castType<ResourceSkin>();
1021 data->deserialization(skin.current(), _version);
1022
1024 }
1025 }
1026 }
1027
1028
1030 {
1031 static_cast<WidgetManager*>(this)->destroyWidgets(_widgets);
1032 }
1033 Widget* MemberObsolete<WidgetManager>::findWidgetT(const std::string& _name, bool _throw)
1034 {
1035 return Gui::getInstance().findWidgetT(_name, _throw);
1036 }
1037 Widget* MemberObsolete<WidgetManager>::findWidgetT(const std::string& _name, const std::string& _prefix, bool _throw)
1038 {
1039 return Gui::getInstance().findWidgetT(_name, _prefix, _throw);
1040 }
1041 void MemberObsolete<WidgetManager>::parse(Widget* _widget, const std::string& _key, const std::string& _value)
1042 {
1043 _widget->setProperty(_key, _value);
1044 }
1045
1046
1047#endif // MYGUI_DONT_USE_OBSOLETE
1048
1049#ifndef MYGUI_DONT_USE_OBSOLETE
1050
1051 static std::string convertAlignToDirection(const std::string& _value)
1052 {
1053 Align align = utility::parseValue<Align>(_value);
1054 if (align == Align::Right)
1056 else if (align == Align::Top)
1058 else if (align == Align::Bottom)
1061 }
1062
1063 static std::string convertRectToCoord(const std::string& _value)
1064 {
1065 IntRect rect = IntRect::parse(_value);
1066 IntCoord coord(rect.left, rect.top, rect.width(), rect.height());
1067 return coord.print();
1068 }
1069
1070 using SetString = std::set<std::string>;
1074
1075#endif // MYGUI_DONT_USE_OBSOLETE
1076
1077 bool BackwardCompatibility::isIgnoreProperty(const std::string& _key)
1078 {
1079#ifndef MYGUI_DONT_USE_OBSOLETE
1080 if (mPropertyIgnore.find(_key) != mPropertyIgnore.end())
1081 return true;
1082#endif // MYGUI_DONT_USE_OBSOLETE
1083 return false;
1084 }
1085
1086 bool BackwardCompatibility::checkProperty(Widget* _owner, std::string& _key, std::string& _value)
1087 {
1088#ifndef MYGUI_DONT_USE_OBSOLETE
1089 if (mPropertyIgnore.find(_key) != mPropertyIgnore.end())
1090 return false;
1091
1092 MapString::iterator item = mPropertyRename.find(_key);
1093 if (item != mPropertyRename.end())
1094 {
1095 MYGUI_LOG(Warning, (*item).first << " is deprecated, use " << (*item).second << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1096 _key = (*item).second;
1097 }
1098 else if (_key == "Progress_StartPoint")
1099 {
1100 MYGUI_LOG(Warning, "Progress_StartPoint is deprecated, use Progress_FlowDirection" << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1101 _key = "Progress_FlowDirection";
1102 _value = convertAlignToDirection(_value);
1103 }
1104 else if (_key == "ComboBox_AddItem")
1105 {
1106 MYGUI_LOG(Warning, "ComboBox_AddItem is deprecated" << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1107 ComboBox* widget = _owner->castType<ComboBox>(false);
1108 if (widget != nullptr)
1109 widget->addItem(_value);
1110 return false;
1111 }
1112 else if (_key == "List_AddItem")
1113 {
1114 MYGUI_LOG(Warning, "List_AddItem is deprecated" << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1115 ListBox* widget = _owner->castType<ListBox>(false);
1116 if (widget != nullptr)
1117 widget->addItem(_value);
1118 return false;
1119 }
1120 else if (_key == "Tab_AddSheet")
1121 {
1122 MYGUI_LOG(Warning, "Tab_AddSheet is deprecated" << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1123 TabControl* widget = _owner->castType<TabControl>(false);
1124 if (widget != nullptr)
1125 widget->addItem(_value);
1126 return false;
1127 }
1128 else if (_key == "Tab_AddItem")
1129 {
1130 MYGUI_LOG(Warning, "Tab_AddItem is deprecated" << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1131 TabControl* widget = _owner->castType<TabControl>(false);
1132 if (widget != nullptr)
1133 widget->addItem(_value);
1134 return false;
1135 }
1136 else if (_key == "Window_MinMax")
1137 {
1138 MYGUI_LOG(Warning, "Window_MinMax is deprecated, use Window_MinSize or Window_MaxSize" << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1139 Window* widget = _owner->castType<Window>(false);
1140 if (widget != nullptr)
1141 {
1142 IntRect rect = IntRect::parse(_value);
1143 widget->setMinSize(rect.left, rect.top);
1144 widget->setMaxSize(rect.right, rect.bottom);
1145 }
1146 return false;
1147 }
1148 else if (_key == "ImageRect")
1149 {
1150 MYGUI_LOG(Warning, "ImageRect is deprecated, use ImageCoord" << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1151 _key = "ImageCoord";
1152 _value = convertRectToCoord(_value);
1153 }
1154 else if (_key == "StartPoint")
1155 {
1156 MYGUI_LOG(Warning, "StartPoint is deprecated, use FlowDirection" << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1157 _key = "FlowDirection";
1158 _value = convertAlignToDirection(_value);
1159 }
1160
1161#endif // MYGUI_DONT_USE_OBSOLETE
1162 return true;
1163 }
1164
1166 {
1167#ifndef MYGUI_DONT_USE_OBSOLETE
1168 mPropertyRename["Widget_Caption"] = "Caption";
1169 mPropertyRename["Button_Pressed"] = "StateSelected";
1170 mPropertyRename["ButtonPressed"] = "StateSelected";
1171 mPropertyRename["StateCheck"] = "StateSelected";
1172 mPropertyRename["Edit_ShowVScroll"] = "VisibleVScroll";
1173 mPropertyRename["Edit_ShowHScroll"] = "VisibleHScroll";
1174 mPropertyRename["ScrollView_VScroll"] = "VisibleVScroll";
1175 mPropertyRename["ScrollView_HScroll"] = "VisibleHScroll";
1176 mPropertyRename["Progress_Position"] = "RangePosition";
1177 mPropertyRename["Scroll_Position"] = "RangePosition";
1178 mPropertyRename["Tab_SelectSheet"] = "SelectItem";
1179 mPropertyRename["Image_Texture"] = "ImageTexture";
1180 mPropertyRename["Image_Coord"] = "ImageRegion";
1181 mPropertyRename["Image_Tile"] = "ImageTile";
1182 mPropertyRename["Image_Index"] = "ImageIndex";
1183 mPropertyRename["Image_Resource"] = "ImageResource";
1184 mPropertyRename["Image_Group"] = "ImageGroup";
1185 mPropertyRename["Image_Name"] = "ImageName";
1186 mPropertyRename["MenuItem_Id"] = "MenuItemId";
1187 mPropertyRename["MenuItem_Type"] = "MenuItemType";
1188 mPropertyRename["Combo_MaxLength"] = "MaxListLength";
1189 mPropertyRename["AlignText"] = "TextAlign";
1190 mPropertyRename["ToStick"] = "Snap";
1191 mPropertyRename["ListSmoothShow"] = "SmoothShow";
1192 mPropertyRename["HeightList"] = "MaxListLength";
1193 mPropertyRename["AlignVert"] = "VerticalAlignment";
1194
1195 mPropertyIgnore.insert("DragLayer");
1196 mPropertyIgnore.insert("SkinLine");
1197 mPropertyIgnore.insert("HeightLine");
1198 mPropertyIgnore.insert("SkinLine");
1199 mPropertyIgnore.insert("HeightLine");
1200 mPropertyIgnore.insert("SeparatorHeight");
1201 mPropertyIgnore.insert("SeparatorSkin");
1202 mPropertyIgnore.insert("SubmenuImageSize");
1203 mPropertyIgnore.insert("SubMenuSkin");
1204 mPropertyIgnore.insert("SubMenuLayer");
1205 mPropertyIgnore.insert("DistanceButton");
1206 mPropertyIgnore.insert("ButtonSkin");
1207 mPropertyIgnore.insert("ButtonType");
1208 mPropertyIgnore.insert("ButtonSize");
1209 mPropertyIgnore.insert("ButtonOffset");
1210 mPropertyIgnore.insert("DefaultLayer");
1211 mPropertyIgnore.insert("FadeSkin");
1212 mPropertyIgnore.insert("FadeLayer");
1213 mPropertyIgnore.insert("SkinButton");
1214 mPropertyIgnore.insert("HeightButton");
1215 mPropertyIgnore.insert("SkinList");
1216 mPropertyIgnore.insert("SkinButtonEmpty");
1217 mPropertyIgnore.insert("WidthSeparator");
1218 mPropertyIgnore.insert("SkinSeparator");
1219 mPropertyIgnore.insert("TrackSkin");
1220 mPropertyIgnore.insert("TrackWidth");
1221 mPropertyIgnore.insert("TrackMin");
1222 mPropertyIgnore.insert("TrackStep");
1223 mPropertyIgnore.insert("TrackFill");
1224 mPropertyIgnore.insert("OffsetBar");
1225 mPropertyIgnore.insert("ButtonSkin");
1226 mPropertyIgnore.insert("EmptyBarSkin");
1227 mPropertyIgnore.insert("TrackRangeMargins");
1228 mPropertyIgnore.insert("MinTrackSize");
1229 mPropertyIgnore.insert("MainMove");
1230 mPropertyIgnore.insert("LevelOffset");
1231 mPropertyIgnore.insert("State");
1232
1233 mSkinRename["StaticImage"] = "ImageBox";
1234 mSkinRename["StaticText"] = "TextBox";
1235 mSkinRename["HScroll"] = "ScrollBarH";
1236 mSkinRename["VScroll"] = "ScrollBarV";
1237 mSkinRename["ItemBoxH"] = "ItemBox";
1238 mSkinRename["ItemBoxV"] = "ItemBox";
1239 mSkinRename["VSlider"] = "SliderV";
1240 mSkinRename["HSlider"] = "SliderH";
1241 mSkinRename["Progress"] = "ProgressBar";
1242 mSkinRename["ProgressFill"] = "ProgressBarFill";
1243 mSkinRename["List"] = "ListBox";
1244 mSkinRename["MultiList"] = "MultiListBox";
1245 mSkinRename["Edit"] = "EditBox";
1246 mSkinRename["EditStretch"] = "EditBoxStretch";
1247 mSkinRename["EditEmpty"] = "EditBoxEmpty";
1248 mSkinRename["RadioBox"] = "RadioButton";
1249 mSkinRename["Tab"] = "TabControl";
1250 mSkinRename["WordWrap"] = "WordWrapEmpty";
1251 mSkinRename["WordWrapSimple"] = "WordWrapEmpty";
1252 mSkinRename["ButtonSmall"] = "Button";
1253 mSkinRename["ButtonImageText"] = "ButtonImage";
1254
1255 mSkinRename["TileClient"] = "ClientTileSkin";
1256 mSkinRename["DefaultClient"] = "ClientDefaultSkin";
1257 mSkinRename["Panel"] = "PanelSkin";
1258 mSkinRename["PanelSmall"] = "PanelSkin";
1259 mSkinRename["Separator1"] = "SepUpVSkin";
1260 mSkinRename["Separator2"] = "SepDownVSkin";
1261 mSkinRename["Separator3"] = "SepUpHSkin";
1262 mSkinRename["Separator4"] = "SepDownHSkin";
1263 mSkinRename["MarkerWhite"] = "WhiteSkin";
1264 mSkinRename["ButtonLeft"] = "ButtonLeftSkin";
1265 mSkinRename["ButtonRight"] = "ButtonRightSkin";
1266 mSkinRename["ButtonUp"] = "ButtonUpSkin";
1267 mSkinRename["ButtonDown"] = "ButtonDownSkin";
1268 mSkinRename["ButtonV"] = "ButtonAcceptSkin";
1269 mSkinRename["ButtonX"] = "ButtonCloseSkin";
1270 mSkinRename["ButtonMinusPlus"] = "ButtonExpandSkin";
1271#endif // MYGUI_DONT_USE_OBSOLETE
1272 }
1273
1274 std::string BackwardCompatibility::getPropertyRename(const std::string& _propertyName)
1275 {
1276#ifndef MYGUI_DONT_USE_OBSOLETE
1277 MapString::const_iterator item = mPropertyRename.find(_propertyName);
1278 if (item != mPropertyRename.end())
1279 return (*item).second;
1280#endif // MYGUI_DONT_USE_OBSOLETE
1281 return _propertyName;
1282 }
1283
1284 std::string BackwardCompatibility::getFactoryRename(const std::string& _categoryName, const std::string& _factoryName)
1285 {
1286#ifndef MYGUI_DONT_USE_OBSOLETE
1287 if (_categoryName == "Widget")
1288 {
1289 if (_factoryName == "HScroll")
1290 {
1291 MYGUI_LOG(Warning, "HScroll factory is deprecated, use " << ScrollBar::getClassTypeName() << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1292 }
1293 else if (_factoryName == "VScroll")
1294 {
1295 MYGUI_LOG(Warning, "VScroll factory is deprecated, use " << ScrollBar::getClassTypeName() << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1296 }
1297 else if (_factoryName == "RenderBox")
1298 {
1299 MYGUI_LOG(Warning, "RenderBox factory is deprecated, use " << Canvas::getClassTypeName() << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1300 }
1301 else if (_factoryName == "Sheet")
1302 {
1303 MYGUI_LOG(Warning, "Sheet factory is deprecated, use " << TabItem::getClassTypeName() << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1304 }
1305 else if (_factoryName == "StaticImage")
1306 {
1307 MYGUI_LOG(Warning, "StaticImage factory is deprecated, use " << ImageBox::getClassTypeName() << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1308 }
1309 else if (_factoryName == "StaticText")
1310 {
1311 MYGUI_LOG(Warning, "StaticText factory is deprecated, use " << TextBox::getClassTypeName() << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1312 }
1313 else if (_factoryName == "Progress")
1314 {
1315 MYGUI_LOG(Warning, "Progress factory is deprecated, use " << ProgressBar::getClassTypeName() << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1316 }
1317 else if (_factoryName == "List")
1318 {
1319 MYGUI_LOG(Warning, "List factory is deprecated, use " << ListBox::getClassTypeName() << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1320 }
1321 else if (_factoryName == "Edit")
1322 {
1323 MYGUI_LOG(Warning, "Edit factory is deprecated, use " << EditBox::getClassTypeName() << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1324 }
1325 else if (_factoryName == "Tab")
1326 {
1327 MYGUI_LOG(Warning, "Tab factory is deprecated, use " << TabControl::getClassTypeName() << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1328 }
1329 else if (_factoryName == "MultiList")
1330 {
1331 MYGUI_LOG(Warning, "MultiList factory is deprecated, use " << MultiListBox::getClassTypeName() << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1332 }
1333 else if (_factoryName == "MenuCtrl")
1334 {
1335 MYGUI_LOG(Warning, "MenuCtrl factory is deprecated, use " << MenuControl::getClassTypeName() << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1336 }
1337 }
1338#endif // MYGUI_DONT_USE_OBSOLETE
1339 return _factoryName;
1340 }
1341
1342 std::string BackwardCompatibility::getSkinRename(const std::string& _skinName)
1343 {
1344#ifndef MYGUI_DONT_USE_OBSOLETE
1345 MapString::iterator item = mSkinRename.find(_skinName);
1346 if (item != mSkinRename.end())
1347 {
1348 MYGUI_LOG(Warning, (*item).first << " skin is deprecated, use " << (*item).second << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1349 return (*item).second;
1350 }
1351#endif // MYGUI_DONT_USE_OBSOLETE
1352 return _skinName;
1353 }
1354
1356 {
1357#ifndef MYGUI_DONT_USE_OBSOLETE
1358 mPropertyRename.clear();
1359#endif // MYGUI_DONT_USE_OBSOLETE
1360 }
1361
1363 {
1364#ifndef MYGUI_DONT_USE_OBSOLETE
1366 std::string widgetCategory = MyGUI::WidgetManager::getInstance().getCategoryName();
1367 factory.registerFactory<HScroll>(widgetCategory);
1368 factory.registerFactory<VScroll>(widgetCategory);
1369 factory.registerFactory<Canvas>(widgetCategory, "RenderBox");
1370 factory.registerFactory<TabItem>(widgetCategory, "Sheet");
1371 factory.registerFactory<ImageBox>(widgetCategory, "StaticImage");
1372 factory.registerFactory<TextBox>(widgetCategory, "StaticText");
1373 factory.registerFactory<ProgressBar>(widgetCategory, "Progress");
1374 factory.registerFactory<ListBox>(widgetCategory, "List");
1375 factory.registerFactory<EditBox>(widgetCategory, "Edit");
1376 factory.registerFactory<TabControl>(widgetCategory, "Tab");
1377 factory.registerFactory<MultiListBox>(widgetCategory, "MultiList");
1378 factory.registerFactory<MenuControl>(widgetCategory, "MenuCtrl");
1379#endif // MYGUI_DONT_USE_OBSOLETE
1380 }
1381
1382} // namespace MyGUI
#define MYGUI_LOG(level, text)
static std::string getPropertyRename(const std::string &_propertyName)
static bool isIgnoreProperty(const std::string &_key)
static std::string getFactoryRename(const std::string &_categoryName, const std::string &_factoryName)
static bool checkProperty(Widget *_owner, std::string &_key, std::string &_value)
static std::string getSkinRename(const std::string &_skinName)
widget description should be here.
Definition: MyGUI_Button.h:22
wrapper over Texture - shows the texture. Implemented: resizing of texture (see TextureResizeMode); r...
Definition: MyGUI_Canvas.h:24
static const std::string & getClassTypeName()
Definition: MyGUI_Canvas.h:25
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.
Definition: MyGUI_EditBox.h:29
static const std::string & getClassTypeName()
Definition: MyGUI_EditBox.h:30
static FactoryManager & getInstance()
void registerFactory(const std::string &_category, const std::string &_type, Delegate::IDelegate *_delegate)
IObject * createObject(const std::string &_category, const std::string &_type)
Widget * findWidgetT(const std::string &_name, bool _throw=true)
Definition: MyGUI_Gui.cpp:188
void frameEvent(float _time)
Definition: MyGUI_Gui.cpp:326
static Gui & getInstance()
Type * castType(bool _throw=true)
Definition: MyGUI_IObject.h:18
widget description should be here.
static const std::string & 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.
Definition: MyGUI_ItemBox.h:33
static LayerManager & getInstance()
void resizeView(const IntSize &_viewSize)
const std::string & getCurrentLayout() const
static LayoutManager & getInstance()
widget description should be here.
Definition: MyGUI_ListBox.h:31
void addItem(const UString &_name, Any _data=Any::Null)
Add an item to the end of a array.
static const std::string & getClassTypeName()
Definition: MyGUI_ListBox.h:32
widget description should be here.
static const std::string & getClassTypeName()
widget description should be here.
widget description should be here.
static const std::string & getClassTypeName()
void setVisible(bool _visible)
static PointerManager & getInstance()
void setDefaultPointer(const std::string &_value)
widget description should be here.
static const std::string & getClassTypeName()
virtual const IntSize & getViewSize() const =0
static RenderManager & getInstance()
const std::string & getCategoryName() const
void loadFromXmlNode(xml::ElementPtr _node, const std::string &_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 const std::string & getClassTypeName()
widget description should be here.
widget description should be here.
static const std::string & getClassTypeName()
TabItem * addItem(const UString &_name, Any _data=Any::Null)
Add an item to the end of a array.
widget description should be here.
Definition: MyGUI_TabItem.h:22
static const std::string & getClassTypeName()
Definition: MyGUI_TabItem.h:23
widget description should be here.
Definition: MyGUI_TextBox.h:21
static const std::string & getClassTypeName()
Definition: MyGUI_TextBox.h:22
A UTF-16 string with implicit conversion to/from std::string and std::wstring.
widget description should be here.
Definition: MyGUI_Widget.h:37
void setProperty(const std::string &_key, const std::string &_value)
const std::string & getCategoryName() const
static WidgetManager & getInstance()
widget description should be here.
Definition: MyGUI_Window.h:30
void setMinSize(const IntSize &_value)
void setMaxSize(const IntSize &_value)
ElementPtr createRoot(const std::string &_name)
ElementPtr createChild(const std::string &_name, const std::string &_content="", ElementType _type=ElementType::Normal)
ElementEnumerator getElementEnumerator()
const std::string & getName() const
void addAttribute(const std::string &_key, const T &_value)
bool findAttribute(const std::string &_name, std::string &_value)
static std::string convertAlignToDirection(const std::string &_value)
static MapString mPropertyRename
std::map< std::string, std::string > MapString
Definition: MyGUI_Types.h:39
static std::string convertRectToCoord(const std::string &_value)
static SetString mPropertyIgnore
std::set< std::string > SetString
std::vector< Widget * > VectorWidgetPtr
const size_t ITEM_NONE
Definition: MyGUI_Macros.h:17
static MapString mSkinRename
types::TRect< int > IntRect
Definition: MyGUI_Types.h:32
unsigned int Char
Definition: MyGUI_Types.h:49
std::string print() const
std::string print() const
Definition: MyGUI_TCoord.h:200
static TRect< int > parse(const std::string &_value)
Definition: MyGUI_TRect.h:163