MCPcopy Create free account
hub / github.com/LibreSprite/LibreSprite / DevConsoleView

Method DevConsoleView

src/app/ui/devconsole_view.cpp:62–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60};
61
62DevConsoleView::DevConsoleView()
63 : Box(VERTICAL)
64 , m_textBox("Welcome to LibreSprite Scripting Console\n(Experimental)", LEFT)
65 , m_label(">")
66 , m_entry(new CommmandEntry)
67{
68 SkinTheme* theme = static_cast<SkinTheme*>(this->theme());
69
70 addChild(&m_view);
71 addChild(&m_bottomBox);
72
73 m_bottomBox.addChild(&m_language);
74 m_bottomBox.addChild(&m_label);
75 m_bottomBox.addChild(m_entry);
76
77 auto& engines = script::Engine::getRegistry();
78 for (auto& entry : engines) {
79 std::string name = entry.first;
80 if (!name.empty())
81 m_language.addItem(name);
82 }
83
84 m_view.setProperty(SkinStylePropertyPtr(
85 new SkinStyleProperty(theme->styles.workspaceView())));
86
87 m_view.attachToView(&m_textBox);
88 m_view.setExpansive(true);
89 m_entry->setExpansive(true);
90 m_entry->ExecuteCommand.connect(&DevConsoleView::onExecuteCommand, this);
91}
92
93DevConsoleView::~DevConsoleView()
94{

Callers

nothing calls this directly

Calls 7

addChildMethod · 0.80
setPropertyMethod · 0.80
attachToViewMethod · 0.80
setExpansiveMethod · 0.80
themeMethod · 0.45
emptyMethod · 0.45
addItemMethod · 0.45

Tested by

no test coverage detected