24 #include "pythonBuffer.h" 34 auto& canvas =
minsky.canvas;
40 if (typeName ==
"Group" && !canvas.model->groups.empty())
42 canvas.item = canvas.model->groups.front();
47 found =
minsky.model->recursiveDo(&GroupItems::items, [&](
const Items&, Items::const_iterator i)
49 if ((*i)->classType() == typeName)
59 if (!found || !canvas.item)
62 throw std::runtime_error(
"Object not found");
72 auto& canvas =
minsky.canvas;
76 bool found =
minsky.model->recursiveDo(
78 [&](
const Items&, Items::const_iterator i) {
79 if (
auto v = dynamic_cast<VariableBase*>(i->get()))
81 if (v->name() == name)
90 if (!found || !canvas.item)
93 throw std::runtime_error(
"Variable not found");
106 LocalMinsky::LocalMinsky(
Minsky&) {}
107 LocalMinsky::~LocalMinsky() {}
void doOneEvent(bool idletasksOnly)
checks if any GUI events are waiting, and proces an event if so
minsky::Item & findVariable(const std::string &name)
CLASSDESC_PYTHON_MODULE(pyminsky)
minsky::Item & findObject(const std::string &typeName)
Creation and access to the minskyTCL_obj object, which has code to record whenever Minsky's state cha...
std::vector< ItemPtr > Items
CLASSDESC_ADD_GLOBAL(minsky)
CLASSDESC_ADD_FUNCTION(findObject)