CtrlrChildWindow *CtrlrManagerWindowManager::createWindow(const CtrlrManagerWindowManager::WindowType window)
{
	if (isCreated(window))
	{
		return (nullptr);
	}

	CtrlrChildWindow *w = new CtrlrChildWindow (*this);

	switch (window)
	{
		case CtrlrManagerWindowManager::MidiMonWindow:
			w->setContent (new CtrlrMIDIMon (owner));
			break;

		case CtrlrManagerWindowManager::LogViewer:
			w->setContent (new CtrlrLogViewer (owner));
			break;

		case CtrlrManagerWindowManager::MIDICalculator:
			w->setContent (new CtrlrMIDICalculator (owner));
			break;

        case CtrlrManagerWindowManager::Repository:
            break;
	}

	w->setName("Ctrlr/" + w->getContent()->getContentName());
	windows.add (w);

	return (w);
}
Ejemplo n.º 2
0
CtrlrChildWindow *CtrlrPanelWindowManager::createWindow(const CtrlrPanelWindowManager::WindowType window)
{
	if (isCreated(window))
	{
		return (nullptr);
	}

	CtrlrChildWindow *w = new CtrlrChildWindow (*this);

	switch (window)
	{
		case CtrlrPanelWindowManager::LuaConsole:
			w->setContent (new CtrlrLuaConsole (owner));
			break;

		case CtrlrPanelWindowManager::LuaMethodEditor:
			w->setContent (new CtrlrLuaMethodEditor (owner));
			break;

		case CtrlrPanelWindowManager::ModulatorList:
			w->setContent (new CtrlrPanelModulatorList(owner));
			break;

		case CtrlrPanelWindowManager::LayerEditor:
			w->setContent (new CtrlrPanelLayerList(owner));
			break;

		case CtrlrPanelWindowManager::MIDILibrary:
			w->setContent (new CtrlrMIDILibraryEditor(owner));
			break;

		case CtrlrPanelWindowManager::BufferEditor:
			w->setContent (new CtrlrMIDIBufferEditor(owner));
			break;
	}

	w->setName(owner.getProperty (Ids::name).toString() + "/" + w->getContent()->getContentName());
	windows.add (w);

	return (w);
}