| 762 | } |
| 763 | |
| 764 | WidgetConstructResult WidgetParser::scrollAreaHandler(String const& name, Json const& config) { |
| 765 | auto scrollArea = make_shared<ScrollArea>(); |
| 766 | |
| 767 | if (config.contains("buttons")) |
| 768 | scrollArea->setButtonImages(config.get("buttons")); |
| 769 | if (config.contains("thumbs")) |
| 770 | scrollArea->setThumbImages(config.get("thumbs")); |
| 771 | |
| 772 | if (config.contains("children")) |
| 773 | constructImpl(config.get("children"), scrollArea.get()); |
| 774 | |
| 775 | if (config.contains("horizontalScroll")) |
| 776 | scrollArea->setHorizontalScroll(config.getBool("horizontalScroll")); |
| 777 | if (config.contains("verticalScroll")) |
| 778 | scrollArea->setVerticalScroll(config.getBool("verticalScroll")); |
| 779 | |
| 780 | scrollArea->setUpdatesChildren(config.getBool("updatesChildren", false)); |
| 781 | |
| 782 | common(scrollArea, config, false); |
| 783 | return WidgetConstructResult(scrollArea, name, config.getFloat("zlevel", 0)); |
| 784 | } |
| 785 | |
| 786 | void WidgetParser::common(WidgetPtr widget, Json const& config, bool getChildren) { |
| 787 | if (config.contains("rect")) { |
nothing calls this directly
no test coverage detected