예제 #1
0
GOGUIPanel* GOGUIDivisionalsPanel::CreateDivisionalsPanel(GOrgueConfigReader& cfg)
{
	GOGUIButton* button;

	GOGUIPanel* panel = new GOGUIPanel(m_organfile);
	GOGUIDisplayMetrics* metrics = new GOGUISetterDisplayMetrics(cfg, m_organfile, GOGUI_SETTER_DIVISIONALS);
	panel->Init(cfg, metrics, _("Divisionals"), wxT("SetterDivisionalPanel"));

	GOGUIHW1Background* back = new GOGUIHW1Background(panel);
	back->Init(cfg, wxT("SetterDivisionals"));
	panel->AddControl(back);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Set")), false);
	button->Init(cfg, wxT("SetterGeneralsSet"), 1, 100);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Regular")), false);
	button->Init(cfg, wxT("SetterGerneralsRegular"), 3, 100);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Scope")), false);
	button->Init(cfg, wxT("SetterGeneralsScope"), 4, 100);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Scoped")), false);
	button->Init(cfg, wxT("SetterGeneralsScoped"), 5, 100);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Full")), false);
	button->Init(cfg, wxT("SetterGeneralsFull"), 7, 100);
	panel->AddControl(button);

	panel->GetLayoutEngine()->Update();
	for (unsigned int i = m_organfile->GetFirstManualIndex(); i < m_organfile->GetODFManualCount(); i++)
	{
		int x, y;
		GOrgueManual* manual = m_organfile->GetManual(i);

		panel->GetLayoutEngine()->GetPushbuttonBlitPosition(100 + i, 1, x, y);

		GOGUILabel* PosDisplay=new GOGUILabel(panel, NULL);
		PosDisplay->Init(cfg, wxString::Format(wxT("SetterDivisionalLabel%03d"), i), x, y, manual->GetName());
		panel->AddControl(PosDisplay);

		for(unsigned j = 0; j < 10; j++)
		{
			GOrgueDivisional* divisional = new GOrgueDivisional(m_organfile, manual->GetDivisionalTemplate(), true);
			divisional->Init(cfg, wxString::Format(wxT("Setter%03dDivisional%03d"), i, j + 100), i, 100 + j, wxString::Format(wxT("%d"), j + 1));
			manual->AddDivisional(divisional);

			button = new GOGUIButton(panel, divisional, true);
			button->Init(cfg, wxString::Format(wxT("Setter%03dDivisional%03d"), i, j + 100), j + 3, 100 + i);
			panel->AddControl(button);
		}
	}
	return panel;
}
예제 #2
0
GOGUIPanel* GOGUICrescendoPanel::CreateCrescendoPanel(GOrgueConfigReader& cfg)
{
	GOGUIButton* button;

	GOGUIPanel* panel = new GOGUIPanel(m_organfile);
	GOGUIDisplayMetrics* metrics = new GOGUISetterDisplayMetrics(cfg, m_organfile, GOGUI_SETTER_CRESCENDO);
	panel->Init(cfg, metrics, _("Crescendo Pedal"), wxT("SetterCrescendoPanel"));

	GOGUIHW1Background* back = new GOGUIHW1Background(panel);
	back->Init(cfg, wxT("SetterCrescendo"));
	panel->AddControl(back);

	GOGUIEnclosure* enclosure = new GOGUIEnclosure(panel, m_organfile->GetEnclosure(wxT("Swell")));
	enclosure->Init(cfg, wxT("SetterSwell"));
	panel->AddControl(enclosure);

	GOGUILabel* PosDisplay=new GOGUILabel(panel, m_organfile->GetLabel(wxT("CrescendoLabel")));
	PosDisplay->Init(cfg, wxT("SetterCrescendoPosition"), 350, 10);
	panel->AddControl(PosDisplay);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Set")), false);
	button->Init(cfg, wxT("SetterCrescendoSet"), 1, 100);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Regular")), false);
	button->Init(cfg, wxT("SetterCrescendoRegular"), 3, 100);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Scope")), false);
	button->Init(cfg, wxT("SetterCrescendoScope"), 4, 100);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Scoped")), false);
	button->Init(cfg, wxT("SetterCrescendoScoped"), 5, 100);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Full")), false);
	button->Init(cfg, wxT("SetterCrescendoFull"), 7, 100);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("CrescendoA")), false);
	button->Init(cfg, wxT("SetterCrescendoA"), 1, 101);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("CrescendoB")), false);
	button->Init(cfg, wxT("SetterCrescendoB"), 2, 101);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("CrescendoC")), false);
	button->Init(cfg, wxT("SetterCrescendoC"), 3, 101);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("CrescendoD")), false);
	button->Init(cfg, wxT("SetterCrescendoD"), 4, 101);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("CrescendoPrev")), false);
	button->Init(cfg, wxT("SetterCrescendoPrev"), 6, 101);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("CrescendoCurrent")), false);
	button->Init(cfg, wxT("SetterCrescendoCurrent"), 7, 101);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("CrescendoNext")), false);
	button->Init(cfg, wxT("SetterCrescendoNext"), 8, 101);
	panel->AddControl(button);

	return panel;
}
예제 #3
0
GOGUIPanel* GOGUIFloatingPanel::CreateFloatingPanel(GOrgueConfigReader& cfg)
{
	GOGUIPanel* panel = new GOGUIPanel(m_organfile);
	GOGUIDisplayMetrics* metrics = new GOGUISetterDisplayMetrics(cfg, m_organfile, GOGUI_SETTER_FLOATING);
	panel->Init(cfg, metrics, _("Coupler manuals and volume"), wxT("SetterFloating"), wxT(""));

	GOGUIHW1Background* back = new GOGUIHW1Background(panel);
	back->Init(cfg, wxT("SetterFloating"));
	panel->AddControl(back);

	for (unsigned i = m_organfile->GetODFManualCount(); i <= m_organfile->GetManualAndPedalCount(); i++)
	{
		wxString group;
		group.Printf(wxT("SetterFloating%03d"), i - m_organfile->GetODFManualCount() + 1);
		GOGUIManualBackground* manual_back = new GOGUIManualBackground(panel, i - m_organfile->GetODFManualCount());
		manual_back->Init(cfg, group);
		panel->AddControl(manual_back);

		GOGUIManual* manual = new GOGUIManual(panel, m_organfile->GetManual(i), i - m_organfile->GetODFManualCount());
		manual->Init(cfg, group);
		panel->AddControl(manual);

		for(unsigned j = 0; j < 10; j++)
		{
			GOrgueDivisional* divisional = new GOrgueDivisional(m_organfile, m_organfile->GetManual(i)->GetDivisionalTemplate(), true);
			divisional->Init(cfg, wxString::Format(wxT("Setter%03dDivisional%03d"), i, j + 100), i, 100 + j, wxString::Format(wxT("%d"), j + 1));
			m_organfile->GetManual(i)->AddDivisional(divisional);

			GOGUIButton* button = new GOGUIButton(panel, divisional, true);
			button->Init(cfg, wxString::Format(wxT("Setter%03dDivisional%03d"), i, j + 100), j + 1, i - m_organfile->GetODFManualCount());
			panel->AddControl(button);
		}

	}

	GOrgueEnclosure* master_enc = new GOrgueEnclosure(m_organfile);
	master_enc->Init(cfg, wxT("SetterMasterVolume"), _("Master"), 127);
	m_organfile->AddEnclosure(master_enc);
	master_enc->SetElementID(m_organfile->GetRecorderElementID(wxString::Format(wxT("SM"))));

	GOGUIEnclosure* enclosure = new GOGUIEnclosure(panel, master_enc);
	enclosure->Init(cfg, wxT("SetterMasterVolume"));
	panel->AddControl(enclosure);

	for(unsigned i = 0; i < m_organfile->GetWindchestGroupCount(); i++)
	{
		GOrgueWindchest* windchest = m_organfile->GetWindchest(i);
		windchest->AddEnclosure(master_enc);

		GOrgueEnclosure* enc = new GOrgueEnclosure(m_organfile);
		enc->Init(cfg, wxString::Format(wxT("SetterMaster%03d"), i + 1), windchest->GetName(), 127);
		m_organfile->AddEnclosure(enc);
		enc->SetElementID(m_organfile->GetRecorderElementID(wxString::Format(wxT("SM%d"), i)));
		windchest->AddEnclosure(enc);

		enclosure = new GOGUIEnclosure(panel, enc);
		enclosure->Init(cfg, wxString::Format(wxT("SetterMaster%03d"), i + 1));
		panel->AddControl(enclosure);
	}

	return panel;
}
예제 #4
0
GOGUIPanel* GOGUISequencerPanel::CreateSequencerPanel(GOrgueConfigReader& cfg)
{
	GOGUIButton* button;

	GOGUIPanel* panel = new GOGUIPanel(m_organfile);
	GOGUIDisplayMetrics* metrics = new GOGUISetterDisplayMetrics(cfg, m_organfile, GOGUI_SETTER_SETTER);
	panel->Init(cfg, metrics, _("Combination Setter"), wxT("SetterPanel"));

	GOGUIHW1Background* back = new GOGUIHW1Background(panel);
	back->Init(cfg, wxT("Setter"));
	panel->AddControl(back);

	GOGUILabel* PosDisplay=new GOGUILabel(panel, m_organfile->GetLabel(wxT("Label")));
	PosDisplay->Init(cfg, wxT("SetterCurrentPosition"), 350, 10);
	panel->AddControl(PosDisplay);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Current")), false);
	button->Init(cfg, wxT("SetterCurrent"), 1, 100);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("M100")), false);
	button->Init(cfg, wxT("SetterM100"), 2, 100);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("M10")), false);
	button->Init(cfg, wxT("SetterM10"), 3, 100);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("M1")), false);
	button->Init(cfg, wxT("SetterM1"), 4, 100);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Prev")), false);
	button->Init(cfg, wxT("SetterPrev"), 5, 100);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Next")), false);
	button->Init(cfg, wxT("SetterNext"), 6, 100);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("P1")), false);
	button->Init(cfg, wxT("SetterP1"), 7, 100);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("P10")), false);
	button->Init(cfg, wxT("SetterP10"), 8, 100);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("P100")), false);
	button->Init(cfg, wxT("SetterP100"), 9, 100);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Home")), false);
	button->Init(cfg, wxT("SetterHome"), 10, 100);
	panel->AddControl(button);

	for(unsigned i = 0; i < 10; i++)
	{
		button = new GOGUIButton(panel, m_organfile->GetButton(wxString::Format(wxT("L%d"), i)), false);
		button->Init(cfg, wxString::Format(wxT("SetterL%d"), i), i + 1, 101);
		panel->AddControl(button);
	}

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Set")), false);
	button->Init(cfg, wxT("SetterSet"), 1, 102);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Regular")), false);
	button->Init(cfg, wxT("SetterRegular"), 3, 102);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Scope")), false);
	button->Init(cfg, wxT("SetterScope"), 4, 102);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Scoped")), false);
	button->Init(cfg, wxT("SetterScoped"), 5, 102);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Full")), false);
	button->Init(cfg, wxT("SetterFull"), 7, 102);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("GC")), false);
	button->Init(cfg, wxT("SetterGC"), 8, 102);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Insert")), false);
	button->Init(cfg, wxT("SetterInsert"), 9, 102);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("Delete")), false);
	button->Init(cfg, wxT("SetterDelete"), 10, 102);
	panel->AddControl(button);

	return panel;
}
예제 #5
0
GOGUIPanel* GOGUIRecorderPanel::CreateRecorderPanel(GOrgueConfigReader& cfg)
{
	GOGUIButton* button;

	GOGUIPanel* panel = new GOGUIPanel(m_organfile);
	GOGUIDisplayMetrics* metrics = new GOGUISetterDisplayMetrics(cfg, m_organfile, GOGUI_RECORDER);
	panel->Init(cfg, metrics, _("Recorder / Player"), wxT("Recorder"), wxT(""));

	GOGUIHW1Background* back = new GOGUIHW1Background(panel);
	back->Init(cfg, wxT("Recorder"));
	panel->AddControl(back);

	GOGUILabel* label=new GOGUILabel(panel, NULL);
	label->Init(cfg, wxT("MidiRecorderNameLabel"), 1, 45, _("Audio Recorder"));
	panel->AddControl(label);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("AudioRecorderRecord")), false);
	button->Init(cfg, wxT("MidiRecorderRecord"), 2, 100);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("AudioRecorderStop")), false);
	button->Init(cfg, wxT("MidiRecorderStop"), 3, 100);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("AudioRecorderRecordRename")), false);
	button->Init(cfg, wxT("MidiRecorderRecordRename"), 4, 100);
	panel->AddControl(button);

	label=new GOGUILabel(panel, m_organfile->GetLabel(wxT("AudioRecorderLabel")));
	label->Init(cfg, wxT("MidiRecorderLabel"), 310, 45, wxT(""));
	panel->AddControl(label);

	label=new GOGUILabel(panel, NULL);
	label->Init(cfg, wxT("MidiRecorderNameLabel"), 1, 115, _("MIDI Recorder"));
	panel->AddControl(label);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("MidiRecorderRecord")), false);
	button->Init(cfg, wxT("MidiRecorderRecord"), 2, 101);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("MidiRecorderStop")), false);
	button->Init(cfg, wxT("MidiRecorderStop"), 3, 101);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("MidiRecorderRecordRename")), false);
	button->Init(cfg, wxT("MidiRecorderRecordRename"), 4, 101);
	panel->AddControl(button);

	label=new GOGUILabel(panel, m_organfile->GetLabel(wxT("MidiRecorderLabel")));
	label->Init(cfg, wxT("MidiRecorderLabel"), 310, 115, wxT(""));
	panel->AddControl(label);

	label=new GOGUILabel(panel, NULL);
	label->Init(cfg, wxT("MidiRecorderNameLabel"), 1, 185, _("MIDI Player"));
	panel->AddControl(label);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("MidiPlayerPlay")), false);
	button->Init(cfg, wxT("MidiPlayerPlay"), 2, 102);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("MidiPlayerStop")), false);
	button->Init(cfg, wxT("MidiPlayerStop"), 3, 102);
	panel->AddControl(button);

	button = new GOGUIButton(panel, m_organfile->GetButton(wxT("MidiPlayerPause")), false);
	button->Init(cfg, wxT("MidiPlayerPause"), 4, 102);
	panel->AddControl(button);

	label=new GOGUILabel(panel, m_organfile->GetLabel(wxT("MidiPlayerLabel")));
	label->Init(cfg, wxT("MidiPlayerLabel"), 310, 185, wxT(""));
	panel->AddControl(label);

	return panel;
}