| 118 | bool isVisible() const { return Visible; }; |
| 119 | |
| 120 | template <typename T> sp<T> findControlTyped(const UString &name) const |
| 121 | { |
| 122 | auto c = this->findControl(name); |
| 123 | if (!c) |
| 124 | { |
| 125 | LogError("Failed to find control \"%s\" within form \"%s\"", name, this->Name); |
| 126 | return nullptr; |
| 127 | } |
| 128 | sp<T> typedControl = std::dynamic_pointer_cast<T>(c); |
| 129 | if (!typedControl) |
| 130 | { |
| 131 | LogError("Failed to cast control \"%s\" within form \"%s\" to type \"%s\"", name, |
| 132 | this->Name, typeid(T).name()); |
| 133 | return nullptr; |
| 134 | } |
| 135 | return typedControl; |
| 136 | } |
| 137 | |
| 138 | sp<Control> getParent() const; |
| 139 | sp<Form> getForm(); |
nothing calls this directly
no test coverage detected