mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[apps/code] Get imported modules in the variable box
This commit is contained in:
@@ -437,6 +437,18 @@ PythonToolbox::PythonToolbox() :
|
||||
{
|
||||
}
|
||||
|
||||
const ToolboxMessageTree * PythonToolbox::moduleChildren(const char * name, int * numberOfNodes) const {
|
||||
assert(numberOfNodes != nullptr);
|
||||
for (ToolboxMessageTree t : modulesChildren) {
|
||||
if (strcmp(I18n::translate(t.label()), name)) {
|
||||
*numberOfNodes = t.numberOfChildren();
|
||||
assert(*numberOfNodes > 0);
|
||||
return static_cast<const ToolboxMessageTree *>(t.children(0));
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool PythonToolbox::handleEvent(Ion::Events::Event event) {
|
||||
if (Toolbox::handleEvent(event)) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user