Sketch ini

This commit is contained in:
Ilusha 2024-03-17 10:04:52 +03:00 committed by IlyaShurupov
parent be0177b1b0
commit b8bab2264f
16 changed files with 2510 additions and 0 deletions

View file

@ -0,0 +1,34 @@
#include "nodes.h"
#include "StrokesWidget.h"
int main(int argc, char* argv[]) {
auto nodes = (argc == 2) ? nd::NodesCore::createFast(argv[1]) : nd::NodesCore::createFast();
tp::init_utils();
obj::NDO->define(&obj::StrokesObject::TypeData);
obj::NDO->define(&nd::StrokesWidget::TypeData);
obj::NDO->type_groups.addType(&obj::StrokesObject::TypeData, { "Strokes", "StrokesProject" });
obj::NDO->type_groups.addType(&nd::StrokesWidget::TypeData, { "Strokes", "StrokesWidget" });
nd::StrokesWidget::OpsInit();
nd::StrokesWidget::addShortcuts(nodes);
auto root_widget = NDO_CAST(nd::Widget, obj::NDO->create("RootWidget"));
auto childs = root_widget->getMember<obj::ListObject>("childs");
childs->pushBack(obj::NDO->create("StrokesWidget"));
nodes->bindRootWindow(root_widget);
nodes->run();
nd::StrokesWidget::OpsUnInit();
tp::finalize_utils();
nodes->destroyFast();
tp::terminate();
}