mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-01 10:13:22 +00:00
Add Widget::findChildT<>() member function.
This commit is contained in:
parent
93f1584717
commit
5605ae81e0
@ -250,6 +250,13 @@ public:
|
||||
Widget* findChild(const char* name);
|
||||
Widget* findSibling(const char* name);
|
||||
|
||||
// Finds a child with the specified name and dynamic-casts it to
|
||||
// type T.
|
||||
template<class T>
|
||||
T* findChildT(const char* name) {
|
||||
return dynamic_cast<T*>(findChild(name));
|
||||
}
|
||||
|
||||
void dirty() {
|
||||
jwidget_dirty(this);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user