[DEV] add subWidget search with there name
This commit is contained in:
parent
5309ac7550
commit
2ff07a736e
@ -266,3 +266,30 @@ void ewol::widget::Windows::requestDestroyFromChild(const std::shared_ptr<Object
|
|||||||
markToRedraw();
|
markToRedraw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<ewol::Object> ewol::widget::Windows::getSubObjectNamed(const std::string& _objectName) {
|
||||||
|
std::shared_ptr<ewol::Object> tmpObject = ewol::Widget::getSubObjectNamed(_objectName);
|
||||||
|
if (tmpObject != nullptr) {
|
||||||
|
return tmpObject;
|
||||||
|
}
|
||||||
|
// check direct subwidget
|
||||||
|
if (m_subWidget != nullptr) {
|
||||||
|
tmpObject = m_subWidget->getSubObjectNamed(_objectName);
|
||||||
|
if (tmpObject != nullptr) {
|
||||||
|
return tmpObject;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// get all subwidget "pop-up"
|
||||||
|
for (auto &it : m_popUpWidgetList) {
|
||||||
|
if (it != nullptr) {
|
||||||
|
tmpObject = it->getSubObjectNamed(_objectName);
|
||||||
|
if (tmpObject != nullptr) {
|
||||||
|
return tmpObject;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// not find ...
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -92,6 +92,7 @@ namespace ewol {
|
|||||||
virtual void calculateSize(const vec2& _availlable);
|
virtual void calculateSize(const vec2& _availlable);
|
||||||
virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos);
|
virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos);
|
||||||
virtual void requestDestroyFromChild(const std::shared_ptr<Object>& _child);
|
virtual void requestDestroyFromChild(const std::shared_ptr<Object>& _child);
|
||||||
|
virtual std::shared_ptr<ewol::Object> getSubObjectNamed(const std::string& _objectName);
|
||||||
void setTitle(const std::string& _title);
|
void setTitle(const std::string& _title);
|
||||||
public:
|
public:
|
||||||
enum popUpMessageType {
|
enum popUpMessageType {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user